Skip to content

Create an XSLT transformation or replace one

Request

Without id, creates a transformation in the token's company. With the id of an existing one, replaces it completely (name, description, projects and definition); it is not versioned.

name must be unique within the company: a name already used by another transformation is rejected with 409. Every project in projectIds must exist in the company. The stylesheet is not compiled on save; try it with POST /v2/integration-setup/xslt-transformations/test first.

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

Id of the transformation to replace. Omit to create one.

namestring, non-emptyrequired

Unique within the company. See Naming conventions.

descriptionstring or null, <= 240 characters
projectIdsArray of strings, non-emptyrequired

Projects of the company that use this transformation.

applyToListboolean

Apply to document list exports instead of single documents.

Default:false
definitionobject(XsltTransformationDefinition)required
curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/integration-setup/xslt-transformations \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "ACME Inbox – Invoice XML export",
    "description": "Managed by onboarding script acme-onboarding; changes are overwritten",
    "projectIds": [
      "64b7f0c2a1e4d5f6a7b8c9d0"
    ],
    "definition": {
      "transformation": "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"/\"><invoice><xsl:value-of select=\"//documentNumber\"/></invoice></xsl:template></xsl:stylesheet>",
      "removeEmptyElements": true
    }
  }'

Responses

Replaced.

Bodyapplication/json
idstringrequired
Example:"665f1c2e8b3a4d0012345678"
companyIdstringrequired
namestringrequired
descriptionstring or null
projectIdsArray of stringsrequired
applyToListbooleanrequired
createdAtstring or null, (date-time)
updatedAtstring or null, (date-time)
definitionobject(XsltTransformationDefinition)required
Response
{ "id": "665f1c2e8b3a4d0012345678", "companyId": "6081acde0377a83b93f05a10", "name": "ACME Inbox – Invoice XML export", "description": "Managed by onboarding script acme-onboarding; changes are overwritten", "projectIds": [ "64b7f0c2a1e4d5f6a7b8c9d0" ], "applyToList": false, "createdAt": "2026-10-02T09:30:00.000Z", "updatedAt": "2026-11-20T10:10:00.000Z", "definition": { "transformation": "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"/\"><invoice><xsl:value-of select=\"//documentNumber\"/></invoice></xsl:template></xsl:stylesheet>", "removeEmptyElements": true, "addBinaryFile": false } }