Link receipts to this document
Manually link one or more receipts to an invoice/document. Used for imported documents where receipt-invoice links weren't preserved.
Process:
- Creates PAYMENT_AGAINST links between receipts and the invoice
- Recalculates the invoice balance and payment status
- Returns updated balance information
Note: A receipt can be linked to multiple invoices (e.g., one receipt covering multiple invoices).
Business API key, e.g. vuz_ab12cdef... Created via Settings → Integrations → API Keys. Unlike partner keys, a public API key's STRING does not encode its environment — isolation instead comes from a completely separate sandbox database: a key minted on the Sandbox server (above) only ever reads/writes sandbox data and can never see or affect production, regardless of what the key looks like.
In: header
Path Parameters
Document ID (must be a balanceable type: tax_invoice, invoice, deal_bill)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/documents/string/link-receipts" \ -H "Content-Type: application/json" \ -d '{ "receiptIds": [ "660e8400-e29b-41d4-a716-446655440001", "660e8400-e29b-41d4-a716-446655440002" ] }'{ "success": true, "documentBalance": 500, "paymentStatus": "PARTIALLY_PAID", "linkedCount": 2}
