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
The below responses are what you would get based on being logged in or an authenticated user.
{
"di": "Z+/ywr3MW/NoY3W2jnNN5GRWUm9Ye/4/7DlUMYWCh60=-API", // Unique identifier for the device
"userinfo": null, // User information associated with the list (not present in this example)
"lty": "wl", // List type
"cts": 1681110226853, // Creation timestamp (in milliseconds since epoch)
"lname": "My test list", // List name
"lid": "95cd0bcb-585f-436b-9141-dfa922ebf80c", // Unique identifier for the list.
"pid": "1f0WvUYRaFyM6/cno5z1H2oAYI7tbUWbcGA1kY=", // Unique identifier for the store
"st": 1, // List status (1 = active, 0 = inactive)
"uts": 1681110226853, // Last update timestamp (in milliseconds since epoch)
"lhash": "bXktdGVzdC1saXN0" // Base64-encoded hash of the list name and attributes
}
{
"di": "91b43457-b092-46ca-bd6c-91ecc2f04dd5", // Unique Device Identifier tied to email
"userinfo": {
"sw_mkt": null, // Marketing Permissions True would mean subscribed.
"uid": "uH7nZUNswsC6ejml9x7cZqDb1xgCMEqgds7jk+GIfrg=", user id
"em": "[email protected]", email address
"cts": 1681408172605,
"pid": "1f0WvUYRaFyM6/cno5z1H2oAYI7tbU76VY=", // Unique Merchant ID
"uts": 1681408172605, List created time stamp
"acc_mkt": null, // Accept marketing - Same as sw_mkt however this is platform dependent
"prefs": null // user preferences.
},
"lty": "wl", // List type
"uid": "uH7nZUNswsC6ejml9x7cZqDb1xgCMEqgds7jk+GIfrg=", // UID
"cts": 1681408180376, // List Created Time stamp
"lname": "My test list", // List name
"cby": "[email protected]", // Example email address
"lid": "f3c4a7bd-1fb7-4c85-8df9-73d1de186cfe", // List ID
"pid": "1f0WvUYRaFyM6/cno5z1H2oA1kY=", // Unique Merchant ID
"uts": 1681408180376, // User time stamp.
"_pkey": "uH7nZUNs",
"uby": "[email protected]", // List created by email.
"cfor": "[email protected]" // List Created For Email
}
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.