Skip to main content
POST
/
api
/
vendor-credits
/
{vendorCreditId}
/
apply-to-bills
Apply vendor credit to the given bills.
curl --request POST \
  --url https://api.example.com/api/vendor-credits/{vendorCreditId}/apply-to-bills \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "entries": [
    {
      "billId": 1,
      "amount": 100.5
    },
    {
      "billId": 2,
      "amount": 50
    }
  ]
}
'

Headers

Authorization
string
required

Value must be 'Bearer ' where 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.

Path Parameters

vendorCreditId
number
required

Body

application/json
entries
object[]
required

Entries of bill ID and amount to apply

Example:
[
{ "billId": 1, "amount": 100.5 },
{ "billId": 2, "amount": 50 }
]

Response

201 - undefined