API to fetch the total number of products, included in the store, and excluded from the store and other stats
GET https://services.leadconnectorhq.com/products/store/{storeId}/stats
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
storeId
string
default:"3SwdhCu3svxI8AKsPJt6"
required
Products related to the store
Query parameters
altId
string
default:"6578278e879ad2646715ba9c"
required
Account Id or Agency Id
search
string
default:"Awesome product"
The name of the product for searching.
Filter by product collection Ids. Supports comma separated values
Respuestas
200 - Successful response
totalProducts
number
default:"100"
required
Total number of products
includedInStore
number
default:"80"
required
Number of products included in the store
excludedFromStore
number
default:"20"
required
Number of products excluded from the store
{
"totalProducts": 100,
"includedInStore": 80,
"excludedFromStore": 20
}
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);