Skip to content

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 ​

MethodURL pathRequired access
DELETE/api/v1/user/unsubscribeOrigin + Customer + Brand key

Request fields:

FieldTypeRequiredRules / meaning
query.categorystringoptionalWhitespace 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 ​

MethodURL pathRequired access
GET/api/v1/user/newslettersOrigin + 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).

Batch platform, Shopify app and API documentation