Update Employee
POSThttps://api.uber.com/v1/business/organizations/{organization_id}/employees/update¶ Use Case
The Update Employee endpoint allows you to update an existing employee of an organization.
¶ Authorization
The Update Employee endpoint requires an access_token using the client credentials (for 1P use-case)
grant to business.employees scope.
If an application follows third party authentication, the update employee endpoint requires the client to get authorized using the authorization endpoint
¶ Path Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
organization_id |
string | No | Identifier for your organization. |
¶ Request Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
employee |
object | Yes | An object of employee details whose account needs to be updated. |
employee.first_name |
string | Yes | First name of the employee. |
employee.last_name |
string | Yes | Last name of the employee. |
employee.email |
string | No | Email id of the employee. |
employee.mobile_country_code |
string | Yes | The mobile country code of the employee. If no code is provided but mobile_number is provided, code of the organization will be taken as default code. |
employee.mobile_number |
string | Yes | The mobile number of the employee. |
employee.u4b_data |
object | Yes | Object containing employee data specific to uber for business. |
employee.u4b_data.employee_id |
string | Yes | The employee ID of the employee. |
employee.u4b_data.reviewer |
string | Yes | The email id of the reviewer. |
employee.u4b_data.is_admin |
boolean | Yes | Check if employee is admin. |
employee.u4b_data.groups |
array | Yes | List of groups the employee is in. |
employee.u4b_data.groups[].name |
string | Yes | Group Name. |
employee.u4b_data.roles |
array | Yes | List of roles to be associated with the employee. Supported roles: REVIEWER.Please note that only the REVIEWER role is supported at the moment and the attribute is case sensitive.Since, role updates happen asynchronously some delay is expected for role updates to reflect. At median, updates are reflected within ~6 seconds, and at the 99th percentile, it may take up to ~2 minutes. |
¶ Response Fields
| Name | Type | Description |
|---|---|---|
employee |
struct | An object of employee details whose account has been updated. |
employee.first_name |
string | First name of the employee. |
employee.last_name |
string | Last name of the employee. |
employee.email |
string | Email id of the employee. |
employee.mobile_country_code |
string | The mobile country code of the employee. If no code is provided but mobile_number is provided, code of the organization will be taken as default code. |
employee.mobile_number |
string | The mobile number of the employee. |
employee.u4b_data |
object | Object containing employee data specific to uber for business. |
employee.u4b_data.employee_id |
string | The employee ID of the employee. |
employee.u4b_data.reviewer |
string | The email id of the reviewer. |
employee.u4b_data.is_admin |
boolean | Check if employee is admin. |
employee.u4b_data.last_invite_timestamp |
string | The timestamp of the last invitation sent to the employee. Eg: “2022-09-28T06:58:46Z” |
employee.u4b_data.groups |
array | List of groups the employee is in. |
employee.u4b_data.groups[].uuid |
string | Group UUID. |
employee.u4b_data.groups[].name |
string | Group Name. |
¶ Example Request
curl -X POST "https://api.uber.com/v1/business/organizations/<organization_id>/employees/update" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{
"employee": {
"first_name": "test",
"last_name": "test",
"email": "testnew@uber.com",
"mobile_number": "1234567899",
"mobile_country_code": "+91",
"u4b_data": {
"reviewer": "test1@uber.com",
"employee_id": "test.test",
"is_admin": true,
"roles": ["REVIEWER"],
"groups": [
{
"name": "group-2"
}
]
}
}
}'
¶ Example Response
If the employee was successfully updated:
Status-Code: 200 OK
{
"employee": {
"first_name": "test",
"last_name": "test",
"email": "testneww@uber.com",
"mobile_country_code": "+91",
"mobile_number": "1234567899",
"u4b_data": {
"employee_id": "test.test",
"reviewer": "test1@uber.com",
"is_admin": true,
"last_invite_timestamp": "2022-09-28T06:58:46Z",
"groups": [
{
"uuid": "uuid",
"name": "group-2"
}
]
}
}
}
¶ Error Responses
| HTTP Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST |
request specific message |
| 404 | ENTITY_NOT_FOUND |
An employee with given email was not found |
| 401 | NOT_AUTHORIZED |
Caller not authorized to make this request |
| 429 | rate_limited |
Rate limit exceeded |
| 500 | INTERNAL_SERVER_ERROR |
We have experienced a problem |