---
title: Update BlockData custom property for nodes and entries
slug: commerce-connect-15/service-api/update-blockdata-custom-property-for-nodes-and-entries
docTags: 
createdAt: 2026-07-22T14:38:27.000Z
---

Starting in Version 7.3.0 of Optimizely Service API, you can use custom properties with `BlockData` type in nodes and entries for `GET`, `PUT`, and `POST` endpoints with JSON format.

## Sample

The following code sample defines a `BlockData` property class for nodes and entries:

```csharp
[ContentType(DisplayName = "Header Component", GUID = "625221a8-e7e4-4d78-b099-e8d472b83ed2")]
 public class HeaderBlock : BlockData
 {
     [Display(Name = "Title", GroupName = "Header", Order = 20)]
     [CultureSpecific]
     [Required]
     public virtual string Title { get; set; }

     [Display(Name = "Date", GroupName = "Header", Order = 25)]
     [CultureSpecific]
     public virtual DateTime Date { get; set; }

     [Display(Name = "Number", GroupName = "Header", Order = 26)]
     [CultureSpecific]
     public virtual int Number { get; set; }

     [CultureSpecific]
     [Display(Name = "Main body", GroupName = "Header", Order = 27)]
     public virtual XhtmlString MainBody { get; set; }

     [CultureSpecific]
     [Display(Name = "Page Reference", Order = 14)]
     public virtual PageReference PageReference { get; set; }

     [CultureSpecific]
     [Display(Name = "ContentArea", Order = 8)]
     public virtual ContentArea ContentArea { get; set; }

     [CultureSpecific]
     [Display(Name = "ContentReference", Order = 21)]
     [UIHint(UIHint.AllContent)]
     public virtual ContentReference ContentItem { get; set; }
 }
```

The following code sample adds a property to products and nodes:

```csharp
public class FashionVariant : VariationContent
 {
     [Searchable]
     [Tokenize]
     [IncludeInDefaultSearch]
     [BackingType(typeof(PropertyString))]
     [Display(Name = "Size", Order = 1)]
     public virtual string Size { get; set; }

     [Searchable]
     [CultureSpecific]
     [Tokenize]
     [IncludeInDefaultSearch]
     [BackingType(typeof(PropertyString))]
     [Display(Name = "Color", Order = 2)]
     public virtual string Color { get; set; }

     [Display(Name = "Color2", Order = 3)]
     public virtual string Color2 { get; set; }

     [Display(Name = "Header", Description = "", GroupName = "Header", Order = 10)]
     public virtual HeaderBlock HeaderBlock { get; set; }
 }
```

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/pKLFYj8gXcx31S4_DlaIE_4de78940a68fc0259e399533d426fa0d8afb64c8a57417f3ecd8a5088df63e4f-blockdata-example.png)

## Updates

**Before**

`GET` – Does not return data of BlockData.

`PUT` and `POST` – Do not support BlockData.

**After version 7.3.0**

`GET` – Returns BlockData property data as below and other data is as before (truncated here for short).

```json
{
  "MetaFields": [
    {
      "Data": [
        {
          "Language": "en",
          "Value": "{\"MainBody\":\"<p>content</p>\",\"ContentArea\":[{\"Name\":\"Exported Catalog Files\",\"ContentGroup\":\"\",\"ContentLink\":\"6\",\"TypeIdentifier\":\"episerver.commerce.catalog.contenttypes.catalogimportexportfolder\",\"ContentTypeName\":\"CatalogImportExportFolder\",\"RoleIdentities\":[],\"Attributes\":{},\"ContentGuid\":\"ad102694-cada-3df9-9c12-1eb275648801\",\"InlineBlockData\":null,\"ContentTypeId\":44,\"InlineBlockDataIndex\":0}],\"pagereference\":\"26\",\"Title\":\"tiddddddtile\",\"ContentItem\":\"25\",\"Date\":\"2025-03-05T17:00:00Z\",\"Number\":323,\"contentTypeGuid\":\"625221a8-e7e4-4d78-b099-e8d472b83ed2\"}"
        }
      ],
      "Name": "HeaderBlock",
      "Type": "LongString"
    }
  ]
}
```

Based on JSON format from `GET` endpoint, you can update BlockData type property as MetaField by using `PUT` and `POST` endpoints.

Optimizely supports nodes and entries and does not support DraftNode and DraftEntry. The following list are the supported data types:

- Primitive data types, such as string, number, and datetime
- XhtmlString
- PageReference
- ContentArea
- ContentReference
