Pular para o conteúdo
Instalar app
Português (Brasil)

[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, stock e sort.
  • state filtra por ready, waiting, notified ou problem; stock por in_stock ou out_of_stock.
  • sort aceita até 3 chaves como waiting: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, failed e unsubscribed somados dão subscribers.

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 de 1. Padrão 1.
  • per_page — variantes por página, de 1 a 100. Padrão 10.
  • 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 estoque
    • waiting — há clientes aguardando e a variante ainda está sem estoque
    • notified — nenhum cliente está mais aguardando
    • problem — 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 como key:asc ou key: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.1
Host: preorder.globo.io
Authorization: ************
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?

Relatar um problema