Get a sale's cost basis and margin
Returns the cost basis and margin of a sale, per line and in total: the consignor and third-party takes (from the payables) plus the gallery's borne production-cost share, subtracted from the sold price. A missing or unauthorized sale is a 404.
Returns the cost basis and margin of a sale, per line and in total: the consignor and third-party takes (from the payables) plus the gallery's borne production-cost share, subtracted from the sold price. A missing or unauthorized sale is a 404.
Authorization
bearerAuth sales:readA gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).
In: header
Scope: sales:read
Path Parameters
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
{ "currency": "string", "base_currency": "string", "lines": [ { "sale_item_id": "string", "artwork_id": "string", "artwork_title": "string", "sold_price_cents": -9007199254740991, "consignor_cost_cents": -9007199254740991, "third_party_cost_cents": -9007199254740991, "production_cost_cents": -9007199254740991, "cost_basis_cents": -9007199254740991, "margin_cents": -9007199254740991, "margin_bps": -9007199254740991 } ], "totals": { "sold_price_cents": -9007199254740991, "cost_basis_cents": -9007199254740991, "margin_cents": -9007199254740991, "margin_bps": -9007199254740991, "margin_base_cents": -9007199254740991 }}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "string", "retry": "permanent", "details": null}List sales GET
Lists the gallery's sales (newest first) with cursor pagination. Filter by `status`, or search with `q` — matches the buyer contact's name (minimum 3 characters).
Regenerate a sale's payables POST
Re-derives the consignor payables for a sale from its frozen line splits (e.g. after a line's price was edited). Idempotent: still-pending payables are refreshed and any missing ones created; already-paid or voided payables are left untouched.