Three lines

Uber

Developers

Get Voucher Program Guest Info

GEThttps://api.uber.com/v1/organizations/{organization_id}/voucher-programs/{voucher_program_id}/guests

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 Program Guest Info endpoint allows you to get a list of all program guests with guest info, code info and voucher info.

Note: Guest information will only appear for Uber distributed vouchers, which means guests email/phone were manually added to a program using the Add Guests to Voucher Program endpoint.

Authorization

The Get Voucher Program Guest Info 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.
voucher_program_id string No The voucher_program_id returned back in the create voucher program call which identifies the voucher program created.
Request Query parameters
Name Type Optional Description
limit int Yes Paging limit for the response
page_token string Yes Identifier for the next response page you would like to receive. A token will be returned if number of responses is greater than the supplied limit.
Response Fields
Name Type Description

guests

(

name,

phone,

email,

code,

voucher,

next_token

)

List

 

String

String

String

Object

Object

String

 

List of guests structs containing guest info, codes, voucher info and corresponding usage data for this voucher program.

 

Name: Name of the matched user

Phone: Phone number of the added guest

Email: Email of the added guest

Code: Corresponding Code details

Voucher: Corresponding Voucher details. Will be empty if Voucher has not been claimed.

Next_token: Identifier to retrieve the next set of responses based on the pased in limit

 

code

(

code_id,

code_text

)

 

 

String

String

 

Object that contains Code specific information for this Guest

 

code_id: Unique identifier for this code

code_text: Text identifier for this code

 

voucher

(

voucher_id,

usage_count,

usage_amount,

voucher_status,

canceled_at

)

 

 

String

int

float

String

int

 

Object that contains Voucher specific information for this Guest

 

voucher_id: Unique identifier for this voucher

usage_count: Total number of trips taken using voucher code

usage_amount: Total amount spent using voucher code

voucher_status: Current status of this Voucher

canceled_at: Will be set only if Voucher was canceled. Given as milliseconds since Unix Epoch.

 

Example Request
curl -H 'Authorization: Bearer <TOKEN>' \
     -H 'Accept-Language: en_US' \
     -H 'Content-Type: application/json' \
     -X GET
     'https://api.uber.com/v1/organizations<:organization_id>/voucher-programs/<voucher_program_id>/guests?limit=10'
Example Response

Status-Code: 200 OK

{
  "guests": [
    {
      "name": "John Doe",
      "email": "john.doe@uber.com",
      "phone": "11234567890",
      "code": {
        "code_id": "1d6b34d1-1f06-4cb6-a97a-8bbfdcff119c",
        "code_text": "asdbHd2",
      },
      "voucher": {
        "voucher_id": "d8b75c60-4924-42a0-bfa1-6390682afdb2",
        "voucher_status": "VOUCHER_CLAIMED",
        "usage_count": 20,
        "usage_amount": "200",
        "canceled_at": 0
      }
    },
    {
      "email": "jane.doe@uber.com",
      "phone": "11234567890",
      "code": {
        "code_id": "b05416c0-01cd-52fa-a04e-24f9aaaddc43",
        "code_text": "asdbHd5",
      },
      "voucher": {
        "voucher_status": "VOUCHER_SENT"
      }
    }
  ]
}
Voucher Statuses
Status Description
VOUCHER_SENT An attempt was made to send voucher to the corresponding guest
VOUCHER_CLAIMED The voucher was claimed by the guest
VOUCHER_COMPLETED The vouchers full amount was used by the recipient
VOUCHER_CANCELED Voucher was canceled
VOUCHER_SCHEDULED Voucher is scheduled to send to the corresponding guest
VOUCHER_PENDING Voucher distribution is pending due to organization review
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 Voucher program is not found
500 internal_server_error We have experienced a problem

Uber

Developers
© 2023 Uber Technologies Inc.