Gallery Platform API
Reference

Register an invoice document

Registers an already-uploaded object (from the upload-url endpoint) as a document row, appended to the end. Requires a first-party session.

POST
/gallery/invoices/{id}/documents

Registers an already-uploaded object (from the upload-url endpoint) as a document row, appended to the end. Requires a first-party session.

Authorization

bearerAuth sales:create
AuthorizationBearer <token>

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

In: header

Scope: sales:create

Path Parameters

id*string

The invoice id.

Header Parameters

Idempotency-Key?string

Optional. Send a unique key per logical operation to make retries safe: a retry with the same key replays the stored success for 14 days instead of re-running the write. Reusing a key with a different body returns 400.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Register an uploaded document object as an invoice document.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "id": "string",  "invoice_id": "string",  "storage_path": "string",  "url": "string",  "title": "string",  "file_name": "string",  "content_type": "string",  "byte_size": -9007199254740991,  "position": -9007199254740991,  "created_at": "string",  "updated_at": "string"}