Tracepos Developer HubTracepos Developer Hub
Home
Guide
POS & Integrations
API Reference
Webhooks
Home
Guide
POS & Integrations
API Reference
Webhooks
  • Core Catalog & Outlets

    • Products API
    • Categories & Brands API
    • Warehouses & Outlets API
  • Parties & CRM

    • Customers & Suppliers API
  • Operations & Stock

    • Sales & Transactions API
    • Purchases & Procurement API
    • Inventory & Price Adjustments API
    • Returns & Reversals API
  • Financial Ledger & Expenses

    • Payments & Settlements API
    • Expense Management API
    • Double-Entry Accounting Architecture
  • Real-Time Sync

    • Webhooks & Real-Time Sync

Products API

The Products API allows external applications, POS terminals, and e-commerce storefronts to access your product catalog in real time. Products are scoped to your authenticated warehouse branch, providing localized stock levels, warehouse pricing, and batch details.


List Products

Retrieve a paginated list of catalog products available in your warehouse.

Method: GET /products

Query Parameters

ParameterTypeRequiredDescription
limitIntegerNoNumber of records per page (default: 20, max: 100).
pageIntegerNoPage number for pagination (default: 1).
category_idStringNoFilter products by Category Hash ID (xid).
brand_idStringNoFilter products by Brand Hash ID (xid).
searchStringNoSearch query matching product name, SKU, or barcode.

Request Headers

X-Tracepos-Public-Key: YOUR_PUBLIC_KEY
X-Tracepos-Secret-Key: YOUR_SECRET_KEY
Accept: application/json

Code Samples

cURL
curl -X GET "https://app.tracepos.net/api/v1/public/products?limit=10" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY" \
  -H "Accept: application/json"
Node.js (Axios)
const axios = require('axios');

axios.get('https://app.tracepos.net/api/v1/public/products', {
  params: { limit: 10 },
  headers: {
    'X-Tracepos-Public-Key': process.env.TRACEPOS_PUBLIC_KEY,
    'X-Tracepos-Secret-Key': process.env.TRACEPOS_SECRET_KEY,
    'Accept': 'application/json'
  }
})
.then(res => console.log(res.data))
.catch(err => console.error(err.response?.data || err.message));
Python (Requests)
import os
import requests

res = requests.get(
    "https://app.tracepos.net/api/v1/public/products",
    params={"limit": 10},
    headers={
        "X-Tracepos-Public-Key": os.environ["TRACEPOS_PUBLIC_KEY"],
        "X-Tracepos-Secret-Key": os.environ["TRACEPOS_SECRET_KEY"],
        "Accept": "application/json"
    }
)
print(res.json())
PHP (Guzzle)
<?php
require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();
$response = $client->get('https://app.tracepos.net/api/v1/public/products', [
    'headers' => [
        'X-Tracepos-Public-Key' => getenv('TRACEPOS_PUBLIC_KEY'),
        'X-Tracepos-Secret-Key' => getenv('TRACEPOS_SECRET_KEY'),
        'Accept'             => 'application/json',
    ],
    'query' => ['limit' => 10]
]);

echo $response->getBody();

Response (200 OK)

{
  "status": "success",
  "data": {
    "current_page": 1,
    "per_page": 10,
    "total": 450,
    "data": [
      {
        "xid": "w8vBqGZ0",
        "name": "Coca-Cola 500ml Pet",
        "slug": "coca-cola-500ml-pet",
        "item_code": "5449000000996",
        "product_type": "single",
        "sales_price": 500.00,
        "purchase_price": 380.00,
        "mrp": 550.00,
        "current_stock": 280,
        "category": {
          "xid": "cat_beverages",
          "name": "Beverages & Soft Drinks"
        },
        "brand": {
          "xid": "br_coca_cola",
          "name": "Coca-Cola Company"
        },
        "unit": {
          "xid": "unit_pcs",
          "name": "Pieces",
          "short_name": "Pcs"
        }
      }
    ]
  }
}

Get Single Product

Retrieve comprehensive details for a specific product, including multi-unit packaging options and batch details.

Method: GET /products/{id}

Path Parameters

  • id (String, Required): The Product Hash ID (xid) or system identifier.

Code Sample (cURL)

curl -X GET "https://app.tracepos.net/api/v1/public/products/w8vBqGZ0" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY" \
  -H "Accept: application/json"

Response (200 OK)

{
  "status": "success",
  "data": {
    "xid": "w8vBqGZ0",
    "name": "Coca-Cola 500ml Pet",
    "item_code": "5449000000996",
    "sales_price": 500.00,
    "purchase_price": 380.00,
    "current_stock": 280,
    "description": "500ml PET bottle of carbonated cola drink.",
    "additional_units": [
      {
        "child_unit_id": "unit_carton_12",
        "operator": "*",
        "operator_value": 12,
        "alternative_price": 5800.00,
        "unit": {
          "name": "Carton of 12",
          "short_name": "Ctn"
        }
      }
    ]
  }
}
Next
Categories & Brands API