Transform Preview

Preview transform

Test a payload transform expression against sample input

post/api/v1/projects/{projectId}/transform-preview

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/api/v1/projects/{projectId}/transform-preview
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

projectIdstring uuid required

Request body

inputPayloadstring required

The event payload to transform

transformExpressionstring

A bare JSONPath to extract, for the simplest case. Ignored when a template, script or transformation is given.

templatestring

An unsaved template or script to run. This is what the Transform Studio sends while you are still editing.

kind'TEMPLATE' | 'JAVASCRIPT'

The language template is written in. Omitted means TEMPLATE.

transformationIdstring uuid

A saved transformation to run instead. Takes priority over template, and brings its own kind.

customHeadersstring

Headers to merge, as a JSON object. A script sees these as webhook.headers and may override them.

eventTypestring

The event type a script sees as webhook.eventType

eventIdstring

The event id a script sees as webhook.eventId

urlstring

The destination URL a script sees as webhook.url. Read-only to the script; a transformation cannot redirect a delivery.

Example request

{
  "eventType": "order.completed"
}

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.