Salta ai contenuti
Installa l’app
Italiano

[GET] Elenco dei prodotti con iscrizioni

Panoramica AI

Documenta l'endpoint che elenca le varianti per cui i clienti si sono iscritti, con il numero di clienti in attesa, inviati, non riusciti e disiscritti per variante.

  • Chiami GET /shop-api/back-in-stock/products; il limite di frequenza è throttle:60,1.
  • Parametri facoltativi: page, per_page (da 1 a 100, predefinito 10), query, state, stock e sort.
  • state filtra per ready, waiting, notified o problem; stock per in_stock o out_of_stock.
  • sort accetta fino a 3 chiavi come waiting:desc; per impostazione predefinita prima i prodotti con più iscritti.
  • Vengono conteggiate solo le iscrizioni con un indirizzo email; waiting, sent, failed e unsubscribed sommati danno subscribers.

Riepilogo generato dall’AI. Può contenere errori, quindi controlla la guida completa qui sotto.

* Authentication

Obbligatoria Authorization: Bearer ••••••••••••••••••••••••••••••••••••

Limite throttle:60,1

Richiesta

Recupera le varianti a cui i clienti si sono iscritti, una riga per variante, con il numero di clienti in attesa, a cui è stata inviata l’e-mail di riassortimento, con invio non riuscito o disiscritti. Supporta paginazione, ricerca, filtri e ordinamento.

Endpoint GET - /shop-api/back-in-stock/products?page=1&per_page=10

Parametri Tipo Obbligatorio
page number no
per_page number no
query string no
state string no
stock string no
sort string no
  • page — numero di pagina, a partire da 1. Predefinito: 1.
  • per_page — varianti per pagina, da 1 a 100. Predefinito: 10.
  • query — ricerca per titolo del prodotto, titolo della variante o SKU.
  • state — uno dei seguenti valori:
    • all (predefinito)
    • ready — ci sono clienti in attesa e la variante è di nuovo disponibile
    • waiting — ci sono clienti in attesa e la variante è ancora esaurita
    • notified — nessun cliente è più in attesa
    • problem — l’invio di almeno un’e-mail di riassortimento non è riuscito
  • stock — all (predefinito), in_stock, out_of_stock.
  • sort — fino a 3 chiavi separate da virgole, ciascuna scritta come key:asc o key:desc. Chiavi: product, waiting, notified, subscribers, last_added. Predefinito: prima le varianti con più iscritti. Esempio: waiting:desc,last_added:desc.

Vengono conteggiate solo le iscrizioni con un indirizzo e-mail.

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;

Risposta di successo 200

waiting, sent, failed e unsubscribed non si sovrappongono mai e la loro somma è sempre uguale a 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
}
}

Errore

{
"success" => false,
"message" => "The selected state is invalid."
}
Message Quando
The page must be at least 1. page è inferiore a 1
The per page may not be greater than 100. per_page è fuori intervallo
The selected state is invalid. state non è uno dei valori indicati sopra
The selected stock is invalid. stock non è uno dei valori indicati sopra
Something went wrong Errore imprevisto

Questa pagina ti è stata utile?

Segnala un problema