EaserixDocs
DevelopersAPI referenceCronCrunchExpenses

Update an expense

Owner-scoped. Omitted fields stay as they are. clientId or projectId of "" clears that link. Sending pricing, amount, quantity, or unitRate recomputes the total from the merged values.

View as Markdown
PATCH
/v1/expenses/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/expenses/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "expense": {    "id": "string",    "clientId": "string",    "clientName": "string",    "projectId": "string",    "projectName": "string",    "projectColor": "string",    "spentOn": "2019-08-24",    "pricing": "amount",    "amount": 0,    "quantity": 0,    "unitRate": 0,    "type": "string",    "billable": true,    "note": "string",    "hasReceipt": true,    "receipt": {      "contentType": "string",      "sizeBytes": 0,      "filename": "string",      "url": "string"    },    "created": "2019-08-24T14:15:22Z"  }}