Search Location by Address
1 min
POST
https://api.upstartcommerce.com/v1/location/search/address2
Header Parameters
- x-upstart-tenantstringrequiredDescription
- x-upstart-sitestringDescription
Body Parameters
- bodySearchByAddressQueryrequiredDescription
- filterAddressFilterrequiredDescription
- termSearchTermDescription
- SearchConditionTerm
- condSearchConditionDescription
- propertystring
- comparatorSearchComparatorDescription
- valueobject
- SearchAndTerm
- andSearchTerm[]Description
- SearchConditionTerm
- Circular-Reference
- SearchAndTerm
- Circular-Reference
- SearchOrTerm
- orSearchTerm[]Description
- SearchConditionTerm
- Max depth limit reached
- SearchAndTerm
- Max depth limit reached
- SearchOrTerm
- Max depth limit reached
- SearchNotTerm
- Max depth limit reached
- SearchNotTerm
- Max depth limit reached
- SearchOrTerm
- orSearchTerm[]Description
- SearchConditionTerm
- Max depth limit reached
- SearchAndTerm
- Max depth limit reached
- SearchOrTerm
- Max depth limit reached
- SearchNotTerm
- Max depth limit reached
- SearchNotTerm
- Max depth limit reached
- addressstringrequired
- distanceDistanceFilterDescription
- valuenumber<double>requiredFormatdouble
- unitDistanceUnitsDescription
- ordersSearchOrder[]Description
- propertystringrequired
- ascbooleanrequiredDefaulttrue
- pageinteger<int32>requiredExampleFormatint32
- pageSizeinteger<int32>requiredExampleFormatint32
- returnEmptyFacetsbooleanDefaultfalse
Responses
200
- LocationAddressSearchResponseDescription
- objectLocationAddressSearchResponseItems
- itemsLocationWithDistance[]requiredDescription
- addressAddressrequiredDescription
- citystringrequired
- countrystringrequiredDescriptionPattern^[A-Z]{2}$
- countystring
- postalCodestringrequired
- stateOrRegionstringrequired
- street1stringrequired
- street2string
- avgRatingnumber<double>DescriptionFormatdouble
- siteIdsSiteId[]Description
- contactInformationmap<string, string>requiredDescription
- contentContent[]Description
- contentstringrequiredDescription
- endDateTimestring<date-time>DescriptionFormatdate-time
- identifierstringrequiredDescription
- startDateTimestring<date-time>DescriptionFormatdate-time
- coordinatesCoordinatesrequiredDescription
- latitudenumber<double>requiredFormatdoubleMinimum-90Maximum90
- longitudenumber<double>requiredFormatdoubleMinimum-180Maximum180
- dateOriginallyOpenedstring<date>DescriptionFormatdate
- deliveryAvailablebooleanrequiredDescriptionDefaultfalse
- directionsSummarystringDescription
- distanceDistanceDescription
- valuenumber<double>ExampleDescriptionFormatdouble
- unitDistanceUnitsDescription
- dynamicPropertiesobjectDescription
- externalApplicationReferencesmap<string, string>Description
- hoursOfOperationNormalHoursOfOperation[]Description
- closedstringExampleDescriptionPattern[0-2][0-9]:[0-5][0-9]
- dayDayOfWeekrequiredDescription
- isOpenbooleanrequiredDescription
- openstringExampleDescriptionPattern[0-2][0-9]:[0-5][0-9]
- idLocationIdrequiredDescription
- locationTypestringrequiredDescription
- mediamap<string, MediaValue>
- namestringrequiredDescription
- numReviewsinteger<int32>DescriptionFormatint32Minimum0
- operationalbooleanrequiredDescription
- operationHoursExceptionsOperationHoursException[]Description
- closedstringExampleDescriptionPattern[0-2][0-9]:[0-5][0-9]
- exceptionTypestringrequiredDescription
- isOpenbooleanrequiredDescription
- namestringrequiredExampleDescription
- openstringExampleDescriptionPattern[0-2][0-9]:[0-5][0-9]
- pickupAvailablebooleanrequiredDescriptionDefaultfalse
- pricingZonestringDescriptionDefaultNTL
- publicbooleanrequiredDescription
- remodelDatesstring[]
- object
- pageinteger<int32>requiredDescriptionFormatint32
- pageSizeinteger<int32>requiredDescriptionFormatint32
- countinteger<int32>requiredDescriptionFormatint32
- queryIdstringrequiredDescription
- facetCountsFacetCountsDescription
- propertiesPropertyFacet[]requiredDescription
- propertystringrequiredDescription
- propertyTypestringrequired
- countsPropertyFacetCount[]requiredDescription
- valuestringrequiredDescription
- countinteger<int32>requiredDescriptionFormatint32
- rangesRangeFacet[]requiredDescription
- propertystringrequiredDescription
- propertyTypestringrequired
- countsRangeFacetCount[]requiredDescription
- valuestringrequiredDescription
- countinteger<int32>requiredDescriptionFormatint32
- startstringrequiredDescription
- endstringrequiredDescription
- gapstringrequiredDescription
- redirectsstring[]requiredDescription
400
- ValidationErrorResponseDescription
- namestringrequired
- codestringrequired
- detailstring
401
- ErrorResponseDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
curl
curl --request POST \
--url https://api.upstartcommerce.com/v1/location/search/address2 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-upstart-tenant: string' \
--data '{
"filter": {
"term": {
"and": {
"or": {}
},
"or": {}
},
"address": "",
"distance": {
"value": ""
}
},
"orders": [
{
"property": "",
"asc": true
}
],
"page": 2,
"pageSize": 4
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-upstart-tenant", "string");
var raw = JSON.stringify({
"filter": {
"term": {
"and": {
"or": {}
},
"or": {}
},
"address": "",
"distance": {
"value": ""
}
},
"orders": [
{
"property": "",
"asc": true
}
],
"page": 2,
"pageSize": 4
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.upstartcommerce.com/v1/location/search/address2", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.upstartcommerce.com/v1/location/search/address2")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-upstart-tenant"] = "string"
request.body = JSON.dump({
"filter": {
"term": {
"and": {
"or": {}
},
"or": {}
},
"address": "",
"distance": {
"value": ""
}
},
"orders": [
{
"property": "",
"asc": true
}
],
"page": 2,
"pageSize": 4
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.upstartcommerce.com/v1/location/search/address2"
payload = json.dumps({
"filter": {
"term": {
"and": {
"or": {}
},
"or": {}
},
"address": "",
"distance": {
"value": ""
}
},
"orders": [
{
"property": "",
"asc": True
}
],
"page": 2,
"pageSize": 4
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-upstart-tenant': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success-set of locations returned.
{
"items": [
{
"address": {
"city": "",
"country": "",
"county": "",
"postalCode": "",
"stateOrRegion": "",
"street1": "",
"street2": ""
},
"avgRating": "",
"siteIds": [
""
],
"contactInformation": "",
"content": [
{
"content": "",
"endDateTime": "",
"identifier": "",
"startDateTime": ""
}
],
"coordinates": {
"latitude": "",
"longitude": ""
},
"dateOriginallyOpened": "",
"deliveryAvailable": false,
"directionsSummary": "",
"distance": {
"value": 157.75,
"unit": ""
},
"dynamicProperties": {},
"externalApplicationReferences": "",
"hoursOfOperation": [
{
"closed": 1200,
"day": "",
"isOpen": false,
"open": "08:00"
}
],
"id": "",
"locationType": "",
"media": "",
"name": "",
"numReviews": "",
"operational": false,
"operationHoursExceptions": [
{
"closed": 1200,
"exceptionType": "",
"isOpen": false,
"name": "Memorial Day",
"open": "08:00"
}
],
"pickupAvailable": false,
"pricingZone": "",
"public": false,
"remodelDates": [
"2019-05-29"
]
}
],
"page": "",
"pageSize": "",
"count": "",
"queryId": "",
"facetCounts": {
"properties": [
{
"property": "",
"propertyType": "",
"counts": [
{
"value": "",
"count": ""
}
]
}
],
"ranges": [
{
"property": "",
"propertyType": "",
"counts": [
{
"value": "",
"count": ""
}
],
"start": "",
"end": "",
"gap": ""
}
]
},
"redirects": [
""
]
}400
// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.
{
"name": "",
"code": "",
"detail": ""
}401
// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}