NAV
Shell HTTP JavaScript Python PHP

Emplifi Live Commerce API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The REST API allows you to integrate Live Commerce into your app, website or CRM. It’s been designed to share Emplifi Live Commerce core functionalities.

Base URLs:

Authentication

LiveAdvisor Availability

check for a specific live advisor availability

Code samples

# You can also use wget
curl -X GET https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/direct/{alias}/is-available \
  -H 'Accept: application/json' \
  -H 'api-key: API_KEY'

GET https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/direct/{alias}/is-available HTTP/1.1
Host: sandbox.goinstore.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'api-key':'API_KEY'
};

fetch('https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/direct/{alias}/is-available',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'api-key': 'API_KEY'
}

r = requests.get('https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/direct/{alias}/is-available', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'api-key' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/direct/{alias}/is-available', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /gis/rest/api/v1/live-advisor/direct/{alias}/is-available

check for a specific live advisor availability by specifying the alias for the advisor of interest.

Parameters

Name In Type Required Description
alias path string true alias of the live advisor.

Example responses

200 Response

{
  "availability": "AVAILABILITY_UNKNOWN"
}

Responses

Status Meaning Description Schema
200 OK ok AdvisorAvailableResponse
400 Bad Request Bad Request. Check response body for extra details. None
401 Unauthorized Unauthorized. The api-key is either disabled or not valid. None
403 Forbidden Forbidden. The api-key is not authorized to access the requested resource. None
404 Not Found Not Found None
500 Internal Server Error Server error. Some error occurred on server side, no action is required on client. None

check availability via multi-level priorities

Code samples

# You can also use wget
curl -X POST https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/multi-level/any-available \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'api-key: API_KEY'

POST https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/multi-level/any-available HTTP/1.1
Host: sandbox.goinstore.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "required-routing-keys": [
    "string"
  ],
  "operator": "AND",
  "optional-routing-keys": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'api-key':'API_KEY'
};

fetch('https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/multi-level/any-available',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': 'API_KEY'
}

r = requests.post('https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/multi-level/any-available', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'api-key' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://sandbox.goinstore.com/gis/rest/api/v1/live-advisor/multi-level/any-available', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /gis/rest/api/v1/live-advisor/multi-level/any-available

Check for live advisor availability using multi-level priorities. (read-only operation)

Body parameter

{
  "required-routing-keys": [
    "string"
  ],
  "operator": "AND",
  "optional-routing-keys": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body AdvisorAvailableMultiLevelRequest false none
» required-routing-keys body [string] false optional parameter, if missing an empty array is assumed. If present, represents the list of routing keys used to determine the advisors to consider for the availability. If present, only advisors configured with one or all (depending on the operator) the keys will be considered.
» operator body string false optional parameter, if missing AND is assumed. Represents wheter the required keys are ALL required (AND operator) or just ANY of them (OR operator).
» optional-routing-keys body [string] false optional parameter, if missing an empty array is assumed. If present, represents the list of routing keys used to determine the advisors to consider for the availability. In this case the advisor is only preferred over others if has any of the keys from this list.

Enumerated Values

Parameter Value
» operator AND
» operator OR

Example responses

200 Response

{
  "availability": "AVAILABILITY_UNKNOWN"
}

Responses

Status Meaning Description Schema
200 OK ok AdvisorAvailableResponse
400 Bad Request Bad Request. Check response body for extra details. None
401 Unauthorized Unauthorized. The api-key is either disabled or not valid. None
403 Forbidden Forbidden. The api-key is not authorized to access the requested resource. None
404 Not Found Not Found None
500 Internal Server Error Server error. Some error occurred on server side, no action is required on client. None

Schemas

AdvisorAvailableResponse

{
  "availability": "AVAILABILITY_UNKNOWN"
}

Represents the availability of the live advisors. AVAILABILITY_UNKNOWN should never occur unless of service errors.

Properties

Name Type Required Restrictions Description
availability string false none none

Enumerated Values

Property Value
availability AVAILABILITY_UNKNOWN
availability AVAILABLE
availability NOT_AVAILABLE

AdvisorAvailableMultiLevelRequest

{
  "required-routing-keys": [
    "string"
  ],
  "operator": "AND",
  "optional-routing-keys": [
    "string"
  ]
}

Request body for the multi-level availability algorithm.

Properties

Name Type Required Restrictions Description
required-routing-keys [string] false none optional parameter, if missing an empty array is assumed. If present, represents the list of routing keys used to determine the advisors to consider for the availability. If present, only advisors configured with one or all (depending on the operator) the keys will be considered.
operator string false none optional parameter, if missing AND is assumed. Represents wheter the required keys are ALL required (AND operator) or just ANY of them (OR operator).
optional-routing-keys [string] false none optional parameter, if missing an empty array is assumed. If present, represents the list of routing keys used to determine the advisors to consider for the availability. In this case the advisor is only preferred over others if has any of the keys from this list.

Enumerated Values

Property Value
operator AND
operator OR