Configure Retail App - REST API
This page explains how to establish REST API integration between Customer v2 and an external service. The API's can be used in multiple flows and can be configured with variable placeholders to allow reuse in multiple scenarios.
Follow a step-by-step tutorial to connection.
Before You Begin
Confirm you know the API you want to connect to and the authorization requirements needed perform API calls.
Think about what information returned from the API call is relevant to complete the flow and how to parse it for the user.
Accessing the REST API Configuration
Sign in to iX Hello Customer v2.
In the left navigation menu, go to Integrations → REST API.
Select Create connection or open an existing REST API to edit. The detail page includes:
A header displaying the Name and the description. Click edit to update the base URL and authorization values.
A list view of configured methods for this API.
Name
RetailAPI
Description
Retail Demo API - Customer service for jacket returns and exchanges
Customer v2 doesn't support editing the Name and Description of the REST API after creation. Ensure they are correct before saving.
Click Save to create the REST API and continue to the base URL and authorization type.
Authorization Type
No Authorization

Configuring the Method request
Step 1: checkInventoryMethod
Setup of the overarching settings that will be used by all methods
Name
checkInventory
Description
A description to provide further information.
Request type
POST
Method path *
inventory
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"product_name":"{{product_name}}","size":"{{size}}","color":"{{color}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA
Enter a <space> in a required setting to use the default value of that setting.

Step 2: checkInventoryAllMethod
Setup of the overarching settings that will be used by all methods
Name
checkInventoryAll
Description
A description to provide further information.
Request type
POST
Method path *
inventory
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"product_name":"{{product_name}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 3: generateReturnLabelMethod
Setup of the overarching settings that will be used by all methods
Name
generateReturnLabel
Description
A description to provide further information.
Request type
POST
Method path *
return-label
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"order_id":"{{order_id}}","item_sku":"{{item_sku}}","customer_email":"{{customer_email}}","return_reason":"{{return_reason}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 4: getUserDataMethod
Setup of the overarching settings that will be used by all methods
Name
getUserData
Description
A description to provide further information.
Request type
GET
Method path *
user-data
Query String *
ani={{ani}}
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"order_id":"{{order_id}}","item_sku":"{{item_sku}}","customer_email":"{{customer_email}}","return_reason":"{{return_reason}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 5: processExchangeMethod
Setup of the overarching settings that will be used by all methods
Name
processExchange
Description
A description to provide further information.
Request type
POST
Method path *
exchange
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"order_id":"{{order_id}}","original_item_sku":"{{original_item_sku}}","new_item_sku":"{{new_item_sku}}","customer_id":"{{customer_id}}","customer_email":"{{customer_email}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 6: registerUserMethod
Setup of the overarching settings that will be used by all methods
Name
registerUser
Description
A description to provide further information.
Request type
POST
Method path *
user-data
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"ani":"{{ani}}","name":"{{name}}","email":"{{email}}","loyalty_status":"{{loyalty_status}}"}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 7: sendConfirmationMethod
Setup of the overarching settings that will be used by all methods
Name
sendConfirmation
Description
A description to provide further information.
Request type
POST
Method path *
sms
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"phone_number":"{{phone_number}}","message_type":"confirmation","content":{"confirmation_number":"{{confirmation_number}}"}}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 8: sendProductLinkMethod
Setup of the overarching settings that will be used by all methods
Name
sendProductLink
Description
A description to provide further information.
Request type
POST
Method path *
sms
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"phone_number":"{{phone_number}}","message_type":"product_link","content":{"product_url":"{{product_url}}"}}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Step 9: sendSMSMethod
Setup of the overarching settings that will be used by all methods
Name
sendSMS
Description
A description to provide further information.
Request type
POST
Method path *
sms
Query String *
NA
Request Headers *
Request headers are key-value pairs used to transfer metadata about the request.
{"Content-Type":"application/json"}
Request Body *
The request body contains the actual data being transferred between the client and the server, in JSON format.
{"phone_number":"{{phone_number}}","message_type":"{{message_type}}","content":{"product_url":"{{product_url}}","confirmation_number":"{{confirmation_number}}","message":"{{message}}"}}
Result Type
Entry
Result Path
NA
Record Path
$
Record Template
NA
Record Limit
10
Valid Result Template
NA
Empty Result Template
NA

Next Steps
Once you’ve configured and saved your REST API configuration, they can be selected and configured in an API call node.
Follow the vNext Retail Bot tutorial to setup a REST API configuration in preparation for a Retail Bot.
Last updated
Was this helpful?