Sandbox
¶ Employee Management Sandbox API Overview
The Sandbox API provides a way to test the endpoints and user flows without actually creating a production employee. The test employees created using sandbox API can be used in other sandbox APIs like trips management. To use the Sandbox, make calls to https://sandbox-api.uber.com.
Note: Sandbox APIs can only be used on test organizations.
Environment | Host |
---|---|
Production | https://api.uber.com |
Sandbox | https://sandbox-api.uber.com |
Look for Try It tags throughout the documentation for sandbox examples.
¶ Using the Sandbox API
¶ 1. Create a test employee
Call /v1/business/organizations/id/employees using the sandbox URL https://sandbox-api.uber.com to create a test employee.
Note: The organization used should be a test organization. To obtain a test organization, you can either contact support or use the organization management sandbox APIs to create one.
The email provided in the POST /v1/business/organizations/id/employees
request should be a valid address where you can receive emails.
This will setup temporary test drivers that will exist for 8 hours.
On success, this call will append +uber+sandbox
to the email provided and create a test uber account using that email.
Example: abc@gmail.com
will become abc+uber+sandbox@gmail.com
.
The test account will be created with password as UberSandboxAccount123
.
¶ Example Request
Try It Replace the token in the below request to use it a terminal to create a run. Note the organization_id
and email
will have to be changed.
curl -i -X POST "https://sandbox-api.uber.com/v1/business/organizations/<organization_id>/employees" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"employee": {
"first_name": "test",
"last_name": "test",
"email": "abc@gmail.com"
}
}'
¶ Example Response
{
"employee": {
"first_name": "test",
"last_name": "test",
"email": "samarthjoshi29+1+uber+sandbox@gmail.com",
"u4b_data": {
"billing_mode": "CENTRALIZED",
"is_admin": false,
"groups": [
{
"uuid": "7615127c-467b-47b5-b91f-36e8fcf6a107",
"name": "General"
}
]
}
}
}
¶ 2. Confirm the test employee and complete the setup
Step 1 will trigger an email to the address used in the request above with an invitation URL.
To accept the invitation URL, open it in incognito mode in your browser and sign in using the sandbox email and password.
Example: For abc@gmail.com
sign in using email as abc+uber+sandbox@gmail.com
and password as UberSandboxAccount123
.