Create a commercial document

This endpoint allows you to create a commercial document (proforma,
shipping order or purchasing order).

The document number is assigned by Pennylane, based on the numbering
configured for this type of document.
GET /api/external/v2/numberings lists whether proforma, shipping_order,
or purchasing_order is configured.

ℹ️

This endpoint requires the following scope: commercial_documents:all

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Allowed:
date
required

Document issue date (ISO 8601)

date
required

Document validity deadline (ISO 8601)

int64
required

Customer identifier

int64

The commercial document template ID

string | null

For example, the contact details of the person to contact

string | null

Document title

string | null

Document description

string
enum
Defaults to EUR
string | null

Additional details. Maximum 2,000 characters.

string
enum

The local default is based on the thirdparty (customer / supplier ) billing_language . In case the customer is not present, we will default to the company locale.

Allowed:
discount
object
invoice_line_sections
array of objects
invoice_line_sections
string

A unique external reference you can provide to track this document. If not provided, Pennylane will generate an identifier for you.

invoice_lines
array
required
length ≥ 1
invoice_lines*

Provide only the product_id to automatically populate label,
raw_currency_unit_price, unit and vat_rate.
You can override any of these fields by providing them explicitly.

int64
required

The product ID. Auto-fills label, raw_currency_unit_price, unit and vat_rate from the product.

number
required

Line item quantity (number of items)

string

Line item label

string

The unit price excluding taxes (undiscounted if a discount is set). Can be set up to 6 decimals.

string

Line item unit (type of unit)

string
enum

Product VAT rate. A 20% VAT in France is FR_200.

string | null

The description of the invoice line

integer

Has to correspond to the rank number of a line items section in which the line item should be

discount
object
Headers
string

Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json