Workflow Manager
POST
/api/v1/workflow
Task Workflow Api Spec
Request headers
transaction_id
string
required
any random UUID
Request body
Object
payload
string
required
any payload to be transformed and send to castle
retailer_moniker
string
required
Retailer Moniker
trigger_detail
Object
required
notification_type
string
required
notification type the retailer has signed up for
return_id
string
narvar unique return id
tracking_number
string
incoming tracking number for that order
order_number
string
order number of that particular order
locale
string
local of that particular order
custom_attributes
Object
additonal properties as a json map
task_workflow
Array
required
Object
parent_task
string
required
parent channel which is not dependent on any channels
dependent_channel
Array
of
string
dependent channel dependent on the parent channel… These channels will be triggered only when parent channel is successful
task_channel
Object
parent task maps to which channel
Example:
"parent_task1" : "webhook"
email_info
Object
email_sender_name
string
from_contact
string
reply_to_contact
string
test_contact
string
email_subject
string
contacts
Object
name
string
email_address
string
email_provider
Object
name
string
credentials
Object
Example:
credentials map
Examples
Responses
200
OK
Successfully Processed the payload
400
Bad Request
Not able to marshall the payload or any other processing issues
Example 1
POST http://webhook-workflow-manager-qa01-internal/task HTTP/1.1
Content-Type: application/json
{
"payload": "",
"retailer_moniker": "testretailer",
"trigger_detail": {
"notification_type": "delivered",
"return_id": "1234",
"tracking_number": "trackin",
"order_number": "order",
"locale": "locale",
"custom_attributes": {},
"email_info": {
"email_sender_name": "test",
"from_contact": "sda",
"reply_to_contact": "reply_to_contact",
"test_contact": "test_contact",
"contacts": {
"name": "nanda",
"email_address": "nanda@narvar.com"
},
"provider": {
"name": "sparkpost",
"credentials": {
"api_key": "12334"
}
}
},
"task_workflow": [
{
"parent_channel": "webhook_1",
"dependent_channel": [
"sms_1",
"email_1"
],
"task_channel": {
"webhook_1": "webhook",
"sms1": "sms",
"email_1": "email"
}
}
]
}
}