Skip to main content
PUT
/
api
/
vendor-credits
/
{id}
Edit the given vendor credit.
curl --request PUT \
  --url https://api.example.com/api/vendor-credits/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "vendorId": 1,
  "exchangeRate": 1,
  "vendorCreditNumber": "123456",
  "referenceNo": "123456",
  "vendorCreditDate": "2021-01-01",
  "note": "123456",
  "open": true,
  "warehouseId": 1,
  "branchId": 1,
  "entries": [
    {
      "itemId": 1,
      "quantity": 1,
      "unitPrice": 1,
      "discount": 1,
      "discountType": "percentage",
      "accountId": 1,
      "amount": 1
    }
  ],
  "attachments": [
    {
      "key": "123456"
    }
  ],
  "discount": 1,
  "discountType": "percentage",
  "adjustment": 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

id
number
required

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

Response

200 - undefined