Get products
Returns all products available in MPower
GET/https://api-get-products-kigtdz23uq-ew.a.run.app
Headers
x-api-key
<API_KEY>
string
Body Parameters
No body, query, or path parameters are required.
cURL
curl -i \
-H "x-api-key: <API_KEY>" \
https://api-get-products-kigtdz23uq-ew.a.run.appResponse
200 Success
{
"count": 852,
"products": {
"productDocumentId": {
"manufacturer_info": {
"id": "manufacturer-id",
"name": "Manufacturer name"
},
"product_info": {
"name": "Product name",
"sku": "AAA-000",
"category": "Category",
"subcategory": "Subcategory",
"size": {
"cbm": 1.2,
"depth": 10,
"gross_weight": 20,
"height": 30,
"net_weight": 18,
"width": 40
}
}
}
}
}401 Unauthorized
{
"error": "Unauthorized"
}405 Method not allowed
{
"error": "Method not allowed"
}500 API key is not configured
{
"error": "API key is not configured"
}Behavior / Side effects
Read-only endpoint
- Reads all documents from the products collection.
- Does not write, update, or delete Firestore documents.
Request behavior
- Does not require body, query, or path parameters.
- Does not support filters, sorting, or pagination.
- Returns all products in a single response.
Response shape
- Returns a top-level products object.
- Each key inside products is the Firestore product document ID.
- Each product includes only manufacturer_info and product_info.
- manufacturer_info includes id and name.
- product_info includes name, sku, category, subcategory, and size.
- size is either an object with product dimensions/weights or null.
Field mapping
- manufacturer_info.id is read from products/{product_id}.manufacturer_id.
- manufacturer_info.name is read from products/{product_id}.manufacturer_name.
- product_info.name is read from products/{product_id}.name.
- product_info.sku is read from products/{product_id}.sku.
- product_info.category is read from products/{product_id}.type.
- product_info.subcategory is read from products/{product_id}.subtype.
- product_info.size.cbm is read from products/{product_id}.spec_info.size.product_cbm.
- product_info.size.depth is read from products/{product_id}.spec_info.size.product_depth.
- product_info.size.gross_weight is read from products/{product_id}.spec_info.size.product_gross_weight.
- product_info.size.height is read from products/{product_id}.spec_info.size.product_height.
- product_info.size.net_weight is read from products/{product_id}.spec_info.size.product_net_weight.
- product_info.size.width is read from products/{product_id}.spec_info.size.product_width.
- sku is returned as stored and is not validated or transformed by the endpoint.
Data quality expectations
- Product fields are expected to exist for every product.
- If spec_info or spec_info.size is missing or invalid, product_info.size is returned as null.
- If size exists but one numeric field is missing or invalid, that specific field is returned as null.
- The API does not calculate or transform size values; it returns the stored numeric values.
- The API has a defensive fallback and may return null only if the underlying Firestore document is incomplete or malformed.