Skip to main content
POST
Create a bill

Authorizations

X-API-Key
string
header
required

Your application's API key (sk_development_… or sk_production_…). An optional X-Signature / X-Timestamp HMAC pair may additionally be sent for stronger security — see Authentication.

Path Parameters

connectionId
string<uuid>
required

The connection to the accounting system to write through.

Query Parameters

awaitSync
boolean

Wait for the ERP write to complete before responding, instead of just queuing it.

Body

application/json
supplierRef
object
required
issueDate
string<date>
required
currency
string
required
subTotal
number
required

Decimal amount in the document's currency.

taxAmount
number
required

Decimal amount in the document's currency.

totalAmount
number
required

Decimal amount in the document's currency.

lineItems
object[]
required
status
enum<string>
required
Available options:
Unknown,
Open,
PartiallyPaid,
Paid,
Void,
Draft
billCode
string
reference
string
purchaseOrderRefs
object[]
dueDate
string<date>
currencyRate
number
Required range: x >= 0.0001
amountDue
number

Decimal amount in the document's currency.

note
string
withholdingTax
object[]

Response

Created

supplierRef
object
required
issueDate
string<date>
required
currency
string
required
subTotal
number
required

Decimal amount in the document's currency.

taxAmount
number
required

Decimal amount in the document's currency.

totalAmount
number
required

Decimal amount in the document's currency.

lineItems
object[]
required
status
enum<string>
required
Available options:
Unknown,
Open,
PartiallyPaid,
Paid,
Void,
Draft
billCode
string
reference
string
purchaseOrderRefs
object[]
dueDate
string<date>
currencyRate
number
Required range: x >= 0.0001
amountDue
number

Decimal amount in the document's currency.

note
string
withholdingTax
object[]
id
string
connectionId
string
syncStatus
enum<string>
Available options:
pending,
syncing,
synced,
failed
createdAt
string<date-time>
updatedAt
string<date-time>