Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Data Structures‎ > ‎

Imported Voucher

Data Structure holding information for an imported voucher.

Upcoming: ImporterVoucher.priceAmount and ImporterVoucher.originalPriceAmount will be released on February 5, 2013. These fields are intended to replace ImporterVoucher.price and ImporterVoucher.originalPrice respectively, which will be deprecated in the coming months.

Fields:
Field Data Type Nulls Description
consumerMarkedRedeemed bool

Whether or not the consumer of this voucher has marked it as redeemed.
externalResource
string
Y
A url or filename of the voucher itself.
importedVoucherId int

The id of the imported voucher.
merchantRedeemed bool

Whether or not the merchant has marked this voucher as redeemed.
merchantName string
Y
The name of the merchant that sold this voucher.
originalPrice
string
Y
The original price of the voucher.
originalPriceAmountCurrency The original price of the voucher. 
price string
Y
The price of the voucher.
priceAmountCurrency The price of the voucher.
quantity int
Y
The number of units that were purchased on the voucher.
userKey    string
 
The user key for the consumer the voucher is for.
voucherCode string
Y
The voucher code.
voucherTitle string
Y
The voucher title.
 

Sample JSON Response:
 {
     "consumerMarkedRedeemed": false,
     "externalResource": "asdfasdf.pdf",
     "importedVoucherId": 64,
     "merchantName": "the merchant",
     "merchantRedeemed": false,
     "originalPrice": "25",
     "originalPriceAmount": { 
         /* see currency */
     },
     "price": "25",
     "priceAmount": { 
         /* see currency */
     },
     "quantity": 2,
     "voucherCode": "lolcode",
     "voucherTitle": "voucher title"
 }


Sample XML Response:
<importedVoucher>
      <consumerMarkedRedeemed>false</consumerMarkedRedeemed>
      <externalResource i:nil="true" />
      <importedVoucherId>65</importedVoucherId>
      <merchantName i:nil="true" />
      <merchantRedeemed>false</merchantRedeemed>
      <originalPrice>34</originalPrice>
          <originalPriceAmount>
          <!-- see currency -->
      </originalPriceAmount>    
      <price>34</price>
      <priceAmount>
          <!-- see currency -->
      </priceAmount>  
      <quantity>2</quantity>
      <voucherCode>asdfasdfasdf</voucherCode>
      <voucherTitle>asdfasdf</voucherTitle>
</importedVoucher>

Comments