OCAPI custom properties 23.2

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/v23_2/products/creative-zen-v HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE: HTTP/1.1 200 OK
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.
  • Text
  • String
  • Enum of Strings
  • Set of Strings
  • Integer
  • Enum of Integers
  • Set of Integers
  • Double
  • Set of Doubles
  • Boolean
  • EMail
  • Password
  • Date
  • Date+Time
Note:

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

X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
Notifications pending to read 9