Order User Guides
- Overview
- Order Management
- Order Fulfillment Logic
- Activity Log
- Settings
Inventory User Guides
Orders API Endpoints
- Orders (3.0.0)
- Developer Guide
- Orders FAQ
- Shopping Lists
- Shipping Methods
- Imports
- Exports
- Orders
- Frauds
- Notifications
- Backorders Preorders
- Cancellations
- Allocations
- Shipments
- Inventory Transfers
- Tracking
- Invoices
- Payments
- Credits
- Appeasements
- Returns
Inventory API Endpoints
- Inventory (3.0.0)
- Inventory FAQ
- Imports
- Counters
- Inventory
- Locations
- Networks
Search for nearby locations
Search for nearby locations based on city name, state, postal code, and other geographical details as mentioned in the request body.
curl --request POST \
--url https://api.fabric.inc/v3/locations/geography-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"filters": [
{
"field": "TYPE",
"value": [
"DC",
"Store"
]
}
],
"origin": {
"city": "San Francisco",
"country": "United States",
"maxDistance": "50",
"minDistance": "5",
"postalCode": "89135",
"region": "New York"
}
}'
{
"data": [
{
"address": {
"addressLine1": "123 Main St.",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"contacts": [
{
"email": "abc@mail.com",
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"phone": [
{
"number": "0281923712",
"type": "MOBILE"
}
],
"type": "OFFICE"
}
],
"countryCode": "US",
"postalCode": "98121",
"region": "WA",
"type": "Home"
},
"capacity": {
"allocationPercentage": 20,
"currentAllocations": 5,
"infiniteAllocation": true,
"isCapacityFull": true,
"maxAllocations": 30
},
"coordinates": {
"coordinates": [
-122.3493,
47.6205
],
"type": "Point"
},
"createdAt": "2022-05-25T07:58:30.996Z",
"distance": 100,
"isActive": true,
"locationId": "9372919a8219e8",
"locationNumber": 23,
"name": "Seattle Store",
"operatingHours": [
{
"day": "SUNDAY",
"hours": [
{
"close": "20",
"open": "10",
"type": "PICK_UP"
}
]
}
],
"transfer": {
"autoStockWindow": "PT10M",
"isAutoReceiving": true
},
"type": "DC",
"updatedAt": "2022-05-25T07:58:30.996Z"
}
],
"pagination": {
"count": 1000,
"limit": 10,
"offset": 1
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
Unique request ID
x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is an optional field. The default US channel is 12 while the default Canada channel is 13.
Query Parameters
Number of records to skip before returning all records. Default is 0
when no value is specified.
0
Maximum number of records per page
1 <= x <= 100
10
Body
Criteria to search geo location
Criteria to find location using a single value. Condition between field
and value
is anything except IN and NIN when valueSearchFilter
is used.
Filter conditions. EQ (Equal to): Searches for exact match. NEQ (Not equal to): Searches by excluding the specified value. IN: Search for multiple values. NIN (Not IN): Excludes the specified values in the search. LT (Less than): Searches for values that are less than the specified value. GT (Greater than): Search for values that are greater than the specified value. LTE (Less than or equal to): Searches for values that are less than or equal to the specified value. GTE (Greater than or equal to): Searches for values that are greater than or equal to the specified value.
EQ
, NEQ
, IN
, NIN
, LT
, GT
, LTE
, GTE
"EQ"
Field name
"location.locationNum"
The group name.
"GroupA"
A single value for field
using which data is searched
"ORDER_CREATE"
Geo search origin. Must include postalCode
OR (city
and region
).
City for which location will be searched
"San Francisco"
ISO 3166-1 alpha-2 based country code
"US"
Postal code from where nearby locations are to be searched
"94008"
Region for which location will be searched
"New York"
Distance unit
MILE
, KILOMETER
, METER
"MILE"
Maximum distance (in radius) from the specified postal code within which the location will be searched
100
Minimum distance (in radius) from the specified postal code within which the location will be searched
10
Response
Location geo search response
Nearby location response
Merchant-specified unique number to identify the location
23
Location name
"Seattle Store"
Address details
Region or state
"WA"
Address line 1
"123 Main St."
Address line 2
"Suite 100"
Address line 3
"Seventh floor"
Address line 4
"Attention: Pat E. Kake"
City name
"Seattle"
Contact details
Contact details
E-mail address
"abc@mail.com"
Contact type
"OFFICE"
ISO 3166-1 alpha-2 based country code
"US"
Postal or ZIP code
"98121"
Address type
"Home"
Location Capacity Model used by fulfillment specialist to optimize fulfillments across the distribution network and monitor productivity by location
The current percentage of allocations at this location. Calculated by (currentAllocations / maxAllocations)*100.
20
The number of current allocations at this location.
5
A boolean used to determine if a location has no allocation capacity limit.
true
The maximum allocations this location can take at any given time. When currentAllocations=maxAllocations, this location is AtCapacity
and can't take any further allocations.
30
Location coordinates
The location coordinates consist of a coordinate field in the format of [longitude, latitude], where the longitude value must fall between -180 and 180, and the latitude value must be between -90 and 90, both inclusive.
Coordinate value
Geo coordinate type
"Point"
{
"coordinates": [-122.3493, 47.6205],
"type": "Point"
}
Time location was created
"2022-05-25T07:58:30.996Z"
Store distance from the specified address
100
Determines if a location is active and able to fulfill allocations. true: Location is active for order fulfillment operation. false: Location is inactive.
true
System-generated unique ID to identify the location
"9372919a8219e8"
Location operating hours
Store operating hour
Day of week
SUNDAY
, MONDAY
, TUESDAY
, WEDNESDAY
, THURSDAY
, FRIDAY
, SATURDAY
"SUNDAY"
Location type
"DC"
Time location was last updated
"2022-05-25T07:58:30.996Z"
An object containing the pagination response data.
The total number of search results.
1000
The maximum number of records per page.
1 <= x <= 100
10
The number of records to skip before returning all records. For example, offset=20, limit=10
returns records 21-30.
x >= 0
1
Was this page helpful?
curl --request POST \
--url https://api.fabric.inc/v3/locations/geography-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"filters": [
{
"field": "TYPE",
"value": [
"DC",
"Store"
]
}
],
"origin": {
"city": "San Francisco",
"country": "United States",
"maxDistance": "50",
"minDistance": "5",
"postalCode": "89135",
"region": "New York"
}
}'
{
"data": [
{
"address": {
"addressLine1": "123 Main St.",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"contacts": [
{
"email": "abc@mail.com",
"name": {
"firstName": "Pat",
"lastName": "Kake",
"middleName": "E"
},
"phone": [
{
"number": "0281923712",
"type": "MOBILE"
}
],
"type": "OFFICE"
}
],
"countryCode": "US",
"postalCode": "98121",
"region": "WA",
"type": "Home"
},
"capacity": {
"allocationPercentage": 20,
"currentAllocations": 5,
"infiniteAllocation": true,
"isCapacityFull": true,
"maxAllocations": 30
},
"coordinates": {
"coordinates": [
-122.3493,
47.6205
],
"type": "Point"
},
"createdAt": "2022-05-25T07:58:30.996Z",
"distance": 100,
"isActive": true,
"locationId": "9372919a8219e8",
"locationNumber": 23,
"name": "Seattle Store",
"operatingHours": [
{
"day": "SUNDAY",
"hours": [
{
"close": "20",
"open": "10",
"type": "PICK_UP"
}
]
}
],
"transfer": {
"autoStockWindow": "PT10M",
"isAutoReceiving": true
},
"type": "DC",
"updatedAt": "2022-05-25T07:58:30.996Z"
}
],
"pagination": {
"count": 1000,
"limit": 10,
"offset": 1
}
}