- Support
- Product Releases
- Blog
- Overview
- API References
- API Authentication
- Getting Started with fabric APIs
- Making your first API request
- Example
- Using Developer Portal
- Security and Compliance
- Product Catalog API - Overview
- Developer Guide
Attributes & Attribute Mapping
Categories
Products
Collections
Background Jobs
Bulk Import & Export
Published Products
Allocations
- Orders (3.0.0)
Backorders Preorders
Exports
Developer Guide
Invoices
Shopping Lists
Shopping List Items
Notifications
Orders
Returns
Cancellations
Tracking
Frauds
Payments
Appeasements
Credits
Shipments
Shipping Methods
Shipping Method Items
Webhooks
- Orders FAQ(s)
- Overview
- Algolia standard integration
- Avalara standard integration
- Constructor.io standard integration
- Stripe standard integration
- Offers (3.0.0)
Real-time Pricing Engine
Promotions
Webhook Events
Redemptions
Priced Products
Product Exclusion Lists
Price Types
Coupons
Coupon Codes
Segments
Prices
Price Methods
Price Controls
Price Lists
Add-ons
Exports
Imports
Attributes
Customer Profile
Customer Address
Customer Self
Getting Started
Product Catalog
Orders
Integrations
Offers
Customers
Find inventory of specific items in a specific region
Search for list of inventories of specific items in a specific region based on SKUs, postal code, latitude, longitude, and other details of the location as specified in the request body.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Merchant's 24-character tenant ID
Unique request ID
Sales channel ID
Sales channel IDs.<br />Note: Use xFabricChannelIds
for multiple channels, and xFabricChannelId
for single channel
Find inventory by geography request
List of SKUs for which the inventories are to be searched within the specified region
List of location types
Geo search origin. Must include postalCode
OR (city
and region
).
Postal code from where nearby locations are to be searched
Longitude of the location in degree
Latitude of the location in degree
City for which location will be searched
Region for which location will be searched
ISO 3166-1 alpha-2 based country code
Minimum distance (in radius) from the specified postal code within which the location will be searched
Maximum distance (in radius) from the specified postal code within which the location will be searched
Distance unit
curl --request POST \
--url https://api.fabric.inc/v3/inventories/actions/find-by-geography \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"skus": [
"sku1"
],
"locationTypes": [
"DC"
],
"origin": {
"postalCode": "94008",
"longitude": -108.7256871,
"latitude": 21.2629852,
"city": "San Francisco",
"region": "New York",
"countryCode": "US",
"minDistance": 10,
"maxDistance": 100,
"distanceUnit": "MILE"
}
}'
{
"locations": [
{
"distance": 12.34,
"locationType": "DC",
"locationNumber": 12345
}
],
"inventories": [
{
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483Z",
"updatedAt": "2022-08-01T20:03:28.483Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": true,
"backorderShipmentAt": "2022-08-01T20:03:28.483Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Merchant's 24-character tenant ID
Unique request ID
Sales channel ID
Sales channel IDs.<br />Note: Use xFabricChannelIds
for multiple channels, and xFabricChannelId
for single channel
Body
List of SKUs for which the inventories are to be searched within the specified region
List of location types
Geo search origin. Must include postalCode
OR (city
and region
).
Postal code from where nearby locations are to be searched
Longitude of the location in degree
Latitude of the location in degree
City for which location will be searched
Region for which location will be searched
ISO 3166-1 alpha-2 based country code
Minimum distance (in radius) from the specified postal code within which the location will be searched
Maximum distance (in radius) from the specified postal code within which the location will be searched
Distance unit
MILE
, KILOMETER
, METER
Response
List Locations sorted by nearest first where Inventory present in queried region.
Distance of the location from the provided coordinates; distance is defined using the unit specified in distanceUnit
.
Type of the location
Location number of the inventory
Inventories present in queried region.
System-generated inventory ID. This ID is generated during inventory creation.
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
Merchant-defined item ID whose inventory is created or updated. If omitted, fabric Inventory service generates the itemId
. If you choose to use the itemId
in your environment, you must include it in all inventory Write requests.
Represents the warehouse or store location where the inventory is stored. It is recommended to link locationNumber
to the corresponding value in the fabric Locations service.
Region where inventory is managed
Sales channel ID; identifies business operations location.
ID of the vendor who will replenish the inventory for the retailer
Time of inventory creation
Time when inventory was last updated
Time between when an order is placed to replenish inventory and when the order is received at warehouse
Inventory type - a classifier attribute that provides flexibility to define inventory types
Infinite inventory flag.<br />true: Inventory can be used any number of times and does not have any consumption limit.<br />false: Inventory cannot be used infinitely, and has a consumption limit.
Time when backorder is shipped
Time when preorder is shipped
Maximum restock inventory quantity
Maximum first-shipping inventory quantity
Reserved inventory quantity at the location
Inventory quantity below which consumer service wants to be alerted as low stock at the location
Code of the network to which the inventory belongs
Merchant-defined inventory counter (also known as inventory position)
Placeholder for additional info
Indicates inventory positions at network
Virtual counters are calculated at run time from counters
Was this page helpful?
curl --request POST \
--url https://api.fabric.inc/v3/inventories/actions/find-by-geography \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"skus": [
"sku1"
],
"locationTypes": [
"DC"
],
"origin": {
"postalCode": "94008",
"longitude": -108.7256871,
"latitude": 21.2629852,
"city": "San Francisco",
"region": "New York",
"countryCode": "US",
"minDistance": 10,
"maxDistance": 100,
"distanceUnit": "MILE"
}
}'
{
"locations": [
{
"distance": 12.34,
"locationType": "DC",
"locationNumber": 12345
}
],
"inventories": [
{
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483Z",
"updatedAt": "2022-08-01T20:03:28.483Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": true,
"backorderShipmentAt": "2022-08-01T20:03:28.483Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
]
}