OCAPI Resource Data Formats

The Open Commerce API currently supports one data format for resources: JSON. JSON is the default format. XML is not supported as data format for resources any longer.

How you specify a format depends on the underlying HTTP method. For GET requests, you provide a value for the URL request parameter format (valid value is json). For POST, PUT, and PATCH requests, you provide a value for the HTTP header content-type (valid value is application/json). The HTTP header content-type has precedence over the URL request parameter format.

The Open Commerce API supports character encoding in UTF-8 only.

Note

Attention!

The Open Commerce API (OCAPI) is now deprecated. The provisions described in our versioning and deprecation policy fully apply. For all new projects and major refactoring work, use B2C Commerce API (SCAPI) as the default REST API. For additional details, refer to Why Use SCAPI Instead of OCAPI.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!