Purchase Payment
The purchase payment resource.
Basehttps://rest.carbon.ms/purchasePayment
GET
/purchasePaymentList purchase payments
Retrieve a paginated list of purchase payments. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
GEThttps://rest.carbon.ms/purchasePayment
curl --request GET \
--url 'https://rest.carbon.ms/purchasePayment?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"paymentId": "xyz789",
"supplierId": "xyz789",
"currencyCode": "string",
"exchangeRate": 0,
"totalAmount": 0,
"companyId": "xyz789",
"createdBy": "string"
}
]GET
/purchasePaymentRetrieve a purchase payment
Fetch a single purchase payment by filtering on `id`.
Query parameters
idstringMatch on the purchase payment's `id`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/purchasePayment
curl --request GET \
--url 'https://rest.carbon.ms/purchasePayment?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"paymentId": "xyz789",
"supplierId": "xyz789",
"currencyCode": "string",
"exchangeRate": 0,
"totalAmount": 0,
"companyId": "xyz789",
"createdBy": "string"
}POST
/purchasePaymentCreate a purchase payment
Create a new purchase payment.
Body parameters
paymentIdstringrequiredsupplierIdstringrequiredReferences supplier.id
paymentDatedatecurrencyCodestringrequiredReferences currencyCode.code
exchangeRatenumberrequiredtotalAmountnumberrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectPOSThttps://rest.carbon.ms/purchasePayment
curl --request POST \
--url https://rest.carbon.ms/purchasePayment \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"paymentId":"xyz789","supplierId":"xyz789","currencyCode":"string","exchangeRate":0,"totalAmount":0,"companyId":"xyz789"}'Response
{
"id": "abc123def456",
"paymentId": "xyz789",
"supplierId": "xyz789",
"currencyCode": "string",
"exchangeRate": 0,
"totalAmount": 0,
"companyId": "xyz789",
"createdBy": "string"
}PATCH
/purchasePaymentUpdate a purchase payment
Update an existing purchase payment, matched on `id`.
Body parameters
paymentIdstringrequiredsupplierIdstringrequiredReferences supplier.id
paymentDatedatecurrencyCodestringrequiredReferences currencyCode.code
exchangeRatenumberrequiredtotalAmountnumberrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectPATCHhttps://rest.carbon.ms/purchasePayment
curl --request PATCH \
--url 'https://rest.carbon.ms/purchasePayment?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"paymentId":"xyz789"}'Response
{
"id": "abc123def456",
"paymentId": "xyz789",
"supplierId": "xyz789",
"currencyCode": "string",
"exchangeRate": 0,
"totalAmount": 0,
"companyId": "xyz789",
"createdBy": "string"
}DELETE
/purchasePaymentDelete a purchase payment
Delete a purchase payment, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the purchase payment to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/purchasePayment
curl --request DELETE \
--url 'https://rest.carbon.ms/purchasePayment?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content