InvoicingAdd attachments to an e-invoice draft

Add attachments to an e-invoice draft

Adds pre-uploaded attachments to an e-invoice draft (or a finalized invoice).

Call POST /v2/documents/invoice-attachments/upload-url first, upload each file with a plain HTTP PUT to the returned uploadUrl, and then call this endpoint with the returned bucket and fileNames: [uploadPath]. Pass one or more uploadPath values to attach several files at once.

The attachments can be embedded into the final Peppol BIS 3.0 XML according to organization settings. The e-invoice XML attachments can never be replaced.

curl -X POST "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents/invoice-attachments/add" \
  -H "Content-Type: application/json" \
  -H "api_key: YOUR_API_KEY" \
  -d '{
  "data": {
    "organizationId": "example_string",
    "documentId": "example_string",
    "organizationFileId": "example_string",
    "bucket": "example_string",
    "fileNames": [
      "John Doe"
    ]
  }
}'
{
  "data": {
    "documentId": "example_string"
  },
  "success": true,
  "message": "example_string",
  "code": "APP_UNAUTHENTICATED"
}
POST
/v2/documents/invoice-attachments/add
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: api_key)
api_keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
dataobject

Either documentId or organizationFileId must be provided - documentId takes precedence.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
api_keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
dataobject

Either documentId or organizationFileId must be provided - documentId takes precedence.

Responses

dataobject
successboolean
messagestring

optional message to help user understand error code

codestring
Allowed values:APP_UNAUTHENTICATEDAPP_INCORRECT_INPUT_DATASAVE_DATA_ERROR_CODE