Kibo Settings API Developer Guide
Understanding Settings in Kibo
In Kibo, Settings are the administrative controls that define the business logic and behavior of your e-commerce site. Unlike data that changes frequently (like orders or inventory), settings are configured once and then modified occasionally to adapt to business needs. They are the “switches and dials” of the platform. What makes Kibo’s approach different is the granularity and scope of its settings. They are not just a flat list of key-value pairs; they are structured, domain-specific JSON objects. For example,InventorySettings is a complete object that controls everything from backordering logic to how stock levels are displayed, while ReturnSettings governs the entire RMA workflow. Interacting with these settings programmatically allows you to automate site configuration, synchronize environments, and build powerful administrative tools.
How This Domain Fits Into Kibo
The Settings domain is foundational. It underpins the logic of virtually every other part of the Kibo platform. The settings you configure dictate how the other APIs behave.- Inventory:
InventorySettingsdetermine if a product can be backordered, which directly affects the Inventory and Order domains. - Fulfillment:
ShippingSettingsdefine the origin address and other parameters used by the Fulfillment domain to calculate shipping costs. - Subscription:
SubscriptionSettingscontrol fundamental subscription behaviors, like the next order date offset and how pricing is applied on continuity orders. - Returns:
ReturnSettingsdefine the rules that the Returns API enforces, such as the valid window for a customer to initiate a return.
Prerequisites
- Kibo API credentials and basic setup
- Node.js 16+ with TypeScript
- Familiarity with REST APIs
What You’ll Learn
After completing this guide, you’ll understand:- How Kibo organizes its business logic into distinct, structured settings objects (based on official API specs).
- The key “read-then-write” pattern required to safely update settings (verified from apidocs.kibocommerce.com).
- Common workflows like enabling backordering or updating your shipping origin address programmatically.
- How to avoid the most common beginner mistake: accidentally deleting settings with a partial update.
- How to read and navigate the official Settings API documentation effectively.
Kibo Settings Fundamentals
How Kibo Organizes Settings Data
Kibo groups settings into logical, domain-specific objects. Each object is a complete document containing all the configurable properties for that domain. The primary objects you’ll work with are:GeneralSettings: Site-wide information like name, contact info, and security settings.InventorySettings: Controls for stock levels, backordering, and out-of-stock behavior.ReturnSettings: Rules for the customer return process.ShippingSettings: The master configuration for order shipping, including origin address.CartSettings: Controls for the shopping cart behavior.CustomerCheckoutSettings: Rules for the customer-facing checkout process.SubscriptionSettings: Configuration for subscription products and continuity programs.
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 (Client ID, Shared Secret, etc.). This object is then passed to the constructor of specific API clients (e.g., new GeneralSettingsApi(configuration)).
Request/Response Structure:
When you get a settings object, Kibo returns the complete JSON document for that domain.
update endpoints use the PUT HTTP method, which performs a complete replacement of the object. If you send only a partial object, you will wipe out all the other settings in that group. The only safe way to update a setting is to:
- GET the full settings object.
- Modify the specific property you want to change on that object.
- PUT the entire, modified object back.
/api-overviews/openapi_settings_overview
Common Settings Workflows
- Environment Synchronization: Reading settings from a production environment and programmatically applying them to a sandbox or staging environment to ensure consistency.
- Automated Configuration: As part of a new site deployment script, automatically enabling or disabling features like guest checkout or backordering.
- Building Custom Admin Tools: Creating a simplified UI for business users to change a specific setting without giving them full access to the Kibo Admin.
Managing General Settings: The Kibo Way
When You Need This
This is the most basic settings operation, often used to update your site’s name, timezone, or contact email programmatically. It serves as the introduction to the required “GET then PUT” pattern.API Documentation Reference
Get Endpoint:GET /commerce/settings/general
Update Endpoint: PUT /commerce/settings/general
Method: GET, PUT
API Docs: /api-overviews/openapi_settings_overview#get-general-settings
Understanding the Kibo Approach
Kibo groups all top-level site settings into a singleGeneralSettings object. To ensure data integrity and prevent accidental misconfigurations, it requires you to submit the entire object when making a change. This forces you to acknowledge the current state of all other settings before applying an update.
Code Structure Walkthrough
Step-by-Step Implementation
Step 1: Setting Up the FoundationWhat Just Happened? (Code Explanation)
- The setup phase created the standard
Configurationobject. - We instantiated the
GeneralSettingsApiclient to work with general settings. - The required step was calling
getGeneralSettings()before attempting the update. This gave us a complete object representing the current state. - We then modified a single property on this local object.
- Finally, the
updateGeneralSettings()call sent the full object back, ensuring that only our desired change was made while preserving all other existing settings.
Common Beginner Mistakes
Mistake 1: Performing a partial update and deleting settings. This is the most dangerous mistake when working with settings.Multiple Real-World Examples
The “GET then PUT” pattern applies to all settings. The only difference is the client and the structure of the settings object. Example 1: Enable Backordering (Inventory Settings)Integrating Settings with Other Kibo Domains
Settings + Storefront Experience
Settings have a direct and immediate impact on the storefront. When you updateCustomerCheckoutSettings to disallow guest checkout, the very next user who tries to check out without logging in will be blocked. When you update CartSettings, the cross-sell products a user sees may change. These settings are the primary way a business user configures the customer experience without changing code.
Settings + Order Management
The entire order management lifecycle is governed by settings.InventorySettings control sourcing, ShippingSettings control rate calculation, and ReturnSettings control post-purchase workflows. Programmatically changing these settings allows you to adapt your fulfillment logic to changing conditions, such as disabling backorders during a supply chain disruption.
Troubleshooting Your Settings Implementation
Reading Kibo Error Messages
VALIDATION_ERROR: The request body is malformed or contains an invalid value for a setting (e.g., an incorrect enum value forbackorderBehavior). Themessagefield will often contain details about which property was invalid.ITEM_NOT_FOUND: Usually means the settings for that domain have not been initialized. This is rare.UNAUTHORIZED: Your API credentials do not have the permissions required to read or update settings.
Common Development Issues
Issue 1: “I updated a setting, and now my entire site configuration is broken!”- Why it happens: You fell into the most common trap: you performed a partial update using
PUT. You sent a request body with only the single setting you wanted to change, which caused the Kibo API to delete all the other settings in that group. - How to fix it: Immediately
GETthe settings from a backup environment (like Production) andPUTthe full, correct object back into the broken environment. - How to avoid it: NEVER call an
update(PUT) endpoint for settings without first calling the correspondinggetendpoint and modifying the result. Your code must always follow the “GET, Modify, PUT” pattern. - API Reference: This applies to all
PUTendpoints in the Settings API group.
VALIDATION_ERROR with a confusing message.”
- Why it happens: The value you are trying to set is invalid for that specific property. Many settings properties are not free-form strings; they must be one of a specific set of enumerated values (e.g.,
backorderBehaviormust beAllowBackorder,AllowBackorderAndNotify, orEnterPendingOrder). - How to fix it: Carefully review the API documentation at
apidocs.kibocommerce.comfor the specific settings object you are working with. The schema definition will show the allowed values for each property. TheGETresponse for that setting will also show you the currently valid value.

