Fetch customer alert requests
Use this endpoint to display alert requests in a logged-in customer's account area.
info
This endpoint supports logged-in customers only. Obtain a current-customer JWT with the Back in Stock Alerts client ID before calling it.
Request
GET https://backinstockalerts.hypaapps.com/api/stores/{store_hash}/customers/{jwt}/alert-requests
Accept: application/json
| Path parameter | Description |
|---|---|
store_hash | BigCommerce store hash. |
jwt | Token returned by BigCommerce's Current Customer API. |
Query parameters
| Parameter | Description |
|---|---|
channel_id | Filter by storefront channel ID. |
date_range | Include requests from this number of days ago through today. Minimum 1; maximum 365. |
status | Filter by sent or pending. |
unsubscribed | Filter by unsubscribe state. Accepts true, false, 0, 1, yes or no. |
page | Page number, starting at 1. |
per_page | Results per page. Minimum 1; maximum 100. |
sort_by | id_desc (default), id_asc, product_asc or product_desc. |
currency_code | Currency code used to format product prices. |
Response
The response contains a data array and pagination metadata.
Alert request fields
| Field | Type | Description |
|---|---|---|
id | integer | Alert-request ID. |
channel_id | integer | Storefront channel where the request was created. |
product | object | Requested product details. |
notification | object or null | Notification created for the request, if any. |
unsubscribed | timestamp or null | When the customer unsubscribed. |
created_at | string | When the request was created. |
Product fields
| Field | Type | Description |
|---|---|---|
product_id | integer | BigCommerce product ID. |
product_variant_id | integer or null | BigCommerce variant ID, or null for a simple product. |
name | string | Product name. |
image_url | string | Product image URL. |
price | string | Formatted product price. |
sku | string | Product or variant SKU. |
url | string | Product URL on the storefront. |
Notification fields
| Field | Type | Description |
|---|---|---|
id | integer | Notification ID. |
status | string | pending when ready for dispatch, or sent after dispatch. |
created_at | string | When the notification was created. |
Pagination fields
| Field | Type | Description |
|---|---|---|
total | integer | Total matching requests. |
count | integer | Requests on the current page. |
per_page | integer | Maximum requests per page. |
current_page | integer | Current page number. |
total_pages | integer | Total number of pages. |
{
"data": [
{
"id": 483,
"channel_id": 1,
"created_at": "2026-07-20 10:30:06",
"product": {
"product_id": 11135,
"product_variant_id": 23303,
"name": "Example product",
"sku": "SKU-123",
"url": "https://example-store.mybigcommerce.com/example-product",
"image_url": "https://backinstockalerts.hypaapps.com/img/ProductDefault.gif",
"price": "£8.95"
},
"notification": null,
"unsubscribed": null
}
],
"meta": {
"total": 1,
"count": 1,
"per_page": 25,
"current_page": 1,
"total_pages": 1
}
}
Example JavaScript
The client ID below is the public Back in Stock Alerts app client ID used with BigCommerce's Current Customer API.
const appClientId = '9s57chpu0tik4pw7wz9d2p022qnff6n';
async function fetchCustomerJwt() {
const response = await fetch(
`/customer/current.jwt?app_client_id=${appClientId}`,
);
if (response.status === 404) {
throw new Error('Customer is not logged in.');
}
if (!response.ok) {
throw new Error('Unable to identify the customer.');
}
return response.text();
}
async function fetchAlertRequests(storeHash, jwt, filters = {}) {
const query = new URLSearchParams(filters).toString();
const endpoint = `https://backinstockalerts.hypaapps.com/api/stores/${storeHash}/customers/${jwt}/alert-requests`;
const response = await fetch(`${endpoint}${query ? `?${query}` : ''}`, {
headers: {Accept: 'application/json'},
});
if (!response.ok) {
const body = await response.json().catch(() => ({}));
throw new Error(body.error || 'Unable to fetch alert requests.');
}
return response.json();
}
const jwt = await fetchCustomerJwt();
const alerts = await fetchAlertRequests('abc123', jwt, {
page: '1',
per_page: '20',
status: 'pending',
});
Use the returned id with Unsubscribe customer from an alert request.