Internal API to fetch the Product Collections
http
GET https://services.leadconnectorhq.com/products/collectionsAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
limit | number | No | 20 | The maximum number of items to be included in a single page of results |
offset | number | No | 0 | The starting index of the page, indicating the position from which the results should be retrieved. |
altId | string | Yes | 6578278e879ad2646715ba9c | Account Id |
altType | string | Yes | LOCATION | The type of alt. For now it is only LOCATION |
collectionIds | string | No | 65d71377c326ea78e1c47df5,65d71377c326ea78e1c47d34 | Ids of the collections separated by comma(,) for search purposes |
name | string | No | Best Sellers | Query to search collection based on names |
Responses
200 - Successful response
data(array[], required): Array of Collectionstotal(number, required): The total count of the collections present, which is useful to calculate the pagination
json
{
"data": [
[]
],
"total": 0
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X GET 'https://services.leadconnectorhq.com/products/collections' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/products/collections', {
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/collections',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/collections');
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);