Invoices, bills, and payments
Find stored receivables and payables by identity, counterparty, date, currency, or amount, then open one exact document or payment with its connected financial context.
Resource families
| Resource | Finder | Detail | Scope |
|---|---|---|---|
| Invoices and customer credits | GET /invoices | GET /invoices/{id} | invoices:read |
| Bills and supplier credits | GET /bills | GET /bills/{id} | bills:read |
| Customer payments | GET /customer-payments | GET /customer-payments/{id} | customer-payments:read |
| Supplier payments | GET /supplier-payments | GET /supplier-payments/{id} | supplier-payments:read |
Each family also checks the acting person's current ShelfCycle access. Receivables follow the acting person's current customer and salesperson visibility.
Find documents
Invoice and bill finders accept an exact id or number, a counterpartyId, transactionCurrencyCode, and organization-calendar from and to dates. Amount filters use integer cents:
amountCentsfor one exact amount;amountMinCentsandamountMaxCentsfor a range;amountBasis=totaloramountBasis=opento choose which document amount is compared;openOnly=truefor documents with a current open balance; andkindto choose invoices or customer credits, or bills or supplier credits.
curl "$SHELFCYCLE_API_BASE_URL/invoices?counterpartyId=customer-id&openOnly=true&limit=25" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "X-ShelfCycle-Client: Collections workspace"
Document results include status, counterparty, transaction currency, total, paid, and open amounts, the open amount in the organization's base currency, document and due dates, and whether the amount was carried over when the organization began using ShelfCycle.
Review documents by due date
Use dueFrom and dueTo on GET /invoices or GET /bills to select an inclusive due-date window in the organization's timezone. Either bound can be used on its own. Add sortBy=dueDate for soonest-due-first results, or keep the default sortBy=kind ordering.
curl "$SHELFCYCLE_API_BASE_URL/bills?openOnly=true&dueFrom=2026-10-19&dueTo=2026-10-31&sortBy=dueDate&limit=25" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY"
List rows include daysPastDue: a positive number for an overdue open document, zero when due today, a negative number until it is due, and null when it is not open or has no due date. meta.basis.asOfDate is the organization day used for that calculation; meta.ordering identifies the result order. This is separate from the document-date from and to filters. Continue with meta.nextCursor alone.
Find payments
Customer- and supplier-payment finders accept the same identity, counterparty, currency, date, and amount filters. Add groupId to select one customer deposit or supplier payment batch.
curl "$SHELFCYCLE_API_BASE_URL/customer-payments?amountCents=1594703&from=2026-06-01&to=2026-06-30&limit=25" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "X-ShelfCycle-Client: Deposit matching"
Payment results include the exact paid amount, counterparty, paid date, payment identity, deposit or batch context, and matchedOn so the caller can see whether the match came from the payment itself or its group. Applied documents, credits, discounts, write-offs, and amounts kept on account are included when the key has the matching family access.
Open one exact result
After selecting an ID, call the matching detail endpoint. Document detail can include connected payments, while payment detail can include the documents it settled. Each connected family keeps its own scope and current user access.
For example, an invoices:read key can read an invoice without receiving connected customer-payment details. Add customer-payments:read when the workflow needs those payment relationships too.
Use the returned relationships when explaining what a payment settled. Do not infer an allocation by adding amounts that happen to match.
Read bill costs and item detail
GET /bills/{id} includes costs, items, and lineCoverage alongside the bill header and accessible payment relationships. It uses existing bills:read and the acting person's current Bill viewing access.
curl "$SHELFCYCLE_API_BASE_URL/bills/bill-id" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "X-ShelfCycle-Client: Payables review"
Each costs entry contains an id, description, amountCents, resolvedCurrencyCode, and nullable linkedOrder. When an order is recorded, linkedOrder identifies its kind (purchase_order, sales_order, or work_order), id, and orderNo.
Each items entry contains an id, amountCents, resolvedCurrencyCode, and ledgerAccount with its id and name. Amounts are integer-cent strings; keep their currency with them.
Cost lines attribute the same money as item lines. Do not add the two lists together or treat cost lines as extra charges. The bill's recorded amount remains money.itemsAmountCents, with paidAmountCents and openAmountCents alongside it.
Each list returns up to 500 lines. lineCoverage reports totalCosts, returnedCosts, totalItems, returnedItems, and truncated. When truncated is true, present the returned lines as partial detail and keep the header amount as the bill total. The detail lists do not have a continuation cursor.
Bill attachments
Use GET /bills/{id}/documents with bill-documents:read to read a selected bill's supporting files, or POST the completed upload descriptor or external HTTPS link with bill-documents:write and a stable Idempotency-Key. Current Bill viewing or update permission applies to the matching action. bills:read alone does not grant file access. Choose a bill UUID, not a supplier credit ID. Attachments preserve the bill and payment amounts. See Attached documents for preview, integrity, and retry examples.
Continue a finder
The default page size is 25 and limit accepts 1 through 100. When meta.nextCursor is present, make the next request with that cursor by itself:
curl "$SHELFCYCLE_API_BASE_URL/invoices?cursor=$NEXT_CURSOR" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY"
The cursor keeps the original resource, key, organization, filters, and page size together. Restart from the original filters when the workflow needs a fresh current view.
Choose a report for totals
Use the finder and detail routes for exact financial documents and their relationships. Use Reports for Accounts Receivable aging, Accounts Payable aging, payments received, payments made, and other complete-population summaries.