API reference
Expenses API
3 operations for expenses. Each one names the scope your API key needs.
Scopes used here: expenses.claim.approve , expenses.claim.submit
List an employee's expense claims
GET /expense-claims
Scope: expenses.claim.approve
Parameters
| Name | In | Description |
|---|---|---|
employeeId required | query | Whose claims to list. |
cursor | query | Opaque cursor from a previous response's nextCursor. |
limit | query | Page size, 1-200. Defaults to 50. |
Response 200
| Field | Type | Notes |
|---|---|---|
data | array of object required | |
data[].id | string (uuid) required | |
data[].employeeId | string (uuid) required | |
data[].status | string required | |
data[].totalPaise | integer required | |
nextCursor | string, nullable required | Opaque. Pass back as ?cursor= for the next page; null on the last page. |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/expense-claims' \
-H 'Authorization: Bearer YOUR_API_KEY' Create a draft expense claim
POST /expense-claims
Scope: expenses.claim.submit
Headers: Idempotency-Key
(see idempotency)
Request body
| Field | Type | Notes |
|---|---|---|
employeeId | string (uuid) required | |
travelRequestId | string (uuid), nullable | |
lines | array of object required | |
lines[].gstGstin | string, nullable | |
lines[].gstInvoiceNo | string, nullable | |
lines[].gstTaxableValuePaise | integer, nullable | |
lines[].gstCgstPaise | integer, nullable | |
lines[].gstSgstPaise | integer, nullable | |
lines[].gstIgstPaise | integer, nullable | |
lines[].expenseTypeId | string (uuid) required | |
lines[].amountPaise | integer required | |
lines[].description | string | |
lines[].billDocumentId | string (uuid), nullable |
Response 201
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
employeeId | string (uuid) required | |
status | string required | |
totalPaise | integer required |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s -X POST 'https://<your-company>.<app-domain>/api/v1/expense-claims' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: <a unique value>' \
--data '{ … }' Fetch one expense claim with its lines
GET /expense-claims/{id}
Scope: expenses.claim.approve
Parameters
| Name | In | Description |
|---|---|---|
id required | path |
Response 200
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
employeeId | string (uuid) required | |
status | string required | |
totalPaise | integer required |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/expense-claims/<id>' \
-H 'Authorization: Bearer YOUR_API_KEY'