Appearance
Newsletters
List and cancel a customer's newsletter subscriptions.
Access labels such as Origin + Brand key + Customer are defined in Headers and access. Each endpoint ends in a Try it console; set the host and keys once in its Settings tab or on the overview.
Unsubscribe newsletter
| Method | URL path | Required access |
|---|---|---|
DELETE | /api/v1/user/unsubscribe | Origin + Customer + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
query.category | string | optional | Whitespace trimmed; Allowed values ("NEWS", "NEW_RELEASES", "PRODUCT_UPDATE", "COMPANY_ANNOUNCEMENT") |
The payload variable is built from query.category; send category in the URL, not in a JSON payload.
Example:
bash
curl -X DELETE "$BASE_URL/api/v1/user/unsubscribe?category=NEWS" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/contactus_controller.js:228 → unsubscribeNewsletter; routes: routes/v1/contactus_route.js:54; service: _unsubscribeNewsletter (app/v1/service/contactUs_service.js:283).
Fetch user newsletter subscriptions
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/user/newsletters | Origin + Brand key + Customer |
Request fields: no body, query, or path fields are read by this controller. Context comes from the headers/middleware above.
Example:
bash
curl -X GET "$BASE_URL/api/v1/user/newsletters" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/customer_controller.js:1394 → fetchUserNewsletterSubscriptions; routes: routes/v1/customer_route.js:549; service: _fetchCustomerNewsletterSubscriptions (app/v1/service/customer_service.js:3171).