- Print
Change order of products in campaign
- Print
This API will first sort the products in the order specified in the request body, and then append the remaining products registered in the campaign in their original order.
Example of the ordering by customerProductIds
The original order of customerProductIds registered in the campaign: sl09, sl08, sl07, sl06, sl05, sl04
Order of customerProductIds after processing the request: sl04, sl05, sl07, sl09, sl08, sl06 \
curl --location --request PUT
'https://private.shopliveapi.com/v2/{accessKey}/campaign/{campaignKey}/product/order'
--header 'Accept: application/json'
--header 'Authorization: Bearer {JWT_TOKEN}'
--header 'Content-Type: application/json'
--data-raw
'[
{"customerProductId": "sl04"},
{"customerProductId": "sl05"},
{"customerProductId": "sl07"}
]'
Error code
HTTP Status Code | Error code(_s) | Error Message(_e) |
---|---|---|
404 | 710 | Campaign does not exist |
400 | -839 | One of productId or customerProductId required |
400 | -840 | Either the list does not exist or the data does not exist |
Authorization: Bearer
Customer access key
Campaign key
Example body of the ordering by customerProductIds
The original order of customerProductIds registered in the campaign: sl09, sl08, sl07, sl06, sl05, sl04 Order of customerProductIds after processing the request to be: sl04, sl05, sl07, sl09, sl08, sl06
[
{
"customerProductId": "sl04"
},
{
"customerProductId": "sl05"
},
{
"customerProductId": "sl07"
}
]
Example of the ordering by productIds
The original order of productIds registered in the campaign: 1239, 1238, 1237, 1236, 1235, 1234 Order of productIds after processing the request to be: 1234, 1235, 1237, 1239, 1238, 1236
[
{
"productId": 1234
},
{
"productId": 1235
},
{
"productId": 1237
}
]
Automatically generated unique product ID
Customer's product ID and must be unique(defined by the customer).
200
""
4XX
"{\n \"_s\": -000,\n \"_e\": \"Error message\"\n}"