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);
});

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"
            }
        ]
    }
}

Last updated