HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


## Example models





## Published catalog entries

### Get all entries

Column Title
Column Title
Column Title
GETget/episerverapi/commerce/entries/{startPage}/{pageSize}By default this method gets all languages for the entries. If you want only one specific language, use the Accept-Language header.

#### JSON response type





#### XML response type





Response





### Get a specific entry

Column Title
Column Title
Column Title
GETget/episerverapi/commerce/entries/{entryCode}By default this method gets all languages for the entry. If you want only one specific language use the Accept-Language header.

#### JSON response type





#### XML response type





Response





### Create entry

Column Title
Column Title
Column Title
POSTpost/episerverapi/commerce/entriesCreate entry.

#### JSON response type





#### XML response type





Response





### Update entry

Column Title
Column Title
Column Title
PUTput/episerverapi/commerce/entries/{entryCode}Update entry

#### JSON response type





#### XML response type





Response





### Delete entry

Column Title
Column Title
Column Title
DELETEdelete/episerverapi/commerce/entries/{entryCode}Delete entry

#### JSON response type





#### XML response type





Response





## Common draft entries [New in Service API 5.1.0]

Use the endpoints listed below to get common draft versions, create new common drafts, and update or delete existing drafts.

### Get common draft entry

Column Title
Column Title
Column Title
GETget/episerverapi/commerce/entries/{entryCode}/commondraft/{lang}Get common draft entry

#### JSON response type





#### XML response type





Response





### Create common draft entry

Note

The Optimizely Service API does not support creating common drafts for non-existing content. You can create a first draft version by using an endpoint for published content (without “commondraft”) and setting IsActive to “false”.

Column Title
Column Title
Column Title
POSTpost/episerverapi/commerce/entries/commondraft/{lang}Create common draft entry

#### JSON response type





#### XML response type





Response





### Update common draft entry

Note

If common draft content is in “Published” state, a new common draft version is created (same behavior as Post common draft). If common draft content is in a DelayedPublish/AwaitingApproval/CheckedIn state, then it skips updating content and returns a Conflict status code (409).

Column Title
Column Title
Column Title
PUTput/episerverapi/commerce/entries/{entryCode}/commondraft/{lang}Update common draft entry

#### JSON response type





#### XML response type





Response





### Delete common draft entry

Column Title
Column Title
Column Title
DELETEdelete/episerverapi/commerce/entries/{entryCode}/commondraft/{lang}Delete common draft entry

#### JSON response type





#### XML response type





Response





## Special strings and characters

### Special strings

Theses properties require special values to function properly.

InventoryStatus

  • Enabled

  • Disabled

  • Ignored

EntryType

  • Product

  • Variation

  • Package

  • Bundle

  • DynamicPackage

### Special characters in entry code [New version 5.4.2]

As of version 5.4.2, the Service API supports special characters (such as "/", "%" or "+") in the entry code for all actions (get all, get a specific, post, put or delete) for these objects:

  • Catalog entry

  • Catalog entry association

  • Catalog entry relation

  • Catalog item asset

  • Catalog entry price

The special characters must be double-encoded then sent to the Service API. For example, the slash character (/) is double-encoded as **%252F**.

Note

Because double escaping in URLs involves security risks, it is preferable to avoid this approach.

To enable double-encoding support, edit the site 's web.config file as shown below:





Note

The characters listed after requestPathInvalidCharacters are only an example of special characters for which you can enable double-encoding support. You can modify the list as needed.