POST
/
api
/
vendor-credits

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
vendorId
number
required

The id of the vendor

Example:

1

exchangeRate
number
required

The exchange rate of the vendor credit

Example:

1

vendorCreditNumber
string
required

The vendor credit number

Example:

"123456"

referenceNo
string
required

The reference number of the vendor credit

Example:

"123456"

vendorCreditDate
string
required

The date of the vendor credit

Example:

"2021-01-01"

note
string
required

The note of the vendor credit

Example:

"123456"

open
boolean
required

The open status of the vendor credit

Example:

true

warehouseId
number
required

The warehouse id of the vendor credit

Example:

1

branchId
number
required

The branch id of the vendor credit

Example:

1

entries
string[]
required

The entries of the vendor credit

Example:
[
{
"itemId": 1,
"quantity": 1,
"unitPrice": 1,
"discount": 1,
"discountType": "percentage",
"accountId": 1,
"amount": 1
}
]
attachments
string[]
required

The attachments of the vendor credit

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

The discount of the vendor credit

Example:

1

discountType
string
required

The discount type of the vendor credit

Example:

"percentage"

adjustment
number
required

The adjustment of the vendor credit

Example:

1