Skip to main content
The “List Prices for a Product” API allows retrieving a paginated list of prices associated with a specific product. Customize your results by filtering prices or paginate through the list using the provided query parameters.
GET https://services.leadconnectorhq.com/products/{productId}/price

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Path parameters

productId
string
default:"6578278e879ad2646715ba9c"
required
ID of the product that needs to be used

Query parameters

limit
number
default:"20"
The maximum number of items to be included in a single page of results
offset
number
default:"0"
The starting index of the page, indicating the position from which the results should be retrieved.
locationId
string
default:"3SwdhCsvxI8Au3KsPJt6"
required
The unique identifier for the account.
ids
string
To filter the response only with the given price ids, Please provide with comma separated

Respuestas

prices
object[]
required
An array of prices
total
number
default:"10"
required
{
  "prices": [
    {
      "_id": "655b33aa2209e60b6adb87a7",
      "membershipOffers": [
        {}
      ],
      "variantOptionIds": [
        "h4z7u0im2q8",
        "h3nst2ltsnn"
      ],
      "locationId": "3SwdhCsvxI8Au3KsPJt6",
      "product": "655b33a82209e60b6adb87a5",
      "userId": "6YAtzfzpmHAdj0e8GkKp",
      "name": "Red / S",
      "type": "one_time",
      "currency": "INR",
      "amount": 199999,
      "createdAt": "2023-11-20T10:23:38.645Z",
      "updatedAt": "2024-01-23T09:57:04.852Z",
      "compareAtPrice": 2000000,
      "availableQuantity": 5,
      "allowOutOfStockPurchases": true
    }
  ],
  "total": 10
}
{}
{}
{}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/products/YOUR_productId/price' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price', {
  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/YOUR_productId/price',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/YOUR_productId/price');
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);