Skip to content

Create a PDF mapping or add a version to it

Request

Without id, creates a new PDF mapping in the token's company with version 1 (name required). With the id of an existing PDF mapping, appends the next version to it. Every accepted request creates a version, also when its definition equals an earlier one.

Takes effect immediately only where Latest is followed: configuration rules following Latest of this PDF mapping switch to the new version. Pinned references keep their version.

name and description are not versioned: they are replaced when given and kept when omitted.

Security
OAuth2(Required scopes: integration-setup.write)
Bodyapplication/jsonrequired
idinteger

Id of the PDF mapping to add a version to. Omit to create a new PDF mapping.

Example:41
namestring, non-empty

Required without id. Not an identifier and not versioned: with id, renames when given.

descriptionstring

Not versioned; omitted = unchanged.

definitionobject(EInvoicePdfMappingDefinition)required
curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/integration-setup/e-invoice-pdf-mappings \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "XRechnung PDF",
    "description": "Preview for XRechnung UBL and CII",
    "definition": {
      "mappingExpression": "<xsl:stylesheet version=\"2.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">…</xsl:stylesheet>"
    }
  }'

Responses

Version created (and the PDF mapping, if no id was given).

Headers
Locationstring

URL of the configuration, e.g. /v2/integration-setup/e-invoice-pdf-mappings/41.

Bodyapplication/json
idintegerrequired

Configuration id.

Example:41
namestringrequired
Example:"XRechnung PDF"
companyIdstringrequired
Example:"6081acde0377a83b93f05a10"
versioninteger or nullrequired

The version created by this request (or, for an unchanged configuration rule, its current version; null when it has no history yet).

Example:3
createdbooleanrequired

True when this request created the configuration itself (no id was given).

Example:false
Response
{ "id": 41, "name": "XRechnung PDF", "companyId": "6081acde0377a83b93f05a10", "version": 1, "created": true }