Price Segmentation Guide
This guide explains how to implement price segmentation for B2B scenarios using Elastic Path Commerce Cloud. Learn how to set up different pricing tiers and manage custom pricing for resellers. This guide uses EPCC Accounts to segment audiences. The alternative mechanisms to segment your Shopper Segments include using HTTP headers and EPCC customers (see here).
Objectives
This guide aims to:
- Teach users how to set up different pricing tiers and manage custom pricing for resellers
- Show how to use EPCC Accounts to segment audiences
- Provide step-by-step instructions for implementing price segmentation through:
- Setting up pricebooks for different pricing tiers
- Creating and organizing products in a hierarchy
- Configuring a segmented catalog
- Managing reseller accounts and pricing rules
- Implementing custom pricing for specific resellers
The guide is particularly focused on B2B scenarios where different resellers or customer segments need different pricing structures. It provides practical examples and API calls to demonstrate how to:
- Create separate pricebooks for different pricing tiers (e.g., List Price, Bronze Tier)
- Set up product hierarchies
- Configure catalogs with price segmentation enabled
- Manage reseller accounts and their specific pricing rules
- Preview and test pricing for different segments
The following how to guide will implement price segmentation, it will involve:
- Setting up pricebooks for different pricing tiers
- Creating and organizing products in a hierarchy
- Configuring a segmented catalog
- Manage reseller accounts and pricing rules
- Implement custom pricing for specific tiers and resellers
Initial Setup
Creating Pricebook For List Prices
Create separate pricebooks for List Price (default catalog pricing)
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "pricebook",
"attributes": {
"name": "List Price",
"description": "Public list prices for all customers",
"external_ref": "list-price-public"
}
}
}'
Sample response...
{
"data": {
"id": "<generated-pricebook-id>",
"type": "pricebook",
"attributes": {
"name": "List Price",
"description": "Public list prices for all customers",
"external_ref": "list-price-public",
"created_at": "<timestamp>",
"updated_at": "<timestamp>"
}
}
}
Setting Up Product Hierarchy
- Create a hierarchy to categorize and organize your products. This hierarchy is required for catalog publishing
curl -X POST https://useast.api.elasticpath.com/pcm/hierarchies \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "hierarchy",
"attributes": {
"name": "Software Licenses",
"description": "Software license products and categories",
"slug": "software-licenses"
}
}
}'
- Create a categeory structure
curl -X POST https://useast.api.elasticpath.com/pcm/hierarchies/:hierarchyId/nodes \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "node",
"attributes": {
"name": "Microsoft",
"description": "Microsoft Products",
"slug": "microsoft"
}
}
}'
curl -X POST https://useast.api.elasticpath.com/pcm/hierarchies/:hierarchyId/nodes \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "node",
"attributes": {
"name": "Microsoft",
"description": "Microsoft licenses",
"slug": "windows"
},
"relationships": {
"parent": {
"data": {
"id": "<ms-node-id>",
"type": "node"
}
}
}
}
}'
Creating Products And Attaching to Hierarchy Node
- Add product details including:
- SKU
- Description
- Media type (digital/physical)
- Live status (to ensure it is added to catalog)
curl -X POST https://useast.api.elasticpath.com/pcm/products \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "product",
"attributes": {
"name": "Microft Windows Home - Digital License",
"description": "License Key for Microsoft Windows Home",
"sku": "windows-11-home-dpl",
"slug": "windows-11---home---digital-download",
"status": "live",
"commodity_type": "digital",
"tags": [
"microsoft",
"windows",
"home"
]
}
}
}'
- Add products to the hierarchy
curl -X POST https://useast.api.elasticpath.com/pcm/hierarchies/:hierarchyId/nodes/:nodeId/relationships/products \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": [
{
"type": "product",
"id": "<product_id>"
}
]
}'
- Create prices in the List Price pricebook as default pricing We will set List price to be $45.00 for the MS Home License. We will support tiered picing of 5-9 $43.00, 10-14 $41.00 and 15+ $39.00
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks/:pricebookId/prices \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "product-price",
"attributes": {
"sku": "windows-11-home-dpl",
"currencies": {
"USD": {
"amount": 4500,
"includes_tax": false,
"tiers": {
"min_5": {
"amount": 4300,
"minimum_quantity": 5
},
"min_10": {
"amount": 4100,
"minimum_quantity": 10
},
"min_15": {
"amount": 3900,
"minimum_quantity": 15
}
}
}
}
}
}
}
'
The response will look something like
{
"data": {
"id": "ede58328-dca8-4aa0-8c2b-e494f2d30974",
"type": "product-price",
"attributes": {
"created_at": "2025-05-12T20:21:44.417Z",
"updated_at": "2025-05-14T09:37:39.919Z",
"sku": "windows-11-home-dpl",
"currencies": {
"USD": {
"amount": 4500,
"includes_tax": false,
"tiers": {
"min_5": {
"amount": 4300,
"minimum_quantity": 5
},
"min_10": {
"amount": 4100,
"minimum_quantity": 10
},
"min_15": {
"amount": 3900,
"minimum_quantity": 15
}
}
}
}
},
"meta": {
"owner": "store"
}
}
}
Configuring the Catalog
- Create a catalog with -- the License Hierarchy -- Price Segmentation Enabled -- the List Price pricebook
curl -X POST https://useast.api.elasticpath.com/pcm/catalogs \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "catalog",
"attributes": {
"name": "Software Licenses Catalog",
"description": "Software license products with price segmentation",
"hierarchy_ids": [
"<hierarchy_id>"
],
"pricebook_ids": [
{
"id": "<list_price_pricebook_id>",
"priority": 1
}
],
"enable_price_segmentation": true
}
}
}'
The response will look something like...
{
"data": {
"id": "<generated-catalog-id>",
"type": "catalog",
"attributes": {
"name": "Software Licenses Catalog",
"description": "Software license products with price segmentation",
"hierarchy_ids": [
"<hierarchy_id>"
],
"pricebook_ids": [
{
"id": "<list_price_pricebook_id>",
"priority": 1
}
],
"enable_price_segmentation": true,
"created_at": "<timestamp>",
"updated_at": "<timestamp>"
}
}
}
- Publish the catalog
curl -X POST https://useast.api.elasticpath.com/pcm/catalogs/<generated-catalog-id>/releases \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"export_full_delta": true
}
}'
The response will look something like this:
{
"data": {
"id": "<generated-release-id>",
"type": "catalog-release",
"attributes": {
"name": "Software Licenses Catalog",
"description": "Software license products with price segmentation",
"catalog_id": "<catalog-id>",
"published_at": "<timestamp>",
"hierarchies": [
{
"id": "<hierarchy-id>",
"type": "node"
}
]
},
"meta": {
"created_at": "<timestamp>",
"updated_at": "<timestamp>",
"release_status": "IN_PROGRESS",
"is_full_publish": true,
"is_full_delta": true,
"total_products": 0,
"total_nodes": 0,
"percent_completed": 0
}
}
}
The publish process is asynchronous and will show status updates in the response:
- ENDING: Request received but not yet processed
- IN_PROGRESS: Catalog release is being created
- PUBLISHED: Catalog release is complete
- FAILED: Publish process failed
You can monitor the publish progress by polling the catalog release endpoint
curl -X GET https://useast.api.elasticpath.com/pcm/catalogs/:catalogId/releases/<generated-release-id> \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json"
To make this catalog your default catalog, create a catalog rule with no criteria that points at it.
curl -X POST "https://useast.api.elasticpath.com/pcm/catalogs/rules" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "catalog_rule",
"attributes": {
"name": "Default Catalog",
"description": "Default Catalog when no other rules have matching criteria",
"catalog_id": "YOUR_CATALOG_ID"
}
}
}'
The response will look like this:
{
"data": {
"attributes": {
"catalog_id": "YOUR_CATALOG_ID",
"created_at": "2025-05-20T14:07:33.097Z",
"description": "Default Catalog to use when no other rules have matching criteria",
"name": "Default Catalog",
"updated_at": "2025-05-20T14:07:33.097Z"
},
"id": "<new-rule-id>",
"type": "catalog_rule"
},
"links": {
"self": "/pcm/catalogs/rules/<new-rule-id>"
}
}
Preview the catalog and ensure the products have the expected prices
To query the catalog in a shopper context, you should use an implicit token..
curl -X POST https://useast.api.elasticpath.com/oauth/access_token \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json" \
-d "client_id=<YOUR_CLIENT_ID>" \
-d "grant_type=implicit"
A few important notes about this command: Replace YOUR_CLIENT_ID with your actual client ID from your application keys
The response will look like this:
{
"expires": 1537779121,
"identifier": "implicit",
"expires_in": 3600,
"access_token": "0e82127a8d9c20abb3d6e48561cbfe81448956ab",
"token_type": "Bearer"
}
- The token expires after 1 hour (3600 seconds), at which point you'll need to generate a new one
- This token provides read-only access to resources and is most appropriate for client-side applications
- For subsequent API requests, you'll need to include this token in the Authorization header
Now query the catalog (no segmentation information is supplied here)
curl --globoff -X GET "https://useast.api.elasticpath.com/pcm/catalog/products?page[limit]=10&page[offset]=0&include=main_image,files" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
You should see the products with the list prices from the 'List Price' pricebook.
Creating an Account for the Reseller
Accounts within Elastic Path can be used to allow a Reseller to purchase products with prices specific to that account.
You can register resellers in two ways:
-
Through Commerce Manager:
- Navigate to Orders Area
- Select Accounts
- Create new account or add users to existing accounts
- Add account members
-
Via the API:
- Use Account Signup/Registration endpoints
- Create new accounts programmatically
We will use the API is this guide.
While we will go over each step you'll need to execute to set up an Account for your Reseller, we won't go into any of the details behind them.
We assume that each new registered user is for a new reseller. This will create a new account per registered user. Accounts can support having multiple registered users in a single account.
However, if you need more a more detailed overview, please take a look through the following resources.
Fetch Authentication Realm ID:
curl -X GET "https://useast.api.elasticpath.com/v2/authentication-realms" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
Sample Response... You want the ID of the "authentication-realm" with name of "Account Management Realm"
{
"meta": {
"page": {
"limit": 25,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
},
"data": [
{
"relationships": {
"origin": {
"data": {
"id": "xxxxxx",
"type": "account_authentication_settings"
}
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/<Account Management Realm ID>"
},
"id": "<Account Management Realm ID>",
"name": "Account Management Realm",
"meta": {
"created_at": "2025-05-12T19:29:10.099Z",
"updated_at": "2025-05-12T19:29:10.099Z"
},
"type": "authentication-realm",
"duplicate_email_policy": "allowed",
"redirect_uris": []
}
],
"links": {
"next": null,
"current": "https://useast.api.elasticpath.com/v2/authentication-realms?page%5Boffset%5D=0&page%5Blimit%5D=25",
"last": "https://useast.api.elasticpath.com/v2/authentication-realms?page%5Boffset%5D=0&page%5Blimit%5D=25",
"prev": null,
"first": "https://useast.api.elasticpath.com/v2/authentication-realms?page%5Boffset%5D=0&page%5Blimit%5D=25"
}
}
Fetch Password Profile ID:
curl -X GET "https://useast.api.elasticpath.com/v2/authentication-realms/{authentication_realm_id}/password-profiles" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
The response will look like this:
{
"meta": {
"page": {
"limit": 25,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
},
"data": [
{
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/authentication_realm_id/password-profiles/<password_profile_id>"
},
"name": "password profile",
"meta": {
"created_at": "2025-05-12T19:29:10.417Z",
"updated_at": "2025-05-12T19:29:10.417Z"
},
"type": "password_profile",
"id": "<password_profile_id>",
"username_format": "email",
"enable_one_time_password_token": true
}
],
"links": {
"next": null,
"current": "https://useast.api.elasticpath.com/v2/authentication-realms/authentication_realm_id/password-profiles?page%5Boffset%5D=0&page%5Blimit%5D=25",
"last": "https://useast.api.elasticpath.com/v2/authentication-realms/authentication_realm_id/password-profiles?page%5Boffset%5D=0&page%5Blimit%5D=25",
"prev": null,
"first": "https://useast.api.elasticpath.com/v2/authentication-realms/authentication_realm_id/password-profiles?page%5Boffset%5D=0&page%5Blimit%5D=25"
}
}
Next, let's create the necessary account information to allow the Reseller access...
curl -X POST "https://useast.api.elasticpath.com/v2/authentication-realms/<account_management_realm_id>/user-authentication-info" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "user_authentication_info",
"name": "John Doe",
"email": "john.doe@reseller.com"
}
}'
The response will look like this:
{
"data": {
"id": "<user_authentication_info_id>",
"name": "John Doe",
"email": "john.doe@reseller.com",
"meta": {
"created_at": "2025-05-20T14:41:25.499Z",
"updated_at": "2025-05-20T14:41:25.499Z",
"creation_status": "COMPLETE"
},
"type": "user_authentication_info"
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/<account_management_realm_id>/user-authentication-info/<user_authentication_info_id>"
}
}
Once that's done, you'll next need to create a Username and Password for the Reseller by running...
curl -X POST "https://useast.api.elasticpath.com/v2/authentication-realms/<account_management_realm_id>/user-authentication-info/<user_authentication_info_id>/user-authentication-password-profile-info" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "user_authentication_password_profile_info",
"password_profile_id": "<password_profile_id>",
"username": "john.doe@reseller.com",
"password": "password123"
}
}'
The response will look like this:
{
"data": {
"id": "<user_authentication_password_profile_info_id>",
"username": "john.doe@reseller.com",
"meta": {
"created_at": "2025-05-20T14:44:22.713Z",
"updated_at": "2025-05-20T14:44:22.713Z"
},
"type": "user_authentication_password_profile_info",
"password_profile_id": "<password_profile_id>"
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/<account_management_realm_id>/user-authentication-info/<user_authentication_info_id>/user-authentication-password-profile-info/<user_authentication_password_profile_info_id>"
}
}
Important notes about this request:
- Replace YOUR_ACCESS_TOKEN with your actual access token
- Replace
<account_management_realm_id>
with your actual authentication realm ID - Replace
<user_authentication_info_id>
with the ID of the user authentication info you created earlier - Replace
<password_profile_id>
with your actual password profile ID - The request body requires four fields:
- type: Must be "user_authentication_password_profile_info"
- password_profile_id: The ID of the password profile to use
- username: The username for authentication (must be an email)
- password: The password for authentication (must be at least 8 characters)
The response will look like this:
{
"data": {
"id": "2b2dd626-9960-40c6-a9f9-d4af96eed3fb",
"username": "john.doe",
"meta": {
"created_at": "2021-06-07T15:58:08.198Z",
"updated_at": "2021-06-07T15:58:08.198Z"
},
"type": "user_authentication_password_profile_info",
"password_profile_id": "<password_profile_id>"
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/authentication-realms/<account_management_realm_id>/user-authentication-info/<user_authentication_info_id>/user-authentication-password-profile-info/2b2dd626-9960-40c6-a9f9-d4af96eed3fb"
}
}
Finally, you will create an access token that you can use to make requests on behalf of the account holder when browsing the catalog/adding to cart and checkout.
curl -X POST "https://useast.api.elasticpath.com/v2/account-members/tokens" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "account_management_authentication_token",
"authentication_mechanism": "password",
"password_profile_id": "YOUR_PASSWORD_PROFILE_ID",
"username": "john.doe",
"password": "password123"
}
}'
The response will include an account management authentication token that you can use in subsequent requests by setting it in the EP-Account-Management-Authentication-Token header.
{
"meta": {
"account_member_id": "57566321-c5e3-474c-8160-cf6789af6ad4",
"page": {
"limit": 25,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
},
"data": [
{
"account_name": "John Doe",
"account_id": "<reseller-account-id>",
"token": "<account_management_authentication_token>",
"type": "account_management_authentication_token",
"expires": "2025-05-21T14:48:18.448Z"
}
],
"links": {
"current": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
"first": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
"last": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
"next": "null",
"prev": "null"
}
}
Important notes:
- Replace YOUR_ACCESS_TOKEN with your actual access token
- Replace YOUR_PASSWORD_PROFILE_ID with your actual password profile ID
- For OIDC, replace the OAuth-related fields with your actual values
Key components of the response:
- type: Always "account_management_authentication_token"
- account_id: The ID of the account this account member belongs to... used on catalog rule creation
- token: The JWT token that can be used for subsequent requests
- expires: The date and time the token expires
As we have set up our Authentication Realm to automatically create accounts when creating a User, we need to make sure we can find the ID of that Account when it's created.
When fetching the account membership details for the user, you can include any associated accounts with that user by
passing include=account
as a query parameter.
Managing Reseller Pricing
This guide uses EPPC Accounts to provide Shopper segmentation. You can use legacy EPCC customers and HTTP Contet tags as well as schedules to expose different pricing models for the same catalog.
Custom Pricing for Tiered Resellers
To implement custom pricing for a Bronze tier resellers, you will create a tiere specific pricebook, add tier specific pricing to that pricebook and then create a cataloge rule using this pricbook as primary pricing model. If no price exists, the price will be found in the catalogs default pricing model:
- Create a new pricebook for the bronze tier resellers
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "pricebook",
"attributes": {
"name": "bronze-tier-pricing",
"description": "pricing for bronze tier resellers",
"external_ref": "bronze-tier-pricing"
}
}
}'
The Response Will look like:
{
"data": {
"id": "<bronze_tier_pricebook_id>",
"type": "pricebook",
"attributes": {
"created_at": "2025-05-20T14:51:54.325Z",
"name": "bronze-tier-pricing",
"description": "pricing for bronze tier resellers",
"external_ref": "bronze-tier-pricing",
"updated_at": "2025-05-20T14:51:54.325Z"
},
"meta": {
"owner": "store"
}
},
"links": {
"self": "/pcm/pricebooks/<bronze_tier_pricebook_id>"
}
}
- Add negotiated prices for specific products We will support tiered pricing and a base price of $30.01 We will set List price to be \39.00 for the MS Home License. We will support tiered picing of 5-9 \37.00, 10-14 \35.00 and 15+ \33.00
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks/:reseller_specific_pricebook_id/prices \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "product-price",
"attributes": {
"sku": "windows-11-home-dpl",
"currencies": {
"USD": {
"amount": 3900,
"includes_tax": false,
"tiers": {
"min_5": {
"amount": 3700,
"minimum_quantity": 5
},
"min_10": {
"amount": 3500,
"minimum_quantity": 10
},
"min_15": {
"amount": 3300,
"minimum_quantity": 15
}
}
}
}
}
}
}'
- Publish the catalog to ensure the new pricebooks prices will be included. You do not need to update the catalog.
curl -X POST https://useast.api.elasticpath.com/pcm/catalogs/<generated-catalog-id>/releases \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"export_full_delta": true
}
}'
- Creating Pricing Rules
A catalog rule is the mechanism used to link a shopper context to a specific catalog. For segmented pricing, the rule will specify which prices to show that segment.
In this example, we use add rule with the bronze tier pricebook. The bronze tier pricebook.This will look for product prices in bronze tier pricebook. If no price is found the bronze tier pricebook, the catalogs default pricing will be used (using pricebooks defined on the catalog)
You can add a rule per pricing tier or create a rule per reseller account. If you have a small number of resellers (<100), you could use a single rule for all Bronze Tier resellers and add their accounts to the rule. However, we would recommend considering having a rule per account. This allows for easier customization of an accounts pricing (see Custom Pricing for Specific Resellers)
Note: for this demo, the account id of the reseller has been pulled from the account_management_authentication_token response
curl -X POST "https://useast.api.elasticpath.com/pcm/catalogs/rules" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "catalog_rule",
"attributes": {
"name": "bronze-reseller-catalog-pricing",
"description": "Catalog rule for bronze tier resellers",
"catalog_id": "YOUR_CATALOG_ID",
"account_ids": ["<reseller-account-id>"],
"pricebook_ids":[
{
"id": "<bronze-tier-pricebook-id>",
"priority": 50
}
]
}
}
}'
- Preview the catalog as the reseller and ensure the products have the expected prices
If you are using account, ALL shopper requets will need to supply the token
from <account_management_authentication_token>
response as well as the access token.
You need to add the following header...
EP-Account-Management-Authentication-Token
Now query the catalog (no segmentation information is supplied here)
curl -X GET "https://useast.api.elasticpath.com/pcm/catalog/products" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "EP-Account-Management-Authentication-Token: <ACCOUNT_MANAGEMENT_AUTHENTICATION_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
You should see the products with the prices from the 'Bronze Tier' pricebook.
Custom Pricing for Specific Resellers
To implement custom pricing for specific resellers you will create a reseller specific pricebook, add reseller specific pricing to that pricebook and then create a cataloge rule using this pricbook as primary pricing model and the broze tier pricebook as a fallback pricing model:
- Create a new pricebook for the reseller
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "pricebook",
"attributes": {
"name": "john.doe@reseller.com",
"description": "Account Specific Pricing for john.doe@reseller.com",
"external_ref": "john.doe@reseller.com pricing"
}
}
}'
The Response Will look like:
{
"data": {
"id": "<reseller_specific_pricebook_id>",
"type": "pricebook",
"attributes": {
"created_at": "2025-05-20T14:51:54.325Z",
"description": "Account Specific Pricing for john.doe@reseller.com",
"external_ref": "john.doe@reseller.com pricing",
"name": "john.doe@reseller.com",
"updated_at": "2025-05-20T14:51:54.325Z"
},
"meta": {
"owner": "store"
}
},
"links": {
"self": "/pcm/pricebooks/<reseller_specific_pricebook_id>"
}
}
- Add negotiated prices for specific products We will support tiered pricing and a base price of $30.01 We will set List price to be $38.00 for the MS Home License. We will support tiered picing of 5-9 $36.00, 10-14 $34.00 and 15+ $32.00
curl -X POST https://useast.api.elasticpath.com/pcm/pricebooks/:reseller_specific_pricebook_id/prices \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "product-price",
"attributes": {
"sku": "windows-11-home-dpl",
"currencies": {
"USD": {
"amount": 3800,
"includes_tax": false,
"tiers": {
"min_5": {
"amount": 3600,
"minimum_quantity": 5
},
"min_10": {
"amount": 3400,
"minimum_quantity": 10
},
"min_15": {
"amount": 3200,
"minimum_quantity": 15
}
}
}
}
}
}
}'
- Publish the catalog to ensure the new pricebooks prices will be included. You do not need to update the catalog.
curl -X POST https://useast.api.elasticpath.com/pcm/catalogs/<generated-catalog-id>/releases \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"export_full_delta": true
}
}'
- Creating Pricing Rules
A catalog rule is the mechanism used to link a shopper context to a specific catalog. For segmented pricing, the rule will specify which prices to show that segment.
In this example, we use add rule with reseller specific pricebook and bronze tier pricebook. The bronze tier pricebook has lower priority than reseller specific pricebook. This will look for product prices in reseller specific pricebook first, then fall back to bronze tier pricebook. If no price is found in either of these pricebooks, the catalogs default pricing will be used (using pricebooks defined on the catalog)
curl -X POST "https://useast.api.elasticpath.com/pcm/catalogs/rules" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"data": {
"type": "catalog_rule",
"attributes": {
"name": "john.doe@reseller.com",
"description": "Account Specific Pricing for john.doe@reseller.com",
"catalog_id": "YOUR_CATALOG_ID",
"account_ids": ["<account_id_of_newly_created_reseller>"],
"pricebook_ids":[
{
"id": "<reseller_specific_pricebook_id>",
"priority": 100
},
{
"id": "<bronze-tier-pricebook-id>",
"priority": 50
}
]
}
}
}'
- Preview the catalog as the reseller and ensure the products have the expected prices
Now query the catalog (no segmentation information is supplied here)
curl -X GET "https://useast.api.elasticpath.com/pcm/catalog/products" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "EP-Account-Management-Authentication-Token: <ACCOUNT_MANAGEMENT_AUTHENTICATION_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
You should see the products with the prices from the 'Reseller Specific Tier' pricebook.
What if i am using a Backend For Front End Pattern
If you are using a Backend For Front end pattern using admin endpoints,
- Admin API endpoints don't support automatic price resolution through catalog rules.
- You need to manually specify which pricebooks should be used for pricing products
- You want to control price segmentation at the API level rather than relying on automatic resolution
If you want segmented pricing, you will need to explicitly specify the pricebooks to use via the EP-Pricebook-IDs-For-Price-Segmentation-Preview header
. This header allows you to:
- Supply a comma-delimited list of pricebook IDs (up to 5)
- Set priority order (the first pricebook has the highest priority)
- Control which prices are used for product display and cart operations
This approach is useful when:
- You need more control over price resolution
- You're building a custom frontend that doesn't use EPCC Accounts and need to handle different pricing scenarios
- You want to implement complex pricing logic in your backend
- You want to preview which prices will be applied to a product using the Pricebooks IDs specified in a catlog rule
Example usage:
curl -X GET "https://useast.api.elasticpath.com/pcm/catalogs/{catalog_id}/releases/{release_id}/products" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json" \
-H "EP-Pricebook-IDs-For-Price-Segmentation-Preview: <pricebook_id_priority_1>,<pricebook_id_priority_2>" \
-H "Content-Type: application/json"
Important notes about this endpoint:
Required parameters:
- catalog_id: The unique identifier of your catalog
- release_id: The unique identifier of the catalog release (or use latestPublished for the most recent version)
Optional parameters:
- page[limit]: Number of products per page (default: 10)
- page[offset]: Number of products to skip
- include: Include related resources like:
- main_image: Product images
- files: Associated files
- component_products: For bundle products
Here's an example with some of these parameters:
curl --globoff -X GET "https://useast.api.elasticpath.com/pcm/catalogs/YOUR_CATALOG_ID/releases/latestPublished/products?page[limit]=20&page[offset]=0&include=main_image,files" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "EP-Pricebook-IDs-For-Price-Segmentation-Preview: <pricebook_id_priority_1>,<pricebook_id_priority_2>" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
The response will include:
- Product data (name, description, SKU, etc.)
- Price information
- Any included resources (images, files, etc.)
- Metadata about the products
- Breadcrumb information showing parent nodes
- Variation information for products with variations
- Note: that this endpoint only returns products in a live status
Best Practices
- Use clear naming conventions for pricebooks and rules
- Document pricing agreements and rules
- Regularly review and update pricing structures
- Test pricing visibility for different user types
- Maintain audit trails of pricing changes