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

Find the exact order before reading or attaching its files. Sales-order attachments use GET and POST /orders/{id}/documents with sales-order-documents:read or sales-order-documents:write, separately from orders:read, and follow current order visibility. See Attached documents for uploads, integrity details, and permitted shipped COA copies.

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.

Filter by people and team tags

Sales and purchase orders accept assignedToIds for up to 100 assigned user UUIDs, comma-separated or repeated. assignedToId remains the earlier list name. Sales orders additionally accept salesPersonId, a salesperson record UUID identifying the person credited on the order; purchase orders do not accept that field.

Use ownership=mine for sales orders assigned or credited to the acting person, or purchase orders assigned to them. salesOwnership=mine remains the earlier name. Do not combine mine with a named salesperson or assignee. orderTag selects one team tag and also requires tags:read; meta.tagFilter identifies the selected tag.

curl "$SHELFCYCLE_API_BASE_URL/orders?ownership=mine&orderTag=docs%20received&limit=25" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Finder rows carry assignedTo, and sales orders also carry salesPerson, each as id/displayName or null; sales-order detail also includes its salesperson. Unknown salesperson or assignee IDs return 422 invalid_input. A known person outside the connection's record access narrows to the visible intersection, which can be empty. These filters do not expand access. See People and tag filters for role distinctions, tag corrections, and query examples.

Continue finder results

Set limit from 1 to 25. Continue with meta.nextCursor as cursor, keeping the first page’s filters and limit unchanged.

curl "$SHELFCYCLE_API_BASE_URL/orders?ownership=mine&orderTag=docs%20received&limit=25&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

The cursor keeps the original filters and ordering. For changed-record windows, it also keeps the first page's timestamp cutoff while each page reads current records. 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 as lineCursor with the same lineLimit:

curl "$SHELFCYCLE_API_BASE_URL/orders/order-id?lineLimit=100&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.