Currency
GET /currency/ List
Returns a json list of currencies with their respective flags in encoded format. Display on html page for visibility of flags.
Copy fetch("https://nexus.smartstock.africa/currency/",{headers: {Authorization: "Bearer access_token"}})"
Query Params
Name Type Description
page int Page index (1-based)
page_size int Items per page (max 100)
search str Filter by name/sku
Response
Copy {
"count": 224,
"next": "bas_url/currency/?page=2",
"previous": null,
"results": [
{"id":1,"currencyCode":"AFN","flag_emoji":"🇦🇫"}
]
}
GET /currency/{id}/ Retrieve
Products
GET /api/v1/products/ List
Returns a paginated list of products.
Copy curl -H "Authorization: Bearer <token>" \
bas_url/api/v1/products/?page=1&page_size=20
Query Params
Name Type Description
page int Page index (1-based)
page_size int Items per page (max 100)
search str Filter by name/sku
Response
Copy {
"count": 42,
"next": "bas_url/api/v1/products/?page=2",
"previous": null,
"results": [
{"id":1,"name":"Laptop","price":"1200.00","currency":"USD"}
]
}
POST /api/v1/products/ Create
Copy curl -X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name":"Mouse","price":"19.99","currency":"USD"}' \
bas_url/api/v1/products/
GET /api/v1/products/{id}/ Retrieve
PUT /api/v1/products/{id}/ Update
DELETE /api/v1/products/{id}/ Delete