Skip to main content
POST
Issue a sale

Authorizations

x-api-key
string
header
required

Your API key, for example cmp_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx. Create one on the Integrations page of the compliance dashboard.

Headers

Idempotency-Key
string

A unique value you choose for this document, 8 to 128 characters: letters, digits and . _ : -. Repeating the request with the same key returns the original result instead of filing a second document. Strongly recommended.

Required string length: 8 - 128
Pattern: ^[A-Za-z0-9._:-]+$

Body

application/json
traderInvoiceNumber
string
required

Your own number for this sale. Unique per business.

Maximum string length: 50
saleDate
string<date>
required

As YYYY-MM-DD.

lines
object[]
required
Required array length: 1 - 200 elements
customer
object

The buyer. Optional.

paymentTypeCode
string
default:01

A KRA payment type code. See Codes & Values.

Maximum string length: 2
branchId
string

Defaults to the business's first branch.

callbackUrl
string

Where to send the result. An absolute https URL on a public host, with no credentials in it. See Result callbacks.

Maximum string length: 2048
businessId
string

The business to act for. Required for organisation-wide keys; omit it for a business-bound key. List the ids you can use with GET /v1/businesses.

Response

A repeat of an earlier request. The original sale is returned and nothing is filed again.

data
object
required