Making API Calls

In order to make API calls, you need to be familiar with the hostname options to identify your tenant, site, and environment as well as any context headers you may need to include.

API Host

You can make calls to either a production or sandbox environment, as well as optionally include a Site ID (s00000) in addition to the required Tenant ID (t00000). The tp0 is your tenant's assigned production pod for making calls to production environments.

  • Example US Sandbox Tenant: https://t10000.sandbox.mozu.com/api
  • Example US Production Tenant: https://t10000.tp0.mozu.com/api
  • Example EU Sandbox Tenant: https://t100000.sb.euw0.kibocommerce.com/api
  • Example EU Production Tenant: https://t100000.tp0.euw1.kibocommerce.com/api

Include this domain in the request path. For example, you could use the following path to make an Orders API request on the sandbox environment:

https://t00000.tp0.sandbox.mozu.com/api/commerce/orders

Our interactive API specs support authentication and API server selection in order to make calls directly from the documentation. Selecting a server prompts you to enter a Tenant ID, a Site ID if you chose the t00000-s00000 format, and pick either a production or sandbox environment. 

API Headers

The request header must include an API context which often identifies the site and catalog you are referencing. If you use the hostname format that includes the Site ID, then the master catalog, catalog, site, locale, and currency context are inferred by the site and do not need to be explicitly provided. Likewise, the tenant is usually not necessary in the header since the tenant ID is already included in the hostname.

The following is an example explicitly defining that context:

x-vol-tenant: 0000
x-vol-master-catalog: 1
x-vol-catalog: 1
x-vol-site: 11111

Supported Headers

The following table details all headers supported by Kibo, though most are not required for every API operation. 

HeaderTypeValue
x-vol-catalogrequest and responseThe identifier of the catalog. Your first catalog is 1, the second catalog is 2, and so on.
x-vol-master-catalogrequest and responseThe identifier of the master catalog. Your first master catalog is 1, the second catalog is 2, and so on.
x-vol-siterequest and responseThe unique identifier of the site. This number can be found in the URL of the live site as well as some areas of the Admin, such as under System > Structure > Site, preceded by an "s-". For example: https://t0000.sandbox.mozu.com/Admin/s-11111/website in a sandbox environment.
x-vol-tenantrequest and responseThe unique identifier of the tenant. This number appears in your site’s URL in Admin, preceded by a "t". For example: https://t0000.sandbox.mozu.com/Admin/m-1/ in a sandbox environment.
x-vol-has-errorresponseIf true (1), the response contains an error.
x-vol-localerequest and responseThe code of the content locale. For example: en-US
x-vol-versionrequest and responseThe version of the API to use in the request. If the version is not specified, the request uses the latest available version.
x-vol-currencyrequest and responseThe three-letter ISO 4217 standard global currency code. For example: USD
x-vol-purchase-locationrequestThe location code of the store that you want to restrict your call to, such as for querying products only at that particular location.
x-vol-pricelistrequestThe code of the pricelist that you want to restrict your call to, such as when querying for products.
x-vol-correlationrequestAn optional GUID used to associate multiple log entries in a cascading chain of API requests.
x-vol-dataview-moderequestThe mode in which to view runtime data, which is Live or Pending.

Next Steps

To learn how to use Postman, see the Getting Started with Postman guide.

For further information on how to filter and sort API queries, see the Filtering and Sorting documentation

After you have submitted your request, refer to the Status Codes documentation for the HTTP statuses and other API response codes you can expect.