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
RESTPOSThttps://[Your URL] /servlet/e-commerce/orders

Headers

Property TypeDescriptionDefaultRequired
x-ev-store-hashstringStore Hash, can be gotten from the Store pageYes
x-ev-customer-hashstringCustomer Hash, can be gotten from the stores page.Yes

Parameters

Property TypeDescriptionDefaultRequired
Contact Identifier (contact_email or contact_unique_id)stringThe contact that needs to be actioned, it could be one of either the contact _email or contact_unique_idYes
order_link_urlstringURL that links to the order page at store.No
Order_idstringURL that links to the order page at storeNo
sub_totalstringSub total value of the orderNo
shipping_feestringShipping fee on the orderNo
taxesstringTaxes charged on the orderNo
totalstringTotal of the order No
discountstringDiscount on the orderNo
productsarrayArray of products that wasYes
checkout_urlstringThe Store checkout URL that shows the cartNo
workflow_idintegerIf 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"}