List a product's reported inventory across stores
curl --request GET \
--url http://127.0.0.1:5185/v1/products/{product_id}/inventoryconst options = {method: 'GET'};
fetch('http://127.0.0.1:5185/v1/products/{product_id}/inventory', 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/products/{product_id}/inventory"
response = requests.get(url)
print(response.text){
"data": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
},
"observation_state": "reported_positive",
"quantity_reported": 1,
"quantity_semantics": "dabs_reported_unverified",
"purchase_eligibility": "eligible",
"eligibility_reason_code": "<string>",
"retrieval_policy_id": "<string>",
"meets_retrieval_policy": true,
"upstream_age_known": false,
"times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
},
"last_refresh_attempt": {
"attempted_at": "2023-11-07T05:31:56Z",
"status": "succeeded"
}
}
],
"meta": {
"page": {
"has_more": true,
"next_cursor": "<string>",
"cursor_expires_at": "2023-11-07T05:31:56Z"
},
"warnings": [
{
"code": "INVENTORY_COVERAGE_PARTIAL"
}
],
"coverage": {
"status": "complete_for_retrieval_policy",
"candidate_product_count": 1,
"checked_product_count": 1,
"unchecked_pair_count": 1,
"retrieved_at_min": "2023-11-07T05:31:56Z",
"retrieved_at_max": "2023-11-07T05:31:56Z",
"scope_store_count": 1,
"expected_pair_count": 1,
"within_policy_product_count": 1,
"reported_positive_pair_count": 1,
"reported_zero_pair_count": 1,
"row_absent_pair_count": 1
},
"facets": {
"matching_product_count": 1,
"brands": [
{
"count": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>"
}
],
"categories": [
{
"count": 1,
"id": "<string>",
"name": "<string>"
}
],
"statuses": [
{
"count": 1,
"code": "<string>"
}
],
"price": {
"currency": "USD",
"minimum_amount_minor": 1,
"maximum_amount_minor": 1
},
"semantics": "counts_after_all_requested_filters_including_each_active_facet_filter"
}
},
"links": {
"self": "<string>",
"next": "<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>"
}
]
}{
"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>"
}
]
}List a product's reported inventory across stores
Returns materialized product/store states. Warehouse and on-order values are deliberately excluded from rows and remain separate on product detail.
List a product's reported inventory across stores
curl --request GET \
--url http://127.0.0.1:5185/v1/products/{product_id}/inventoryconst options = {method: 'GET'};
fetch('http://127.0.0.1:5185/v1/products/{product_id}/inventory', 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/products/{product_id}/inventory"
response = requests.get(url)
print(response.text){
"data": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
},
"observation_state": "reported_positive",
"quantity_reported": 1,
"quantity_semantics": "dabs_reported_unverified",
"purchase_eligibility": "eligible",
"eligibility_reason_code": "<string>",
"retrieval_policy_id": "<string>",
"meets_retrieval_policy": true,
"upstream_age_known": false,
"times": {
"source_updated_at": "2023-11-07T05:31:56Z",
"retrieved_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z"
},
"last_refresh_attempt": {
"attempted_at": "2023-11-07T05:31:56Z",
"status": "succeeded"
}
}
],
"meta": {
"page": {
"has_more": true,
"next_cursor": "<string>",
"cursor_expires_at": "2023-11-07T05:31:56Z"
},
"warnings": [
{
"code": "INVENTORY_COVERAGE_PARTIAL"
}
],
"coverage": {
"status": "complete_for_retrieval_policy",
"candidate_product_count": 1,
"checked_product_count": 1,
"unchecked_pair_count": 1,
"retrieved_at_min": "2023-11-07T05:31:56Z",
"retrieved_at_max": "2023-11-07T05:31:56Z",
"scope_store_count": 1,
"expected_pair_count": 1,
"within_policy_product_count": 1,
"reported_positive_pair_count": 1,
"reported_zero_pair_count": 1,
"row_absent_pair_count": 1
},
"facets": {
"matching_product_count": 1,
"brands": [
{
"count": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>"
}
],
"categories": [
{
"count": 1,
"id": "<string>",
"name": "<string>"
}
],
"statuses": [
{
"count": 1,
"code": "<string>"
}
],
"price": {
"currency": "USD",
"minimum_amount_minor": 1,
"maximum_amount_minor": 1
},
"semantics": "counts_after_all_requested_filters_including_each_active_facet_filter"
}
},
"links": {
"self": "<string>",
"next": "<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>"
}
]
}{
"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>"
}
]
}