Number of APIs: 18
This Qodex collection contains API endpoints from various Salesforce Commerce B2B/D2C API domains. Follow this documentation to get started with Salesforce Qodex collections. ⚠️ Disclaimers: ℹ️ Report issues and ask questions here. Though not strictly required to use the collection, for ease of use some APIs in the collection assume data found in a commerce B2B/D2C trial webstore created through the SFDX commerce plugin. For more information on how to create a trial webstore please see How to Create Scratch Orgs and Stores. The collection relies on the following variables: Note: Not every folder needs all of the variables. Look at the documentation of each folder for specific detailsSalesforce Commerce B2B/D2C APIs
Get started
Variables Reference
Variable
Description
Where to find it? (Some assume trial webstore)
orgUrl
The base URL for the Salesforce org.
Through the following SFDX command :
sfdx force:org:display -u
. The orgUrl is the Instance Url in the response.
orgId
Salesforce org Id.
Use the Login org admin (SOAP) endpoint under Setup Queries folder to return the id. (This uses
orgUsername
and orgPassword
)
orgUsername
Org administrator username
Specified when the org was created.
orgPassword
Org administrator password
Specified when the org was created.
apiVersion
The Salesforce API version (e.g.: 57.0).
Log into the org -> Go to Setup -> type
apex classes
in the Quick Find box >> click New in the Apex Classes
page -> click on the Version Setting
tab to see all the supported versions
webstoreName
The name of the webstore.
Specified at webstore creation time.
webstoreId
The Id of the webstore.
Use the Get webstore id endpoint under Setup Queries folder to return the id. (This uses
webstoreName
)
buyerUsername
Registered buyer/shopper username.
Specified when creating the trial webstore.
buyerPassword
Registered buyer/shopper password.
Specified when creating the trial webstore.
buyerAccountId
Account Id associated with the shopper/buyer.
Use the Get buyer account id endpoint under Setup Queries folder to return the id. (This uses
buyerUsername
)
productSearchTerm
Search term used to find the product.
Defaulted to coffee, which will return results in the trial webstore.
GET {{orgUrl}}/services/data/v{{apiVersion}}/query/?q=SELECT+Id,+Username,+AccountId+FROM+User+WHERE+UserName+=+'{{buyerUsername}}'
POST {{orgUrl}}/services/Soap/u/{{apiVersion}}
GET {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/products/:productId
DELETE {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/carts/:cartId
POST {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/carts
POST {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/carts/:cartId/cart-items
ENDPOINTS