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",
"minDistance": "5",
"maxDistance": "50",
"postalCode": "89135",
"region": "New York"
}
}
'{
"pagination": {
"limit": 10,
"offset": 1,
"count": 1000
},
"data": [
{
"locationNumber": 23,
"name": "Seattle Store",
"distance": 100,
"locationId": "9372919a8219e8",
"isActive": true,
"address": {
"region": "WA",
"addressLine1": 123,
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"countryCode": "US",
"postalCode": 98121,
"type": "Home",
"contacts": [
{
"type": "OFFICE",
"email": "[email protected]",
"phone": [
{
"number": "0281923712",
"type": "MOBILE"
}
],
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
}
}
]
},
"type": "DC",
"capacity": {
"maxAllocations": 30,
"currentAllocations": 5,
"infiniteAllocation": true,
"allocationPercentage": 20,
"isCapacityFull": true
},
"services": {
"brand": "WHBM",
"channel": "Frontline"
},
"zones": [
"<string>"
],
"createdAt": "2022-05-25T07:58:30.996Z",
"updatedAt": "2022-05-25T07:58:30.996Z",
"operatingHours": [
{
"day": "SUNDAY",
"hours": [
{
"open": 10,
"close": 20,
"type": "PICK_UP"
}
]
}
],
"coordinates": {
"type": "Point",
"coordinates": [
-122.3493,
47.6205
]
},
"attributes": {
"isReturns": "true"
},
"supportedCarriers": [
{
"carrier": "FedEx",
"serviceLevels": [
{
"name": "FedEx",
"shippingMethod": "FedEx"
}
]
}
],
"activeFulfillmentMethods": {
"ShipToHome": "true"
},
"transfer": {
"isAutoReceiving": true,
"autoStockWindow": "PT10M"
}
}
],
"stats": [
"<string>"
]
}Searches for nearby locations based on a specified address or coordinate input. Useful for location-aware services and delivery matching.
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",
"minDistance": "5",
"maxDistance": "50",
"postalCode": "89135",
"region": "New York"
}
}
'{
"pagination": {
"limit": 10,
"offset": 1,
"count": 1000
},
"data": [
{
"locationNumber": 23,
"name": "Seattle Store",
"distance": 100,
"locationId": "9372919a8219e8",
"isActive": true,
"address": {
"region": "WA",
"addressLine1": 123,
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"countryCode": "US",
"postalCode": 98121,
"type": "Home",
"contacts": [
{
"type": "OFFICE",
"email": "[email protected]",
"phone": [
{
"number": "0281923712",
"type": "MOBILE"
}
],
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
}
}
]
},
"type": "DC",
"capacity": {
"maxAllocations": 30,
"currentAllocations": 5,
"infiniteAllocation": true,
"allocationPercentage": 20,
"isCapacityFull": true
},
"services": {
"brand": "WHBM",
"channel": "Frontline"
},
"zones": [
"<string>"
],
"createdAt": "2022-05-25T07:58:30.996Z",
"updatedAt": "2022-05-25T07:58:30.996Z",
"operatingHours": [
{
"day": "SUNDAY",
"hours": [
{
"open": 10,
"close": 20,
"type": "PICK_UP"
}
]
}
],
"coordinates": {
"type": "Point",
"coordinates": [
-122.3493,
47.6205
]
},
"attributes": {
"isReturns": "true"
},
"supportedCarriers": [
{
"carrier": "FedEx",
"serviceLevels": [
{
"name": "FedEx",
"shippingMethod": "FedEx"
}
]
}
],
"activeFulfillmentMethods": {
"ShipToHome": "true"
},
"transfer": {
"isAutoReceiving": true,
"autoStockWindow": "PT10M"
}
}
],
"stats": [
"<string>"
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
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 <= 10010
Criteria to search geo location
50Show child attributes
Field name
"location.locationNum"
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"
Group name
"GroupA"
Geo search origin. Must include postalCode OR (city and region).
Show child attributes
Postal code from where nearby locations are to be searched
94008
City for which location will be searched
"San Francisco"
Region for which location will be searched
"New York"
ISO 3166-1 alpha-2 based country code
"US"
Minimum distance (in radius) from the specified postal code within which the location will be searched
10
Maximum distance (in radius) from the specified postal code within which the location will be searched
100
Distance unit
MILE, KILOMETER, METER "MILE"
OK
Location geo search response
Pagination response
Show child attributes
Maximum number of records per page
1 <= x <= 10010
Number of records to skip before returning all records. For example, offset=20, limit=10 returns records 21-30.
x >= 01
Total number of search results
1000
Show child attributes
Merchant-defined unique identifier for the location.
23
Human-readable name of the location.
"Seattle Store"
Distance between the queried address and the location, typically measured in meters.
100
System-generated unique identifier for the location.
"9372919a8219e8"
Indicates whether the location is currently active for order fulfillment operations. A value of true means active; false means inactive.
true
Physical address associated with the location.
Show child attributes
Region or state
"WA"
Address line 1
123
Address line 2
"Suite 100"
Address line 3
"Seventh floor"
Address line 4
"Attention: Pat E. Kake"
City name
"Seattle"
ISO 3166-1 alpha-2 based country code
"US"
Postal or ZIP code
98121
Address type
"Home"
Show child attributes
Contact type
"OFFICE"
E-mail address
Classification of the location (for example, distribution center, retail store).
"DC"
Capacity constraints and allocation limits defined for the location.
Show child attributes
Maximum allocations this location can take at any given time. When currentAllocations=maxAllocations, this location is AtCapacity and cannot take any further allocations.
30
Current allocations at this location.
5
Current percentage of allocations at this location. Calculated by (currentAllocations / maxAllocations)*100.
20
If location has no allocation capacity limit.
true
Custom service attributes that define or categorize the location. Often used for routing or filtering purposes.
{ "brand": "WHBM", "channel": "Frontline" }A list of shipping zones associated with the location.
Timestamp indicating when the location record was created, in ISO 8601 UTC format.
"2022-05-25T07:58:30.996Z"
Timestamp indicating when the location record was last updated, in ISO 8601 UTC format.
"2022-05-25T07:58:30.996Z"
Weekly schedule defining the operating hours of the location.
Show child attributes
Day of week
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY "SUNDAY"
Geographic coordinates in GeoJSON format. Must be in the form [longitude, latitude] with longitude between -180 and 180, and latitude between -90 and 90.
{
"type": "Point",
"coordinates": [-122.3493, 47.6205]
}Additional metadata or flags related to the location.
{ "isReturns": "true" }List of shipping carriers supported by this location.
Show child attributes
Carrier name
"FedEx"
A map of fulfillment methods currently supported and enabled at the location.
{ "ShipToHome": "true" }Stats Details
Was this page helpful?