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
idstring uuidrequired

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
attributestring[]required

The attribute combination of the variant to return

Example: ["key1:value1","key2:value2"]
Responses
curl -L \
  --url '/umbraco/delivery/api/v1/content/item/{id}/variant?attribute=text'
{
  "content": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "contentType": "text",
    "properties": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  },
  "attributes": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "isDefault": true
}

Last updated

Was this helpful?