Commercial documents

Find and read sales and purchase orders, then follow open purchase lines through receiving with exact event and document context.

Commercial documents are sales-order and purchase-order records. They are separate from files attached to a customer, supplier, product, or purchase order.

Endpoints

EndpointScopeReturns
GET /ordersorders:readSales-order summaries narrowed by exact identifiers, status, customer, product, related purchase order, business date, or last update.
GET /orders/{id}orders:readSales-order header, line items, fulfillment progress, stored totals, and line-page coverage.
GET /purchase-orderspurchase-orders:readPurchase-order summaries narrowed by exact identifiers, status, supplier, product, related sales order, due date, or last update.
GET /purchase-orders/{id}purchase-orders:readPurchase-order header, line items, receipt progress, supplier document costs, stored totals, and line-page coverage.
GET /purchase-order-executionpurchase-order-execution:readCurrent open purchase lines with receipt state, comparable quantities, evidence quality, and continuation.
GET /purchase-order-lines/{id}/receipt-eventspurchase-order-execution:readExact receipt events for one visible purchase-order line.
GET /purchase-orders/{id}/documentspurchase-order-execution:readDocuments attached to one visible purchase order.
POST /purchase-orders/{id}/documentspurchase-order-documents:writePreview or attach one document to a visible purchase order.

Use the finder first unless you already have a selected id from search or a previous response.

Access

ScopeWhat it unlocks
orders:readSales-order finder and exact sales-order reads.
purchase-orders:readPurchase-order finder and exact purchase-order reads.
purchase-order-execution:readCurrent open purchase lines, receipt events, and attached purchase-order documents.
purchase-order-documents:writeReadiness checks and document association for a visible purchase order.

The sales- and purchase-order read scopes also follow the acting user's current ShelfCycle order permissions.

The execution and document scopes also follow the acting user's current purchase-order permissions. See the Purchase execution guide for receiving workflows and the Attached documents guide for uploads and association.

Find sales orders

curl "$SHELFCYCLE_API_BASE_URL/orders?customerId=customer-id&fromDate=2026-07-01&toDate=2026-07-31&limit=25" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Choose one or more supported filters:

FilterUse it for
orderNo, customerOrderNo, externalIdOne exact identifier or up to 25 comma-separated exact identifiers.
customerIdOrders for one customer.
productId, productFamilyIdOrders containing a selected product or product family.
linkedPurchaseOrderIdSales orders related to one purchase order.
statusOrders in one documented sales-order status.
fromDate and toDateAn inclusive ordered-date range in the organization's time zone.
changedFrom and changedToA half-open last-updated range of up to 30 days.

Finder rows include the customer, status, order dates, related purchase order, document total and currency, product ids, URL, and updatedAt.

Batch known customer order references in one exact request:

curl "$SHELFCYCLE_API_BASE_URL/orders?customerOrderNo=A,B,C&limit=5" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

orderNo, customerOrderNo, and externalId each accept as many as 25 exact comma-separated values.

Find purchase orders

curl "$SHELFCYCLE_API_BASE_URL/purchase-orders?supplierId=supplier-id&fromDate=2026-08-01&toDate=2026-08-31&limit=25" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Purchase-order finders accept orderNo, externalId, supplierId, productId, productFamilyId, linkedSalesOrderId, status, a paired fromDate and toDate due-date range, or a paired changedFrom and changedTo last-updated range. orderNo and externalId each accept as many as 25 exact comma-separated values.

Finder rows include the supplier, status, submitted, confirmed, completed, received, ship, and due dates when present, related sales order, document total and currency, product ids, URL, and updatedAt.

Continue finder results

Set limit from 1 to 25. When meta.hasMore is true, make the next request with meta.nextCursor and no other query parameters:

curl "$SHELFCYCLE_API_BASE_URL/orders?cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

The signed cursor keeps the original filters, order, and result snapshot together. Finder metadata reports the returned row count, ordering, snapshot time, and the next cursor.

Read sales-order detail

curl "$SHELFCYCLE_API_BASE_URL/orders/order-id?lineLimit=100" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Sales-order detail includes:

FieldUse it for
headerOrder identity, status, customer, related purchase order, ship-to address, shipping instructions, dates, assignee, warehouse, and freight details.
lineItemsProduct or non-product lines with quantity, product quantity, UOM, unit price, extended amount, and currency.
lineItems[].fulfillmentWhether the line is allocated, uses virtual inventory, and when it was consumed.
totalsStored subtotal, tax, shipping, fee, total, and document currency.
lineCoverageTotal and returned line counts plus the next line cursor.

Read purchase-order detail

curl "$SHELFCYCLE_API_BASE_URL/purchase-orders/purchase-order-id?lineLimit=100" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Purchase-order detail includes:

FieldUse it for
headerOrder identity, status, supplier, supplier instructions, related sales order, ship-from address, dates, assignee, warehouse, and freight details.
lineItemsProduct lines with quantity, product quantity, UOM, unit cost, extended amount, and currency.
lineItems[].receiptReceipt count, first and last receipt dates, and virtual-inventory status.
costsSupplier document cost rows with description, amount, currency, and related line when present.
totalsStored item amount, non-item cost amount, total, and document currency.
lineCoverageTotal and returned line counts plus the next line cursor.

Continue line items

Order detail returns 100 lines by default. Set lineLimit from 1 to 500. When lineCoverage.hasMore is true, keep the same order id and pass lineCoverage.nextLineCursor by itself:

curl "$SHELFCYCLE_API_BASE_URL/orders/order-id?lineCursor=$NEXT_LINE_CURSOR" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Money and quantities

Money fields are string cents in the reported three-letter currency. Quantities are decimal strings. Read quantity, productQuantity, uom, unit price or cost, and extendedAmountCents together. Use the returned totals as the document totals.