Skip to main content
POST
/
api
/
vendor-credits
/
{vendorCreditId}
/
refund
Create a refund for the given vendor credit.
curl --request POST \
  --url https://api.example.com/api/vendor-credits/{vendorCreditId}/refund \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "amount": 100,
  "exchangeRate": 1,
  "depositAccountId": 1,
  "description": "Refund for vendor credit",
  "date": "2021-01-01",
  "branchId": 1
}
'

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
string
required

Body

application/json
amount
number
required

The amount of the refund

Example:

100

exchangeRate
number
required

The exchange rate of the refund

Example:

1

depositAccountId
number
required

The id of the deposit account

Example:

1

description
string
required

The description of the refund

Example:

"Refund for vendor credit"

date
string<date-time>
required

The date of the refund

Example:

"2021-01-01"

branchId
number
required

The id of the branch

Example:

1

Response

201 - undefined