Skip to main content

Products

Product Endpoint

The Products API allows you to retrieve product information, including pricing, inventory levels, and metadata. You can search and filter products using various parameters.

GET/api/v1/product/

Get products by filter parameters

NameTypeRequiredDescription
formatstringResponse format: 'json' (default) or 'xml' (BMEcat 2005 format)
product_numberstringFilter by single or comma-separated AXRO product numbers (e.g., 'CANL055BK' or 'CANL055BK,CANL056WH')
oemstringFilter by single or comma-separated OEM numbers (e.g., '3016C002' or '3016C002,CF540A')
eanstringFilter by single or comma-separated EAN numbers (e.g., '4549292124699' or '4549292124699,4549292124706')
brandstringFilter by single or comma-separated brand names (e.g., 'HP,Canon,Epson')
categorystringFilter by single or comma-separated category IDs (e.g., '50593,50638')
pagestringPage number for pagination (default: 1)
limitstringNumber of items per page (default: 100)

Example Request

curl -X GET https://api.axro.com/api/v1/product/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
"products": [
{
"product_number": "CANL055BK",
"ean": "4549292124699",
"oem_number": "3016C002",
"brand": "Canon",
"stock": 42,
"price": [
{
"from_quantity": 1,
"to_quantity": 5,
"price": 8599
},
{
"from_quantity": 6,
"to_quantity": 999999,
"price": 8299
}
],
"title": {
"en_GB": "Canon 055 Toner Cartridge - Black",
"de_DE": "Canon 055 Tonerkartusche - Schwarz"
},
"category": {
"id": 50593,
"de": "Tonerkartuschen",
"en": "Toner cartridges"
},
"modified_at": "2024-02-15T14:30:00Z"
}
],
"total_pages": 5
}
Hint

Depending on how you set the limit, you will most likely have to paginate.

Use the key total_pages as the maximum and create a recursive function that calls the API endpoint with the next page as the page parameter until the corresponding page is reached.

Check "Example Requests for pagination" below.

Example Request for pagination

#!/bin/bash

URL="https://api.axro.com/api/v1/product/"
TOKEN="YOUR_TOKEN"
CURRENT_PAGE=1
HAS_MORE_PAGES=true

while [ "$HAS_MORE_PAGES" = true ]
do
echo "Fetching page $CURRENT_PAGE..."
RESPONSE=$(curl -s -X GET "$URL?page=$CURRENT_PAGE" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json")

echo $RESPONSE | jq .

# Extract total_pages
TOTAL_PAGES=$(echo $RESPONSE | jq '.total_pages')

if [ -z "$TOTAL_PAGES" ] || [ "$TOTAL_PAGES" = "null" ]; then
echo "Could not determine total pages, stopping"
HAS_MORE_PAGES=false
elif [ $CURRENT_PAGE -ge $TOTAL_PAGES ]; then
echo "Reached last page ($TOTAL_PAGES)"
HAS_MORE_PAGES=false
else
CURRENT_PAGE=$((CURRENT_PAGE + 1))
fi
done

Categories Endpoint

GET/api/v1/product/categories/

Get all available product categories

Example Request

curl -X GET https://api.axro.com/api/v1/product/categories/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

[
{
"id": 50593,
"de": "Tonerkartuschen",
"en": "Toner cartridges"
},
{
"id": 50638,
"de": "Tintenpatronen",
"en": "Ink cartridges"
},
{
"id": 51522,
"de": "Drucker",
"en": "Printers"
}
]

Brands Endpoint

GET/api/v1/product/categories/

Get all available product brands

Example Request

curl -X GET https://api.axro.com/api/v1/product/brands/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
"brands": [
"Canon",
"HP",
"Epson",
"Brother",
"Samsung"
]
}