Skip to main content

purchaseOrdersCount

Requires at least one of the permissions purchase:grn:create, purchase:purchase_order:list or purchase:purchase_order:read.

Returns how many purchase orders match the filters, without loading them. Needs the purchase order read or list permission (or GRN create) and the purchase orders feature on your plan.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query PurchaseOrdersCount {
purchaseOrdersCount
}

Response:

{
"data": {
"purchaseOrdersCount": 0
}
}
purchaseOrdersCount(
filters: PurchaseOrderFiltersInput
): Int!

Arguments​

purchaseOrdersCount.filters ● PurchaseOrderFiltersInput input​

Filter criteria for purchase order records. Omit to match all.

Type​

Int scalar​

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.