Complete Order

Order Ahead / Endpoints

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

Authorization

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="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"'

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.