API reference

Shop, invoices and payments

Orders, carts, quotes, proposals, invoices, credit notes, refunds and payment accounts.

Scopes for this area: shop:read, shop:write and shop:admin.

180 operations

location

MethodRouteWhat it doesLevelCommand
POST/shop/locationsAdd a stock location (warehouse, shop, supplier or virtual).adminrivier shop location create
GET/shop/locationsThe places stock is kept.readrivier shop location list
POST/shop/locations/{id}/archiveRetire a stock place that holds nothing.adminrivier shop location archive

stock

MethodRouteWhat it doesLevelCommand
GET/shop/stockStock of every variant of a product at every place: on hand, held, promised, safety stock, what can still be sold.readrivier shop stock list
POST/shop/stockReceive stock (positive) or correct it (negative), idempotent on the key.adminrivier shop stock adjust

product

MethodRouteWhat it doesLevelCommand
GET/shop/productsThe owner's product list in any state (draft, active, archived or all), with variants, prices and stock.readrivier shop product list
PUT/shop/products/{id}/statusPut a product in draft (off the shop), active (on sale) or archived.adminrivier shop product set status

view

MethodRouteWhat it doesLevelCommand
GET/shop/viewsSaved views of a list (search, filters, sort): the caller's own and the project's shared ones.readrivier shop view list
POST/shop/viewsKeep the current search, filters and sort of a list under a name, for oneself or shared.writerivier shop view save
DELETE/shop/views/{id}Delete one of one's own saved views.writerivier shop view remove

collection

MethodRouteWhat it doesLevelCommand
GET/shop/collectionsCollections and the products in each.readrivier shop collection list
DELETE/shop/collections/{id}/items/{productId}Take a product out of a manual collection.adminrivier shop collection remove item
POST/shop/collectionsAdd a collection.adminrivier shop collection create
POST/shop/collections/{id}/itemsAdd products to a collection.adminrivier shop collection add items
GET/shop/collection-searchCollections by name or slug.readrivier shop collection search
POST/shop/collection-archive/{id}Retire a collection; its products stay.writerivier shop collection archive

catalogue

MethodRouteWhat it doesLevelCommand
GET/shop/export.csvThe catalogue as a spreadsheet: one row per variant, with prices, stock, collections, search text and the addresses of published pictures.readrivier shop catalogue export
POST/shop/importAdd and change products from a spreadsheet (same columns as the export). Dry run by default: says what would be created or changed. Pictures are fetched from https addresses by the safe reader.adminrivier shop catalogue import

variant

MethodRouteWhat it doesLevelCommand
POST/shop/variantsAdd a variant (SKU, options, weight, tax class, cost and price floor) to a product.adminrivier shop variant create
GET/shop/variantsThe variants of a product.readrivier shop variant list
GET/shop/variants/{id}One variant with its SKU, options, weight, tax class, cost and price floor.readrivier shop variant get
PATCH/shop/variants/{id}Change a variant's SKU, options, weight, tax class, cost or price floor.adminrivier shop variant update
POST/shop/variants/{id}/archiveRetire a variant. Refused while it is in a cart, an unshipped order or a bundle.adminrivier shop variant archive

price

MethodRouteWhat it doesLevelCommand
POST/shop/pricesSet a price. It goes into the price history; it may not go under the floor, and a previous price must be the lowest of the last 30 days.adminrivier shop price set
GET/shop/pricesLive prices of a variant (all, with `all`).readrivier shop price list
GET/shop/price-historyEvery price a variant has been sold at, newest first.readrivier shop price history
POST/shop/prices/{id}/endEnd a live price.adminrivier shop price end

stock rule

MethodRouteWhat it doesLevelCommand
PUT/shop/stock-rulesSafety stock and backorder for a variant at a location.adminrivier shop stock rule set

bundle

MethodRouteWhat it doesLevelCommand
PUT/shop/bundlesMake a variant a bundle of other variants.adminrivier shop bundle set
GET/shop/bundles/{id}The parts of a bundle variant.readrivier shop bundle get
DELETE/shop/bundles/{id}Stop selling a variant as a bundle.adminrivier shop bundle remove

zone

MethodRouteWhat it doesLevelCommand
POST/shop/zonesAdd a shipping zone (a set of countries).adminrivier shop zone create
GET/shop/zonesShipping zones with their countries and rates.readrivier shop zone list
PATCH/shop/zones/{id}Change a zone's name or countries, or archive it.adminrivier shop zone update

rate

MethodRouteWhat it doesLevelCommand
POST/shop/ratesAdd a shipping rate to a zone (by weight, free over a total).adminrivier shop rate create
PATCH/shop/rates/{id}Change a shipping rate, or archive it.adminrivier shop rate update

tax rule

MethodRouteWhat it doesLevelCommand
POST/shop/tax-rulesAdd a tax rule with its source and the date it was checked.adminrivier shop tax rule create
GET/shop/tax-rulesTax rules with their dates, source and when they were last checked.readrivier shop tax rule list
PATCH/shop/tax-rules/{id}Change a tax rule's rate, dates or source.adminrivier shop tax rule update

discount

MethodRouteWhat it doesLevelCommand
POST/shop/discountsAdd a discount: a code or automatic, percent, fixed or free shipping, with limits.adminrivier shop discount create
PUT/shop/discounts/{id}/statusPause, resume or archive a discount.adminrivier shop discount set status
GET/shop/discountsDiscounts with their rule, limits, status and use.readrivier shop discount list
GET/shop/discounts/{id}One discount.readrivier shop discount get

catalog

MethodRouteWhat it doesLevelCommand
GET/shop/catalogWhat is for sale: products with variants, the price for a currency and country, and what is in stock.readrivier shop catalog list

availability

MethodRouteWhat it doesLevelCommand
GET/shop/availability/{id}How many of a variant can still be promised (a bundle: the smallest over its parts).readrivier shop availability get

completeness

MethodRouteWhat it doesLevelCommand
GET/shop/completenessHow complete a product is for a channel (storefront, google, openai, meta): the share of what the channel requires that it has, and what is missing.readrivier shop completeness get

feed

MethodRouteWhat it doesLevelCommand
GET/shop/feeds/{channel}The product feed a channel reads (google, openai, meta) as JSON or tab-separated text: one row per variant for every product that has what the channel requires, and the products left out with what each lacks.readrivier shop feed get

order

MethodRouteWhat it doesLevelCommand
GET/shop/ordersOrders by state or customer.readrivier shop order list
GET/shop/orders/{id}One order with its lines, money and the terms it was sold under.readrivier shop order get
GET/shop/orders/{id}/timelineWhat happened to an order, in order.readrivier shop order timeline
POST/shop/ordersPlace an order from a cart. Prices, tax and shipping are worked out again; the stock is committed; idempotent on the key.writerivier shop order place
POST/shop/orders/{id}/payA hosted checkout address for what is due on an order.writerivier shop order pay
POST/shop/orders/{id}/cancelCancel an order nobody has paid for and give its stock back.writerivier shop order cancel
POST/shop/orders/{id}/shipShip whole lines of a paid order with a carrier and tracking.writerivier shop order ship
POST/shop/orders/{id}/completeClose a delivered order.writerivier shop order complete
POST/shop/orders/{id}/refundAsk for a refund of part or all of what an order paid. A person approves it on the payments side before any money moves.writerivier shop order refund
POST/shop/orders/{id}/cancel-paidCancel a paid order that has not shipped and ask for its refund. A person's decision.writerivier shop order cancel paid
POST/shop/orders/{id}/invoiceMake the invoice for a paid order again (it is made on payment; this retries a failure). Idempotent per order.writerivier shop order invoice
POST/shop/orders/syncBring in orders placed on the connected shops and marketplaces since a time (default: since the last order brought in). Each source order is imported once.writerivier shop order sync
PATCH/shop/orders/{id}Correct the contact or delivery address of an order that has not shipped.writerivier shop order update
GET/shop/orders/{id}/paymentsThe payment history of an order: checkout, paid, refund asked, refunded.readrivier shop order payments

cart

MethodRouteWhat it doesLevelCommand
POST/shop/cartsStart a cart in a currency and country.writerivier shop cart create
GET/shop/carts/{id}A cart priced as it stands: lines, discounts, shipping options, tax and total.readrivier shop cart get
PATCH/shop/carts/{id}Set the cart's country and discount codes.writerivier shop cart update
POST/shop/carts/{id}/linesAdd a variant to the cart. The stock is held for the buyer.writerivier shop cart add line
PUT/shop/carts/{id}/lines/{variantId}Change a line's quantity; zero removes it.writerivier shop cart set line

shipment

MethodRouteWhat it doesLevelCommand
POST/shop/shipments/{id}/deliverMark a shipment delivered.writerivier shop shipment deliver
GET/shop/shipmentsShipments for an order or in a state.readrivier shop shipment list
GET/shop/shipments/{id}One shipment.readrivier shop shipment get
PATCH/shop/shipments/{id}Correct a shipment's carrier or tracking number.writerivier shop shipment update

return

MethodRouteWhat it doesLevelCommand
POST/shop/orders/{id}/returnsAsk to send shipped lines back. Only units that shipped and are not already returned or waiting can be asked for.writerivier shop return request
GET/shop/returnsReturns by state or order.readrivier shop return list
POST/shop/returns/{id}/decisionAccept or reject a return request.writerivier shop return decide
POST/shop/returns/{id}/receiveRecord that the goods came back; units go back on the shelf when the request said so.writerivier shop return receive
POST/shop/returns/{id}/refundAsk for the refund of an accepted return. A person approves it on the payments side before any money moves.writerivier shop return refund

refunds due

MethodRouteWhat it doesLevelCommand
GET/shop/refunds-dueCancelled orders that hold money nobody has asked to give back.readrivier shop refunds due list

public catalog

MethodRouteWhat it doesLevelCommand
GET/public/shop/catalogThe storefront catalogue: prices, options and whether each variant can be bought.readrivier shop public catalog list

public cart

MethodRouteWhat it doesLevelCommand
POST/public/shop/cartsStart a cart.readrivier shop public cart create
GET/public/shop/carts/{id}A cart priced as it stands.readrivier shop public cart get
PATCH/public/shop/carts/{id}Set the cart's country and discount codes.readrivier shop public cart update
POST/public/shop/carts/{id}/linesAdd a variant to the cart.readrivier shop public cart add line
PUT/public/shop/carts/{id}/lines/{variantId}Change a line's quantity; zero removes it.readrivier shop public cart set line

public checkout

MethodRouteWhat it doesLevelCommand
POST/public/shop/checkoutPlace the order and, unless told not to, start the payment; answers with the order, its link and the payment address.readrivier shop public checkout place

public order

MethodRouteWhat it doesLevelCommand
GET/public/shop/orders/{id}/downloadsThe files a buyer is owed, as short-lived addresses, once the order is paid.readrivier shop public order downloads
GET/public/shop/orders/{id}An order, through its own link.readrivier shop public order get
POST/public/shop/orders/{id}/payA fresh payment address for an unpaid order.readrivier shop public order pay
POST/public/shop/orders/{id}/returnsAsk to return shipped lines, through the order's link.readrivier shop public order return
POST/public/shop/orders/{id}/cancelCancel an unpaid order through its link.readrivier shop public order cancel

supplier

MethodRouteWhat it doesLevelCommand
GET/shop/suppliersSuppliers.readrivier shop supplier list
GET/shop/suppliers/{id}One supplier.readrivier shop supplier get
POST/shop/suppliersAdd a supplier.writerivier shop supplier create
DELETE/shop/suppliers/{id}Stop buying from a supplier (an approver's decision).writerivier shop supplier archive

supplied

MethodRouteWhat it doesLevelCommand
GET/shop/suppliedWhich variants each supplier sells and at what cost.readrivier shop supplied list
POST/shop/suppliedSay that a supplier sells a variant, at a unit cost.writerivier shop supplied create

margin

MethodRouteWhat it doesLevelCommand
GET/shop/marginMargin of a variant's price against the cheapest supplier cost.readrivier shop margin get

purchase order

MethodRouteWhat it doesLevelCommand
GET/shop/purchase-ordersPurchase orders by status.readrivier shop purchase order list
GET/shop/purchase-orders/{id}One purchase order.readrivier shop purchase order get
POST/shop/purchase-ordersDraft a purchase order.writerivier shop purchase order create
POST/shop/purchase-orders/{id}/approveApprove a draft purchase order (a person; an agent never approves its own).writerivier shop purchase order approve
POST/shop/purchase-orders/{id}/sendSend an approved purchase order; test mode only until live sending is opened.writerivier shop purchase order send
POST/shop/purchase-orders/{id}/receiveGoods arrived: mark received and put the quantities on the shelf.writerivier shop purchase order receive
POST/shop/purchase-orders/{id}/cancelCancel a purchase order that has not been received.writerivier shop purchase order cancel

reorder

MethodRouteWhat it doesLevelCommand
POST/shop/reorders/draftDraft purchase orders for the variants whose stock is at or below its reorder point.writerivier shop reorder draft

payment account

MethodRouteWhat it doesLevelCommand
GET/payments/accountsThe payment accounts of the project with their state in plain words.readrivier shop payment account list
POST/payments/accountsConnect a payment account (the business's own Stripe through a connection, or Skerry).adminrivier shop payment account connect
POST/payments/accounts/{id}/refreshAsk the provider where onboarding stands.adminrivier shop payment account refresh
PUT/payments/accounts/{id}/defaultMake an account the default for its mode.adminrivier shop payment account set default
POST/payments/accounts/{id}/approve-liveApprove live money on a verified account.adminrivier shop payment account approve live
POST/payments/accounts/{id}/revoke-liveTake live approval away.adminrivier shop payment account revoke live

money policy

MethodRouteWhat it doesLevelCommand
GET/payments/policyThe money limits: the largest refund in one action and in a day, and the payment links an agent may make.readrivier shop money policy get
PUT/payments/policySet the money limits.adminrivier shop money policy set

payment

MethodRouteWhat it doesLevelCommand
GET/payments/paymentsPayments by reference (an order, a booking), status or page.readrivier shop payment list
GET/payments/payments/{id}One payment with its status, what was received and refunded, and the fee.readrivier shop payment get

refund

MethodRouteWhat it doesLevelCommand
GET/payments/refundsRefunds by state or payment.readrivier shop refund list
POST/payments/refundsAsk for a refund. It waits for a person's approval; the limits of the money policy apply.writerivier shop refund request
POST/payments/refunds/{id}/approveApprove a refund; it is sent to the provider once.writerivier shop refund approve
POST/payments/refunds/{id}/rejectReject a refund request.writerivier shop refund reject

mismatch

MethodRouteWhat it doesLevelCommand
GET/payments/mismatchesDifferences found between the books and the provider.readrivier shop mismatch list
POST/payments/mismatches/{id}/resolveClose a difference with a note, or dismiss it.writerivier shop mismatch resolve

reconcile

MethodRouteWhat it doesLevelCommand
POST/payments/reconcileCompare the last days of payments with the provider and record differences. Nothing is corrected automatically.writerivier shop reconcile run

invoice settings

MethodRouteWhat it doesLevelCommand
GET/invoices/settingsThe seller's details, default VAT and payment terms printed on invoices.readrivier shop invoice settings get
PUT/invoices/settingsSet the seller's details, default VAT, payment days and footer.adminrivier shop invoice settings set

invoice series

MethodRouteWhat it doesLevelCommand
GET/invoices/seriesThe number series for invoices and credit notes.readrivier shop invoice series list
POST/invoices/seriesAdd a number series (gapless, optionally restarting each year).adminrivier shop invoice series create

invoice

MethodRouteWhat it doesLevelCommand
GET/invoicesInvoices by status, what they are for (an order, a stay) or a search.readrivier shop invoice list
GET/invoices/{id}One invoice with its lines, tax groups, payments and what is due.readrivier shop invoice get
PATCH/invoices/{id}Change a draft invoice: dates, notes, payment terms, references, the customer and where the goods were delivered.writerivier shop invoice update
GET/invoices/{id}/eventsWhat happened to an invoice, in order.readrivier shop invoice events
GET/invoices/{id}/pdfThe invoice as a PDF.readrivier shop invoice pdf
POST/invoicesDraft an invoice; idempotent on the key. It has no number until it is finalised.writerivier shop invoice draft
POST/invoices/{id}/finaliseNumber and freeze an invoice. A numbered invoice can only be corrected by a credit note.writerivier shop invoice finalise
POST/invoices/{id}/sendEmail the invoice with its PDF to the customer.writerivier shop invoice send
POST/invoices/{id}/paymentsRecord a payment received against an invoice (a bank transfer, cash); idempotent on the key. Marking an invoice paid is a person's decision.writerivier shop invoice record payment
POST/invoices/{id}/voidVoid an invoice nobody has paid.writerivier shop invoice void
POST/invoices/{id}/links/{linkId}/revokeSwitch one link of an invoice off.writerivier invoices links revoke
POST/invoices/{id}/links/{linkId}/regenerateReplace a link of an invoice with a new one; the old address stops working.writerivier invoices links regenerate
POST/invoices/{id}/send-link/previewThe mail that sending the invoice with its private link would produce, the PDF size and the checks that would stop it; nothing is sent.writerivier invoices send-link preview
PUT/invoices/{id}/clientSet which client of the organisation an invoice is for (null clears it) and who receives it; without recipients they come from the client's primary and default-copied contacts.writerivier invoices client
GET/invoices/{id}/receiptsThe bank-transfer receipts the client uploaded at the invoice link: file name, size, the amount and note they gave, and whether a payment was recorded after it.readrivier invoices receipts
GET/invoices/{id}/receipts/{receiptId}/downloadOne uploaded receipt file (editor and above).readrivier invoices receipts download
GET/invoices/{id}/doc-eventsWhen an invoice was sent, opened by the client and reported paid by them.readrivier invoices doc-events

credit note

MethodRouteWhat it doesLevelCommand
POST/invoices/{id}/credit-notesAsk for a credit note against a numbered invoice (the whole invoice or chosen lines). A person issues it.writerivier shop credit note request
GET/invoices/credit-notesCredit notes, optionally for one invoice.readrivier shop credit note list
POST/credit-notes/{id}/issueIssue a credit note: it is numbered and reduces what the invoice is owed.writerivier shop credit note issue
POST/credit-notes/{id}/rejectReject a credit note request.writerivier shop credit note reject

quote

MethodRouteWhat it doesLevelCommand
GET/quotesQuotes by status, client or a search, newest first.readrivier quotes list
GET/quotes/{id}One quote with its lines, tax groups, status and the client's answer.readrivier quotes get
POST/quotesDraft a quote for a client; idempotent on the key (the body's idempotencyKey or the Idempotency-Key header). It has no number until it is sent.writerivier quotes create
PATCH/quotes/{id}Change a quote; fields left out stay as they are. A sent quote becomes a new revision and goes back to draft.writerivier quotes update
GET/quotes/{id}/eventsWhat happened to a quote, in order.readrivier quotes events
GET/quotes/{id}/certificateThe certificate of completion of an accepted quote as a PDF: who accepted, when, from where, and the fingerprint of what they accepted.readrivier quotes certificate
GET/quotes/{id}/pdfThe quote as a PDF.readrivier quotes pdf
POST/quotes/{id}/previewThe mail that sending the quote would produce, the PDF size and the checks that would stop it; nothing is sent.writerivier quotes preview
POST/quotes/{id}/sendSend the quote to the client by mail with its PDF and private link, or with channel link return the link without mail. The first send numbers it and fixes its content; sending again is a resend.writerivier quotes send
POST/quotes/{id}/links/{linkId}/revokeSwitch one link of a quote off.writerivier quotes links revoke
POST/quotes/{id}/links/{linkId}/regenerateReplace a link of a quote with a new one; the old address stops working.writerivier quotes links regenerate
POST/quotes/{id}/duplicateA new draft copied from a quote, without its number; idempotent on the key.writerivier quotes duplicate
POST/quotes/{id}/convertTurn an accepted quote into an invoice, or with depositPercent a deposit invoice and a balance invoice (both drafts). The quote becomes converted.writerivier quotes convert
POST/quotes/{id}/voidVoid a quote with the reason; it stays on record and its links stop working.writerivier quotes void

proposal

MethodRouteWhat it doesLevelCommand
GET/proposalsProposals by status, client or a search, newest first.readrivier proposals list
GET/proposals/{id}One proposal with its lines, tax groups, sections, status and the client's answer.readrivier proposals get
POST/proposalsDraft a proposal for a client; idempotent on the key (the body's idempotencyKey or the Idempotency-Key header). It has no number until it is sent.writerivier proposals create
PATCH/proposals/{id}Change a proposal; fields left out stay as they are. A sent proposal becomes a new revision and goes back to draft.writerivier proposals update
GET/proposals/{id}/eventsWhat happened to a proposal, in order.readrivier proposals events
GET/proposals/{id}/certificateThe certificate of completion of an accepted proposal as a PDF: who accepted, when, from where, and the fingerprint of what they accepted.readrivier proposals certificate
GET/proposals/{id}/pdfThe proposal as a PDF.readrivier proposals pdf
POST/proposals/{id}/previewThe mail that sending the proposal would produce, the PDF size and the checks that would stop it; nothing is sent.writerivier proposals preview
POST/proposals/{id}/sendSend the proposal to the client by mail with its PDF and private link, or with channel link return the link without mail. The first send numbers it and fixes its content; sending again is a resend.writerivier proposals send
POST/proposals/{id}/links/{linkId}/revokeSwitch one link of a proposal off.writerivier proposals links revoke
POST/proposals/{id}/links/{linkId}/regenerateReplace a link of a proposal with a new one; the old address stops working.writerivier proposals links regenerate
POST/proposals/{id}/duplicateA new draft copied from a proposal, without its number; idempotent on the key.writerivier proposals duplicate
POST/proposals/{id}/convertTurn an accepted proposal into a quote (the default) or into invoices. The proposal becomes converted.writerivier proposals convert
POST/proposals/{id}/voidVoid a proposal with the reason; it stays on record and its links stop working.writerivier proposals void