Redeem Voucher Code
POSThttps://api.uber.com/v1.2/me/vouchers/redeem
¶ Use Case
The Redeem Code endpoint allows you to apply voucher code to a user.
¶ Authorization
The Redeem Code endpoint requires an authorization
code valid for the scope vouchers.redeem
.
¶ Request Parameters
Name | Type | Optional | Description |
---|---|---|---|
code_text |
string | No | The code_text will be redeemed and generate a voucher |
¶ Response Fields
Name | Type | Optional | Description |
---|---|---|---|
voucher_id |
string | No | The voucher_id of the voucher |
¶ Example Request
curl -X POST
-H 'Authorization: Bearer <TOKEN>' \
-H 'Accept-Language: en_US' \
-H 'Content-Type: application/json' \
-d '{"code_text":"<code_text>"}' \
https://api.uber.com/v1.2/me/vouchers/redeem
¶ Example Response
Status-Code: 200 OK
{
"voucher_id" : "<voucher_id>"
}
¶ Error Responses
HTTP Status | Code | Description |
---|---|---|
400 | redeem_count_exceeded |
Redeem count is exceeded |
400 | voucher_program_inactive |
Voucher program is inactive |
404 | resource_not_found |
Voucher program is not found |
409 | code_already_redeemed |
Code has already been redeemed |
500 | internal_server_error |
We have experienced a problem |