Update List Attributes
Updates list level attributes like lnote, lprops.
Update a shopper's list attributes like lnote
, lprops
.
Endpoint | request type | API Type |
---|---|---|
https://{{Swym API Endpoint }}/api/v3/lists/update | POST | shopper |
Query Params
Parameter | Type | Required | Description |
---|---|---|---|
pid | string (Encoded) | Yes | Unique identifier for the store available in Swym Admin |
limit | int64 | No | Maximum number of records to return |
offset | int64 | No | Number of records to skip |
Form Data
Field | Type | Required | Description |
---|---|---|---|
regid | string | Yes | Unique identifier for the shopper generated by generate-regid |
sessionid | string | Yes | Session id generated with generate-regId endpoint which does not expire without manual intervention |
lnote | string | optional | Optional note at list level |
lprops | object | optional | List level object that can house custom properties |
ldesc | string | optional | List description |
Example Curl
curl --location --request POST '{{Swym API Endpoint}}/api/v3/lists/update?pid={{URL Encoded PID}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'regid={{regid}}' \
--data-urlencode 'sessionid={{sessionid}}' \
--data-urlencode 'lid={{lid}}' \
--data-urlencode 'lnote=I am newly updated.'
Curl Placeholders
Assuming these values are provided above, the curl command should work correctly. However, if there are any issues with the API endpoint or the data being passed in the request, there could still be errors that need to be resolved before you can test these APIS.
Placeholders | Descriptions |
---|---|
{{Swym API Endpoint}} | This needs to be replaced with the actual Swym API endpoint URL. |
{{URL Encoded PID}} | This needs to be replaced with the actual PID value, URL-encoded. |
{{regid}} | This needs to be replaced with the actual regid value. |
{{sessionid}} | This needs to be replaced with the actual session ID value. |
{{lid}} | This needs to be replaced with the actual list ID value. |
Success Response
{
"di": "/Gj4Nxlknpq60=-API",
"lty": "wl",
"cts": 1682428634539,
"lnote": "I am newly updated.",
"lname": "Lists New",
"lid": "8f343ac2-4c10-4925-906e-b398f9a13dfc",
"pid": "1f0WvUYRaFyM6+nWbcGA1kY=",
"st": 1,
"id": "829f631d-5915-45dc-9f63-1d5915c5dc94",
"uts": 1682499206295,
"_pkey": "f3BzfFA2",
"_t": 1,
"lhash": "bmV3LWxpc3QtZm9yLXRlc3Rpbmc="
}
[
{
"di": "f03daefc-d03e-438b-950c-86bdee5fcc6c",
"listcontents": [
{
"di": "f03daefc-d03e-438b-950c-86bdee5fcc6c",
"uid": "Xjg/Jbh9Y/0OTIydKNmd5NZjoB7w6B++1/RFflqnPa8=",
"dt": "Black Leather Bag",
"cts": 1682520365028,
"empi": 7168987529376,
"cby": "[email protected]",
"lid": "94dff98c-3eaa-48ee-ad87-98af2f87aeb5",
"du": "https://dashybee.myshopify.com/products/black-leather-bag?variant=41450466017440",
"pid": "/uBEzdkDw3lbo=",
"epi": 41450466017440,
"id": "64beebf5-ceb5-4b47-beeb-f5ceb55b47f3",
"uts": 1682520365028,
"_pkey": "Xjg/Jbh9",
"iu": "https://cdn.shopify.com/s/files/1/0590/0723/8304/products/black-bag-over-the-shoulder_925x_f7b24271-3c83-4bc4-8968-5d1f6b5c2584_620x620.jpg?v=1638894832",
"_t": 2,
"uby": "[email protected]",
"pr": 30.0
}
],
"userinfo": {
"fname": "firstname",
"sw_mkt": null,
"uid": "XKNmd5NZjoB7w6B++1/RFflqnPa8=",
"m": null,
"em": "[email protected]",
"cts": 1643656974342,
"lname": "lastname",
"pid": "6cLXc3z0TERBWpFvFJUpxjaWITbnZ2/uBEzdkDw3lbo=",
"uts": 1682516274533,
"acc_mkt": false,
"ut": null,
"prefs": {
"Mediums": {
"email": {
"signuptime": 1643656974312,
"acceptmarketing": false,
"acceptsource": "shopify"
}
}
}
},
"lty": "wl",
"uid": "Xjg/Jbh9Y/0OTIydKNmd5NZjoB7w6B++1/RFflqnPa8=",
"cts": 1682520364996,
"cnt": 1,
"lnote": "I am newly updated.",
"lname": "My Wishlist",
"cby": "[email protected]",
"lid": "94dff98c-3eaa-48ee-ad87-98af2f87aeb5",
"pid": "/uBEzdkDw3lbo=",
"st": 1,
"id": "75c32443-ecd5-442f-8324-43ecd5f42f1e",
"uts": 1682520590149,
"_pkey": "Xjg/Jbh9",
"_t": 1,
"itemcmnts": 0,
"uby": "[email protected]",
"lhash": "bXktd2lzaGxpc3Q=",
"cfor": "[email protected]"
}
]
Error Response:
If the request is unsuccessful, the API will return a JSON response with an error message and an HTTP status code indicating the type of error that occurred.
Status Code | Type | Description |
---|---|---|
400 | Bad Request | Your request is invalid, change your request params and query and try again. |
401 | Unauthorised | You are performing an action on a resource that is not granted to the current logged-in user. Additionally, for REST APIs, this could mean your API key is wrong. |
403 | Forbidden | You are not allowed to request this data. |
404 | Not Found | The specified requested data could not be found. |
429 | Too Many Requests | You're raising too many requests! Slow down! |
500 | Internal Server Error -- | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |
List names are unique for a given shopper and cannot be updated
Updated about 1 month ago