Create Shopping Cart id
Version 4.0.0
Endpoint
POST
undefined/msapi/sales/shopping-cart/v1/carts/initialize
Copy
This operation initializes the shopping cart
Initialize Shopping Cart and retrieve cart id.
Header Parameters
Body Parameters
Responses
Success
Body
application/json
REQUEST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43curl --request POST \
--url https://example.com/msapi/sales/shopping-cart/v1/carts/initialize \
--header 'accept: application/json;charset=utf-8' \
--header 'content-type: application/json;charset=utf-8' \
--data '
{
"cartType": "ATTCart",
"channel": {
"id": "ATTR",
"name": "ATTR",
"extensions": [
{
"name": "StoreId",
"value": "12334"
},
{
"name": "AgentId",
"value": "sv1323"
}
]
},
"relatedParty": [
{
"id": "00fa7310-38c9-11ec-8d3d-0242ac130003",
"role": "Profile",
"extensions": [
{
"name": "zipCode",
"value": "98021"
},
{
"name": "user-type",
"value": "anonymous"
}
]
},
{
"id": "00fa7310-38c9-11ec-8d3d-0242ac130003",
"role": "Individual"
}
]
}
'RESPONSE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53{
"id": "7aaeaaa0-e38b-11ed-87c3-a77f9285ffc6",
"orderDate": "2023-04-25T17:06:11.658Z",
"lastUpdate": "2023-04-25T17:06:11.658Z",
"channel": [
{
"id": "ATTR",
"name": "ATTR",
"role": "agent",
"extensions": [
{
"name": "storeId",
"value": "12334"
},
{
"name": "agentId",
"value": "sv12345"
},
{
"name": "Application",
"value": "myATTNative"
}
]
}
],
"relatedParty": [
{
"id": "00fa7319-38c9-11ec-8d3d-0242at2",
"role": "Profile",
"extensions": [
{
"name": "user-type",
"value": "anonymous"
}
]
},
{
"role": "Customer",
"extensions": [
{
"name": "customerType",
"value": "Consumer"
},
{
"name": "customerSubType",
"value": "Individual"
}
]
}
],
"state": "inProgress",
"@type": "DEFAULT"
}