Before You Begin
You must have the following Kibo access details:- Maven: a tool for building and managing Java-based projects.
- A Dev Center Account with a provisioned sandbox.
- An Application Key (also called the Client ID) and Secret.
- A Kibo tenant.
Get Started
This tutorial demonstrates installing the Java SDK, authenticating with Kibo credentials, and making an API call. The first example is of a console application that retrieves product details, while the follow-up example retrieves the number of customer accounts for a Kibo eCommerce site. Use these concepts to build a fully-fledged application of your own.Create an Application
First, create an application in the Dev Center with the appropriate behaviors:- Log in to Dev Center.
- Create a new application.
- Add the Customer Read Behavior to the application. This step is necessary to give your application the necessary permissions to read customer accounts. If you design additional functionality for your application, such as updating an order, add the appropriate behaviors to avoid a permissions error.
- Install the application to the sandbox of your choice.
- Enable the application in Admin. If you decide to add additional behaviors to your application after this step, you must reinstall the application to your sandbox and re-enable the application in Admin to apply the new behaviors.
- Locate your Application Key, Shared Secret, Tenant ID, and Site ID. Obtain the Application Key and Shared Secret from the application details page in the Dev Center. Obtain the Tenant ID and Site ID by viewing your site and looking at the URL, which has the format
t{_TenantID}_‑s{_SiteID}_.sandbox.mozu.com.- You can also use the Get Tenant API call to return the Site ID and a Master Catalog ID if needed.
Install the Java SDK
Use Maven to install the Java SDK and identify any API modules you intend to use as dependencies. The SDK contains a module for each API domain, similar to the organization in the Kibo API documentation. You can find these modules in the kibocommerce folder of the SDK. This example uses the Catalog Administration API module.Configuration
Create a Kibo Configuration object with your authentication values that can be re-used for all API clients.-
Create a
.envfile at the root of your project and enter your credentials and any other required values such as Catalog IDs. -
Build the configuration:
-
To initialize the configuration from your system properties:
Create an API Client
Create an API client that makes calls with the appropriate module(s). This client makes a Get Product API call to retrieve product details:Customer API Example
This additional example demonstrates a Java project that calls the Customer API module to retrieve a list of customers and display the total customer amount.-
Using the terminal, generate an example project using Maven.
-
Open the new pom.xml file and add Kibo’s customer module as a dependency.
-
Open App.java and import the Kibo dependencies.
-
Inside the main method, configure the API client and make the call to retrieve customer accounts.
- Run the application.

