OCAPI custom properties 19.1

The Open Commerce API allows to set custom properties of business objects in input documents and read custom properties in output documents. Whether a business object supports custom properties can be found at the document description. If the document contains a header (supports custom properties) in the documentation, then custom properties can be set or read via the document. Custom properties are always marked with the prefix c_ and have therefore their own namespace.

The example below shows a document response including some custom properties in OCAPI:

REQUEST: GET /dw/shop/v19_1/products/creative-zen-v HTTP/1.1
Host: example.com
Accept: application/json

Content-Type:  application/json; charset=UTF-8
Cache-Control:  max-age=900,must-revalidate
   "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
   "c_memorySize" : "1GB",
   "c_tabDescription" : "The ZEN V player was designed for people like you those who walk a step or two ahead of the pack."

Custom Properties value types

The following value types are supported in OCAPI for input and output of custom properties.

The value types HTML and Image are only supported as output, but not as input value type for custom properties in OCAPI.