[GET] Listar productos suscritos
Resumen con IA
Documenta el endpoint que enumera las variantes en las que se han apuntado clientes, con el recuento de clientes en espera, avisados, con fallo y dados de baja por variante.
- Llama a
GET /shop-api/back-in-stock/products; el límite de solicitudes esthrottle:60,1. - Parámetros opcionales:
page,per_page(de 1 a 100, 10 por defecto),query,state,stockysort. statefiltra porready,waiting,notifiedoproblem;stockporin_stockoout_of_stock.sortacepta hasta 3 claves comowaiting:desc; por defecto, primero los productos con más suscriptores.- Solo se cuentan las suscripciones con correo electrónico;
waiting,sent,failedyunsubscribedsumansubscribers.
Resumen generado por IA. Puede contener errores, así que revisa la guía completa a continuación.
* Autenticación
Obligatorio Authorization: Bearer ••••••••••••••••••••••••••••••••••••
Límite throttle:60,1
Solicitud
Obtén las variantes en las que se han registrado clientes, una fila por variante, con el número de clientes que están esperando, a los que ya se ha enviado el correo de reposición, con envío fallido o que han cancelado la suscripción. Admite paginación, búsqueda, filtros y ordenación.
Endpoint GET - /shop-api/back-in-stock/products?page=1&per_page=10
| Parámetros | Tipo | Obligatorio |
|---|---|---|
| page | number | no |
| per_page | number | no |
| query | string | no |
| state | string | no |
| stock | string | no |
| sort | string | no |
page: número de página, a partir de1. Valor predeterminado:1.per_page: variantes por página, de1a100. Valor predeterminado:10.query: busca por título del producto, título de la variante o SKU.state: uno de estos valores:all(predeterminado)ready: hay clientes esperando y la variante vuelve a tener stockwaiting: hay clientes esperando y la variante sigue sin stocknotified: ya no queda ningún cliente esperandoproblem: al menos un correo de reposición no se pudo enviar
stock:all(predeterminado),in_stock,out_of_stock.sort: hasta 3 claves separadas por comas, cada una escrita comokey:ascokey:desc. Claves:product,waiting,notified,subscribers,last_added. Valor predeterminado: primero las variantes con más suscriptores. Ejemplo:waiting:desc,last_added:desc.
Solo se cuentan los registros que tienen una dirección de correo electrónico.
GET /shop-api/back-in-stock/products?page=1&per_page=10&state=waiting&sort=waiting:desc HTTP/1.1Host: preorder.globo.ioAuthorization: ************const myHeaders = new Headers();myHeaders.append("Authorization", "************");const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow"};fetch("https://preorder.globo.io/shop-api/back-in-stock/products?page=1&per_page=10&state=waiting&sort=waiting:desc", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));$curl = curl_init();curl_setopt_array($curl, array( CURLOPT_URL => 'https://preorder.globo.io/shop-api/back-in-stock/products?page=1&per_page=10&state=waiting&sort=waiting:desc', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Authorization: ************' ),));$response = curl_exec($curl);curl_close($curl);echo $response;Respuesta correcta 200
waiting, sent, failed y unsubscribed nunca se solapan y siempre suman subscribers.
{ "success": true, "data": [ { "product_id": 1234567890, // Shopify product ID without gid://shopify/Product/ "variant_id": 9876543210, // Shopify variant ID without gid://shopify/ProductVariant/ "product_title": "Product Name", "variant_title": "Size M / Blue", // "Default Title" if the product has no variants "sku": "SKU-001", // nullable "inventory_available": 0, // Latest available quantity recorded for the variant, null if not recorded yet "state": "waiting", // ready => waiting customers + in stock, waiting => waiting customers + out of stock, notified => nobody waiting "subscribers": 41, // Total sign-ups for this variant "waiting": 39, // Not sent the restock email yet "sent": 1, // Restock email sent "failed": 1, // Restock email failed to send "unsubscribed": 0, // Unsubscribed before the restock email was sent "opened": 0, // Customers who opened the restock email "clicked": 0, // Customers who clicked the restock email "last_subscribed_at": "2026-07-03 10:00:00", // Latest sign-up "last_sent_at": "2026-07-05 08:30:00" // Latest restock email, null if none sent } ], "pagination": { "total": 25, // Total variants "per_page": 10, "current_page": 1, "last_page": 3, "from": 1, // null if the page is empty "to": 10 // null if the page is empty }}Respuesta fallida
{ "success" => false, "message" => "The selected state is invalid."}| Mensaje | Cuándo |
|---|---|
The page must be at least 1. |
page es menor que 1 |
The per page may not be greater than 100. |
per_page está fuera de rango |
The selected state is invalid. |
state no es uno de los valores indicados |
The selected stock is invalid. |
stock no es uno de los valores indicados |
Something went wrong |
Error inesperado |
¿Te ha sido útil?
¡Gracias por tu opinión! Cuéntanos qué faltaba
Informar de un problema