Get products¶
Shop API v1
GET
*base*/products
GET
*base*/products/*productId*
Authentication:API key
Fetches a specific product referenced by its ID, or the full product list.
If the productId
parameter is specified, one product is fetched, otherwise all products in the catalog are fetched.
Parameters¶
int
optional
|
Product ID. This is an internal ID for a product variant in Centra. It’s not visible in the Centra admin panel; only through the API. The “Product ID” shown in the General Attributes for a product in Centra’s admin is returned as the silkProduct field in the API response. |
Response¶
200
Content-type: application/json
The object returned will have the productId
for each product as the key. The product object is explained under Product data model.
Response example¶
1 2 3 4 5 6 7 | HTTP/1.1 200 OK
Content-type: application/json
{
"1": {"product-object"},
"2": {"product-object"},
}
|
Error example¶
1 2 3 4 5 6 7 8 | HTTP/1.1 404 Not Found
Content-type: application/json
{
"errors" : {
"product" : "not found"
}
}
|