Attaches a customs declaration to a courier's bill through the app's declaration service: an inbox document by document_extraction_id, or a PDF, JPEG or PNG inline in content_base64 (at most 700 KiB decoded; a larger file goes to the document inbox through an upload session first). An inbox document also needs view_document_extractions and, for an API credential, the document-extractions:read scope, else 403 document_source_forbidden; it is refused not_a_declaration or document_booked (422), and already_attached (409) when it is on another bill. The same document attached to the same bill again answers 200 with that declaration; a new one answers 201. It is read and checked against the bill; poll customs.show for the result. A bill with no customs record is refused not_a_customs_bill; while held import VAT is not on for the company, customs_off. Requires Idempotency-Key, the bills:action OAuth scope and update_bills.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
