A Location is a warehouse, fulfillment center, retail store, or any physical place where a seller stores inventory. Locations are the foundation of inventory management — they answer the question "where is this product stocked, and how much is available there?"
Every ecommerce platform handles locations differently — some have multi-location inventory, others use "Fulfillment Centers," warehouse/storefront models, or have no location concept at all (single implicit location). ecartAPI normalizes all of these into a single canonical shape.
ecartAPI's canonical location includes:
- A unique identifier and name.
- A physical address (street, city, country, postal code).
- Whether it is active.
- Inventory levels: each product variant has a quantity at each location.
- Pickup settings for in-store pickup.
ecartAPI maps these fields across all supported platforms. Some platforms have simpler location models (a single location with no address data), while others have rich multi-warehouse setups.
Important: Not all platforms support location management. Some platforms have a single implicit location. Location CRUD and inventory update operations are platform-dependent.
| Method | Path | Description |
|---|
| GET | /api/v2/locations | List locations with filters. |
| GET | /api/v2/locations/count | Count locations. |
| GET | /api/v2/locations/{id} | Get a single location by id. |
| POST | /api/v2/locations | Create a location. Platform-dependent. |
| PUT | /api/v2/locations/{id} | Update a location. Platform-dependent. |
| DELETE | /api/v2/locations/{id} | Delete a location. Platform-dependent. |
| Method | Path | Description |
|---|
| GET | /api/v2/locations/{id}/inventories | List inventories at a specific location. |
| GET | /api/v2/locations/{id}/inventories/{inventoryId} | Get inventory for a specific item at a location. |
| PUT | /api/v2/locations/{id}/inventories/{inventoryId} | Update inventory quantity at a location. |
| GET | /api/v2/inventories/{id} | Get inventory for a product/variant across all locations. |
Note: There are two ways to access inventory:
- By location:
/api/v2/locations/{id}/inventories — "what's stocked at this warehouse?"
- By product:
/api/v2/inventories/{id} — "where is this product stocked?"
Both return the same canonical inventory shape.
| Parameter | Description |
|---|
page | Page token or page number for pagination. |
limit | Maximum number of locations per page. |
locationId | Filter by specific location id. |
variantId | Filter locations that stock a specific variant. |
createdAt[from], createdAt[to] | Filter by creation date range. |
pickup | Filter by pickup-enabled locations. |
| Parameter | Description |
|---|
limit | Maximum number of inventory items per page. |
inventoryId | Filter by specific inventory item id. |
inventoryIds | Comma-separated list of inventory item ids. |
| Field | Type | Description |
|---|
id | string | Location's unique identifier on the platform. |
code | string | Location code (internal reference). |
name | string | Location name (e.g., "Main Warehouse"). |
type | string | Location type (e.g., warehouse, store, fulfillment center). |
address1 | string | Primary address line. |
address2 | string | Secondary address line. |
city | string | City name. |
postalCode | string | Postal/ZIP code. |
phone | string | Location phone number. |
active | boolean | Whether the location is active. |
| Field | Type | Description |
|---|
code | string | Country/state code. |
name | string | Country/state full name. |
codeIso2 | string | ISO 3166-1 alpha-2 code (country only). |
codeIso3 | string | ISO 3166-1 alpha-3 code (country only). |
| Field | Type | Description |
|---|
createdAt | string | ISO 8601 creation timestamp. |
updatedAt | string | ISO 8601 last-updated timestamp. |
Platform-specific pickup configuration object. Structure varies by platform.
| Field | Type | Description |
|---|
id | string | Inventory item identifier (typically the SKU or variant id). |
locationId | string | The location where this inventory is held. |
productId | string | The parent product id. |
variantId | string | The variant id. |
sku | string | Stock Keeping Unit. |
quantity | string | Available quantity at this location. |
locationName | string | Name of the location (when available). |
ecartapiUrl | string | ecartAPI URL for this inventory resource. |
| Field | Type | Description |
|---|
createdAt | string | ISO 8601 creation timestamp. |
updatedAt | string | ISO 8601 last-updated timestamp. |
- Not all platforms have locations. Some platforms use a single implicit location. On those platforms, the locations endpoint may return a single entry or may not be available.
- Inventory updates (
PUT /locations/{id}/inventories/{inventoryId}) allow setting the stock quantity for a specific variant at a specific location.
- Product-level inventory (
GET /inventories/{id}) provides a cross-location view, useful for checking total stock across all warehouses.
- Response fields are platform-dependent. Not all fields listed in the response shape are available for every ecommerce platform. Some properties may be absent or returned as
null depending on what the connected platform's API provides.
- If a platform does not support location operations, ecartAPI returns
400 with "The resource is not available for this ecommerce".