Search Voucher Programs
POSThttps://api.uber.com/v1/organizations/{organization_id}/voucher-programs/search
¶ Use Case
The Search Voucher Programs endpoint allows you to search voucher programs for listing purposes and supports paging. There is an optional status filter.
¶ Authorization
The Search Voucher Programs endpoint requires an access_token using the client credentials
grant to organizations.voucher_programs
scope or using authorization_code
to organizations.voucher_programs.delegated
scope.
If an application follows third party authentication, this endpoint requires organizations.voucher_programs.aggregator
scope with the grant type as client_credentials
.
¶ Path Parameters
Name | Type | Optional | Description |
---|---|---|---|
organization_id |
string | No | Identifier for the organization the developer is part of and the entity that owns this voucher program. Should be known to developer when their organization was onboarded to Uber For Business. |
¶ Request Parameters
Name | Type | Optional | Description |
---|---|---|---|
program_status |
string | Yes | Filter for specific status. Valid inputs: [UPCOMING, ACTIVE, COMPLETE, CANCELED] |
limit |
int | No | Paging - limit |
offset |
int | No | Paging - offset |
¶ Response Fields
Name | Type | Description |
---|---|---|
voucher_program_id | string | Unique identifier for Voucher Program |
name | string | Program Default Name |
status | string | Program Status [Upcoming, Active, Complete, Canceled] |
total_dollar_exposure | float | Program Total dollar exposure |
currency_code | string | Currency of the offer value (in ISO 4217 format) |
starts_at | int | Time the voucher program starts/started |
ends_at | int | Time the voucher program ends/ended |
created_at | int | Time the voucher program was created |
voucher_type | string | Program Product type [PERSONAL_TRANSPORT, EATS, GENERIC_VOUCHER] |
code_scheme | string | Program Code Scheme [SINGLE_CODE_MULTI_REDEEM, MULTI_CODE_SINGLE_REDEEM] |
¶ Example Request
curl -H 'Authorization: Bearer <TOKEN>' \
-H 'Accept-Language: en_US' \
-H 'Content-Type: application/json' \
-X POST
'https://api.uber.com/v1/organizations/<organization_id>/voucher-programs/search'\
-d '{
"program_status": "ACTIVE",
"limit": 10,
"offset": 0
}'
¶ Example Response
Status-Code: 200 OK
{
"results": [
{
"voucher_program_id": "abcd-xyzz-1234-987x",
"name": "Uber Adventures",
"status": "ACTIVE",
"total_dollar_exposure": 1050.5,
"currency_code": "USD",
"starts_at": 2394329043,
"ends_at": 2395430934,
"created_at": 239100000,
"voucher_type": "PERSONAL_TRANSPORT",
"code_scheme": "SINGLE_CODE_MULTI_REDEEM"
},
{
"voucher_program_id": "asdf-jkls-emic-olon",
"name": "SO_HUNGRY",
"status": "ACTIVE",
"total_dollar_exposure": 2050,
"currency_code": "USD",
"starts_at": 2394329043,
"ends_at": 2395430934,
"created_at": 239100000,
"voucher_type": "EATS",
"code_scheme": "MULTI_CODE_SINGLE_REDEEM"
}
]
}
¶ Error Responses
HTTP Status | Code | Description |
---|---|---|
400 | invalid_request |
This request is invalid |
403 | user_not_allowed |
User is not authorized for api access |
403 | unauthorized |
Requester not allowed to perform requested action. When the third party app (3P) is not authorized by the U4B organization |
404 | resource_not_found |
Organization is not found |
500 | internal_server_error |
We have experienced a problem |