curl --request POST \
--url https://api.sandbox.usenash.com/v1/workflows/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobId": "<string>",
"orderId": "<string>",
"live": false
}
'import requests
url = "https://api.sandbox.usenash.com/v1/workflows/{id}/test"
payload = {
"jobId": "<string>",
"orderId": "<string>",
"live": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({jobId: '<string>', orderId: '<string>', live: false})
};
fetch('https://api.sandbox.usenash.com/v1/workflows/{id}/test', 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.sandbox.usenash.com/v1/workflows/{id}/test",
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([
'jobId' => '<string>',
'orderId' => '<string>',
'live' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.usenash.com/v1/workflows/{id}/test"
payload := strings.NewReader("{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.usenash.com/v1/workflows/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/workflows/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}"
response = http.request(request)
puts response.read_body[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Test Workflow
Run a workflow against a real entity without activating it. Requires jobId or orderId — the entity the run is evaluated against. By default this is a dry run: filters are evaluated against the entity and each action returns a preview of what it would do, without performing it. With live=true, only the messaging actions (send_slack, send_email, send_sms) are actually performed, and their content is prefixed with [Test]; every other action stays preview-only and its preview carries a note saying so, so a live test can never apply a state change such as cancel_order or add_tag. Returns per-node status, so a caller can confirm which filters passed before activating the workflow.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/workflows/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobId": "<string>",
"orderId": "<string>",
"live": false
}
'import requests
url = "https://api.sandbox.usenash.com/v1/workflows/{id}/test"
payload = {
"jobId": "<string>",
"orderId": "<string>",
"live": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({jobId: '<string>', orderId: '<string>', live: false})
};
fetch('https://api.sandbox.usenash.com/v1/workflows/{id}/test', 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.sandbox.usenash.com/v1/workflows/{id}/test",
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([
'jobId' => '<string>',
'orderId' => '<string>',
'live' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.usenash.com/v1/workflows/{id}/test"
payload := strings.NewReader("{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.usenash.com/v1/workflows/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/workflows/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jobId\": \"<string>\",\n \"orderId\": \"<string>\",\n \"live\": false\n}"
response = http.request(request)
puts response.read_body[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Job ID to build the workflow context from. Provide jobId or orderId (or both).
1Order ID to build the workflow context from. Provide jobId or orderId (or both).
1When false (default) the run is a dry run: filters are evaluated against the real entity and every action returns a preview of what it would do without performing it. When true, only the messaging actions (send_slack, send_email, send_sms) are performed, with their content prefixed by [Test]; all other actions remain preview-only.
Was this page helpful?