Skip to main content
POST
/
api
/
v1
/
invoices
Create invoice
curl --request POST \
  --url https://api.contracting.kukkingu.software/api/v1/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'tenant-id: <tenant-id>' \
  --data '
{
  "contractId": "ctr_z23aoo8naxk68ewcr64tchh5",
  "invoiceNumber": "INV-2025-0001",
  "exchangeRate": 1.12,
  "currencyCode": "EUR",
  "amountMinor": 5000,
  "issuedAt": "2023-10-05T14:48:00.000Z",
  "dueAt": "2023-10-05T14:48:00.000Z",
  "paidAt": "2023-10-05T14:48:00.000Z"
}
'
{
  "data": {
    "id": "<string>",
    "contract": "ctr_z23aoo8naxk68ewcr64tchh5",
    "status": "FINALIZED",
    "invoiceNumber": "INV-2025-0001",
    "exchangeRate": 1.12,
    "currencyCode": "EUR",
    "amountMinor": 5000,
    "createdAt": "2023-10-05T14:48:00.000Z",
    "updatedAt": "2023-10-05T14:48:00.000Z",
    "issuedAt": "2023-10-05T14:48:00.000Z",
    "dueAt": "2023-10-05T14:48:00.000Z",
    "paidAt": "2023-10-05T14:48:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

tenant-id
string
required

Specifies the tenant context for the request. All endpoints operate within this tenant scope.

Example:

"tnt_pfh0haxfpzowht3oi213cqos"

Body

application/json

Request body used to create an invoice resource.

Request body used to create an invoice resource.

contractId
string
required

The ID of the contract.

Example:

"ctr_z23aoo8naxk68ewcr64tchh5"

invoiceNumber
string
required

Unique invoice number.

Required string length: 1 - 255
Example:

"INV-2025-0001"

exchangeRate
number
required

Exchange rate applied when currency conversion is needed.

Required range: x >= 0
Example:

1.12

currencyCode
string
required

ISO 4217 currency code.

Required string length: 3
Example:

"EUR"

amountMinor
integer
required

Amount expressed in the minor unit (e.g., cents).

Required range: 0 <= x <= 9007199254740991
Example:

5000

issuedAt
string<date-time> | null

When the invoice was issued.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2023-10-05T14:48:00.000Z"

dueAt
string<date-time> | null

When the invoice is due.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2023-10-05T14:48:00.000Z"

paidAt
string<date-time> | null

When the invoice was paid.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2023-10-05T14:48:00.000Z"

Response

Default Response

Standard success response payload wrapped in a data property.

data
object
required

Invoice resource returned by the API.