Welcome‎ > ‎Version 3‎ > ‎Merchant Api‎ > ‎Methods‎ > ‎

Get Vouchers

Will retrieve all vouchers for the merchant with a specific voucher code.  Note that voucher codes are unique per offer, so there could be more than one voucher with the same voucher code if the merchant has run more than one offer.  If no VoucherCode parameter is supplied, returns all vouchers for the merchant.

Method: GET /api/v3/merchant/vouchers/
Authentication: oauth
 
Querystring Parameters
Required QueryString Value
Explanation
No
PageNumber
The page number of results.  Default is 1
No
PageSize
The size of the page.   Default is 10
No
VoucherCode
The voucher code of the vouchers to retrieve.

Returns
base response fields
vouchers - Will return a list of Vouchers.

Sample Request:

--will return a specific voucher code
https://api.groupcommerce.com/api/v3/merchant/vouchers?VoucherCode=P-13380-1-9C4C5

--will return page 2 for all the vouchers for the merchant.
https://api.groupcommerce.com/api/v3/merchant/vouchers?PageSize=10&PageNumber=2

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1324597430483)/",
    "success": true,
    "version": "3",
    "metaData": {
        "pageCount": 1,
        "pageNumber": 1,
        "pageSize": 1,
        "totalItems": 1
    },
    "vouchers": [
        {
            // see Voucher
        }
    ]
}


Sample XML Response:

<getVouchersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-12-30T01:10:39.3047506Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <metaData>
        <pageCount>4</pageCount>
        <pageNumber>4</pageNumber>
        <pageSize>10</pageSize>
        <totalItems>32</totalItems>
    </metaData>
    <vouchers>
        <voucher>
            <!--
see Voucher -->
        </voucher>
        <voucher>
            <!--
see Voucher -->
        </voucher>
    </vouchers>
</getVouchersResponse>
Comments