Content

The content endpoints provide additional endpoints to the Umbraco Content Delivery API to help with fetching product related content.

Gets a multi-variants content

By default the variants property editor from Umbraco Commerce will only return attribute information with a product node to save on excessive payload sizes. The variants endpoint can be called to dynamically fetch an attibute combinations content only when it is requested.

GET/umbraco/delivery/api/v1/content/item/{id}/variant
Path parameters
id*string (uuid)

The ID of the content item that has an Umbraco Commerce variants property editor defined on it

Example: "3658dedd-98e1-4d3f-b7a5-9bd37144a16f"
Query parameters
Response

Success

Body
contentIApiElementModel (object)
attributesnullable object
isDefaultnullable boolean
Request
const response = await fetch('/umbraco/delivery/api/v1/content/item/{id}/variant?attribute=text', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "content": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "contentType": "text"
  },
  "isDefault": false
}

Last updated