Skip to content

Purchase Invoice Line

The purchase invoice line resource.

Base/purchaseInvoiceLine
GET/purchaseInvoiceLine

List purchase invoice lines

Retrieve a paginated list of purchase invoice lines. 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.

GET/purchaseInvoiceLine
curl --request GET \
  --url '<your-host>/purchaseInvoiceLine?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "invoiceId": "xyz789",
    "invoiceLineType": "string",
    "quantity": 10,
    "supplierUnitPrice": 0,
    "exchangeRate": 0,
    "companyId": "xyz789",
    "createdBy": "string"
  }
]
GET/purchaseInvoiceLine

Retrieve a purchase invoice line

Fetch a single purchase invoice line by filtering on `id`.

Query parameters

idstring

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

GET/purchaseInvoiceLine
curl --request GET \
  --url '<your-host>/purchaseInvoiceLine?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "invoiceId": "xyz789",
  "invoiceLineType": "string",
  "quantity": 10,
  "supplierUnitPrice": 0,
  "exchangeRate": 0,
  "companyId": "xyz789",
  "createdBy": "string"
}
POST/purchaseInvoiceLine

Create a purchase invoice line

Create a new purchase invoice line.

Body parameters

invoiceIdstringrequired
invoiceLineTypepayableLineTyperequired
purchaseOrderIdstring

References purchaseOrder.id

purchaseOrderLineIdstring

References purchaseOrderLine.id

itemIdstring

References item.id

serviceIdstring
locationIdstring

References location.id

storageUnitIdstring

References storageUnit.id

assetIdstring
descriptionstring
quantitynumberrequired
supplierUnitPricenumberrequired
exchangeRatenumberrequired
inventoryUnitOfMeasureCodestring
purchaseUnitOfMeasureCodestring
companyIdstringrequired

References company.id

customFieldsobject
conversionFactornumber
tagsarray
internalNotesobject
supplierShippingCostnumberrequired
supplierTaxAmountnumberrequired
supplierExtendedPricenumber
taxPercentnumber
jobOperationIdstring

References jobOperation.id

accountIdstring

References account.id

costCenterIdstring

References costCenter.id

requiredDatedate
ownerIdstring

References user.id

sortOrdernumberrequired
unitPricenumber
extendedPricenumber
shippingCostnumber
taxAmountnumber
totalAmountnumber
projectIdstring
POST/purchaseInvoiceLine
curl --request POST \
  --url <your-host>/purchaseInvoiceLine \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"invoiceId":"xyz789","invoiceLineType":"string","description":"string","quantity":10,"supplierUnitPrice":0,"exchangeRate":0,"companyId":"xyz789","supplierShippingCost":0,"supplierTaxAmount":0,"sortOrder":0}'
Response
{
  "id": "abc123def456",
  "invoiceId": "xyz789",
  "invoiceLineType": "string",
  "quantity": 10,
  "supplierUnitPrice": 0,
  "exchangeRate": 0,
  "companyId": "xyz789",
  "createdBy": "string"
}
PATCH/purchaseInvoiceLine

Update a purchase invoice line

Update an existing purchase invoice line, matched on `id`.

Body parameters

invoiceIdstringrequired
invoiceLineTypepayableLineTyperequired
purchaseOrderIdstring

References purchaseOrder.id

purchaseOrderLineIdstring

References purchaseOrderLine.id

itemIdstring

References item.id

serviceIdstring
locationIdstring

References location.id

storageUnitIdstring

References storageUnit.id

assetIdstring
descriptionstring
quantitynumberrequired
supplierUnitPricenumberrequired
exchangeRatenumberrequired
inventoryUnitOfMeasureCodestring
purchaseUnitOfMeasureCodestring
companyIdstringrequired

References company.id

customFieldsobject
conversionFactornumber
tagsarray
internalNotesobject
supplierShippingCostnumberrequired
supplierTaxAmountnumberrequired
supplierExtendedPricenumber
taxPercentnumber
jobOperationIdstring

References jobOperation.id

accountIdstring

References account.id

costCenterIdstring

References costCenter.id

requiredDatedate
ownerIdstring

References user.id

sortOrdernumberrequired
unitPricenumber
extendedPricenumber
shippingCostnumber
taxAmountnumber
totalAmountnumber
projectIdstring
PATCH/purchaseInvoiceLine
curl --request PATCH \
  --url '<your-host>/purchaseInvoiceLine?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",
  "invoiceLineType": "string",
  "quantity": 10,
  "supplierUnitPrice": 0,
  "exchangeRate": 0,
  "companyId": "xyz789",
  "createdBy": "string"
}
DELETE/purchaseInvoiceLine

Delete a purchase invoice line

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

Query parameters

idstring

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

DELETE/purchaseInvoiceLine
curl --request DELETE \
  --url '<your-host>/purchaseInvoiceLine?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content