POST
/
api
/
sale-receipts

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Body

application/json
customerId
number
required

The id of the customer

Example:

1

exchangeRate
number
required

The exchange rate of the sale receipt

Example:

1

depositAccountId
number
required

The id of the deposit account

Example:

1

receiptDate
string<date-time>
required

The date of the sale receipt

Example:

"2021-01-01"

receiptNumber
string
required

The receipt number of the sale receipt

Example:

"123456"

referenceNo
string
required

The reference number of the sale receipt

Example:

"123456"

closed
boolean
required

Whether the sale receipt is closed

Example:

false

warehouseId
number
required

The id of the warehouse

Example:

1

branchId
number
required

The id of the branch

Example:

1

entries
string[]
required

The entries of the sale receipt

Example:
[{ "key": "123456" }]
receiptMessage
string
required

The receipt message of the sale receipt

Example:

"123456"

statement
string
required

The statement of the sale receipt

Example:

"123456"

attachments
string[]
required

The attachments of the sale receipt

Example:
[{ "key": "123456" }]
pdfTemplateId
number
required

The id of the pdf template

Example:

1

discount
number
required

The discount of the sale receipt

Example:

1

discountType
string
required

The discount type of the sale receipt

Example:

"percentage"

adjustment
number
required

The adjustment of the sale receipt

Example:

1