curl --request POST \
--url https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"type": "track",
"event": "Order Completed",
"properties": {
"order_id": "ord_8291",
"total": 129.5,
"currency": "USD"
}
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview"
payload = { "event": {
"type": "track",
"event": "Order Completed",
"properties": {
"order_id": "ord_8291",
"total": 129.5,
"currency": "USD"
}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
type: 'track',
event: 'Order Completed',
properties: {order_id: 'ord_8291', total: 129.5, currency: 'USD'}
}
})
};
fetch('https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'type' => 'track',
'event' => 'Order Completed',
'properties' => [
'order_id' => 'ord_8291',
'total' => 129.5,
'currency' => 'USD'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview"
payload := strings.NewReader("{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "<string>",
"status": 429,
"retry_after": 2
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Preview a transform on a sample event
Run a stored event-transform function against a caller-supplied sample event and return the reshaped result alongside the drop verdict — a dry-run with no persistence and no delivery. Use it in the rule builder to iterate on a spec against realistic payloads before enabling the function. The stored spec is re-validated before it is evaluated, so a function persisted under an older DSL revision cannot mis-fire. 404 when the id does not exist. Requires an owner, admin, or developer role.
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"type": "track",
"event": "Order Completed",
"properties": {
"order_id": "ord_8291",
"total": 129.5,
"currency": "USD"
}
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview"
payload = { "event": {
"type": "track",
"event": "Order Completed",
"properties": {
"order_id": "ord_8291",
"total": 129.5,
"currency": "USD"
}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
type: 'track',
event: 'Order Completed',
properties: {order_id: 'ord_8291', total: 129.5, currency: 'USD'}
}
})
};
fetch('https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'type' => 'track',
'event' => 'Order Completed',
'properties' => [
'order_id' => 'ord_8291',
'total' => 129.5,
'currency' => 'USD'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview"
payload := strings.NewReader("{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/cdp/transform-functions/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"type\": \"track\",\n \"event\": \"Order Completed\",\n \"properties\": {\n \"order_id\": \"ord_8291\",\n \"total\": 129.5,\n \"currency\": \"USD\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "<string>",
"status": 429,
"retry_after": 2
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Path Parameters
Body
A sample event payload the stored transform runs against — the same shape a track call emits (event name plus a properties map).
{
"type": "track",
"event": "Order Completed",
"properties": {
"order_id": "ord_8291",
"total": 129.5,
"currency": "USD"
}
}
Response
data.dropped (the drop verdict), data.event (the reshaped event after every operation ran), plus the function_id and enabled echo — in the standard { data, meta } envelope.