Cowdidocs
API ReferenceInvoice financing

List financing documents for a merchant

GET
/v1/financing/merchants/{merchantId}/documents

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.

AuthorizationBearer <token>

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

merchantId*string

Canonical sales-app merchant id, shared with Core. Legacy ids remain readable.

Length1 <= length <= 255

Query Parameters

size?string

Page size from 1 to 100. Defaults to 20.

Match^\d+$
after?string

Opaque cursor for the next page, taken from links.next. Mutually exclusive with before.

before?string

Opaque cursor for the previous page, taken from links.prev. Mutually exclusive with after.

type?string

Kind of financing document. INVOICE: the receivable to finance. DELIVERY_NOTE: proof of delivery. PURCHASE_ORDER: the buyer’s order. PURCHASE_SUPPORT: any other supporting document.

Value in

  • "INVOICE"
  • "DELIVERY_NOTE"
  • "PURCHASE_ORDER"
  • "PURCHASE_SUPPORT"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/financing/merchants/01JZQ5W7M5Y83M6F1D6E0A2K8N/documents"
{  "data": [    {      "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"    }  ],  "links": {    "next": "string",    "prev": "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"    }  ]}