Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎2 - Consumer Related‎ > ‎

Get Voucher

Will get a consumer's voucher by the secret key and the code.  The urls built by the group commerce system will contain both the key and the code in the querystring.

Method: GET /api/v3/publisher/voucher
Authentication: oauth
 
Parameters
Required QueryString Value
Explanation
Yes
Code
The code that is displayed on the voucher.
Yes
SecretKey The secret key for the voucher.

Returns
  base response fields
  voucher - The voucher object.

Sample Request:

GET http://api.groupcommerce.com/api/v3/publisher/voucher?code=P-4118-131-AF0A2&secretKey=r8PffrhdDLCyb6bpqUTJHo7WPIIpnei7PPZBIKryqDI%3d&format=xml

Authorization: OAuth oauth_signature="CVIYd9DNaGCYTKpwMUOyduSXRM0%3d", oauth_nonce="5476245", oauth_timestamp="1320813824", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1319851251455)/",
    "success": true,
    "version": "3",
    "voucher": {
        /*
see voucher */
    }
}


Sample XML Response:

<getVoucherResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-10-29T01:21:24.3165547Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <voucher>
        <!-- see voucher -->
    </voucher>
</getVoucherResponse>
Comments