Aller au contenu
Sur cette page

Expense

Expense tracking, approval workflow, and invoice linking

Display a listing of expenses

GET /api/v1/expenses

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
category query string non
date_from query string non
date_to query string non
per_page query string non

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X GET "https://app.encryptinvoice.com/api/v1/expenses" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Store a newly created expense

POST /api/v1/expenses

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Corps de la requête

Champ Type Requis Description
expense_date string oui
category string oui
amount number oui
currency string oui
country string non
is_vat_deductible boolean non
vat_deductible_percentage number non
tax_amount number non
description string oui
vendor string non
payment_method string non
reference string non
receipt_path string non Storage path of a previously-uploaded receipt to associate with this expense (e.g. the receipt_path returned by POST /api/v1/expenses/upload-receipt or the legacy /api/v1/invoicing/expenses/upload-receipt).
is_billable boolean non
notes string non
status string non
tax_rates array non

Réponses

Statut Description
201 For non-paginated data, return as before
422
403

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "expense_date": "string",
    "category": "string",
    "amount": 1,
    "currency": "string",
    "country": "string",
    "is_vat_deductible": true,
    "vat_deductible_percentage": 1,
    "tax_amount": 1,
    "description": "string",
    "vendor": "string",
    "payment_method": "string",
    "reference": "string",
    "receipt_path": "string",
    "is_billable": true,
    "notes": "string",
    "status": "string",
    "tax_rates": []
}'

Display the specified expense

GET /api/v1/expenses/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X GET "https://app.encryptinvoice.com/api/v1/expenses/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Update the specified expense

PUT /api/v1/expenses/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
expense_date string non
category string non
amount number non
currency string non
country string non
is_vat_deductible boolean non
vat_deductible_percentage number non
tax_amount number non
description string non
vendor string non
payment_method string non
reference string non
receipt_path string non Storage path of a previously-uploaded receipt to associate with this expense.
is_billable boolean non
notes string non
status string non
tax_rates array non

Réponses

Statut Description
200 For non-paginated data, return as before
422
403

Exemple de requête

curl -X PUT "https://app.encryptinvoice.com/api/v1/expenses/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "expense_date": "string",
    "category": "string",
    "amount": 1,
    "currency": "string",
    "country": "string",
    "is_vat_deductible": true,
    "vat_deductible_percentage": 1,
    "tax_amount": 1,
    "description": "string",
    "vendor": "string",
    "payment_method": "string",
    "reference": "string",
    "receipt_path": "string",
    "is_billable": true,
    "notes": "string",
    "status": "string",
    "tax_rates": []
}'

Remove the specified expense

DELETE /api/v1/expenses/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X DELETE "https://app.encryptinvoice.com/api/v1/expenses/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Convert expense to invoice line item

POST /api/v1/expenses/{id}/convert-to-invoice-item

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
invoice_id integer oui
markup_percentage number non

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses/{id}/convert-to-invoice-item" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": 1,
    "markup_percentage": 1
}'

Duplicate an expense

POST /api/v1/expenses/{id}/duplicate

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
201 For non-paginated data, return as before

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses/{id}/duplicate" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"
POST /api/v1/expenses/{id}/link-to-invoice

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
invoice_id integer oui

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses/{id}/link-to-invoice" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": 1
}'

Mark expense as billable

POST /api/v1/expenses/{id}/mark-billable

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses/{id}/mark-billable" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Mark expense as paid/reimbursed

POST /api/v1/expenses/{id}/mark-paid

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
paid_at string non
payment_method string non
payment_reference string non

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/expenses/{id}/mark-paid" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "paid_at": "string",
    "payment_method": "string",
    "payment_reference": "string"
}'

Nous utilisons des cookies et des analyses respectueuses de la vie privée

Nous utilisons des cookies essentiels pour l'authentification et des analyses respectueuses de la vie privée (auto-hébergées, respectent Do Not Track). Aucun suivi publicitaire ou tiers. En savoir plus dans notre Politique de confidentialité