POST Validate Order Edit

​

Asks whether an order can still be changed, and what would change if it were. Nothing is written — no cart is created — so this is safe to call before offering the customer an "edit order" button.

Read can_proceed first. When it is false, errors explains why, most often 1004 "order is not editable". When it is true, status describes the consequences of editing: items no longer available, items whose price has moved, a changed delivery fee, and whether the venue, order type or totals differ.

An order is editable only while the brand allows order editing, the order is still in Init, SendDelayed, SendTried or Sent, and the editing time limit before preparation has not passed. Orders already being prepared, ready, completed or cancelled cannot be edited.

Note that only catering order types can be swapped for one another during an edit; other order types cannot be changed.

Send Content-Type: application/json even with an empty body.

Path Parameters

  • UUID of the order to check

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

application/json
  • Check the edit against a different store. Defaults to the order's own venue.

Responses

  • application/json
  • Missing or invalid customer token.

  • The brand is not on the NMG product structure.

  • No such order for this customer, or it has already been superseded by a revision.

Request Example for post/orders/{order_uuid}/edit/validate
curl https://api-public-demo.menu.app/api/orders/9f1c0f3a-2b7c-4a66-9f1e-2c9a1c9a1c9a/edit/validate \
  --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 '{}'
{
  "status": "OK",
  "code": 200,
  "data": {
    "cart_order_edit": {
      "order_id": "9f1c0f3a-2b7c-4a66-9f1e-2c9a1c9a1c9a",
      "venue_id": "6f1f0f3a-2b7c-4a66-9f1e-2c9a1c9a1c9a",
      "order_type_id": 6,
      "application_type_id": 2,
      "can_proceed": true,
      "status": {
        "is_venue_changed": false,
        "is_order_type_changed": false,
        "is_price_summary_changed": true,
        "is_discount_changed": false,
        "unavailable_items": [],
        "item_price_changes": [
          {
            "order_item_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
            "name": "Fries",
            "original_price": 400,
            "reorder_price": 450
          }
        ],
        "fee_price_changes": []
      },
      "errors": []
    }
  }
}