Stores Locations API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.

Create a new stores location

You want to add a new warehouse or retail store as an inventory location for your Wix store. Locations are created through the Wix Locations API and automatically appear in the Stores Locations API when configured for inventory.

To create a new stores location:

  1. Call Create Location in the Wix Locations API. Include "INVENTORY" in the locationTypes array:
Copy
  1. The location now appears in the Stores Locations API. Call Query Stores Locations to confirm and retrieve the location details.

Retrieve inventory locations for a store

You want to retrieve all available inventory locations for a store to display them in a location selector or to manage inventory across locations.

To retrieve inventory locations:

  1. Call Query Stores Locations to get all inventory locations:
Copy
  1. To find the default location, filter by default: true:
Copy
  1. Use the location IDs when creating or querying inventory items with the Inventory Items API.
Did this help?