Sending

Generate Document

Generate the XML document that would be written for the given payload, without sending or storing it. Accepts the same body as the send document endpoint, minus the email delivery options and the raw XML document type. The document type identifier and process are resolved against the recipient exactly as they are when sending, so leaving them out returns the document written as the format the recipient is registered to receive; naming both yourself skips that lookup, again exactly as sending does. This endpoint does not check that the recipient can receive the document. The generated document is validated exactly as it is when sending. Documents generated through this endpoint do not count towards your Recommand subscription usage.

POST
/api/v1/{companyId}/generate
AuthorizationBasic <token>

Basic API key authentication. Create a new API key and secret in the Recommand dashboard.

In: header

Path Parameters

companyId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://app.recommand.eu/api/v1/string/generate" \  -H "Content-Type: application/json" \  -d '{    "recipient": "0208:987654321",    "documentType": "invoice",    "document": {      "invoiceNumber": "INV-2024-001",      "buyer": {        "name": "Example Company",        "street": "Example Street 1",        "city": "Brussels",        "postalZone": "1000",        "country": "BE"      },      "lines": [        {          "netPriceAmount": "12.40",          "vat": {            "percentage": "21.00"          }        }      ]    }  }'
{
  "success": true,
  "xml": "string",
  "documentType": "invoice",
  "doctypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",
  "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
}
{
  "success": false,
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}