Keepup Store Docs
Home
  • Welcome
  • 💡Tutorials
    • Overview
    • Account Set Up
    • Sales
      • 💡How to Create a Quote, Invoice or Receipt
      • 💡How to Edit a Quote or an Invoice
      • 💡How to Record Payment for a Quote or an Invoice.
      • 💡How to Filter Sales
      • 💡How to Delete a Sale
      • 💡How to Print a Sale
    • Inventory
      • 💡How to Add a Product
      • 💡How to Edit a Product
      • 💡How to Filter Products
      • 💡How to Delete a Product
      • 💡How to Record Damaged or Lost Products
      • 💡How to Import Products
    • Orders
      • 💡How to Create an Order
      • 💡How to Update an Order
      • 💡How to Filter Orders
      • 💡How to Print Order Labels
      • 💡How to Delete an Order
    • Customers
      • 💡How to Add a Customer
      • 💡How to Import Customers
      • 💡How to Edit a Customer
      • 💡How to Filter Customers
      • 💡How to Delete Customers
      • 💡How to Message Customers
      • 💡How to View Customers Feedback
      • 💡How to Buy SMS/Email Bundle
    • Expenses
      • 💡How to Record an Expense
      • 💡How to Edit an Expense
      • 💡How to Record Payment for an Expense
      • 💡How to Filter Expenses
      • 💡How to Delete an Expense
      • 💡How to View Expenses Analytics
    • Subscription
      • 💡How to Renew Your Subscription
    • Storefront
      • 💡How to Set Up Your Storefront
      • 💡How to Publish and Unpublish Your Storefront
      • 💡How to Update Storefront Settings
      • 💡How to View Storefront Orders
      • 💡How to View Abandoned Carts
    • Purchase Order
      • 💡How to create a Purchase Order
      • 💡How to edit a Purchase Order
      • 💡How to filter Purchase Orders
      • 💡How to delete Purchase Orders
      • 💡How to update a Purchase Order status
      • 💡How to record payment for a Purchase Order
    • Business Settings
      • 💡How to Update Business Information
      • 💡How to Verify your Business
      • 💡How to Manage Your Business API
      • 💡How to Update Sale Settings
      • 💡How to Manage Your Tax Profiles
      • 💡How to Manage Your Delivery and Pick Up Locations
      • 💡How to Manage Your Online Payments Options
      • 💡How to Manage your Offline Payments Options
    • Raw Materials
      • 💡How to Add a Raw Material
      • 💡How to Edit a Raw Material
      • 💡How to Import Raw Materials
      • 💡How to Filter Raw Materials
      • 💡How to Delete a Raw Material
      • 💡How to Record Damaged or Lost Raw Materials
      • 💡How to Create a Manufacturing Order
      • 💡How to Edit a Manufacturing Order
      • 💡How to Filter Manufacturing Orders
      • 💡How to Update a Manufacturing Order Status
      • 💡How to Delete a Manufacturing Order
    • Team Members
      • 💡How to Add Team Members
      • 💡How to Update a Team Member's Permissions
      • 💡How to Filter Team Members
      • 💡How to Remove a Team Member
      • 💡How to View Team Members' Action Logs
    • Damages & Loss
      • 💡How to Filter Damages & Loss
      • 💡How to Edit a Damaged or Lost Item
      • 💡How to Delete a Damaged or Lost Item
    • How to Access Keepup Store Version 2.0
  • âš¡API
    • Introduction
    • Sales
      • âš¡List Sales
      • âš¡Fetch Sale
      • âš¡Add Sale
      • âš¡Edit Sale
      • âš¡Update Balance
      • âš¡Cancel Sale
      • âš¡Refund Sale
    • Products
      • âš¡List Products
      • âš¡Fetch Product
      • âš¡Add Product
      • âš¡Edit Product
Powered by GitBook
On this page
  • Endpoint
  • Headers
  • Query Parameters
  • Sample Requests
  • Sample Response
  1. API
  2. Products

List Products

This endpoint retrieves a list of products based on specified criteria such as product name, SKU, barcode, category, stock status, and expiration status.

Endpoint

GET https://api.keepup.store/v2.0/products

Headers

Authorization: Bearer API_KEY

Query Parameters

product_name

string

optional

Name of the product to filter by. Example: "Widget A"

SKU

string

optional

Stock Keeping Unit to filter by. Example: "SKU12345"

barcode

string

optional

Barcode to filter by. Example: "0123456789012"

category

string

optional

Category of the products. Example: "Electronics"

status

string

optional

Stock status to filter by, options are 'in_stock', 'out_of_stock', 'low_stock', 'all'. Example: "in_stock"

expired

string

optional

Filter for products based on expiration, options are 'yes', 'no'. Example: "no"

limit

string

optional

Limits the number of products returned. Use 'all' for no limit. Example: "10"

page

string

optional

Specifies the page number for pagination. Example: "1"

Sample Requests

const axios = require('axios');

const config = {
    method: 'get',
    url: 'https://api.keepup.store/v2.0/inventory',
    headers: {
        'Authorization': 'Bearer API_KEY' // Replace 'API_KEY' with your actual API key
    },
    params: {
        product_name: "Widget A",
        SKU: "SKU12345",
        barcode: "0123456789012",
        category: "Electronics",
        status: "in_stock",
        expired: "no",
        limit: "10",
        page: "1"
    }
};

axios(config).then(function (response) {
    console.log(JSON.stringify(response.data));
}).catch(function (error) {
    console.error(error);
});
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.keepup.store/v2.0/inventory?product_name=Widget%20A&sku=SKU12345&barcode=0123456789012&category=Electronics&status=in_stock&expired=no&limit=10&page=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY' // Replace 'API_KEY' with your actual API key
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

import requests

url = 'https://example.com/api/inventory'
headers = {'Authorization': 'Bearer your_access_token'}
params = {
    'product_name': 'Widget A',
    'SKU': 'SKU12345',
    'barcode': '0123456789012',
    'category': 'Electronics',
    'status': 'in_stock',
    'expired': 'no',
    'limit': '10',
    'page': '1'
}

response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
    print(response.json())
else:
    print('Failed to retrieve products:', response.status_code, response.text)

Sample Response

{
    "status": 200,
    "message": "products found: 1",
    "data": {
        "meta": {
            "total_records": 1,
            "total_quantity": 0,
            "total_products_in_stock": 0,
            "total_products_out_of_stock": 1,
            "selling_price_total_amount": "0.00",
            "cost_price_total_amount": "0.00",
            "total_expired_products": 0,
            "total_soon_to_expired_products": 0
        },
        "products": [
            {
                "product_id": 19842,
                "product_name": "6:16",
                "description": "<p>6:16 description</p>",
                "cost_price": "0.00",
                "selling_price": "37.00",
                "stock_limit": "unlimited",
                "stock_status": "out_of_stock",
                "quantity": 0,
                "images": [],
                "restock_level": 1,
                "barcode": null,
                "SKU": null,
                "location": null,
                "category": null,
                "show_on_storefront": "yes",
                "featured_product": "no",
                "created_at": "2024-05-11 16:18",
                "updated_at": "2024-05-11 17:00"
            }
        ]
    }
}
{
    "status": 401,
    "error": "Authentication invalid"
}
PreviousProductsNextFetch Product

Last updated 8 months ago

âš¡
âš¡