curl --request POST \
--url https://api.fabric.inc/v3/locations/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"sort": "-location.createdAt",
"filters": [
{
"field": "location.locationNum",
"value": "11245",
"condition": "EQ"
},
{
"field": "location.type",
"values": [
"DC",
"STORE"
],
"condition": "IN"
}
]
}
'{
"pagination": {
"limit": 10,
"offset": 1,
"count": 1000
},
"data": [
{
"locationNumber": 23,
"name": "Seattle Store",
"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>"
]
}Get a list of locations by specified filter criteria.
curl --request POST \
--url https://api.fabric.inc/v3/locations/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"sort": "-location.createdAt",
"filters": [
{
"field": "location.locationNum",
"value": "11245",
"condition": "EQ"
},
{
"field": "location.type",
"values": [
"DC",
"STORE"
],
"condition": "IN"
}
]
}
'{
"pagination": {
"limit": 10,
"offset": 1,
"count": 1000
},
"data": [
{
"locationNumber": 23,
"name": "Seattle Store",
"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.
1
Maximum number of records per page
10
Sample request to search locations
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"
Property by which data is sorted.
Note: - refers to descending and + refers to ascending order.
"+location.createdAt"
OK
Location 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
A merchant-defined unique identifier used to reference the location.
23
The display name of the location, typically shown in the User Interface and reports.
"Seattle Store"
A system-generated globally unique identifier for the location.
"9372919a8219e8"
Indicates whether the location is currently active for order fulfillment. true Location is active. false Location is inactive.
true
The 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
The type or classification of the location (for example, DC for Distribution Center, Store).
"DC"
Capacity limits and allocation settings that define how many orders the location can fulfill.
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-level attributes associated with the location. Often used for filtering or routing (for example, by brand or channel).
{ "brand": "WHBM", "channel": "Frontline" }A list of shipping zones associated with the location for delivery or operational routing.
The timestamp of when the location record was created, in ISO 8601 UTC format.
"2022-05-25T07:58:30.996Z"
The timestamp of the most recent update to the location record, in ISO 8601 UTC format.
"2022-05-25T07:58:30.996Z"
Weekly schedule detailing the hours during which the location operates.
Show child attributes
Day of week
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY "SUNDAY"
The geographical coordinates of the location in GeoJSON format. Must follow the format [longitude, latitude], where longitude ∈ [-180, 180] and latitude ∈ [-90, 90].
{
"type": "Point",
"coordinates": [-122.3493, 47.6205]
}Custom key-value metadata or flags associated with the location.
{ "isReturns": "true" }A list of shipping carriers supported by this location for outbound or inbound logistics.
Show child attributes
Carrier name
"FedEx"
A map of fulfillment methods currently active and supported by this location (for example, ShipToHome, Pickup).
{ "ShipToHome": "true" }Stats Details
Was this page helpful?