Gallery Platform API
Reference

Check a document's artwork list against inventory

Reads an already-uploaded PDF or image (in the gallery-documents bucket), extracts one artwork draft per listed work, and diffs each against existing inventory — the reconcile sibling of extract-from-document. Matching is by title + resolved artist (unambiguous title-only fallback); the report carries per-field ours-vs-theirs diffs for matches, document rows with no inventory match, and (capped, informational) the matched artists' works the document does not list. Read-only: nothing is written — applying a proposed change is a separate, opt-in artwork update. Requires a first-party session.

POST
/gallery/artworks/reconcile-from-document

Reads an already-uploaded PDF or image (in the gallery-documents bucket), extracts one artwork draft per listed work, and diffs each against existing inventory — the reconcile sibling of extract-from-document. Matching is by title + resolved artist (unambiguous title-only fallback); the report carries per-field ours-vs-theirs diffs for matches, document rows with no inventory match, and (capped, informational) the matched artists' works the document does not list. Read-only: nothing is written — applying a proposed change is a separate, opt-in artwork update. Requires a first-party session.

Authorization

bearerAuth artworks:read
AuthorizationBearer <token>

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

In: header

Scope: artworks:read

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Check an uploaded document's artwork list against existing inventory.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "matches": [    {      "artwork_id": "string",      "artwork_title": "string",      "matched_by": "title_artist",      "fields": [        {          "field": "string",          "ours": "string",          "theirs": "string",          "differs": true        }      ],      "in_sync": true    }  ],  "unmatched_in_document": [    {      "artist": {        "name": "string",        "artist_id": "string",        "matched": true      },      "title": "string",      "year": -9007199254740991,      "medium": "string",      "height_cm": 0,      "width_cm": 0,      "depth_cm": 0,      "dimension_unit": "in",      "framed": true,      "price_cents": -9007199254740991,      "currency": "string",      "price_min_cents": -9007199254740991,      "price_max_cents": -9007199254740991,      "edition": "string",      "low_confidence": [        "string"      ]    }  ],  "unmatched_in_inventory": [    {      "artwork_id": "string",      "title": "string"    }  ],  "warnings": [    "string"  ]}