Sandbox
¶ Employee Management Sandbox API Overview
The Sandbox API provides a way to test the endpoints and user flows without actually creating a production organization. The test organizations created using sandbox API can be used in other sandbox APIs like trips and employees 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 organization
Call /v1/organizations/ using the sandbox URL https://sandbox-api.uber.com to create a test organization.
Note: The email provided in the POST /v1/organizations/
request should be a valid email address where you can receive emails.
This will create a test organization and return its UUID.
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/organizations/" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"organization": {
"name": "test org",
"home_country_iso": "US"
},
"admin": {
"first_name": "abc",
"last_name": "def",
"email": "abc@gmail.com"
},
"u4b_products": ["RIDES"],
"consents_accepted": true
}'
¶ Example Response
{
"organization": {
"uuid": "8c01cfed-eba5-46ec-8ab3-3181e47dffd8",
"name": "spj test org",
"home_country_iso": "US",
"status": "INACTIVE"
}
}
¶ 2. Complete the organization 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
.
This will lead you to the organization setup page where you need to select a payment method.
If you added vouchers program while creating the organization, you will have to provide your credit card details to complete the setup. Otherwise, select the already added test credit card at this step.