Add Favorite¶
https://{cluster-id}.elevate-api.cloud/api/storefront/v3/notifications/add-favorite
POST¶
The add favourite notification is to be sent when a visitor select a product as a favourite.
Request¶
Header parameters¶
| Name | Description | Example |
|---|---|---|
| Accept-Encoding | Allows responses to be compressed using Gzip. | gzip |
Query parameters¶
| Name | Description | Example |
|---|---|---|
| customerKey Required | A key that uniquely identifies the current visitor. Using UUIDs as keys are recommended This field is required unless userContext is set to 'ANONYMOUS' or 'UNPERSONALIZED' in which case it is not allowed. If userContext is set to 'SYNTHETIC' this is optional. | e3921377-18a2-47c9-a449-06b894898623 |
| market Required | Must match the corresponding market identifier in the data feed. | UK |
| sessionKey Required | A unique key, identifying the session. Using UUIDs as keys are recommended. This field is required unless userContext is set to 'ANONYMOUS' in which case it is not allowed. If userContext is set to 'SYNTHETIC' this is optional. | 0b05119e-eeb8-418a-bbfb-defa0dde417e |
| userContext | Specifies the level of consent for data tracking. If omitted, the request will be treated as if PERSONALIZED is used. See user context for more details. Supported values: PERSONALIZED, UNPERSONALIZED, ANONYMOUS, SYNTHETIC. | PERSONALIZED |
Supported Content-Type¶
application/json;charset=utf-8text/plain;charset=utf-8
Request body¶
Example
{
"productKey" : "<PRODUCT_KEY_FROM_YOUR_FEED>"
}
Schema
FavoriteNotification¶
The add favourite notification should be sent when a visitor selects a product or variant as a favourite. NOTE! Use either the product or variant key
One of: ProductKey or VariantKey
curl -i \
-X POST \
-H 'Accept-Encoding: null' \
-H 'Content-Type: application/json;charset=utf-8' \
"https://{cluster-id}.elevate-api.cloud/api/storefront/v3/notifications/add-favorite?customerKey=customerKey&market=market&sessionKey=sessionKey&userContext=userContext" \
-T request-body.file
Response¶
Response codes¶
| Status | Description |
|---|---|
| 204 | Notification was received successfully. |
| 400 | Invalid or missing required arguments. |
| 500 | Server error such as cluster unavailable or busy. The response body may contain more information about the error. |
| 202 | Notification was received successfully, but persisting the change is taking longer than expected. Future requests can show stale data, but the change should be persisted eventually. |
Inner Schemas¶
ProductKey¶
| Name | Type | Description |
|---|---|---|
| productKey Required | string | The unique key of the product. Examples: " |
VariantKey¶
| Name | Type | Description |
|---|---|---|
| variantKey Required | string | The unique key of the variant. Examples: " |