Get Programs For Organization
GEThttps://api.uber.com/v1/organizations/{organization_id}/programs
¶ Use Case
The Get Programs Organization endpoint allows clients to query active programs within the organization based on the program filters passed as query parameters. Note that if no filters are passed, all active programs within the organization will be fetched
¶ Authorization
The Get Programs Organization endpoint requires an access_token using the client credentials (for 1P use-case) grant to business.organizations
scope.
If an application follows third party authentication, the create organization 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. |
¶ Query Parameters
Name | Type | Optional | Description |
---|---|---|---|
program_name |
string | Yes | Name of the program to be filtered. This needs to be URL encoded |
program_category |
string | Yes | The category of program, possible values are RIDES EATS GUESTS VOUCHERS HEALTH UNKNOWN |
¶ Response Fields
Top level Object
Name | Type | Description |
---|---|---|
programs |
array | List of program objects |
programs[].program_id |
string | UUID of the program |
programs[].name |
string | Name of the program |
programs[].description |
string | Description of the program |
programs[].category |
string | Category of the program. Possible values are RIDES EATS GUESTS VOUCHERS HEALTH UNKNOWN |
programs[].components |
object | Component object of a program |
Component object
Name | Type | Description |
---|---|---|
expense_code_component |
object | Expense Code Component of Program |
per_trip_cap_component |
object | Per Trip Cap Component of Program |
periodic_cap_component |
object | Periodic Cap Component of Program |
time_components |
[]object | List of time components |
trip_geo_components |
[]object | A list of Program Trip Geo Components |
vehicle_view_component |
object | Vehicle View Component of Program |
vehicle_category_component |
object | Vehicle Category Component of Program |
trip_num_component |
object | Trip Number Component of Program |
time_window_components |
[]object | A list of Program Time Window Components |
Expense Code Component object
Name | Type | Description |
---|---|---|
is_strict |
bool | Whether it is mandatory to enter expense code while booking trip |
is_memo_required |
bool | Whether it is mandatory to enter expense code memo while booking trip. |
Per Trip Component object
Soft Per Trip Cap: Trips exceeding the cap will get created with an indication/flag.
Hard Per Trip Cap: Trips exceeding the cap will get created, but the organization will pay only for the component amount.
Blocking Per Trip Cap: Trips exceeding the cap will be blocked at creation.
Name | Type | Description |
---|---|---|
cap_type |
string | The type of component - SOFT, HARD or BLOCKING |
amount |
string | The amount cap per trip |
currency_code |
string | Currency code of the amount |
deductible |
string | The amount deductible from organization |
percentage |
int | The percentage amount deductible from organization |
Periodic Cap Component object
Name | Type | Description |
---|---|---|
amount |
string | The amount cap per trip |
currency_code |
string | Currency code of the amount |
period |
string | DAILY, WEEKLY, MONTHLY |
Time Component object
Name | Type | Description |
---|---|---|
start_minute |
int | It defines the lower limit of the time range when a trip can be booked |
end_minute |
int | It defines the upper limit of the time range when a trip can be booked |
days_of_week |
[]int | Int array defining list of eligible days of week 0 - Sunday, 1 - Monday and so on |
Trip Geo Component object
Name | Type | Description |
---|---|---|
location_policy_option |
string | PICKUP_ONLY, DROPOFF_ONLY, PICKUP_AND_DROPOFF, PICKUP_OR_DROPOFF |
origins |
[]object | Trip origin location list |
destinations |
[]object | Trip destination location list |
is_dynamic |
bool | If set, work locations will be picked up |
Origin and Destination object
Name | Type | Description |
---|---|---|
latitude |
double | Latitude |
longitude |
double | Longitude |
distance |
int | Distance radius |
name |
string | User friendly name for the location |
address |
address | Address as picked from locations |
Vehicle View Component object
Name | Type | Description |
---|---|---|
vehicle_view_ids |
[]int | List of eligible vehicle view ids if applicable |
Vehicle Category Component object
Name | Type | Description |
---|---|---|
vehicle_categories |
[]string | List of eligible vehicle categories like ECONOMY, SHARED_RIDES, PREMIUM |
allowed_parent_product_type_id |
[]string | List of allowed overarching Uber product types |
Trip Num Component object
Name | Type | Description |
---|---|---|
max |
string | Maximum number of trips allowed |
period |
string | Period for the max number of trips - DAILY, WEEKLY, MONTHLY |
Time Window Component object
Name | Type | Description |
---|---|---|
start_timestamp |
int | Start timestamp of the time window |
end_timestamp |
int | End timestamp of the time window |
¶ Example Request With category and name as input
curl -X GET -H "Authorization: Bearer <TOKEN>" \
"https://api.uber.com/v1/organizations/<organization_id>/programs?program_name=Business%20travel&program_category=RIDES"
¶ Example Response
{
"programs": [
{
"program_id": "28d64c7e-77f0-442b-bdfa-4b0c20b42bbd",
"name": "Business travel",
"description": "A general Uber for Business programme for business travel.",
"components": {
"per_trip_cap_component": {
"amount": "150",
"currency_code": "USD",
"percentage": 10,
"cap_type": "SOFT"
},
"time_components": [
{
"start_minute": 0,
"end_minute": 1439,
"days_of_week": [1, 2, 3, 4, 5]
}
],
"vehicle_category_component": {
"vehicle_categories": ["SHARED_RIDES", "ECONOMY"],
"allowed_parent_product_type_id": []
},
"trip_num_component": {
"max": "5",
"period": "DAILY"
}
},
"category": "RIDES"
}
]
}
¶ Example Request With only category as input
curl -X GET -H "Authorization: Bearer <TOKEN>" \
"https://api.uber.com/v1/organizations/<organization_id>/programs?program_category=EATS"
¶ Example Response 2
{
"programs": [
{
"program_id": "29bd17dd-a9ca-4ad0-8950-b5405cbb249a",
"name": "Build your own Eats",
"description": "A general Uber for Business programme.",
"components": {
"expense_code_component": {
"is_strict": false,
"is_memo_required": false
}
},
"category": "EATS"
}
]
}
¶ Error Responses
HTTP Status | Code | Description |
---|---|---|
400 | BAD_REQUEST |
request specific message |
401 | NOT_AUTHORIZED |
Caller not authorized to make this request |
500 | INTERNAL_SERVER_ERROR |
We have experienced a problem |