Product

The Product API endpoints allow fetching essential product related data such as pricing and stock levels.

Gets one or more Products by product reference

GET/umbraco/commerce/storefront/api/v1/products
Query parameters
Header parameters
Response

Success

Body
productReferencestring
productVariantReferencenullable string
skunullable string
namenullable string
imageUrlnullable string
pricePriceDto (object)
stocknullable number (double)
attributesnullable array of AttributeCombinationDto (object)
taxClassTaxClassReferenceDto (object)
propertiesnullable object
isGiftCardnullable boolean
Request
const response = await fetch('/umbraco/commerce/storefront/api/v1/products', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "productReference": "text",
    "productVariantReference": "text",
    "sku": "text",
    "name": "text",
    "imageUrl": "text",
    "price": {
      "currency": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "text"
      },
      "withoutTax": 0,
      "tax": 0,
      "withTax": 0,
      "formatted": {
        "withoutTax": "text",
        "tax": "text",
        "withTax": "text"
      }
    },
    "stock": 0,
    "attributes": [
      {
        "name": {
          "alias": "text",
          "name": "text"
        },
        "value": {
          "alias": "text",
          "name": "text"
        }
      }
    ],
    "taxClass": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "alias": "text"
    },
    "isGiftCard": false
  }
]

Last updated