Purchase Invoice Price Change

The purchase invoice price change resource.

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

List purchase invoice price changes

Retrieve a paginated list of purchase invoice price changes. 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/purchaseInvoicePriceChange
curl --request GET \
  --url 'https://rest.carbon.ms/purchaseInvoicePriceChange?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "invoiceId": "xyz789",
    "invoiceLineId": "xyz789",
    "previousPrice": 0,
    "newPrice": 0,
    "previousQuantity": 10,
    "newQuantity": 10,
    "updatedBy": "string"
  }
]
GET/purchaseInvoicePriceChange

Retrieve a purchase invoice price change

Fetch a single purchase invoice price change by filtering on `id`.

Query parameters

idstring

Match on the purchase invoice price change's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/purchaseInvoicePriceChange
curl --request GET \
  --url 'https://rest.carbon.ms/purchaseInvoicePriceChange?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "invoiceId": "xyz789",
  "invoiceLineId": "xyz789",
  "previousPrice": 0,
  "newPrice": 0,
  "previousQuantity": 10,
  "newQuantity": 10,
  "updatedBy": "string"
}
POST/purchaseInvoicePriceChange

Create a purchase invoice price change

Create a new purchase invoice price change.

Body parameters

invoiceIdstringrequired

References purchaseInvoice.id

invoiceLineIdstringrequired

References purchaseInvoiceLine.id

previousPricenumberrequired
newPricenumberrequired
previousQuantitynumberrequired
newQuantitynumberrequired
POSThttps://rest.carbon.ms/purchaseInvoicePriceChange
curl --request POST \
  --url https://rest.carbon.ms/purchaseInvoicePriceChange \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"invoiceId":"xyz789","invoiceLineId":"xyz789","previousPrice":0,"newPrice":0,"previousQuantity":10,"newQuantity":10}'
Response
{
  "id": "abc123def456",
  "invoiceId": "xyz789",
  "invoiceLineId": "xyz789",
  "previousPrice": 0,
  "newPrice": 0,
  "previousQuantity": 10,
  "newQuantity": 10,
  "updatedBy": "string"
}
PATCH/purchaseInvoicePriceChange

Update a purchase invoice price change

Update an existing purchase invoice price change, matched on `id`.

Body parameters

invoiceIdstringrequired

References purchaseInvoice.id

invoiceLineIdstringrequired

References purchaseInvoiceLine.id

previousPricenumberrequired
newPricenumberrequired
previousQuantitynumberrequired
newQuantitynumberrequired
PATCHhttps://rest.carbon.ms/purchaseInvoicePriceChange
curl --request PATCH \
  --url 'https://rest.carbon.ms/purchaseInvoicePriceChange?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"invoiceId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "invoiceId": "xyz789",
  "invoiceLineId": "xyz789",
  "previousPrice": 0,
  "newPrice": 0,
  "previousQuantity": 10,
  "newQuantity": 10,
  "updatedBy": "string"
}
DELETE/purchaseInvoicePriceChange

Delete a purchase invoice price change

Delete a purchase invoice price change, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the purchase invoice price change to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/purchaseInvoicePriceChange
curl --request DELETE \
  --url 'https://rest.carbon.ms/purchaseInvoicePriceChange?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content