Skip to main content
POST
/
dsf
/
documents
/
generate
/
invoice
Create a sales invoice
curl --request POST \
  --url https://panel.sendcloud.sc/api/v3/dsf/documents/generate/invoice \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tracking_number": "3SABCD1234567",
  "items": [
    {
      "description": "T-Shirt",
      "quantity": 3,
      "unit_price": 19.95
    },
    {
      "description": "Pants",
      "quantity": 1,
      "unit_price": 45
    }
  ],
  "currency_code": "EUR",
  "tax_rate": 21
}
'
{
  "file_token": "b90e7a70-57c6-4338-992a-eae50d637261",
  "preview_url": "https://s3.example.com/sales_invoice.pdf?token=..."
}

Documentation Index

Fetch the complete documentation index at: https://sendcloud.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Body

application/json
tracking_number
string
required

Parcel tracking number

Example:

"3SABCD1234567"

items
object[]
required

List of invoice line items

currency_code
string
required

ISO 4217 currency code

Example:

"EUR"

tax_rate
number<double>
required

Tax rate percentage (0-99)

Required range: 0 <= x <= 99
Example:

21

company_logo_path
string | null

Optional company logo to include on the invoice. Provide a base64-encoded PNG image string or a public url leading to the company logo image. If not provided a company name will be used to generate a default logo.

force
boolean
default:false

Bypasses the maximum invoice amount validation (5000 EUR). Only use this when strictly necessary, as the validation exists to prevent erroneous invoices.

Response

Invoice generated successfully

file_token
string
required

A token referencing the generated document. Use this token when attaching the document to a ticket (in the attachments array) or when submitting it as part of a requested data response.

preview_url
string
required

Temporary pre-signed URL for previewing or downloading the generated PDF. This URL expires after 72 hours and should not be stored for long-term use.