Kibo Pricing API Developer Guide
Pricing
Understand pricing architecture and concepts
Discount Folders
Organize discounts using folders in the Admin UI
Understanding Pricing in Kibo
In Kibo, pricing is a powerful, standalone concept that is decoupled from the core product. Unlike platforms where a product has a single, fixed price attribute, a Kibo product has no inherent price. Instead, prices are defined in Price Lists, and products are assigned prices within those lists. This architecture is incredibly flexible. It allows you to create an unlimited number of price lists for different contexts without ever duplicating a product. You can have separate price lists for:- Different currencies (USD Price List, EUR Price List)
- B2B customers with negotiated contract rates (Contract A Price List)
- VIP customer segments (Gold Member Price List)
- Time-bound sales and promotions (Black Friday Sale Price List)
How This Domain Fits Into Kibo
The Pricing domain is a foundational service that is consulted throughout the entire customer journey.- Catalog: When a product is displayed on a category or search results page, Kibo’s platform determines the correct price list for the shopper and shows the appropriate price.
- Cart & Checkout: As items are added to the cart, the Pricing engine calculates the subtotal. This same engine is what applies discounts from the Promotion domain.
- Customer: Customer accounts or B2B accounts can be “entitled” to specific price lists, giving them access to exclusive or negotiated pricing.
- Orders: The final, resolved prices for each item are captured and stored on the order record at the time of purchase.
Prerequisites
- Kibo API credentials with Catalog Administration permissions.
- Node.js 16+ with TypeScript.
- Familiarity with REST APIs and
async/await.
What You’ll Learn
After completing this guide, you’ll understand:- How Kibo structures Price List and Price List Entry data (based on official API specs).
- The key patterns Kibo uses for all pricing CRUD operations (verified from apidocs.kibocommerce.com).
- Common workflows like creating sale lists and bulk-updating prices (with accurate, tested examples).
- How to avoid the most common beginner mistakes.
- How to read and navigate the official API documentation for pricing.
Kibo Pricing Fundamentals
How Kibo Organizes Pricing Data
Kibo’s Pricing data model is built on a simple but powerful hierarchy:-
PriceList: This is the container object for a set of prices. It acts as a named bucket. Key properties include:priceListCode: A unique, user-defined string identifier (e.g.,USD-RETAILorVIP-PRICING). You’ll use this code in almost every API call.name: A human-readable name for the list (e.g., “USD Retail Prices”).enabled: A boolean to activate or deactivate the entire price list.
-
PriceListEntry: This is the actual price for a single product within a price list. APriceListcan contain thousands of these entries. Key properties include:productCode: The product this price applies to.currencyCode: The currency of the price (e.g., “USD”).price: The final price a customer pays. If asalePriceis active, this is ignored.salePrice: An optional, lower price that takes precedence over theprice.startDate/endDate: Optional ISO 8601 date-time strings that define when the price entry is active. This is perfect for scheduling sales.
Key Kibo Patterns You’ll See Everywhere
Before we write code, understand these patterns that appear in every Kibo API: Authentication Pattern: The Kibo SDK manages authentication for you. You create a singleConfiguration object containing your credentials. This object is then passed to the constructor of the PriceListsApi client. The client will automatically handle the OAuth 2.0 token exchange for every API call.
Request/Response Structure:
Many pricing operations are designed for bulk updates. When adding or updating price list entries, you send an array of entry objects in the request body. The API will process them as a batch.
ITEM_ALREADY_EXISTS when trying to create a PriceList with a priceListCode that’s already in use.
API Documentation Reference:
Throughout this guide, we’ll reference specific endpoints. Find complete specs under the “Catalog Administration” section at:
/api-reference/pricelist/get-price-lists
Common Pricing Workflows
Kibo developers typically work with Pricing in these scenarios:- System Integration: Syncing prices from an external ERP or PIM system into Kibo by creating and updating price lists.
- Promotional Pricing: Creating a new, temporary price list for a holiday sale and scheduling it to activate and deactivate automatically.
- B2B/Contract Pricing: Managing dedicated price lists for specific B2B accounts with negotiated rates.
Creating a Price List: The Kibo Way
When You Need This
This is the first step for any new pricing strategy. You need a container to hold your prices, whether it’s for a new currency, a new customer segment, or a temporary sale. This operation creates that empty container.API Documentation Reference
- Endpoint:
POST /api/commerce/catalog/admin/pricelists - Method:
POST - SDK Method:
addPriceList - API Docs: Add Price List
Understanding the Kibo Approach
Kibo separates the creation of the price list (the container) from the act of adding prices to it. This allows you to set up the structure and metadata of your price list first. ThepriceListCode you define here becomes the unique key for all future operations, like adding or updating the prices within it.
Code Structure Walkthrough
Step-by-Step Implementation
Step 1: Setting Up the FoundationWhat Just Happened? (Code Explanation)
- The setup phase created the
Configurationobject, which is standard for all SDK interactions. - The API call used an instance of
PriceListsApito interact with the pricing endpoints. - The payload was a
PriceListobject. We defined our own uniquepriceListCodewhich acts as its permanent ID. We also setresolvableto true, which is important for allowing the storefront to use this price list. - The response handling uses a
try...catchblock. On success, Kibo returns the full price list object we just created. On failure, we specifically check for theITEM_ALREADY_EXISTSerror to give a more user-friendly message.
Common Beginner Mistakes
Mistake 1: Trying to add prices at the same time as creating the list. TheaddPriceList endpoint only creates the container. You cannot include an array of PriceListEntry objects in its payload. Adding prices is a separate, subsequent API call.
Mistake 2: Not setting resolvable to true.
If a price list is not resolvable, the Kibo platform won’t consider it when determining which price to show a shopper on the storefront. It can still be accessed directly via the API, but it won’t be used automatically. For most B2C use cases, you want this to be true.
Multiple Real-World Examples
Here are 5 complete, production-ready examples for commonPrice List CRUD operations.
Example 1: Bulk Add Prices to a Price List
After creating a price list, you need to populate it. This is the most common “write” operation.- API Docs: Add Price List Entry
Example 2: Get Price List Entries with Pagination
This shows how to read the prices contained within a list.- API Docs: Get Price List Entries
Example 3: Bulk Update Existing Prices
Use this to change prices that are already in a price list.- API Docs: Update Price List Entry
Example 4: Schedule a Future Sale Price
This example shows how to usestartDate and endDate to create a price that only becomes active during a specific window.
Example 5: Clean Up - Delete Prices and the Price List
This demonstrates the full lifecycle: removing specific prices from a list and then deleting the list itself.- API Docs (Delete Entries): Delete Price List Entry
- API Docs (Delete List): Delete Price List
Troubleshooting Your Pricing Implementation
Reading Kibo Error Messages
ITEM_ALREADY_EXISTS: You tried toaddPriceListwith apriceListCodethat is already in use.ITEM_NOT_FOUND: You tried to operate on apriceListCodethat does not exist.VALIDATION_ERROR: The request body is malformed. When performing bulk entry updates, theitemsarray in the error response will tell you which product code or price was invalid.
Common Development Issues
Issue 1: My price updates aren’t appearing on the storefront immediately.- Why it happens: Kibo’s platform has several layers of caching to ensure high performance. Price list information is cached, so changes made via the API might not be reflected for a few minutes until the cache expires.
- How to fix it: For immediate testing, you can often trigger a cache clear in the Kibo Admin under System > Caching. For automated processes, you can either wait for the cache TTL (Time To Live) to expire naturally or, for advanced use cases, include a special
X-Vol-Cache-Flush: trueheader in your API call to request a cache invalidation. - How to avoid it: Be aware that caching is a feature. For most bulk updates that run overnight, this is not an issue. Factor in a potential delay of a few minutes for changes to propagate.
- Why it happens: A single invalid
productCodeor a malformed price in a large batch will cause the entire API call to fail (ifthrowErrorOnInvalidEntriesis true). - How to fix it: Inspect the
itemsarray within the error response body. Kibo will often report which specific entry in your payload caused the validation failure. Also, consider sending your updates in smaller chunks (e.g., 100-200 entries per call) to make it easier to isolate a bad record. - API Reference: Review the schema for
PriceListEntrycarefully to ensure all your data types are correct (e.g.,priceis a number, not a string).

