Purchase Receipts Queries

Access purchase receipts for received goods, including line items and accounting.

PurchaseReceipt — Returns a single purchase receipt by id

query GetPurchaseReceipt($id: ID!) {
  PurchaseReceipt(id: $id) {
    id
    label
    status
    dated_at
    shipping_at
    total_units
    supplier { id label }
    line_items {
      id
      variant { id label }
      quantity
    }
    purchases {
      paginatorInfo { total }
      data { id label }
    }
  }
}

PurchaseReceipts — Returns a paginated list of purchase receipts with sorting and filters

query PurchaseReceipts(
  $where: QueryPurchaseReceiptsWhereWhereConditions,
  $orderBy: [QueryPurchaseReceiptsOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  PurchaseReceipts(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      supplier { id label }
    }
  }
}

Available fields

FieldTypeDescription
idIntUnique identifier.
labelStringPurchase receipt number.
statusPurchaseReceiptStatusCurrent status.
dated_atDateBilling/Document date.
created_atDateTimeCreation time.
shipping_atDateExpected shipment date.
total_unitsFloatTotal quantity.
total_units_aggregateFloatSum of units for filtered receipts.
supplierSupplierLinked supplier.
line_items[LineItemPurchaseReceipt]List of items received.
purchases_countIntNumber of linked purchase orders.
purchases[Purchase]Source purchase orders.
location_labelStringAssigned location label.
integrations[Integration]Linked external platforms.
has_batch_numbersBooleanTrue if items have batch tracking.
tracking_completedBooleanTrue if all tracking info is entered.
stock_allocation_statusStockAllocationStatusStatus of stock commitment.
delivery_statusDeliveryStatusStatus of physical reception.
committed_quantityFloatConfirmed quantity.
uncommitted_quantityFloatAwaiting confirmation.
reserved_quantityFloatReserved quantity.
delivered_quantityFloatPhysically received quantity.
custom_fields[EntityCustomField]Custom fields for this entity.

Filters

The following fields can be used in the where parameter:

id, label, status, total_units, dated_at, created_at, updated_at, shipping_at, supplier_id, committed_quantity, uncommitted_quantity, delivered_quantity, reserved_quantity, purchases_count, variant_id, variant_label, variant_sku, location_id, batch_number_id, has_batch_numbers, tracking_completed, stock_allocation_status, delivery_status.

Example Filters:

FieldExample
id{ "column": "ID", "operator": "EQ", "value": 200050 }
label{ "column": "LABEL", "operator": "LIKE", "value": "%PR-2025%" }
status{ "column": "STATUS", "operator": "EQ", "value": "delivered" }
supplier_id{ "column": "SUPPLIER_ID", "operator": "EQ", "value": 100002 }
variant_id{ "column": "VARIANT_ID", "operator": "EXISTS", "value": 200050 }
variant_sku{ "column": "VARIANT_SKU", "operator": "EQ", "value": "SKU-BLUE" }
location_id{ "column": "LOCATION_ID", "operator": "EXISTS", "value": 100 }
delivery_status{ "column": "DELIVERY_STATUS", "operator": "EQ", "value": "delivered" }
dated_at{ "column": "DATED_AT", "operator": "GTE", "value": "2025-01-01" }

Sorting

You can sort results using the orderBy parameter:

  • id
  • label
  • status
  • dated_at
  • shipping_at
  • total_units
  • created_at
  • supplier_id
  • supplier_label
  • location_label
  • committed_quantity
  • uncommitted_quantity
  • delivered_quantity
  • reserved_quantity

Grouping Options

You can group results for reports:

FieldDescription
idGroup by internal ID.
yearGroup by year of dated_at.
monthGroup by month of dated_at.
dayGroup by day of dated_at.

Enums

PurchaseReceiptStatus

ValueDescription
unpublishedDraft status (no impact).
pendingPublished and awaiting reception.
deliveredDocument confirmed and items received.
cancelledDocument voided.

StockAllocationStatus

ValueDescription
not_allocatedNo stock allocated.
partially_allocatedPart of the stock allocated.
allocatedFull stock allocated.

DeliveryStatus

ValueDescription
not_deliveredNo items received.
partially_deliveredPart of the items received.
deliveredAll items received.