Skip to main content
GET
/
products
/
{id}
Get product
curl --request GET \
  --url https://store.salesive.com/api/v1/products/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "id": "<string>",
  "name": "<string>",
  "price": 123,
  "currency": "<string>",
  "category": "<string>",
  "description": "<string>",
  "status": "<string>",
  "images": [
    "<string>"
  ],
  "variants": [
    {
      "sku": "<string>",
      "options": {},
      "stock": 1
    }
  ]
}

Request

You can pass either the MongoDB product ID or the generated slug in the id path segment. The API returns the same response for both inputs.
GET /products/{id}

Path parameters

ParameterTypeDescription
idstringProduct ID or slug.

200 response

When the user is authenticated, the response includes an inWishlist boolean indicating whether the product is in the user’s wishlist.
{
    "id": "68c4f1cab50803b7b1310c60",
    "name": "Premium Hoodie",
    "description": "Lightweight fleece hoodie",
    "price": 54.5,
    "currency": "USD",
    "category": "apparel",
    "images": ["https://cdn.salesive.com/products/hoodie-front.png"],
    "variants": [
        {
            "sku": "HOODIE-BLK-M",
            "options": {
                "color": "black",
                "size": "m"
            },
            "stock": 25
        }
    ],
    "inWishlist": false
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

id
string
required

Product's MongoDB identifier or slug.

Response

Product detail response.

id
string
required

Unique product identifier.

name
string
required

Display name of the product.

price
number<float>
required

Unit price for the product.

currency
string
required

ISO currency code for the product price.

category
string
required

Identifier of the category the product belongs to.

description
string

Rich description of the product.

status
string

Derived status such as active or archived.

images
string<uri>[]

Optional list of image URLs for the product.

variants
object[]

Optional list of variant definitions for the product.