How Can Inventory APIs Improve Omnichannel Commerce?

inventory apis

Commerce today is omnichannel. This vast range of sales channels creates great opportunities for retailers. However, it also brings new challenges. Chief among them is inventory management.

With products listed across channels, it is harder to get clear visibility into your inventory. Without an accurate track of stock, you may find yourself unprepared to meet demand. This can lead to missed sales opportunities or, worse—selling out-of-stock products.

Overselling your products can lead to severe reputation damage that is difficult to repair. Retailers can avoid this by implementing e-commerce software capable of supporting multiple sales channels.

Relying on manual methods like spreadsheets is not a sustainable option for businesses looking to scale. The better choice is to use an integrated system like an OMS or a suite of e-commerce APIs to manage stock across channels.

Inventory APIs give you a more seamless way to manage your inventory records. They provide a real-time connection across your applications, allowing you to sync records between multiple platforms.

In this post, we’ll examine how you can use a set of Inventory APIs from fabric to streamline inventory management.

Connecting Inventory Across Channels with APIs

fabric Inventory APIs give you an easier way to manage your inventory. You can use the APIs to visualize changes and modify your records. There are two endpoints used to facilitate omnichannel inventory management: Get Multiple by ItemId and Bulk Insert.

Get Multiple by ItemId

The Get Multiple ItemId endpoint allows you to fetch inventory details for any of the items in your product catalog. You can use it to create an end-to-end view of your items across all locations.

The endpoint uses the POST /inventory path. Here is a sample request to fetch the stock details for a single SKU:

 "items": [{ "itemId":"231212", "quantity":4 } ],

You can fetch the records for multiple items by adding their respective item details and channelId to the request’s body.

Bulk Insert

The Bulk Insert endpoint is used to make bulk updates to your inventory. It is a great tool for reducing the time needed to manage catalog changes. You can use it to modify details like stock, reserved quantity, and location. You can also use it to add or remove items from your catalog.

The endpoint uses the POST /inventory/bulk-insert path. Here is a sample request showing how to update a SKU’s inventory:

 "sku": "1597422",
 "totalQuantity": 30,
 "reservedQuantity": 5,
 "locationId": 175,
 "type": "Stock",
 "channelId": 12
 "sku": "1597422",
 "totalQuantity": 100,
 "reservedQuantity": 5,
 "locationId": 179,
 "type": "Stock",
 "channelId": 12

If the inventory is successfully updated, you’ll receive the following response:

 "_id": "5f11b4c886d5fa0008af5e12",
 "messages": [
 "Import Inventory job started: Fri Jul 17 2020 14:25:12 GMT+0000
 (Coordinated Universal Time)",
 "2 row(s) found",
 "1 Inventory Item(s) found",
 "Successfully saved 1 items ",
 "Successfully finished API Inventory Bulk Upload: Fri Jul 17 2020
 14:25:12 GMT+0000 (Coordinated Universal Time)"
 "keyId": "api-1594995912406",
 "type": "api",
 "status": "FINISHED",
 "totalItems": 1,
 "totalItemsUploaded": 1,
 "totalRows": 2,
 "totalRowsErrors": 0,
 "createdAt": "2020-07-17T14:25:12.493Z",
 "updatedAt": "2020-07-17T14:25:12.692Z",
 "__v": 0

Embrace the API Economy to Scale Commerce Faster

E-commerce APIs have many use cases beyond managing inventory. With the robust suite of APIs of fabric, the possibilities are endless. You can customize without limits and scale to any number of channels—all while giving your customers the experience they deserve.

Topics: Developer
Bradley Taylor

Tech advocate and writer @ fabric.

Learn more about fabric