Fetch Wishlist Social Count
Fetch the wishlist social-count of a product
Endpoint
Endpoint | Request Type | API Type |
---|---|---|
https://{{Swym API Endpoint}}/api/v3/product/wishlist/social-count | POST | shopper |
Query Params
Parameter | Type | Required | Description |
---|---|---|---|
pid | string (Encoded) | Yes | Unique identifier for the store available in Swym Admin |
Form Data
Field | Type | Required | Description |
---|---|---|---|
empi | int/string | Yes | Product id |
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 |
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.
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. |
{{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 Code | Type | Description |
---|---|---|
400 | Bad Request | Your request is invalid, change your request params and query and try again. |
401 | Unauthorized | 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. |
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. |
Updated over 1 year ago