Overview
This request allows you to synchronize contacts from an eCommerce store to the store list in our platform.
The Method
| API | - | Method |
|---|---|---|
| REST | POST | https://[Your URL] /servlet/e-commerce/sync |
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 |
|---|---|---|---|---|
| Contacts | array | Contacts to be synced | Yes |
Responses
| Type | Description |
|---|---|
| array | An array that corresponds to the passed array, with the results. The array also contains the $batch_id string, the identifier for this import, which can be used in other API calls to check the progress of the import. |
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 = [
'contacts' => [[
'contact_email' => '[email protected]',
'contact_name' => 'test name',
'contact_last_purchase_date' => '12763476',
'contact_total_number_of_purchases' => 10,
'contact_total_purchases_amount' => 10.00
], [
'contact_email' => '[email protected]',
'contact_name' => 'test name 2',
'contact_last_purchase_date' => '12763476',
'contact_total_number_of_purchases' => 5,
'contact_total_purchases_amount' => 50.38
]]
];
$request_data = ($request_param);
$response = $client->post('https://qa-za.everlytic.net/servlet/e-commerce/sync', ['form_params' => $request_data]);
Example Response
{"status":"success"}