Skip to main content
PUT
/
invoices
/
{id}
curl --request PUT \
--url https://api.getenso.ai/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "cancelled",
"comments": "Reason for cancellation"
}'
{
  "status": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>",
    "number": "<string>",
    "date": "2023-11-07T05:31:56Z",
    "fromDate": "2023-11-07T05:31:56Z",
    "toDate": "2023-11-07T05:31:56Z",
    "status": "<string>",
    "data": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "OrganisationId": "<string>",
    "ContractPlanId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the invoice to update

Body

application/json

Status update for the invoice

status
enum<string>
required

New status for the invoice

Available options:
cancelled,
paid
comments
string

Reason for cancellation or additional comments

dateOfPayment
string<date-time>

Date when the invoice was paid (required if status is 'paid')

Response

Invoice status updated successfully

status
string

Status of the response

message
string

Success message

data
object

The updated invoice object

I