API Documentation v2

Name

voucher/redeem

Description

Redeems a voucher by code or token.

URL

https://www.spreebird.com/api/v2/voucher/redeem.xml

Supported Request Method

GET

Supported Return Formats

JSON (default), XML

Parameters

Required

api_key, email, code

Optional

ticket_value, force

Example Responses

JSON (default)

{     "response":{         "transaction_id":"da633151747a7281ee7f8b4fda272c77",         "requested_at":"2010-02-23 21:03:29",         "method":"voucher\/redeem",         "code":"0000000000",         "offer":"Good for $20 in awesome food!",         "terms":"Must be redeemed in one visit\nNot valid during happy hour\nCannot be combined with any other offer",         "name":"John Doe",         "face_value":"10.00",         "voucher_value":"20.00",         "ticket_value":"",         "voucher_status":"REDEEMED",         "activated_at":"2012-02-23 04:00:00",         "expired_at":"2012-12-31 23:59:59",         "redeemed_at":"2012-06-09 14:45:33",         "message":"Voucher has been redeemed successfully!"     } }

XML

<?xml version="1.0" encoding="UTF-8"?> <response>     <transaction_id>da633151747a7281ee7f8b4fda272c77</transaction_id>     <requested_at>2010-02-23 21:03:29</requested_at>     <method>voucher/redeem</method>     <code>0000000000</code>     <offer>Good for $20 in awesome food!</offer>     <terms>Must be redeemed in one visit Not valid during happy hour Cannot be combined with any other offer</terms>     <name>John Doe</name>     <face_value>10.00</face_value>     <voucher_value>20.00</voucher_value>     <ticket_value></ticket_value>     <voucher_status>REDEEMED</voucher_status>     <activated_at>2012-02-23 04:00:00</activated_at>     <expired_at>2012-12-31 23:59:59</expired_at>     <redeemed_at>2012-06-09 14:45:33</redeemed_at>     <message>Voucher has been redeemed successfully!</message> </response>