Order Ahead .: Complete a Proposed Order Ahead Order

API Reference / v15

Complete a Proposed Order Ahead Order

This endpoint completes a proposed order ahead order. The user is charged via LevelUp, and his or her order is submitted to the third-party order ahead provider.

Clients may POST to the order_completion_url returned from Show a Proposed Order Ahead Order instead of constructing the URL for this request themselves.

This endpoint will respond with HTTP 202 Accepted, at which point the client should begin polling Show a Completed Order Ahead Order using order_url until it returns HTTP 200 OK.

Request Endpoint

POST /v15/order_ahead/orders/:uuid/complete


A user token with the read_user_orders and read_user_basic_info permissions is required for this request.

cURL Example

curl -X POST https://api.thelevelup.com/v15/order_ahead/orders/f7943600849501323c1552668b2aa48c/complete \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization:token user="1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e"'

Example Response

HTTP 202 Accepted

  "order": {
    "order_url": "https://api.thelevelup.com/v15/users/orders/f7943600849501323c1552668b2aa48c",
    "state": "submitting",
    "uuid": "f7943600849501323c1552668b2aa48c"

Response Parameters

Name Type Description
order_url String URL to Show a Proposed Order Ahead Order.
state String The order’s state. May be one of submitting, charging, completed, or rejected.
uuid String Unique identifier for order.