Fetch Wishlist Social Count

Fetch the wishlist social-count of a product

Endpoint

EndpointRequest TypeAPI Type
https://{{Swym API Endpoint}}/api/v3/product/wishlist/social-countPOSTshopper

Query Params

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

Form Data

FieldTypeRequiredDescription
empiint/stringYesProduct id
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 '{{Swym API Endpoint}}/api/v3/product/wishlist/social-count?pid={{URL Encoded PID}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'empi={{empi}}' \
--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.
{{empi}}This needs to be replaced with the actual empi value.
{{regid}}
This needs to be replaced with the actual regid value, URL-encoded.
{{sessionid}}
This needs to be replaced with the actual session ID value, URL-encoded.

Success Response

{
    "data": {
        "count": 10,
        "empi": 7096252727494
    }
}

🚧

Product Validations and API Response Behavior

If the submitted product data does not match an existing product, the API will respond with a 200 status code and a count of 0. If required, please perform necessary product validations on your end before making API requests.

Error Status Codes:

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.
401UnauthorizedYou 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.
403ForbiddenYou are not allowed to request this data.
500Internal Server Error --We had a problem with our server. Try again later.
503Service UnavailableWe're temporarily offline for maintenance. Please try again later.