Shop API versus Data API for an integration requirement
Key Takeaway
Use the Shop API when the caller acts as a shopper, or as an agent shopping for a customer. Use the Data API when a back-office system reads or changes merchant data. For server-to-server calls, that system gets its OAuth token through the client credentials grant for its own Account Manager client ID.
The Open Commerce API (OCAPI) lets an outside system work with B2C Commerce over HTTP, sending and receiving JSON. For an integration requirement, you choose between the Shop API and the Data API by asking who the caller is acting as. Each API handles authentication differently, so the choice also decides which token the caller needs.
The three OCAPI APIs
OCAPI has three APIs: the Shop API, the Data API and the Meta API. The Meta API returns a formal description of OCAPI itself, including custom attributes. Because the Meta API describes the APIs rather than holding business data, an integration that works with business data chooses between the Shop API and the Data API.
Each resource has its own URL. The URL includes the API version and names the API type in its path as shop, data or meta. For example, v18_7 means year 2018, 7th release.