Uploads a single file and links it to an existing Sales Invoice. The endpoint accepts one file per request. To attach several documents to the same invoice, call it once per file.

post/sales-invoices/{invoice_id}/attachments

Request

  • Base URL
    https://open-api.stag-v2.paper.id/api/v1
  • URL
    https://open-api.stag-v2.paper.id/api/v1/sales-invoices/{invoice_id}/attachments
  • Auth
    API key in header client_id and API key in header client_secret

Path parameters

invoice_idstring required

Unique identifier of the Sales Invoice that will receive the file. Returned by the Create Sales Invoice and List Sales Invoices endpoints.

Headers

client_idstring required

Your Client ID credential

client_secretstring required

Your Client secret credential

Request body multipart/form-data

filestring binary required

The file to upload. Maximum size 10 MB. Executable formats such as .exe are rejected.

Response

200

status_codeinteger
messagestring

Human-readable outcome of the request.

Example response

{
  "status_code": 201,
  "data": {
    "document_id": "aad61dca-9be0-4663-9e9a-dd8d76c0b077",
    "document_type": "INV/08/08/0021",
    "attachment_id": "get.paper.id/21d1rdK",
    "file_name": "https://storage.googleapis.com/ppr-prd/export/4b3419d8-06d1-449c-9632-887b6c12ecda/sales-invoice/pdf/INV_SAL_INV_08_08_0021.pdf",
    "url": "get.paper.id/W7vfptM"
  }
}

Changes