POST
/
inventories
/
actions
/
find-by-geography
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

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-request-id
string

Unique request ID

x-fabric-channel-id
string

Sales channel ID

x-fabric-channel-ids
string

Sales channel IDs.<br />Note: Use xFabricChannelIds for multiple channels, and xFabricChannelId for single channel

Body

application/json
skus
string[]

List of SKUs for which the inventories are to be searched within the specified region

locationTypes
string[]

List of location types

origin
object
required

Geo search origin. Must include postalCode OR (city and region).

Response

200 - application/json
locations
object[]

List Locations sorted by nearest first where Inventory present in queried region.

inventories
object[]

Inventories present in queried region.