# Alerts

Stock and price alert subscriptions

## List stock alerts

> Retrieves active stock availability alerts created by the shopper.

```json
{"openapi":"3.1.0","info":{"title":"Wishlists API - Customer Favourites & Collections","version":"1.0.0"},"tags":[{"name":"Alerts","description":"Stock and price alert subscriptions"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/wishlists/product-alerts/":{"get":{"tags":["Alerts"],"operationId":"listProductAlerts","summary":"List stock alerts","description":"Retrieves active stock availability alerts created by the shopper.","parameters":[{"$ref":"#/components/parameters/CookieHeader"},{"$ref":"#/components/parameters/PageParameter"},{"$ref":"#/components/parameters/PageSizeParameter"},{"$ref":"#/components/parameters/AlertSearchParameter"}],"responses":{"200":{"description":"Product alerts listed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductAlertList"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}},"PageParameter":{"name":"page","in":"query","description":"Page number (1-indexed)","required":false,"schema":{"type":"integer","minimum":1}},"PageSizeParameter":{"name":"page_size","in":"query","description":"Number of results per page","required":false,"schema":{"type":"integer","minimum":1}},"AlertSearchParameter":{"name":"search","in":"query","description":"Filter alerts by product identifier","required":false,"schema":{"type":"integer"}}},"schemas":{"PaginatedProductAlertList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ProductAlert"}}}},"ProductAlert":{"type":"object","description":"Stock alert subscription","required":["pk","product"],"properties":{"pk":{"type":"integer"},"product":{"$ref":"#/components/schemas/WishlistProduct"}}},"WishlistProduct":{"type":"object","description":"Product payload returned within wishlists and alerts","required":["pk","name","sku","price","currency_type","in_stock"],"properties":{"pk":{"type":"integer"},"name":{"type":"string"},"sku":{"type":"string"},"base_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"type":"string","description":"Sale price (stringified decimal)"},"retail_price":{"type":"string","description":"Original list price (stringified decimal)"},"currency_type":{"type":"string","description":"Currency code"},"in_stock":{"type":"boolean"},"stock":{"type":["integer","null"]},"absolute_url":{"type":["string","null"],"format":"uri"},"productimage_set":{"type":"array","items":{"$ref":"#/components/schemas/WishlistProductImage"}},"productvideo_set":{"type":"array","items":{"$ref":"#/components/schemas/WishlistProductVideo"}},"is_ready_to_basket":{"type":["boolean","null"]},"extra_data":{"type":"object","description":"Additional merchandising metadata (variants, etc.)","additionalProperties":true},"basket_offers":{"type":"array","description":"Promotional basket offers applicable to the product","items":{"type":"object","additionalProperties":true}}}},"WishlistProductImage":{"type":"object","description":"Product image metadata","required":["pk","image"],"properties":{"pk":{"type":"integer"},"image":{"type":"string","format":"uri"},"order":{"type":["integer","null"]},"specialimage_set":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"WishlistProductVideo":{"type":"object","description":"Product video metadata","properties":{"pk":{"type":"integer"},"video":{"type":"string","format":"uri"}}},"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"code":{"type":["string","null"]}}}},"responses":{"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Subscribe to stock alert

> Creates a stock availability alert for the given product.

```json
{"openapi":"3.1.0","info":{"title":"Wishlists API - Customer Favourites & Collections","version":"1.0.0"},"tags":[{"name":"Alerts","description":"Stock and price alert subscriptions"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/wishlists/product-alerts/":{"post":{"tags":["Alerts"],"operationId":"createProductAlert","summary":"Subscribe to stock alert","description":"Creates a stock availability alert for the given product.","parameters":[{"$ref":"#/components/parameters/CookieHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAlertCreateRequest"}}}},"responses":{"201":{"description":"Alert created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAlert"}}}},"400":{"$ref":"#/components/responses/ValidationErrorResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"409":{"description":"Alert already exists"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}}},"schemas":{"ProductAlertCreateRequest":{"type":"object","required":["product"],"properties":{"product":{"type":"integer","description":"Product identifier to monitor for restock events"}}},"ProductAlert":{"type":"object","description":"Stock alert subscription","required":["pk","product"],"properties":{"pk":{"type":"integer"},"product":{"$ref":"#/components/schemas/WishlistProduct"}}},"WishlistProduct":{"type":"object","description":"Product payload returned within wishlists and alerts","required":["pk","name","sku","price","currency_type","in_stock"],"properties":{"pk":{"type":"integer"},"name":{"type":"string"},"sku":{"type":"string"},"base_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"type":"string","description":"Sale price (stringified decimal)"},"retail_price":{"type":"string","description":"Original list price (stringified decimal)"},"currency_type":{"type":"string","description":"Currency code"},"in_stock":{"type":"boolean"},"stock":{"type":["integer","null"]},"absolute_url":{"type":["string","null"],"format":"uri"},"productimage_set":{"type":"array","items":{"$ref":"#/components/schemas/WishlistProductImage"}},"productvideo_set":{"type":"array","items":{"$ref":"#/components/schemas/WishlistProductVideo"}},"is_ready_to_basket":{"type":["boolean","null"]},"extra_data":{"type":"object","description":"Additional merchandising metadata (variants, etc.)","additionalProperties":true},"basket_offers":{"type":"array","description":"Promotional basket offers applicable to the product","items":{"type":"object","additionalProperties":true}}}},"WishlistProductImage":{"type":"object","description":"Product image metadata","required":["pk","image"],"properties":{"pk":{"type":"integer"},"image":{"type":"string","format":"uri"},"order":{"type":["integer","null"]},"specialimage_set":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"WishlistProductVideo":{"type":"object","description":"Product video metadata","properties":{"pk":{"type":"integer"},"video":{"type":"string","format":"uri"}}},"ValidationErrorResponse":{"type":"object","description":"Validation errors keyed by field name","additionalProperties":{"type":"array","items":{"type":"string"}}},"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"code":{"type":["string","null"]}}}},"responses":{"ValidationErrorResponse":{"description":"Request payload validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## DELETE /wishlists/product-alerts/{pk}/

> Cancel stock alert

```json
{"openapi":"3.1.0","info":{"title":"Wishlists API - Customer Favourites & Collections","version":"1.0.0"},"tags":[{"name":"Alerts","description":"Stock and price alert subscriptions"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/wishlists/product-alerts/{pk}/":{"delete":{"tags":["Alerts"],"operationId":"deleteProductAlert","summary":"Cancel stock alert","parameters":[{"$ref":"#/components/parameters/CookieHeader"},{"name":"pk","in":"path","required":true,"schema":{"type":"integer"},"description":"Alert identifier"}],"responses":{"204":{"description":"Alert removed"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"description":"Alert not found"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}}},"responses":{"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"code":{"type":["string","null"]}}}}}}
```

## List price alerts

> Retrieves price-drop alerts configured by the shopper.

```json
{"openapi":"3.1.0","info":{"title":"Wishlists API - Customer Favourites & Collections","version":"1.0.0"},"tags":[{"name":"Alerts","description":"Stock and price alert subscriptions"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/wishlists/price-alerts/":{"get":{"tags":["Alerts"],"operationId":"listPriceAlerts","summary":"List price alerts","description":"Retrieves price-drop alerts configured by the shopper.","parameters":[{"$ref":"#/components/parameters/CookieHeader"},{"$ref":"#/components/parameters/PageParameter"},{"$ref":"#/components/parameters/PageSizeParameter"},{"$ref":"#/components/parameters/AlertSearchParameter"}],"responses":{"200":{"description":"Price alerts listed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductPriceAlertList"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}},"PageParameter":{"name":"page","in":"query","description":"Page number (1-indexed)","required":false,"schema":{"type":"integer","minimum":1}},"PageSizeParameter":{"name":"page_size","in":"query","description":"Number of results per page","required":false,"schema":{"type":"integer","minimum":1}},"AlertSearchParameter":{"name":"search","in":"query","description":"Filter alerts by product identifier","required":false,"schema":{"type":"integer"}}},"schemas":{"PaginatedProductPriceAlertList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceAlert"}}}},"ProductPriceAlert":{"type":"object","description":"Price alert subscription","required":["pk","product"],"properties":{"pk":{"type":"integer"},"product":{"type":"integer","description":"Linked product identifier"}}},"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"code":{"type":["string","null"]}}}},"responses":{"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```

## Create or update price alert

> Creates a new price alert or updates the existing one for the same product.

```json
{"openapi":"3.1.0","info":{"title":"Wishlists API - Customer Favourites & Collections","version":"1.0.0"},"tags":[{"name":"Alerts","description":"Stock and price alert subscriptions"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/wishlists/price-alerts/":{"post":{"tags":["Alerts"],"operationId":"createOrUpdatePriceAlert","summary":"Create or update price alert","description":"Creates a new price alert or updates the existing one for the same product.","parameters":[{"$ref":"#/components/parameters/CookieHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPriceAlertCreateRequest"}}}},"responses":{"201":{"description":"Price alert saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPriceAlert"}}}},"400":{"$ref":"#/components/responses/ValidationErrorResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}}},"schemas":{"ProductPriceAlertCreateRequest":{"type":"object","required":["product"],"properties":{"pk":{"type":"integer","description":"Existing alert identifier (send to update)"},"product":{"type":"integer","description":"Product identifier to monitor for price changes"}}},"ProductPriceAlert":{"type":"object","description":"Price alert subscription","required":["pk","product"],"properties":{"pk":{"type":"integer"},"product":{"type":"integer","description":"Linked product identifier"}}},"ValidationErrorResponse":{"type":"object","description":"Validation errors keyed by field name","additionalProperties":{"type":"array","items":{"type":"string"}}},"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"},"code":{"type":["string","null"]}}}},"responses":{"ValidationErrorResponse":{"description":"Request payload validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```
