Three lines

Uber

Developers

Get Voucher Template

GEThttps://api.uber.com/v1/organizations/{organization_id}/voucher-program-templates/{template_id}

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

Use Case

The Get Voucher Template endpoint allows you to get the details of a particular voucher template.

Authorization

The Get Voucher Template 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.
template_id string No The template_id returned back in the create voucher template call which identifies the voucher template created.
Response Fields
Name Type Description
creator_uuid string Template Creator uuid
created_at int Template Creation time from epoch in milliseconds
is_disabled boolean True if Template has been disabled
template_name string Template Name
campaign_name string Default Campaign Name
timezone string Timezone of the voucher program. List of valid timezones as input can be seen under the ‘TZ’ column here, https://en.wikipedia.org/wiki/List_of_tz_database_time_zone. If no Timezone is set, the default timezone of UTC will be used and returned back in the get call.
currency_code string Currency of the offer value (in ISO 4217 format)
is_fully_covered boolean True if trips are fully covered
trip_restriction_type string

This can be set to 4 string values below.

PICKUP_OR_DROPOFF -. Restrict voucher program trips to start from the pickup or end from the dropoff. Both pickup and dropoff params need to be populated for this otherwise an error is thrown. This will be a default value if trip_restriction_type is not provided

PICKUP_AND_DROPOFF - Restrict voucher program trips to start from the pickup and end from the dropoff. Both pickup and dropoff params need to be populated for this otherwise an error is thrown.

PICKUP_ONLY - Trips must start from one of the pickup locations passed in. If no pickup locations are given an error message will be thrown.

DROPOFF_ONLY - Trips must end in one of the dropoff locations. If no dropoff locations are given then an error message will be thrown.

pickup_locations list

List of pickup location structs where each location struct is defined as:

longitude - float

latitude - float

radius - int (meters) (minimum of 20 meters)

address - string (address is displayed to the users and is a mandatory field in location)

This is mandatory if the location_policy_type is defined as PICKUP_OR_DROPOFF, PICKUP_AND_DROPOFF, or PICKUP_ONLY

dropoff_locations list

List of dropoff location structs where each location struct is defined as:

longitude - float

latitude - float

radius - int (meters) (minimum of 20 meters)

address - string (address is displayed to the users and is a mandatory field in location)

This is mandatory if the location_policy_type is defined as PICKUP_OR_DROPOFF, PICKUP_AND_DROPOFF, or DROPOFF_ONLY

value_per_trip_deductible float

Dollar amount of the trip fare that will be charged to the rider before being charged to the voucher issuer. The default value is 0. If this field is set,‘value_per_trip_percentage may not be set and defaults to 0.

Ex: If set to 2, and value_per_trip_max_amount is set to 30, the rider will be charged for the first $2 and the voucher issuer will be charged for the next $30. Any amount over $32 will also be charged to the rider.

value_per_trip_percentage int

Percentage of the trip fare that will be charged to the voucher issuer. The range for this field is [5, 99]. The default value is one hundred. If this field is customized, value_per_trip_deductible is disallowed to set non-default values. If value_per_trip_max_amount is set, that value is respected over the percentage.

Ex: If set to 20, and value_per_trip_max_amount is set to 5 then: for a $10 fare, $2 will be charged to the voucher issuer. For a $30 fare, $5 will be charged to the voucher issuer.

value_per_trip_max_amount float Maximum dollar amount each voucher can cover on each trip fare. Any overage amount will be charged to the rider. This field is required unless value_per_period_max_credit is set, in which case it will be set to value_per_period_max_credit.
value_recurrence_period string

Unit specifying the recurrence period of each voucher’s trip or credit allowance. The default value is ‘SINGLE’, which means no recurrence. Can be set to ‘DAILY’ or ‘MONTHLY’.

Ex: If set to ‘SINGLE’ and value_per_period_max_credit is set to 50, then each voucher can be used redeem to $50 total during the active window.

Ex: If set to DAILY and value_per_period_max_trips is set to 5, then each rider can take 5 trips a day on vouchers under this program.

Ex: If set to MONTHLY and value_per_period_max_trips is set to 5, then each rider can take 5 trips a month on vouchers under this program.

value_per_period_max_trips int

Maximum number of trips a rider can take, per period, on vouchers under this program. If this field is set, value_per_period_max_credit may not be set.

Ex: If set to 5 and value_recurrence_period is set to ‘SINGLE’, each rider can use a voucher under this program on 5 trips total. If value_recurrence_period is set to ‘MONTHLY, each rider can take 5 trips on this voucher each month.

value_per_period_max_credit float

Maximum amount of dollar credit that can be redeemed on a each voucher under this program, per period. If this field is set, value_per_period_max_trips may not be set. The currency that this amount is set in is defined by the currency_code field.

Ex: If set to 100, currency_code set to USD, and value_recurrence_period set to ‘SINGLE’, then: each voucher under this program can be used to redeem up to $100 USD during the active window.

voucher_type string

Specifies the product the voucher can be used for.

Possible values are one of the below:

PERSONAL_TRANSPORT

Voucher used for Uber Rides

EATS

Voucher used for Uber Eats

GENERIC_VOUCHER

Voucher used for Uber Rides or Uber Eats

vehicle_category_types list<string>

A list of vehicle categories specifies the vehicle category types allowed on a voucher trip. If this field is not set with valid vehicle categories, there will be no restrictions on vehicle types for the trip.

Possible values are one or combinations of the enum strings below:

PREMIUM

The premium vehicle category includes Black and BlackSUV

ECONOMY

The economy vehicle category includes UberX and UberXL

SHARED_RIDES

The shared vehicle category includes Pool

timing_restrictions list<object>

(

start_minute - [int] - Start of time window (from start of day, in minutes)

end_minute - [int] - End of time window

days_of_week - [list<int>] - Represents each day of the week that this restriction applies to

)

Example Request
curl -H 'Authorization: Bearer <TOKEN>'
     -H 'Accept-Language: en_US'
     -H 'Content-Type: application/json'
     'https://api.uber.com/v1/organizations/<organization_id>/voucher-program-templates/<template_id>'
Example Response

Status-Code: 200 OK

{
  "template":
  {
    "creator_uuid": "<creator_uuid>"
    "is_disabled": false,
    "campaign_name": "<campaign_name>"
    "template_name": "<template_name>",
    "timezone": "EST",
    "currency_code": "USD",
    "is_fully_covered": true,
    "trip_restriction_type": "PICKUP_OR_DROPOFF",
    "pickup_locations": [
      {
        "latitude": 37.9956,
        "longitude": -123.0234,
        "radius": 1400,
        "address": "Point Reyes Lighthouse"
      }
    ],
    "dropoff_locations": [
      {
        "latitude": 37.997,
        "longitude": -123.018,
        "radius": 1600,
        "address": "27000 Sir Francis Drake Blvd"
      }
    ],
    "created_at": 1648222300,
    "value_per_trip_deductible": 0,
    "value_per_trip_percentage": 10,
    "value_per_trip_max_amount": 100.0,
    "value_recurrence_period": "WEEKLY",
    "value_per_period_max_trips": 10,
    "voucher_type": "EATS",
    "vehicle_category_types": ["Premium"],
    "timing_restrictions": [
      {
        "start_time": 0,
        "end_time": 15,
        "days_of_the_week": [1,3,4]
      }
    ]
  }
}
Error Responses
HTTP Status Code Description
400 invalid_request This request is invalid
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 Voucher template is not found
500 internal_server_error We have experienced a problem

Uber

Developers
© 2023 Uber Technologies Inc.