xclade
Store APIProducts

Get a Product

Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.

GET
/store/products/{id}

Path Parameters

id*string

The product's ID.

Query Parameters

fields?string

Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

region_id?string

The ID of the region the product is being viewed from. This is required if you're retrieving product variant prices with taxes.

country_code?string

The country code the product is being viewed from. This is required if you're retrieving product variant prices with taxes.

province?string

The lower-case ISO 3166-2 province code the product is being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes.

cart_id?string

The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the region_id, country_code, and province properties.

limit?number

Limit the number of items returned in the list.

offset?number

The number of items to skip when retrieving a list.

order?string

The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.

Header Parameters

x-publishable-api-key*string

Publishable API Key created in the Medusa Admin.

Response Body

application/json

application/json

text/plain

application/json

application/json

application/json

application/json

curl -X GET "https://{tenant}.api.myxclade.com/store/products/string" \  -H "x-publishable-api-key: string"
{
  "product": {
    "categories": [
      {}
    ],
    "type": {
      "id": "string",
      "metadata": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z",
      "value": "string"
    },
    "length": 0,
    "title": "string",
    "status": "draft",
    "options": [
      {
        "id": "string",
        "title": "string",
        "product": {},
        "product_id": "string",
        "values": [
          {
            "id": "string",
            "value": "string",
            "option": {},
            "option_id": "string",
            "metadata": {},
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z"
          }
        ],
        "metadata": {},
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z"
      }
    ],
    "description": "string",
    "id": "string",
    "metadata": {},
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "variants": [
      {
        "options": [
          {
            "id": "string",
            "value": "string",
            "option": {},
            "option_id": "string",
            "metadata": {},
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z"
          }
        ],
        "product": {},
        "length": 0,
        "title": "string",
        "metadata": {},
        "id": "string",
        "width": 0,
        "weight": 0,
        "height": 0,
        "origin_country": "string",
        "hs_code": "string",
        "mid_code": "string",
        "material": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z",
        "product_id": "string",
        "sku": "string",
        "barcode": "string",
        "ean": "string",
        "upc": "string",
        "allow_backorder": true,
        "manage_inventory": true,
        "inventory_quantity": 0,
        "variant_rank": 0,
        "calculated_price": {
          "id": "string",
          "is_calculated_price_price_list": true,
          "is_calculated_price_tax_inclusive": true,
          "calculated_amount": 0,
          "calculated_amount_with_tax": 0,
          "calculated_amount_without_tax": 0,
          "is_original_price_price_list": true,
          "is_original_price_tax_inclusive": true,
          "original_amount": 0,
          "currency_code": "usd",
          "calculated_price": {},
          "original_price": {},
          "original_amount_with_tax": 0,
          "original_amount_without_tax": 0
        }
      }
    ],
    "handle": "string",
    "subtitle": "string",
    "is_giftcard": true,
    "thumbnail": "string",
    "width": 0,
    "weight": 0,
    "height": 0,
    "origin_country": "string",
    "hs_code": "string",
    "mid_code": "string",
    "material": "string",
    "collection": {
      "id": "string",
      "title": "string",
      "handle": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z",
      "products": [
        {}
      ],
      "metadata": {}
    },
    "collection_id": "string",
    "type_id": "string",
    "tags": [
      {
        "id": "string",
        "value": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z",
        "metadata": {}
      }
    ],
    "images": [
      {
        "id": "string",
        "url": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z",
        "metadata": {},
        "rank": 0
      }
    ],
    "discountable": true,
    "external_id": "string",
    "deleted_at": "2019-08-24T14:15:22Z"
  }
}

{
  "message": "Discount must be set to dynamic",
  "type": "not_allowed"
}

"Unauthorized"
{
  "message": "Entity with id 1 was not found",
  "type": "not_found"
}
{
  "code": "unknown_error",
  "message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.",
  "type": "QueryRunnerAlreadyReleasedError"
}
{
  "code": "invalid_request_error",
  "message": "Discount with code TEST already exists.",
  "type": "duplicate_error"
}

{
  "code": "api_error",
  "message": "An error occured while hashing password",
  "type": "database_error"
}