POST Orders Filtered Pickup Times

​

Returns the times a store can actually honour for an order — this is the one to use on the Cart 2.0 flow.

Unlike Orders Pickup Times, it applies the store's preparation time, takes the cart into account when you pass cart_id, filters out slots that order throttling has already filled, and respects emergency closures. It also works for delivery: pass a delivery order type with order_type.delivery_info, rather than calling the separate delivery times endpoint.

Three things trip integrators up. The order type is nested as order_type.id — a flat order_type_id is silently ignored. singular_point_id is a UUID, not a numeric id. And the fields from the legacy order-calculation call — menu_items, combo_meals, discounts, tip, calculate_accurate_tax — are not read on the NMG product structure; the cart supplies all of that, so send cart_id instead.

No customer token is required. A guest can call it with the application credentials alone.

As well as pickup_times the response carries preparation_time, asap_time, is_fully_booked and capacity_pause, and on delivery order types a promise with the estimated times and fee where the store has a dispatch integration.

Headers

  • Type of content accepted by the API (application/json in most cases)

  • Application key for specific client app

  • Content-Type header

  • Version of the API to be used

  • Authorization header

  • Unique request identifier

Body

required
application/json
  • Nested, not a flat order_type_id. A flat order_type_id is ignored by this endpoint.

    Properties: 3
  • UUID of the singular point for the order type, taken from the venue's areas. Each area has its own — the one you use for delivery is not the one you use for takeout. Not the venue_id either: sending that is rejected with ​`singular_point_id` parameter is required.

  • The cart you are about to check out. Pass it once you have one: it is what makes the preparation time reflect what is actually in the basket. Without it the preparation time falls back to the store's default strategy.

  • Ask the capacity management service for live slot availability instead of cached throttling data. Slower but more accurate.

  • Key returned by the delivery venues call, for reusing a delivery promise.

  • Delivery time the customer has asked for, on delivery order types.

  • Only for a later calendar day, and only when the store allows ordering days in advance (days_in_advance greater than zero). Omit it for today. Sending it to a store that does not allow advance ordering is rejected, and so is a date that is today or beyond the allowed window.

  • Restrict the slots to those where this menu is being served.

Responses

  • application/json
Request Example for post/orders/filtered-pickup-times
curl https://api-public-demo.menu.app/api/orders/filtered-pickup-times \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Application: application-key' \
  --header 'Content-Type: application/json' \
  --header 'API-VERSION: ' \
  --header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
  --data '{
  "singular_point_id": "9254eb1c-ce27-4fa5-993e-c39096e7141d",
  "order_type": {
    "id": 6,
    "properties": {}
  },
  "cart_id": "f6ce31f7b7549cc7c3e5326661cf1dc3b5ea5c3fd89cce634667e483e23fb51a"
}'
{
  "status": "OK",
  "code": 200,
  "data": {
    "pickup_times": [
      "2023-05-25 07:15:00"
    ]
  }
}