Overview
This request allows you to trigger an already setup order notification workflow. You will do this when you want to add a contact that has made a purchase on an ecommerce store to a workflow.
The Method
API | - | Method |
---|---|---|
REST | POST | https://[Your URL] /servlet/e-commerce/orders |
Your URL is the address of your install.
Headers
Property | Type | Description | Default | Required |
---|---|---|---|---|
x-ev-store-hash | string | Store Hash, can be gotten from the Store page | Yes | |
x-ev-customer-hash | string | Customer Hash, can be gotten from the stores page. | Yes |
Parameters
Property | Type | Description | Default | Required |
---|---|---|---|---|
Contact Identifier (contact_email or contact_unique_id) | string | The contact that needs to be actioned, it could be one of either the contact _email or contact_unique_id | Yes | |
order_link_url | string | URL that links to the order page at store. | No | |
Order_id | string | URL that links to the order page at store | No | |
sub_total | string | Sub total value of the order | No | |
shipping_fee | string | Shipping fee on the order | No | |
taxes | string | Taxes charged on the order | No | |
total | string | Total of the order | No | |
discount | string | Discount on the order | No | |
products | array | Array of products that was | Yes | |
checkout_url | string | The Store checkout URL that shows the cart | No | |
workflow_id | integer | If you want to specify what Workflow to be triggered, you pass in the ID of the Workflow you want to add the contacts to. This can be found by hovering over the checkbox of the Workflow on the Workflow History page. | No |
Code Samples
Example Request
$client = new \GuzzleHttp\Client(['headers' => [ 'x-ev-store-hash' => '6361437b-7adf-402c-b4b0-9e4a3a1e5d85', 'Content-Type' => 'application/json', 'x-ev-customer-hash' => '7URV2nrUrSHswsrE' ]]); $request_param = [ 'order_link_url' => 'http://store.com/order_url/2344', 'order_id' => 34, 'products' => json_decode('[{ "product_description": "Mandatory coherent internet solution", "product_name": "Mop Head - Cotton, 24 Oz", "product_price": 21, "product_quantity": 4, "product_sku": 412, "product_line_total": 100043.22, "product_special_price": 71, "product_url": "https://bbb.org/risus.xml", "product_gallery": ["https://source.unsplash.com/400x1300/?rap", "https://source.unsplash.com/400x300/?rap"] }]'), 'contact_email' => '[email protected]' ]; $request_data = json_encode($request_param); $response = $client->post('https://qa-za.everlytic.net/servlet/e-commerce/orders', ['body' => $request_data]);
Example Response
{"status":"success"}