Skip to main content
POST
/
invoices
Create invoices
curl --request POST \
  --url https://api.getenso.ai/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contractPlanId": "<string>",
  "invoiceData": {
    "date": "2023-10-01",
    "fromDate": "2023-10-01",
    "toDate": "2023-10-31"
  },
  "invoiceItems": [
    {
      "title": "Item Title",
      "description": "Item description",
      "quantity": 1,
      "price": 100,
      "fromDate": "2023-10-01",
      "toDate": "2023-10-31"
    }
  ]
}
'
{
  "status": "error",
  "message": "Forbidden",
  "errors": [
    {}
  ]
}
SystemUser permission: InvoiceService:createInvoice

Authorizations

Authorization
string
header
required

JWT bearer token obtained from POST /auth/system-login using your client credentials.

Body

application/json

Invoice data that needs to be created

contractPlanId
string

ID of the contract plan associated with the invoice

invoiceData
object

Data for the invoice

invoiceItems
object[]

List of items in the invoice

Response

Bad request — validation error

status
string
Example:

"error"

message
string
Example:

"Forbidden"

errors
object[]