Bag Availability Admin API (0.1.0)
Download OpenAPI specification:Download
This internal API provides access to bag availability values in the platform.
Get bag availability
Retrieves a list of fulfillment nodes that have enough inventory for a bag of products.
Authorizations:
Request Body schema: application/json
required | Array of objects non-empty The list of (product_id/quantity) used to find the fulfillment nodes. |
object (location) Represents parameters to search stores by location. Limits the results to only fulfillment nodes that are within a certain radius from the provided geo location. If a geo location is set, the results would be sorted by their distance from that location. Set the radius to zero if you just want to sort by distance, but do not want any filtering to be applied. IMPORTANT: If this was used, fulfillment nodes that are not associated with a geo tagged store will not be filtered out. | |
only_in_store_pickup | boolean Default: false Set to true to get only stores with in_store_pickup set. |
only_stores | boolean Default: false Set to true to get only fulfillment nodes that are associated with a store. |
ignore_atps | boolean Default: false Set to true to get all the fulfillment nodes, regardless of whether they have atps for all the products provided in the bag or not. Fulfillment nodes that do not have enough products to cover the bag will have a field has_atps set to false. |
limit | number Default: 100 Use to limit the number of results returned by GetBagAvailability end point. IMPORTANT: If this is not provided a default of 100 will be used to limit the results. |
Responses
Request samples
- Payload
{- "bag": [
- {
- "product_id": "GD10000",
- "quantity": 5
}
], - "location_filter": {
- "geo": {
- "latitude": 45,
- "longitude": 90
}, - "radius": 10
}, - "only_in_store_pickup": true,
- "only_stores": false,
- "ignore_atps": true,
- "limit": 100
}
Response samples
- 200
- 400
- 500
{- "fulfillment_nodes": [
- {
- "fulfillment_node_id": "US01",
- "store": {
- "address": {
- "address_line_1": "121 Spring Street",
- "city": "New York",
- "country_code": "US",
- "latitude": 40.7235439,
- "longitude": -74.0023732,
- "state": "NY",
- "zip_code": "10012"
}, - "business_hours": [
- {
- "from_time": "09:00",
- "to_time": "21:00",
- "weekday": 0
}
], - "label": "New York Spring Street",
- "phone_number": "1-212-929-0700",
- "store_id": "US01",
- "timezone": "America/New_York"
}, - "has_atps": false,
- "distance": 10
}
]
}