Attach an uploaded financing document
Attaches a document record after the client PUT the file to the presigned URL from POST .../uploads/presign. Requires merchant:financing.documents:write on the merchant. Returns 400 when upload_ref is expired or does not match this merchant, caller, and document type, or when the uploaded object is missing, oversized, or does not match the presigned content type and size. Returns 409 when the same upload has already been attached. Register the returned document as an invoice next, with POST .../invoices.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Path Parameters
Canonical sales-app merchant id, shared with Core. Legacy ids remain readable.
1 <= length <= 255Request Body
application/json
Attach a document after the client PUT the file to the presigned upload URL.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/financing/merchants/01JZQ5W7M5Y83M6F1D6E0A2K8N/documents" \ -H "Content-Type: application/json" \ -d '{ "document_type": "INVOICE", "upload_ref": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "INVOICE", "url": "http://example.com", "file_name": "string", "content_type": "image/jpeg", "size_bytes": 1, "uploaded_at": "2019-08-24T14:15:22Z"}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}List financing documents for a merchant GET
Returns a page of a merchant’s active financing documents, newest first, optionally filtered by `type`. Requires `merchant:financing.documents:read` on the merchant; an organization-scoped role can grant that same permission across every merchant it manages. Each document carries a short-lived presigned `url` for download; an impersonated caller gets `url` masked.
List financing invoices for a merchant GET
Returns a page of a merchant’s own financing invoices, newest first. Requires `merchant:financing.invoices:read` on the merchant; an organization-scoped role can grant that same permission across every merchant it manages. Use GET /v1/financing/invoices instead for an organization-wide roll-up across every merchant.