Purchase Payment

The purchase payment resource.

Basehttps://rest.carbon.ms/purchasePayment
GET/purchasePayment

List purchase payments

Retrieve a paginated list of purchase payments. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows 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/purchasePayment

Retrieve a purchase payment

Fetch a single purchase payment by filtering on `id`.

Query parameters

idstring

Match 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/purchasePayment

Create a purchase payment

Create a new purchase payment.

Body parameters

paymentIdstringrequired
supplierIdstringrequired

References supplier.id

paymentDatedate
currencyCodestringrequired

References currencyCode.code

exchangeRatenumberrequired
totalAmountnumberrequired
companyIdstringrequired

References company.id

customFieldsobject
POSThttps://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/purchasePayment

Update a purchase payment

Update an existing purchase payment, matched on `id`.

Body parameters

paymentIdstringrequired
supplierIdstringrequired

References supplier.id

paymentDatedate
currencyCodestringrequired

References currencyCode.code

exchangeRatenumberrequired
totalAmountnumberrequired
companyIdstringrequired

References company.id

customFieldsobject
PATCHhttps://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/purchasePayment

Delete a purchase payment

Delete a purchase payment, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `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