Automation MCP Server Features Blog Pricing Contact

Order-X for Developers: Purchase Orders in the Factur-X Family

Order-X applies the idea that made Factur-X work, one PDF that is readable by people and structured for machines, to the purchase order. This guide covers the standard from a developer's seat: the Cross-Industry Order XML inside the PDF/A-3, the BASIC, COMFORT and EXTENDED profiles, the 220/230/231 type codes that carry the order dialogue, and the REST endpoints that create and validate all of it without a PDF or XML library in your build.

The purchase order is where most B2B document flows still run on PDFs a human has to read and retype. Invoicing got its hybrid answer years ago: Factur-X and ZUGFeRD put structured XML inside the PDF, and the same file now serves people and software. Order-X, published jointly by Germany's FeRD and France's FNFE-MPE, is that exact idea applied one step earlier in the transaction: the order, the order change, and the order response, each as a PDF/A-3 with a UN/CEFACT Cross-Industry Order (CIO) XML embedded as order-x.xml.

For developers the appeal is symmetry. If your systems already speak the Factur-X data model, Order-X reuses the concepts you know: the same party and line structures, the same profile ladder, the same hybrid container. This guide covers the standard from the integration seat: what is in the file, which profile and type code to pick, and the REST endpoints that create and validate Order-X without adding a PDF or XML dependency to your build.

What Order-X is

An Order-X file is a PDF/A-3 with three defining properties:

A visual layer for people. The PDF pages show the order the way a buyer or supplier expects to read it. For approval flows, archives, and every process that still runs on "attach it to the email", the file behaves like the purchase orders everyone already handles.

A data layer for machines. Embedded in the container is order-x.xml, a UN/CEFACT Cross-Industry Order document carrying the structured order data: parties, line items, quantities, prices, references, delivery details. A receiving system extracts the XML and books the order without OCR or retyping.

Metadata that declares what the file is. The PDF's XMP metadata declares the Order-X document type and the conformance profile, so software can recognize the file for what it is before touching the XML.

If that description sounds like Factur-X, that is the point: Order-X is the same architecture with an order payload instead of an invoice payload. The standard exists because procurement deserves the same automation invoicing got, and because a supply chain that exchanges structured orders can match invoices against them automatically later (the purchase order reference on an EN 16931 invoice, BT-13, suddenly has a structured document behind it).


Profiles and type codes

Two small decisions shape every Order-X integration, and both are single request fields in the API.

The profile is the conformance level of the XML, mirroring the Factur-X ladder:

Profileoptions.profileWhen to use it
BASICbasicCore order data for straightforward transactions.
COMFORTcomfort (default)The full commercial detail a typical order dialogue needs. The right choice unless you know otherwise.
EXTENDEDextendedThe complete UN/CEFACT breadth for complex procurement scenarios.

The type code (UNTDID 1001) says which stage of the order dialogue the document carries:

Codeoptions.typeCodeDocument
220"220" (default)Order: the buyer's purchase order.
230"230"Order change: the buyer amends a previously sent order.
231"231"Order response: the supplier accepts, amends, or declines.

Together they make the full dialogue expressible in one endpoint: the buyer issues a 220, follows up with a 230 when quantities move, and the supplier answers with a 231, all as hybrid documents both sides can read and process.


Create an Order-X hybrid

POST /v1/create/order-x takes the order as structured JSON, in the same BT-style document model the invoice endpoints use, where the document number field carries the order number. The API builds the CIO XML, validates it against the declared profile, renders the visual layer titled as a purchase order, embeds the XML, and returns the finished PDF/A-3:

curl -X POST https://api.invoicexml.com/v1/create/order-x \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order": {
      "invoiceNumber": "PO-2026-0142",
      "issueDate": "2026-09-29",
      "currency": "EUR",
      "buyerReference": "PROJ-88",
      "seller": {
        "name": "Bauteile Nord GmbH",
        "vatIdentifier": "DE123456789",
        "postalAddress": { "line1": "Industrieweg 4", "postCode": "28195", "city": "Bremen", "country": "DE" }
      },
      "buyer": {
        "name": "Maschinenbau Sued AG",
        "postalAddress": { "line1": "Werkstrasse 20", "postCode": "70173", "city": "Stuttgart", "country": "DE" }
      },
      "lines": [
        {
          "quantity": 500,
          "unitCode": "H87",
          "item": { "name": "Linearlager LM12UU" },
          "priceDetails": { "netPrice": 3.40 },
          "vatInformation": { "rate": 19 }
        }
      ]
    },
    "options": { "profile": "comfort", "typeCode": "220" }
  }' \
  --output order-x.pdf

An order change reuses the same request with "typeCode": "230"; the supplier's response is "231". The response file's XMP declares the Order-X document type, and the embedded order-x.xml carries the profile in its guideline identifier, which is what validators key on later.


Your own PDF, or XML only

Two variations cover the remaining integration shapes:

Your own visual layer. If your ERP already renders purchase orders in your house layout, set options.pdfUrl to the PDF's location and the API embeds the validated CIO XML into your design instead of generating one, returning the hybrid with your pages and the standard's data layer.

XML without the container. POST /v1/create/cio is the same document model with a plain Cross-Industry Order XML response, no PDF involved. It mirrors the relationship /v1/create/cii has to the invoice hybrids: the payload alone, for channels that exchange raw XML or systems that do their own packaging.


Validate Order-X and CIO files

POST /v1/validate/order-x takes either container shape: a hybrid Order-X PDF, from which the embedded order-x.xml is extracted automatically, or a raw CIO XML file directly. The endpoint reads the guideline identifier, validates against the declared profile's schema, and returns the verdict as structured JSON; unknown guideline identifiers fall back to COMFORT validation with an advisory saying so:

curl -X POST https://api.invoicexml.com/v1/validate/order-x \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]"

Files from any producer are accepted, which gives the endpoint the same two roles its invoice siblings have: an intake check on orders your suppliers or customers send, and an independent verdict on your own output while you build. For the human side of that loop, POST /v1/validate/order-x/report runs the same validation and returns a shareable PDF report instead of JSON, which is the artifact you attach when telling a trading partner what is wrong with their file.

A document that is not a Cross-Industry Order at all (an invoice uploaded by mistake, say) is identified as such rather than drowned in schema errors, and a PDF with no embedded XML gets a clear verdict naming that as the problem.


Order-X next to Factur-X in one integration

The practical payoff of the family resemblance is that order and invoice flows share one integration pattern. The same JSON document model describes both; what changes is the endpoint and, later, the direction:

FlowDocumentEndpoint
Buyer ordersOrder-X (220)POST /v1/create/order-x
Buyer amendsOrder-X (230)POST /v1/create/order-x
Supplier respondsOrder-X (231)POST /v1/create/order-x
Supplier invoicesFactur-X or ZUGFeRD, carrying the PO number in BT-13POST /v1/create/facturx
Either side checks a received fileAny of the abovePOST /v1/validate/order-x, /v1/validate/facturx

Teams that adopted the hybrid model for invoices under the French and German mandates get the order side almost for free: the request model is already mapped from their ERP, and the purchase order reference that three-way matching depends on now points at a structured document. The Factur-X technical overview covers the invoice half of that pairing in depth.


Where Order-X support lives

One honest scope note so nobody designs against the wrong surface: Order-X is available through the REST API only. The InvoiceXML MCP server and the Zapier apps cover the invoice formats and do not expose the Order-X endpoints. If your integration runs through either of those, the order flow is a direct HTTP call alongside them, using the same API key.


Get started

The fastest way in is one request: take the curl example above, swap in your own order data, and open the PDF that comes back, then upload it to the validator and read a clean verdict. Create a free InvoiceXML account → and get 100 credits for free, no credit card required.

Related resources:


InvoiceXML is a REST API for European e-invoice compliance covering Factur-X, ZUGFeRD, XRechnung, Peppol UBL, CII, and Order-X purchase orders. Stateless processing, GDPR compliant by architecture, and callable from any stack with an HTTP client.

Start free today

Ready to automate your invoices?

Validate, convert and embed compliant e-invoices through one API. Start your 30-day free trial. No credit card required.

GDPR Compliant No credit card required Setup in minutes
Peppol UBL
Factur-X
EN 16931
142 / 142 passed
Compliant
PDF/A-3 embedded