Skip to content

Expense

Expense tracking, approval workflow, and invoice linking

Display a listing of expenses

GET /api/v1/expenses

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
category query string no
date_from query string no
date_to query string no
per_page query string no

Responses

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

Example request

curl -X GET "https://kworia.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

Requires authentication (Bearer token) and the X-Organization-Id header.

Request body

Field Type Required Description
expense_date string yes
category string yes
amount number yes
currency string yes
country string no
is_vat_deductible boolean no
vat_deductible_percentage number no
tax_amount number no
description string yes
vendor string no
payment_method string no
reference string no
receipt_path string no 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 no
notes string no
status string no
tax_rates array no

Responses

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

Example request

curl -X POST "https://kworia.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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

curl -X GET "https://kworia.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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

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

Responses

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

Example request

curl -X PUT "https://kworia.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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

curl -X DELETE "https://kworia.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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

Field Type Required Description
invoice_id integer yes
markup_percentage number no

Responses

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

Example request

curl -X POST "https://kworia.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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

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

Link expense to invoice (for billable expenses)

POST /api/v1/expenses/{id}/link-to-invoice

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

Field Type Required Description
invoice_id integer yes

Responses

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

Example request

curl -X POST "https://kworia.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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

curl -X POST "https://kworia.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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

Field Type Required Description
paid_at string no
payment_method string no
payment_reference string no

Responses

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

Example request

curl -X POST "https://kworia.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"
}'

We use cookies and privacy-respecting analytics

We use essential cookies for authentication and privacy-respecting analytics (self-hosted, respects Do Not Track). No advertising or third-party tracking. Learn more in our Privacy Policy