[GET] Listar produtos inscritos
Visão geral com IA
Documenta o endpoint que lista as variantes em que os clientes se inscreveram, com a contagem de clientes aguardando, enviados, com falha e que cancelaram a inscrição por variante.
- Chame
GET /shop-api/back-in-stock/products; o limite de requisições éthrottle:60,1. - Parâmetros opcionais:
page,per_page(de 1 a 100, padrão 10),query,state,stockesort. statefiltra porready,waiting,notifiedouproblem;stockporin_stockouout_of_stock.sortaceita até 3 chaves comowaiting:desc; o padrão é mostrar primeiro os produtos com mais inscritos.- Só são contadas as inscrições com endereço de e-mail;
waiting,sent,failedeunsubscribedsomados dãosubscribers.
Resumo gerado por IA. Pode conter erros, então confira o guia completo abaixo.
* Autenticação
Obrigatório Authorization: Bearer ••••••••••••••••••••••••••••••••••••
Limit throttle:60,1
Requisição
Recupera as variantes em que os clientes se inscreveram, uma linha por variante, com a quantidade de clientes que estão aguardando, que já receberam o e-mail de reposição, com falha ou que cancelaram a inscrição. Oferece suporte a paginação, pesquisa, filtros e ordenação.
Endpoint GET - /shop-api/back-in-stock/products?page=1&per_page=10
| Parâmetros | Tipo | Obrigatório |
|---|---|---|
| page | number | no |
| per_page | number | no |
| query | string | no |
| state | string | no |
| stock | string | no |
| sort | string | no |
page— número da página, a partir de1. Padrão1.per_page— variantes por página, de1a100. Padrão10.query— pesquisa por título do produto, título da variante ou SKU.state— um dos seguintes:all(padrão)ready— há clientes aguardando e a variante voltou ao estoquewaiting— há clientes aguardando e a variante ainda está sem estoquenotified— nenhum cliente está mais aguardandoproblem— pelo menos um e-mail de reposição não foi enviado
stock—all(padrão),in_stock,out_of_stock.sort— até 3 chaves separadas por vírgulas, cada uma escrita comokey:ascoukey:desc. Chaves:product,waiting,notified,subscribers,last_added. Padrão: mais inscritos primeiro. Exemplo:waiting:desc,last_added:desc.
Somente inscrições com endereço de e-mail são contabilizadas.
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;Resposta de sucesso 200
waiting, sent, failed e unsubscribed nunca se sobrepõem e sempre somam 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 }}Falha
{ "success" => false, "message" => "The selected state is invalid."}| Message | When |
|---|---|
The page must be at least 1. |
page é menor que 1 |
The per page may not be greater than 100. |
per_page está fora do intervalo |
The selected state is invalid. |
state não é um dos valores acima |
The selected stock is invalid. |
stock não é um dos valores acima |
Something went wrong |
Erro inesperado |
Esta página foi útil?
Obrigado pelo feedback! Conte o que faltou
Relatar um problema