Newer Version Available

This content describes an older version of this product. View Latest

B2B and D2C Commerce Resources

Get, create, update, and delete your commerce data. Work with address management, carts, checkouts, orders, products, promotions, taxes, wishlists, and search settings.

Available resources are:

Address Management

Resource Description
/commerce/webstores/webstoreId/accounts​/accountId/addresses Create a Commerce account address for a webstore, or retrieve a collection of addresses for a webstore account.
/commerce/webstores/webstoreId/accounts​/accountId/addresses/addressId Update or delete an address for a Commerce account associated with a webstore.

Carts

Resource Description
/commerce/webstores/webstoreId/carts Create a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId Get a cart. Delete a cart. Create an active cart, if one doesn’t exist.
/commerce/webstores/webstoreId/carts​/cartStateOrId/actions/add-cart-to-wishlist Copy the products from a cart to a wishlist.
/commerce/webstores/webstoreId/carts/cartStateorId/actions/clone Clones an existing cart to create a secondary, read-only cart to support Pay Now functionality.
/commerce/webstores/webstoreId/carts​/cartStateOrId/actions/make-primary Make a secondary cart a primary cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/actions/preserve Preserve cart contents when a guest logs in as an authenticated customer.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-coupons Get coupons associated with a cart, and apply a coupon code to a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-coupons/cartCouponId Delete a coupon from a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/messages/actions/set-visibility Set the visibility for cart messages.
/commerce/webstores/webstoreId/carts​/cartStateOrId/products Get the items in a cart, sorted by product ID.
/commerce/webstores/webstoreId/carts​/cartStateOrId/products/productId Get cart items of a specific product.
/commerce/webstores/webstoreId/carts​/cartStateOrId/promotions Get promotions associated with a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-items Get the items in a cart. Add an item to a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-items/batch Add a batch of up to 100 items to a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-items/cartItemId Update or delete an item in a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/cart-items/promotions Get promotions associated with items in a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/delivery-groups/actions/arrange-items Arrange cart items into delivery groups.
/commerce/webstores/webstoreId/carts​/cartStateOrId/delivery-groups Get or create a collection of delivery groups in a cart.
/commerce/webstores/webstoreId/carts​/cartStateOrId/delivery-groups/deliveryGroupId Get, delete, or update a delivery group in the cart.

Checkouts

Resource Description
/commerce/webstores/webstoreId/checkouts/activeOrCheckoutId Get, delete, or update a Commerce store checkout.
/commerce/webstores/webstoreId/​checkouts/activeOrCheckoutId/payments Payment for a Commerce store checkout.
/commerce/webstores/webstoreId/checkouts/activeOrCheckoutId/orders Place an order for a Commerce store checkout.
/commerce/webstores/webstoreId/​checkouts Start a Commerce store checkout.
/commerce/webstores/webstoreId/​payments/token Tokenize a payment for a Commerce store checkout.

Context

Resource Description
/commerce/webstores/webstoreId/​application-context Get application context information for a Commerce store.
/commerce/webstores/webstoreId/​session-context Get session context information for a Commerce store.

Externally Managed Accounts

Resource Description
/commerce/webstores/webstoreId/​external-managed-accounts Get a collection of externally managed accounts.

Extensions

Resource Description
/commerce/extension/extensions Get a collection of Commerce extensions available for your org.
/commerce/extension/providers Get Commerce extension providers or register a Commerce extension provider.
/commerce/extension/providers/providerId Get, delete, or modify a Commerce extension provider.
/commerce/extension/mappings Get and set extension provider mappings, which associate an extension provider with a webstore.
/commerce/extension/mappings/mappingId Delete, get, or modify a Commerce extension mapping.

Import

Resource Description
/commerce/management/import/​category/jobs Create a job to asynchronously import category data using a .csv file.
/commerce/management/import/​category/jobs/jobId Cancel or get the status of a job to asynchronously import category data using a .csv file.
/commerce/management/webstores/webstoreId/​product-import Import products for a B2B or B2C store using a .csv file.
/commerce/management/import/product/jobs Create a job to asynchronously import product data using a .csv file.
/commerce/management/import/product/jobs​/jobId Cancel or get the status of a job to asynchronously import global product data using a .csv file.

My Profile

Resource Description
/commerce/webstores/${webstoreId}/myprofile Retrieve the buyer's account details. Update buyer account details.

Products, Product Categories, Product Prices, Product Searches

Resource Description
/commerce/webstores/webstoreId/products Get fields, prices, and default images for a list of products.
/commerce/webstores/webstoreId/products/​productId Get a product.
/commerce/webstores/webstoreId/products/​productId/children Get a collection of child products related to a parent product.
/commerce/webstores/webstoreId/​product-categories/children Get product categories for a specific parent product category or get all the top-level product categories for the store.
/commerce/webstores/webstoreId/​product-categories/productCategoryId Get a product category.
/commerce/webstores/webstoreId/​product-category-path/product-categories/​productCategoryId Get the product category path from the root category to the current category.
/commerce/webstores/webstoreId/pricing/​products Get the prices for multiple products.
/commerce/webstores/webstoreId/pricing/​products/productId Get the list and buyer price for a product.
/commerce/webstores/webstoreId/search/​product-search Search products.
/commerce/webstores/webstoreId/search/​sort-rules Get sort rules for the live index.
/commerce/webstores/webstoreId/search/​suggestions Get suggestions for product searches.

Promotions

Resource Description
/commerce/promotions/actions/evaluate Determine which promotions the customer is eligible for based on the store and buyer group, and compute the applicable price adjustments based on the coupons and the items in the cart. This API evaluates only the first 50 active manual promotions and first 50 active automatic promotions, based on priority. This API computes and returns applicable price adjustments, but it does not apply those adjustments to the webcart record. If you want to enable promotions based on shipping, contact Salesforce Customer Support.
/commerce/promotions/actions/evaluate-products Determine which promotions apply to a product or set of products, and compute the applicable price adjustments. This API evaluates discrete products, including product variants and independent products but not parent products. Domain dependent and independent use cases are both supported. For example, a domain dependent call uses webstoreId and effectiveAccountId to evaluate products in a cart based on internal products or product categories. A domain independent call uses an external dataset based on SKUs or product categories.
/commerce/promotions/actions/decrease-use​/coupon-codes Get coupon code redemption usage to revert a previously redeemed coupon code.
/commerce/promotions/actions/increase-use​/coupon-codes Get coupon code redemption addition (increase) usage.

Taxes

Resource Description
/commerce/webstores/webstoreId​/taxes/actions/calculate-taxes Calculate taxes for a Commerce webstore.

Wishlists

Search Settings

Resource Description
/commerce/management/webstores/​webstoreId/search/attribute-settings/​facetable-fields Get and update facetable attributes.
/commerce/management/webstores/​webstoreId/search/attribute-settings/​searchable-fields Get and update searchable attributes.
/commerce/management/webstores/webstoreId/search/​boost-bury-rules Get all boost and bury rules for a webstore. Create a boost and bury rule. You can create up to 25 boost and bury rules for a webstore.
/commerce/management/webstores/webstoreId/search/​boost-bury-rules​/ruleId Get a boost and bury rule. Delete a boost and bury rule.
/commerce/management/webstores/​webstoreId/search/indexes Get indexes and create an index of a product catalog.
/commerce/management/webstores/​webstoreId/search/indexes/indexId Get a search index.
/commerce/management/webstores/​webstoreId/search/index-logs Get search index logs for a webstore.
/commerce/management/webstores/​webstoreId/search/product-settings Get and update product search settings.
/commerce/management/webstores/webstoreId/search/​results-rules Create or retrieve search include rules for a webstore. You can create up to 25 rules for a webstore. Search include rules are not configurable in the UI.
/commerce/management/webstores/​webstoreId/search/sort-rules Create or retrieve sort rules for a webstore.