Kibo Location (Admin) API Developer Guide
Fulfillment
Understand how locations fit into fulfillment
Location Types
Configure location types in the Admin UI
Understanding Locations in Kibo
In Kibo, a Location is far more than just a physical address. It’s a fundamental operational entity that represents any place where inventory is stored, from which orders can be fulfilled, or where customers can pick up purchases. This could be a massive warehouse, a retail store, a third-party drop-shipper, or even a virtual holding location. What makes Kibo’s approach different is that each Location is defined by its capabilities. You explicitly declare what a location can do usingfulfillmentTypes (e.g., DirectShip, InStorePickup) and what it is using locationTypes (e.g., Warehouse, Store). This rich data model allows Kibo’s advanced order routing and fulfillment logic to make intelligent decisions about how to process customer orders efficiently.
How This Domain Fits Into Kibo
The Location domain is the foundation of Kibo’s omnichannel commerce capabilities. It is linked to several other core domains:- Inventory: Inventory levels are not stored globally; they are tracked per Location. To know if a product is in stock, you must ask, “How many are in stock at the Austin warehouse?”
- Fulfillment & Orders: When an order is placed, Kibo’s fulfillment engine consults the list of Locations. It checks their inventory and their
fulfillmentTypesto determine the optimal location(s) from which to source the order’s shipments. - Returns: Locations can be designated as places where customers can return items purchased online.
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 structures Location data, including its types and fulfillment capabilities (based on official API specs).
- The key patterns for creating, updating, and managing your physical and virtual locations (verified from apidocs.kibocommerce.com).
- Common workflows like onboarding a new warehouse or managing holiday shipping exceptions.
- How to avoid the most common beginner mistakes, like performing a partial update incorrectly.
- How to read and navigate the official Location Administration API documentation effectively.
Kibo Location Fundamentals
How Kibo Organizes Location Data
The system revolves around a few core data structures:Location: The central object. It is uniquely identified by acode(a user-defined string likeDAL-WAREHOUSE-01). It contains properties likename,address,phone, and, most importantly, arrays defining its capabilities:fulfillmentTypes: An array of strings defining what the location can do. Key values verified from API docs includeDirectShip(ship-to-home) andInStorePickup(BOPIS).locationTypes: An array of strings defining what the location is. Key values includeStore,Warehouse, andDropShipper.
CutoffTimeOverride: A subordinate object linked to aLocation. It allows you to define exceptions to the location’s standard shipping cutoff times, which is essential for managing holidays or special events. It is identified by its own uniquecode.
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 LocationAdminApi(configuration)). The clients will automatically handle the OAuth 2.0 token exchange behind the scenes for every API call.
Request/Response Structure:
When you request a collection of locations, Kibo’s API provides a consistent, paginated response. The actual data is always inside the items array.
/api-overviews/openapi_location_admin_overview
Common Location Workflows
Kibo developers typically work with Locations in these scenarios:- Onboarding a New Fulfillment Center: Creating a new warehouse location and defining its shipping capabilities.
- Synchronizing Store Information: Running a scheduled job to update details like phone numbers or addresses for a network of retail stores from an external system of record.
- Managing Holiday Operations: Adding temporary overrides to shipping cutoff times for the peak holiday season to manage customer expectations.
Add a New Location: The Kibo Way
When You Need This
This is the foundational step for expanding your fulfillment network. You need this whenever you open a new retail store, partner with a new warehouse, or enable a new drop-shipper.API Documentation Reference
Endpoint:POST /commerce/admin/locations
Method: POST
API Docs: Add Location
Understanding the Kibo Approach
Kibo treats thecode of a location as its permanent, unique business key. You define it once during creation, and it cannot be changed. This code is used throughout the platform to reference this location in inventory, fulfillment, and reporting APIs. The creation process requires you to be explicit about the location’s capabilities (fulfillmentTypes), ensuring it’s immediately ready to be integrated into the order processing workflow.
Code Structure Walkthrough
Step-by-Step Implementation
Step 1: Setting Up the FoundationLocation JSON object to the Kibo API. The API validates that the code is unique and the payload is correctly structured. If successful, it creates the location and returns the full Location object, including any server-generated values.
Step 3: The Core Implementation
What Just Happened? (Code Explanation)
- The setup phase created the standard
Configurationobject for authentication. - The API call was made using an instance of
LocationAdminApi. This client provides type-safe methods for all location management operations. - The payload we prepared was a complete
Locationobject. We explicitly defined its uniquecodeand itsfulfillmentTypes, making it immediately available to Kibo’s fulfillment engine. - The response was the newly created
Locationobject, confirming its creation.
Common Beginner Mistakes
Mistake 1: Trying to update a location’scode.
The code is immutable. Once a location is created with code: "STORE-A", you cannot change it. To “rename” it, you would need to deactivate the old location and create a new one.
Mistake 2: Using PUT for a partial update and accidentally deleting data.
The updateLocation endpoint (PUT) performs a full replacement of the object. If you only send { "phone": "new-number" }, you will wipe out the address, fulfillment types, and everything else. The correct pattern is to GET the location, modify the object, then PUT the entire modified object back.
Advanced Patterns & Multiple Examples
Pattern 1: Idempotent Location Synchronization
Business Scenario: You need a script that runs daily to sync location data from an external “source of truth” into Kibo. The script must correctly create new locations and update existing ones without creating duplicates. Kibo’s Architecture Consideration: The API does not have a single “upsert” endpoint. The correct, idempotent pattern is to first try toGET the location by its unique code. If you get a 404 Not Found error, you know it doesn’t exist and you should call POST to create it. If the GET call succeeds, you know it exists and you should call PUT to update it.
API Endpoints Used:
GET /commerce/admin/locations/{locationCode}PUT /commerce/admin/locations/{locationCode}POST /commerce/admin/locations
Example 2: Get a Specific Location
Example 3: Add a Holiday Cutoff Time Override
Example 4: Get All Cutoff Overrides for a Location
Example 5: Delete a Cutoff Time Override
Integrating Location with Other Kibo Domains
Location + Inventory Integration
Inventory is always location-specific. You cannot ask Kibo for a product’s overall stock level. You must ask for its stock level at a particular location. Any API call to update or retrieve inventory will require alocationCode. This direct link is what enables features like ship-from-store and in-store pickup.
Location + Fulfillment Integration
The fulfillment process is a direct consumer of Location data. When an order needs to be shipped, the fulfillment engine queries for active locations with theDirectShip fulfillment type and available inventory for the ordered items. The location’s address is used to calculate shipping rates, and its cutoff times determine the expected ship date.
Troubleshooting Your Location Implementation
Reading Kibo Error Messages
LOCATION_ALREADY_EXISTS: You tried to calladdLocationwith acodethat is already in use.LOCATION_NOT_FOUND: ThelocationCodeyou provided in a URL (e.g., forgetLocationorupdateLocation) does not exist.VALIDATION_ERROR: The request body is malformed. A common cause is providing an invalidcountryCodeor malformedfulfillmentTypesobject.
Common Development Issues
Issue 1: My location was created, but it never gets assigned any shipments.- Why it happens: This is almost always because the
fulfillmentTypesarray is either empty or does not contain the necessary capability, likeDirectShip. If a location cannot ship orders, the fulfillment engine will ignore it. - How to fix it:
GETthe location, add the correct fulfillment type object(s) to the array (e.g.,{ code: "DS", name: "Direct Ship" }), and thenPUTthe entire updated location object back. - API Reference:
/api-reference/locationadmin/update-location
- Why it happens: The
PUT /commerce/admin/locations/{locationCode}endpoint performs a complete replacement of the location object. If your request body only contains{"name": "New Name"}, you are telling Kibo to replace the entire existing object with that, effectively deleting all other fields. - How to fix it: This is a standard REST pattern. You must always
GETthe full location object first, modify the properties you want to change on that object in your code, and thenPUTthe entire modified object back in the request body. See thesyncLocationadvanced example for the correct implementation.

