Skip to content

Create Pro-Forma

Required scope: proforma:create

Generates a pro-forma document from an order revision. A pro-forma is an off-ledger preview, not a booked invoice. expectedOrderVersion is the order revision to snapshot; a mismatch is rejected. Generation is idempotent through idempotencyKey: reusing the same key returns the original pro-forma.

Generated Reference
POST /public-api/publicapi.v1.ProForma/CreateProForma

Generates or returns the pro-forma document for an immutable order revision. Idempotent per idempotency_key.

Request CreateProFormaRequest
Response CreateProFormaResponse

CreateProFormaRequest

Field Type Description
order_id string Order to generate the pro-forma for.
expected_order_version int32 Order revision to snapshot into the pro-forma.
idempotency_key string Idempotency key; reusing it returns the original pro-forma.

CreateProFormaResponse

Field Type Description
pro_forma ProForma The created or existing pro-forma.
{
"orderId": "<order-id>",
"expectedOrderVersion": 2,
"idempotencyKey": "proforma-order-123-v2"
}
{
"proForma": {
"id": "<pro-forma-id>",
"customerId": "<customer-id>",
"orderId": "<order-id>",
"orderVersion": 2,
"status": "PUBLIC_PRO_FORMA_STATUS_DRAFT",
"totalMinor": "151200",
"currency": "EUR",
"lines": [
{ "description": "Solar panel", "quantity": 8, "unitPriceMinor": "18900", "vatRate": 0.21 }
],
"createdAt": "1737936000"
}
}