Professional Documents
Culture Documents
Test Data...............................................................................................................................................2
Obtaining a token..................................................................................................................................2
Calling Order Details API via Gateway...................................................................................................3
Orders by CustomerId.......................................................................................................................3
Order by CustomerId and Order Reference.......................................................................................3
Calling Customer Profile API via Gateway..............................................................................................5
Calling Interaction Builder API via Gateway...........................................................................................6
Create live chat request data.............................................................................................................6
Send a POST request..........................................................................................................................6
Sample data.......................................................................................................................................6
Test Data
Username Password Customer Id
ccsarahstudent@asos.com asos123456 241007484
test15_qa@asos.com asos123456 201655977
Obtaining a token
1. Go to https://test.asosservices.com/?x-site-origin=env02pt.asosdevelopment.com
2. Log in using credentials from the above table
3. Once logged in, open developer tools (F12 in Edge or Chrome) and run this in the console:
await asos.sdk.identity.getAccessToken()
4. Copy the token
Calling Order Details API via Gateway
Orders by CustomerId
Send a GET request to the following URL:
https://care-gatewayapi-v1-pt.asosdevelopment.com/care/gatewayapi/v1/
orderdetails/commerce/myaccount/v1/customers/{customerId}/orders
Necessary headers:
asos-gateway-key: 6b62e430badc4ae48df8626574208e0f
Sample data:
CustomerId: 241007484
cURL code:
curl --location --request GET 'https://care-gatewayapi-v1-pt.asosdevelopment.com/
care/gatewayapi/v1/orderdetails/commerce/myaccount/v1/customers/241007484/orders'
\
--header 'asos-gateway-key: 6b62e430badc4ae48df8626574208e0f ' \
--header 'Authorization: Bearer {token}'
https://care-gatewayapi-v1-pt.asosdevelopment.com/care/gatewayapi/v1/orderdetails/
commerce/myaccount/v1/customers/{customerId}/orders/{OrderReference}
Necessary headers:
asos-gateway-key: 6b62e430badc4ae48df8626574208e0f
CustomerId: 241007484
cURL code:
curl --location --request GET 'https://care-gatewayapi-v1-pt.asosdevelopment.com/
care/gatewayapi/v1/orderdetails/commerce/myaccount/v1/customers/241007484/orders/
5UZ1E8YVZS3K\
--header 'asos-gateway-key: 6b62e430badc4ae48df8626574208e0f' \
--header 'Authorization: Bearer {token}'
Calling Customer Profile API via Gateway
https://care-gatewayapi-v1-pt.asosdevelopment.com/care/gatewayapi/v1/
customerprofile/customer/profile/v2/customers/{customerId}
Necessary headers:
asos-gateway-key: 6b62e430badc4ae48df8626574208e0f
Sample data:
CustomerId: 241007484
cURL code:
https://care-gatewayapi-v1-pt.asosdevelopment.com/care/gatewayapi/v1/
interactionbuilder/care/interactionbuilder/v2/livechat/initiate
Necessary headers:
asos-gateway-key: 6b62e430badc4ae48df8626574208e0f
Sample data
curl --location --request POST
'https://care-gatewayapi-v1-pt.asosdevelopment.com/care/gatewayapi/v1/interactionbuilder/
care/interactionbuilder/v2/livechat/initiate' \
--data
'{"first_name":"Sarah","last_name":"Student","dob":"29/07/2021","email":"ccsarahstudent@aso
s.com","order_number":"1234","topic":"Delivery and
Returns","subtopic":"Delivery","signed_in":true,"market":"GB","customer_id":241007484,"tele
phone":"123456","nuance_chat_object":{"conversationData":
[{"key":"key","value":"value"}],"conversationMessage":[{"engagementId":"d4f0bc64-d369-4a9a-
bb70-8fc99db6193f","messageText":"Hi,
ASOS","messageTimestamp":"1627578223","isAgentMsg":false},{"engagementId":"b30cab8b-b18c-
4846-aaee-676581dc0d8c","messageText":"Hi,
Blade","messageTimestamp":"1627578253","isAgentMsg":true}]}}'