jsonresttestingsandboxuber-api

Uber Eats `test_specifications` cannot be applied in sandbox mode


Creating a delivery on sandbox-api.uber.com (without test_specifications) works properly, and live_mode comes back as false, indicating that we are in the sandbox rather than production mode.

Working example without test_specifications:

{
    "pickup_address": "124 w tennesee st, tallahassee, fl, 32301",
    "dropoff_address": "124 w tennesee st, tallahassee, fl, 32301",
    "dropoff_name": "nowhere",
    "manifest": "nothing",
    "pickup_name": "nobody",
    "dropoff_phone_number": "523-123-1231",
    "pickup_phone_number": "523-123-1232"
}

But, when adding test_specifications as in the robocourier example, the API responds with "test_specifications not allowed for production requests" and fails to create the delivery.

Failing example with test_specifications:

{
    "pickup_address": "124 w tennesee st, tallahassee, fl, 32301",
    "dropoff_address": "124 w tennesee st, tallahassee, fl, 32301",
    "dropoff_name": "nowhere",
    "manifest": "nothing",
    "pickup_name": "nobody",
    "dropoff_phone_number": "523-123-1231",
    "pickup_phone_number": "523-123-1232",
    "test_specifications": {
        "robo_courier_specification": {
            "mode": "auto"
        }
    }
}

Response from Uber Eats DaaS:

{
    "code": "invalid_params",
    "message": "The parameters of your request were invalid.",
    "kind": "error",
    "metadata": {
        "param_details": "test_specifications not allowed for production requests"
    }
}

How can we enable the robo_courier_specification so that we can test webhooks in the sandbox?


Solution

  • Our contact at Uber Eats generated a new "sandbox only" account for us which behaves as documented regarding the DaaS robocourier.

    The robocourier seems to make a distinction between production and sandbox accounts, a behavior apparently held over from Postmates. This "sandbox only" distinction does not currently appear to be visible on the dashboard.