Fetch User Lists

Fetches all of the lists owned by the logged in shopper without the list contents.

Endpoint

Endpointrequest typeAPI Type
https://{{Swym> API Endpoint }}/api/v3/lists/fetch-user-listsPOSTshopper

Query Params

ParameterTypeRequiredDescription
pidstring (Encoded)YesUnique identifier for the store available in Swym Admin

Form Data

FieldTypeRequiredDescription
regidstringYesUnique identifier for the shopper generated by generate-regid
sessionidstringYesSession id generated with generate-regId endpoint which does not expire without manual intervention

Example Curl

curl --location --request POST '{{Swym API Endpoint}}/api/v3/lists/fetch-user-lists?pid={{URL Encoded PID}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--data-urlencode 'sessionid={{sessionid}}' \
--data-urlencode 'regid={{regid}}'

🚧

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.

PlaceholdersDescriptions
{{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.

Success Response

{
    "status": "success",
    "data": [
        {
            "di": "f2e7c57a-f0ff-4cc3-adf5-5e6534ad51d5",
            "lty": "wl",
            "uid": "NaaAKnZGW4BJbI4ElEG8eAF5c/k8WvcngmNn4u6i6og=",
            "cts": 1668583375423,
            "lname": "My Wishlist",
            "cby": "[email protected]",
            "lid": "3ec50229-88c3-4461-a0c7-b7e3e899a4a7",
            "pid": "HrR2aHVe2DNffJdNtPgRnrJIQku44Cyyl9QWqL24/XE=",
            "st": 1,
            "id": "d922b412-4872-49da-a2b4-124872e9daa4",
            "uts": 1668583375423,
            "_pkey": "NaaAKnZG",
            "_t": 1,
            "uby": "[email protected]",
            "lhash": "bXktd2lzaGxpc3Q=",
            "cfor": "[email protected]"
        }
    ]
}
{
  "status": "error",
  "error-code": "user-not-logged-in",
  "error-msg": "User is not logged in. This API only supports logged in users. Please refer our API documentation for more details."
}

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 CodeTypeDescription
400Bad RequestYour request is invalid, change your request params and query and try again.
401UnauthorisedYou 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.
404Not FoundThe specified requested data could not be found.
500Internal Server ErrorWe had a problem with our server. Try again later.
503Service UnavailableWe're temporarily offline for maintenance. Please try again later.