Three lines

Uber

Developers

Create Sandbox Run

POSThttps://sandbox-api.uber.com/v1/guests/sandbox/run

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

Use case

Use this endpoint to create a new mock sandbox run.

This endpoint creates ephemeral mock test drivers that can be used to complete a trip in the sandbox.

The run_id and its drivers will exist for 8 hours and should be reused for additional trips in the same city.

Authorization

OAuth 2.0 Bearer token with the guests.trips scope.

Request
Example request
curl -X POST \
  -H 'authorization: Bearer <access_token>' \
  -H 'content-type: application/json' \
  -d '{
      "driver_locations": [
        {
          "latitude": 40.75176657279212,
          "longitude": -73.98786252473836
        }
      ],
      "pickup_location": {
        "latitude": 40.7517665,
        "longitude": -73.98786252
      },
      "dropoff_location": {
        "latitude": 40.75279,
        "longitude": -74.00465
      },
      "parent_product_type_id": "6a8e56b8-914e-4b48-a387-e6ad21d9c00c"
    }' \
    'https://sandbox-api.uber.com/v1/guests/sandbox/run'
Request body parameters
Field Type Description
driver_locations array List of driver locations to be available for this sandbox run. Each element in the list will create a new driver in the given location. This endpoint supports a maximum of 1 driver location in this list at this time. The location should be close to the pickup location. An empty object will randomly place the driver near the pickup location. (required).
driver_locations[i].latitude float The latitude of the driver.
driver_locations[i].longitude float The longitude of the driver.
pickup_location object The object that contains the latitude and longitude of rider pickup (required).
pickup_location.latitude float Latitude of the pickup location of the trip (required).
pickup_location.longitude float Longitude of the pickup location of the trip (required).
dropoff_location object An object that contains the latitude and longitude of rider drop off (required).
dropoff_location.latitude float Latitude of the drop off location of the trip (required).
dropoff_location.longitude float Longitude of the drop off location of the trip (required).
parent_product_type_id string Unique identifier of a product for drivers in this run. Use from the chart below (required).
parent_product_type_id values
ID Description
6a8e56b8-914e-4b48-a387-e6ad21d9c00c Uber X parent_product_type_id.
17201575-69bd-4498-925e-ffba2af07a9a Uber Green parent_product_type_id.
60b76812-c307-4076-b83b-fcb36e75da07 Uber XL parent_product_type_id.
557ec967-167f-446b-a868-c1457dae0c70 SUV parent_product_type_id.
f1faedb7-5825-484f-b236-24e2cd95ec23 Uber Black parent_product_type_id.
4cefa6a0-efb5-41dc-a8bb-870f2c3212ba Mid Tier parent_product_type_id.
b1afcc8d-02ff-4bfb-be88-b0afed2a0ef2 Taxi parent_product_type_id.
d49da4d3-c4fc-4034-b363-c22105fa9c90 Moto parent_product_type_id.
3af476c7-31aa-4015-8d25-0499e4b2afba Business Item Delivery parent_product_type_id.
93ef20c4-5b30-4d80-8a13-e4cad0ce8c13 Rider Item Delivery parent_product_type_id.
87598847-8405-4a31-809f-a771d3af1df3 Intercity parent_product_type_id.
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.

Uber

Developers
© 2023 Uber Technologies Inc.