Three lines

Uber

Developers

Create Sandbox Run for Eats Order Simulation

POSThttps://sandbox-api.uber.com/v1/sandbox/terminal-state-eats-run

Use case

Use this endpoint to create a sandbox run for mocking a terminal state eats order. You can select from available scenarioIDs for simulating desired kind of order. Note that this endpoint is only available to be invoked from sandbox environment.

Test eater account will be configured and provided by Uber for Business representative.

Available Scenarios
Name Type Description
COMPLETED_STATE_DELIVERY_ORDER string Simulates a completed eats order at provided location.
Authorization

OAuth 2.0 Bearer token with the business.receipts scope.

Request
Example request
curl -X POST \
  -H 'authorization: Bearer <access_token>' \
  -H 'content-type: application/json' \
  -d '{
        "eater_location": {
          "point": {
            "latitude": 37.34214,
            "longitude": -121.9096
          }
        },
        "eater_info": {
          "identifier": {
            "email_address": "uber+sandbox+test@uber.com"
          }
        },
        "scenario": {
          "id": "COMPLETED_STATE_DELIVERY_ORDER"
        },
        "expense_info": {
          "code": "xx",
          "memo": "xxx"
        }
    }' \
    'https://sandbox-api.uber.com/v1/sandbox/terminal-state-eats-run'
Request body parameters
Name Type Description Required?
eater_location.point object Specifies the delivery location for the order. Currently available only in San francisco Bay area locations. yes
eater_location.point.latitude float The delivery location latitude for the order. yes
eater_location.point.longitude float The delivery location longitude for the order. yes
eater_info object Specifies the test eater information for the order. yes
eater_info.identifier object Specifies the test eater identifier for the order. yes
eater_info.identifier.email_address string specifies the email address of the test eater taking the order. yes
scenario.id enum Scenario depicting type of order to be simulated. Allowed values: COMPLETED_STATE_DELIVERY_ORDER yes
expense_info object Specifies any expense info to be set on the order receipt. no
expense_info.code string Specifies the expense code to be set on the business order. no
expense_info.memo string Specifies the expense memo to be set on the business order. no
Response
Example response:
{
  "run_id": "<run_id>"
}
Response body parameters
Field Type Description
run_id string A unique identifier of a sandbox create run request.
Errors
HTTP Status Code Description
400 BAD_REQUEST Suggests that the server was unable to understand or process the request due to its incorrect or malformed structure.
403 FORBIDDEN Indicates that the server understood the request but refuses to authorize it.
404 NOT_FOUND Suggests that the server was unable to find requested runID
500 INTERNAL_SERVER_ERROR Represents an unanticipated error occurred on the server side while processing the request.

Uber

Developers
© 2023 Uber Technologies Inc.