OCAPI Usage

Detailed information about using the Open Commerce API:

TopicDescription
API ExplorerYou can interactively explore the Open Commerce APIs with API Explorer.
Batch requestsYou can sometimes use a batch request (a multipart HTTP request that can contain up to 50 subrequests) instead of issuing multiple separate requests.
Best practicesUseful tips for working with OCAPI.
CachingYou can build client-side application caches or leverage Proxy caches.
Client application identificationYou must ensure that your client application identifies itself for security and tracking purposes.
CORSYou can take advantage of Cross-Origin Resource Sharing (CORS).
Custom propertiesYou can get access to customer properties of business objects.
CustomizationYou can customize OCAPI resources on server-side.
Data formatsYou can specify a preferred data format for resources (JSON or XML).
ExpansionsYou can minimize network traffic and conserve server CPU usage by using a technique called expansion.
FilteringYou can specify a filter on an API request to limit the number of items in the response.
FlashDocument contains special information.
Global ExceptionsGlobal exceptions thrown by OCAPI.
Global HTTP headersHTTP headers globally used by OCAPI.
Hook Circuit BreakerThe Hook Circuit Breaker feature improves stability and saves processing time by protecting the system from high rates of hook failures.
HTTP methodsYou create requests based on standard HTTP methods (as defined by RFC 2616).
HTTP status codes and faultsYou can diagnose problems or failures by examining HTTP status codes and faults.
ImagesYou can retrieve images using absolute URLs.
JSONPYou can request that the server returns a JSON document with a JavaScript function call wrapped around it.
JWT (JSON Web Token)The stateless Shop API uses JSON Web Tokens in its authentication mechanism.
LocalizationYou can use the API in different locales.
MetadataYou can request metadata about the API itself, such as the current version.
OAuth 2.0You have to authorize your Data API requests using the OAuth 2.0 protocol.
OCAPI settingsYou can configure OCAPI settings in Business Manager by modifying a JSON data structure, enabling you to control client permissions, caching, and other resource-specific behaviors.
Optimistic lockingDescribes the two optimistic locking mechanisms supported by OCAPI.
PaginationYou can use pagination to break up large responses into smaller chunks.
Property selectionYou can use property selectors to limit which resource properties are returned.
Resource StatesResource States can be used for Optimistic Locking, which prevents collisions of concurrent requests, for example, the "lost update" problem.
Session bridgeAllows seamless interaction between OCAPI and a session-based storefront.
System JobsPredefined jobs that can be called with an OCAPI request.
URL syntaxYou must create appropriately constructed URLs to operate on resources.
Versioning and deprecation policyYou must ensure that your application conforms to the versioning and deprecation policy.