Gallery Platform API
Reference

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.

GET
/gallery/sales/{id}/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.

Authorization

bearerAuth sales:read
AuthorizationBearer <token>

A gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).

In: header

Scope: sales:read

Path Parameters

id*string

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  }}