curl --request GET \
--url http://127.0.0.1:5185/v1/availability/comparisonconst options = {method: 'GET'};
fetch('http://127.0.0.1:5185/v1/availability/comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://127.0.0.1:5185/v1/availability/comparison"
response = requests.get(url)
print(response.text){
"data": {
"requested_products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_ids": {
"utah_dabs_sku": "347210"
},
"name": "<string>",
"brand": "<string>",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_size": {
"milliliters": 2,
"display": "<string>",
"normalization_state": "normalized"
},
"price": {
"amount_minor": 1,
"currency": "USD",
"display": "$19.99",
"source": "utah_dabs_workbook",
"times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
}
},
"status": {
"code": "1",
"label": "General distribution",
"lifecycle": "active",
"source_raw": "<string>"
}
}
],
"scope": {
"origin": {
"latitude": 0,
"longitude": 0
},
"radius_m": 250000,
"store_count": 1,
"inventory_age": "within_policy",
"purchase_eligibility": "eligible",
"max_stops": 2
},
"strategies": [
{
"strategy": "best_single_store",
"result_state": "complete",
"completeness_required": true,
"no_solution_reason": "NO_REPORTED_MATCH",
"plan": {
"stop_count": 2,
"farthest_store_distance_m": 1,
"total_origin_distance_m": 1,
"distance_metric": "straight_line_from_supplied_coordinates",
"covered_product_count": 2,
"requested_product_count": 13,
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncovered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"stores": [
{
"store": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_ids": {
"inventory_store_code": "0002",
"directory_id": "<string>"
},
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "UT",
"postal_code": "<string>",
"country": "US"
},
"phone": "<string>",
"contact_links": {
"telephone_uri": "<string>",
"geo_uri": "<string>"
},
"location": {
"latitude": 0,
"longitude": 0
},
"distance_m": 1,
"access_type": "consumer_state_store",
"operational_status": {
"state": "open",
"note": "<string>",
"source": "reviewed_editorial"
},
"services": [
"refrigerated_beer"
],
"regular_hours_available": true,
"directory_presence": {
"state": "present",
"last_seen_at": "2023-11-07T05:31:56Z"
},
"details_times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
}
},
"assigned_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reported_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eligible_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"covered_product_count": 1,
"selected_coverage_mode": "purchase_eligible_reported_positive"
}
]
}
}
]
},
"meta": {
"coverage": {
"selected_coverage_mode": "purchase_eligible_reported_positive",
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncovered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncertain_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"restricted_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reported_positive_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"purchase_eligible_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"requested_product_count": 13,
"store_count": 1,
"expected_pair_count": 1,
"observed_pair_count": 1,
"unchecked_pair_count": 1,
"retrieved_at_min": "2023-11-07T05:31:56Z",
"retrieved_at_max": "2023-11-07T05:31:56Z",
"upstream_age_known": false
},
"warnings": [
{
"code": "INVENTORY_COVERAGE_PARTIAL"
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}Compare reported availability for a bounded product list
Evaluates up to 25 exact products against inventory already stored by Nektir. The request never waits for or triggers a Utah DABS refresh. All strategies use the same publication revision, radius, retrieval-age policy, and purchase-eligibility mode.
fewest_stores_complete minimizes store count first. Equal-stop plans minimize the farthest
store’s straight-line distance from the supplied coordinates, then total straight-line origin
distance. Distances are not driving routes. A missing solution or empty result does not establish
that stock is unavailable when meta.coverage.unchecked_pair_count is positive.
curl --request GET \
--url http://127.0.0.1:5185/v1/availability/comparisonconst options = {method: 'GET'};
fetch('http://127.0.0.1:5185/v1/availability/comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://127.0.0.1:5185/v1/availability/comparison"
response = requests.get(url)
print(response.text){
"data": {
"requested_products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_ids": {
"utah_dabs_sku": "347210"
},
"name": "<string>",
"brand": "<string>",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_size": {
"milliliters": 2,
"display": "<string>",
"normalization_state": "normalized"
},
"price": {
"amount_minor": 1,
"currency": "USD",
"display": "$19.99",
"source": "utah_dabs_workbook",
"times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
}
},
"status": {
"code": "1",
"label": "General distribution",
"lifecycle": "active",
"source_raw": "<string>"
}
}
],
"scope": {
"origin": {
"latitude": 0,
"longitude": 0
},
"radius_m": 250000,
"store_count": 1,
"inventory_age": "within_policy",
"purchase_eligibility": "eligible",
"max_stops": 2
},
"strategies": [
{
"strategy": "best_single_store",
"result_state": "complete",
"completeness_required": true,
"no_solution_reason": "NO_REPORTED_MATCH",
"plan": {
"stop_count": 2,
"farthest_store_distance_m": 1,
"total_origin_distance_m": 1,
"distance_metric": "straight_line_from_supplied_coordinates",
"covered_product_count": 2,
"requested_product_count": 13,
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncovered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"stores": [
{
"store": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_ids": {
"inventory_store_code": "0002",
"directory_id": "<string>"
},
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "UT",
"postal_code": "<string>",
"country": "US"
},
"phone": "<string>",
"contact_links": {
"telephone_uri": "<string>",
"geo_uri": "<string>"
},
"location": {
"latitude": 0,
"longitude": 0
},
"distance_m": 1,
"access_type": "consumer_state_store",
"operational_status": {
"state": "open",
"note": "<string>",
"source": "reviewed_editorial"
},
"services": [
"refrigerated_beer"
],
"regular_hours_available": true,
"directory_presence": {
"state": "present",
"last_seen_at": "2023-11-07T05:31:56Z"
},
"details_times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
}
},
"assigned_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reported_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"eligible_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"covered_product_count": 1,
"selected_coverage_mode": "purchase_eligible_reported_positive"
}
]
}
}
]
},
"meta": {
"coverage": {
"selected_coverage_mode": "purchase_eligible_reported_positive",
"covered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncovered_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"uncertain_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"restricted_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reported_positive_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"purchase_eligible_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"requested_product_count": 13,
"store_count": 1,
"expected_pair_count": 1,
"observed_pair_count": 1,
"unchecked_pair_count": 1,
"retrieved_at_min": "2023-11-07T05:31:56Z",
"retrieved_at_max": "2023-11-07T05:31:56Z",
"upstream_age_known": false
},
"warnings": [
{
"code": "INVENTORY_COVERAGE_PARTIAL"
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
]
}Headers
Strong entity tag from an earlier response.
HTTP-date fallback validator. ETag takes precedence.
Query Parameters
Comma-separated exact stable product UUIDs. Order is preserved in requested_products.
1 - 25 elementsRequired WGS84 origin latitude used for radius and straight-line ranking.
-90 <= x <= 90Required WGS84 origin longitude used for radius and straight-line ranking.
-180 <= x <= 180Radius in meters; valid only with coordinates.
1 <= x <= 500000Comma-separated strategies to return. Omit to calculate all strategies.
5best_single_store, closest_store_with_any, closest_complete_store, fewest_stores_complete, best_partial_plan eligible plans against reported-positive observations classified for ordinary consumer purchase. any plans against all reported-positive observations while preserving eligibility arrays per store.
eligible, any Whether inventory predicates require the current retrieval-age policy.
within_policy, any_age Maximum stores considered by complete and partial multi-store plans.
1 <= x <= 3