For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
      • GETSearch entities
      • POSTCreate entity
      • GETGet entity
      • POSTUpdate entity
      • DELDelete entity
      • POSTAccept Terms of Service
      • POSTInitiate KYB
      • POSTGenerate JWT Token
      • GETGenerate Onboarding Link
      • POSTSend Onboarding Email
      • GETEvents
        • GETFind payee counterparties
        • GETFind payor counterparties
        • POSTLink Payees
        • POSTHide Payee
        • POSTLink Payors
        • POSTHide Payors
          • GETGet All
          • GETGet
          • POSTCreate
          • DELDelete
          • GETEstimate Vendor Credit Usage
Logo
Sign inBook a demo
API ReferenceEntityCounterpartyVendor Credit

Create

POST
https://api.mercoa.com/entity/:entityId/counterparty/:counterpartyId/vendor-credit
POST
/entity/:entityId/counterparty/:counterpartyId/vendor-credit
$curl -X POST https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "totalAmount": 100,
> "currency": "USD",
> "note": "This is a note"
>}'
1{
2 "id": "vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7",
3 "vendorId": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
4 "payerId": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
5 "createdAt": "2021-01-01T00:00:00Z",
6 "updatedAt": "2021-01-01T00:00:00Z",
7 "memoNumber": "123456",
8 "totalAmount": 100,
9 "remainingAmount": 100,
10 "currency": "USD",
11 "creatorEntityId": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
12 "note": "This is a note",
13 "invoiceIds": [
14 "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9"
15 ]
16}
Was this page helpful?
Previous

Delete

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

entityIdstringRequired
Entity ID or Entity ForeignID
counterpartyIdstringRequired
Counterparty Entity ID or Counterparty Entity ForeignID

Request

This endpoint expects an object.
totalAmountdoubleRequired
Total amount of the vendor credit in major units
currencyenumRequired
Currency code for the amount. Defaults to USD.
memoNumberstringOptional
Memo number for the vendor credit
notestringOptional
An optional note to attach to the vendor credit

Response

This endpoint returns an object.
idstring
vendorIdstring
ID of the vendor the vendor credit may be used for
payerIdstring
ID of the payer who may use the vendor credit
createdAtdatetime
updatedAtdatetime
memoNumberstring
Memo number for the vendor credit
totalAmountdouble
Total issued amount of the vendor credit in major units
remainingAmountdouble
Remaining usable amount in the vendor credit in major units
currencyenum
Currency code for the amount. Defaults to USD.
creatorEntityIdstring
ID of the entity that created this vendor credit
notestring
An optional note to attach to the vendor credit
invoiceIdslist of strings
The IDs of the invoices that this vendor credit has been applied to

Errors

400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
409
Conflict
500
Internal Server Error
501
Unimplemented