GEThttps://api.spirestock.com/api/v1/products#
List all products in the catalog with optional search filter. Products include their class and variants.
Parameters
NameDescription
pagenumber- Page number (default: 1)
limitnumber- Items per page (default: 20, max: 100)
searchstring- Search by product name
statusnumber- Filter by status: 1 (active), 0 (inactive)
Example request
curl "https://api.spirestock.com/api/v1/products?search=milk&status=1" \
-H "Authorization: Bearer YOUR_TOKEN"Example response
{
"response_code": 200,
"data": [
{
"id": 1,
"organization_id": 6,
"product_name": "Full Cream Milk",
"product_class_id": 1,
"product_hsn": "0401",
"product_color_code": "#FFFFFF",
"product_description": "Fresh full cream milk",
"container_id": null,
"packaging_type_id": null,
"product_image": null,
"status": 1,
"product_class_name": "Milk",
"description": "Toned milk in pouches",
"order_of": null,
"createdAt": "2023-02-15T09:48:43.000Z",
"updatedAt": "2023-02-15T09:48:43.000Z",
"sp_product_class": {
"id": 42,
"product_class": "Milk",
"unit": "L"
},
"variants": [
{
"id": 526,
"organization_id": 6,
"product_id": 233,
"item_sku_code": "SKU-001",
"variant_name": "Toned Milk 400ML",
"variant_size": "0.4",
"variant_quantity": 400,
"mrp": "15.00",
"sp": "8.50",
"container_quantity": 24,
"packaging_quantity": 0,
"is_bulk_pack": false,
"production_unit_id": 18,
"barcode_value": null,
"barcode_format": "EAN13",
"status": 1,
"product_name": "Toned Milk",
"product_class_id": 42,
"container_id": 43,
"container_name": "CRATE",
"packaging_type_id": 43,
"packaging_type_name": "PCS",
"variant_unit_id": 18,
"variant_unit_name": "ML",
"largest_unit_name": "L",
"order_of": null,
"no_of_pouch": 24,
"container_size": "9.60 L/CRATE",
"included_in_scheme": null,
"container_mrp": "360.00",
"sp_distributor": "8.50",
"container_sp_distributor": "204.00",
"sp_superstockist": "8.50",
"container_sp_superstockist": "204.00",
"sp_employee": "8.50",
"container_sp_employee": "204.00",
"valid_from": "2023-02-16",
"valid_to": "2024-02-29",
"gst": 5,
"is_allow_in_packaging": 1,
"is_allow_in_container": 1,
"tally_export_type": 1,
"is_tally_export_uom": 1,
"sap_code": "MAT-001",
"production_unit_ids": "18",
"createdAt": "2023-02-16T07:19:20.000Z",
"updatedAt": "2023-02-16T07:19:20.000Z"
}
]
}
],
"pagination": {
"total": 65,
"page": 1,
"limit": 20,
"total_pages": 4
}
}