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.
Find supplier payments by payment run
GET /supplier-payments accepts number as either the supplier payment's own number or the number of the Payment run it belongs to, such as APPYMT-1042. Matching ignores letter case. A supplier payment matching both numbers appears once, and totals and paging use the same matched records. The normal supplier payment scopes and current viewing access apply.
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 as cursor, keeping the first page’s filters and limit unchanged.
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.
Read currency amounts and complete totals
The four list routes return exchangeRate as a decimal string: the record's own rate override when present, otherwise its linked rate. It is null for a base-currency record or when no rate is available. A draft's rate remains provisional until posting.
Invoice and bill list rows include baseTotalAmountCents, basePaidAmountCents, and baseOpenAmountCents; basePaidAmountCents is null for customer and supplier credits. Payment list rows include baseAmountCents. These are integer-cent strings in the organization's base currency. They convert at the record's rate; they do not represent ledger carrying values or realized exchange differences. Separate rounding can make total differ from paid plus open by one cent.
meta.totals covers the complete filtered population before pagination. Keep byTransactionCurrency lanes separate; use the base-currency totals with baseCurrencyCode for a combined view. Document totals distinguish document total, paid, and open amounts from credit total and open amounts, with corresponding base... fields. Drafts and voided documents are excluded from those sums; drafts reports draft counts and amounts separately. Payment totals report cashAmountCents per currency and baseCashAmountCents per currency and overall.
When a record has no conversion rate, its original amounts remain available while its base amounts are null. missingBaseAmounts counts these records in each totals scope. A credit total may also be null when the acting person cannot view credits; check that count and current credit access before interpreting an unavailable total. Do not substitute zero for an unavailable amount.
These fields describe list responses. Use the exact detail response's own money fields when opening a record, rather than assuming it has the list's new rate and base-amount fields.
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. Continue with meta.nextCursor as cursor, keeping the first page’s filters and limit unchanged.
curl "$SHELFCYCLE_API_BASE_URL/invoices?counterpartyId=customer-id&openOnly=true&limit=25&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 finder totals for the selected financial list and detail routes for exact documents and their relationships. Use Reports for aging, payments received and made, supplier bill charges, and other specialized summaries.