Authenticating Partner Commerce APIs
Basics
This page describes the headless Partner Commerce service that enables rapid experience-first commerce development and applications.
The Partner Commerce API follows a microservice architecture that enables commerce into any part of an application and is built on the JSON API specification, follows predictable REST URLs and supports cross-origin resource sharing.
Authentication
Authorization: Bearer 00D230000000nZM!ARMAQHLLm33JxYYP.UJn1gF6FFmLv8sDYK_8szeckHWtbguztoBpF0HL8...
The SDK comes with built-in mechanisms for obtaining the above authentication token or you may use any standard Salesforce approach for obtaining a custom access token for use with the API.
Endpoint
https://mycommunity.force.com/community/services/apexrest/Apttus_WebStore/apttus/:version/:api`
Versions
The Partner Commerce API ensures backward compatibility by properly versioning any changes to the APIs. Should changes to the API structure need to be made, it will occur within a new version and older functionality will be preserved.
X-Storefront Header Parameter
x-storefront: my-storefront`
Content Type
Content-Type: application/json
X-Account Header Parameter
x-account: 0011900000hnGsr`
Includes
You can easily include resource relationships on most top-level resources. Multiple includes are defined using comma delimited values.
Caching
Server side caching is used and can be configured per request using the cacheStrategy query parameter.
Errors
Code | Response |
---|---|
201 | Created Successfully |
200 | Updated Successfully |
204 | Deleted Successfully |
400 | Invalid JSON |
422 | Validation Error |
500 | Something went wrong on our end |