Every endpoint
59 endpoints under https://api.stockroom.app/v2, in 8 sections. Every one takes a bearer key, and every refusal is one Error envelope with a code you can branch on.
#Account
The key itself: which store it belongs to, what it may do, and when it expires. GET /v2/whoami is the cheapest way to prove a key works.
#Suppliers
Suppliers and their per-supplier catalogs: supplier SKU, cost, minimum order quantity and pack size. Archive, unarchive and merge are actions rather than fields; nothing in Stockroom deletes a supplier.
#Purchase orders
Drafts, lines, charges and the whole lifecycle: send, mark ordered, mark on the way, close, reopen, cancel what is left, archive, duplicate. Each move is its own call, and an illegal one is 422 invalid_transition rather than a silent write.
#Receipts
One record per delivery against a purchase order: what came in, to where, on what date, at what cost. Recording a receipt moves stock, so it requires an Idempotency-Key; voiding one reverses the movement instead of editing a number back down.
#Payments
Payments recorded against a purchase order, one row each, so a part payment is expressible. The order's payment_status and paid_at follow from the rows; mark paid and mark unpaid are the shortcuts.
#Stock adjustments
A signed delta per line, drafted and then applied. Applying moves stock and requires an Idempotency-Key. Stockroom adjusts by a delta and never sets an absolute level.
#Catalog
Read-only mirror of the store's Shopify products, variants, locations and inventory levels. It may lag Shopify by a few seconds. To change catalog data, write to Shopify's Admin API.
#Webhooks
Subscriptions to a URL, the delivery log, a test event and redelivery. The signing secret is in the creation response and nowhere else.
Shapes
The named shapes an answer is made of: a supplier, a purchase order, a receipt, an adjustment, a webhook.