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

Order Detail

Data Structure holding detailed information about a order.  It includes the recipients of the voucher as well as all the vouchers created for that user.  This object will contain the offer id and the offer option id.  Use the list of offers on the Order object to get additional details about this order detail.

Fields:
Field Data Type Nulls Description
firstName
string

The first name of the person the voucher is registered to.
items
list
 The list of items that were attempted to be purchased. 
isGift bool
Value that determines if this order detail was a gift.
lastName string

The last name of the person the voucher is registered to.
offerId int
  The offer id the order detail is associated with.
offerOptionId
int
  The offer option id the order detail is associated with.
price Currency

The unit price (price per quantity) for this detail item.
quantity
int
  The number of items that were attempted to be purchased. Check the vouchers list for the number that were actually created.
segmentKey string
  The segment key for the order detail.
shippingAddress Address
Y The address the associate order will ship to.
vouchers list

Contains the list of vouchers assigned to this person.  This will contain multiple vouchers if there were multiple purchases.  If a consumer buys 3 of an offer there will be 3 vouchers listed in this list.
 
Voucher:
Field Data Type Nulls Description
consumerMarkedRedeemed bool
Whether or not the consumer of this voucher has marked it as redeemed (not an official redemption - just for display purposes).
consumerName string
  The name of the person the voucher is registered to.
expirationDate
datetime
Y  Will contain the expiration date.  Null implies expiration date might be found in the fine print.
merchantRedeemed bool
  Whether or not the merchant for this voucher has marked it as redeemed (an official redemption).
offerId int
The offer id the voucher is for.
offerOptionId int
The offer option id the voucher is for.
redemptionUrl
string
Y
If the voucher is redeemable online, this will contain the url.
refundDate
datetime Y
Gets the date the item was refunded.  Null is not refunded.
segmentKey string
The segment key the offer was purchased on.
shippingProvider
string
  The carrier.  One of { None, USPS, DHL, FedEx }.
shippingTrackingNumber
string
Y
The tracking number issued by the shipping provider.
shippingTrackingUrl
string
Y
Returns the tracking url for this shipment order. Will be null if the item doesn't require shipping or has not shipped yet.
userKey string Y
The userkey of the user making the purchase.  This can be used for additional security to ensure the correct user is looking at a voucher. Will only be null on a preview request.
voucherCode string Y
The code printed on the voucher.  Will be null if the voucher has been refunded.
voucherCodeImageDisplayFormat
string
Y
The voucher code format. Ex: Qr code, Code 128.  One of { QrCode, Barcode }
voucherPin string Y The voucher pin used for pay-on-redemption vouchers.
voucherUrl
string
Y If the voucher can be printed, this will contain the url.

Sample JSON Response:
{
    "firstName": "Sylvester",
    "items" [
        /* see item
*/
    ],
    "isGift": false,
    "lastName": "Martin",
    "offerId": 5734,
    "offerOptionId": 5640,
    "price": {
        /* see currency */
    },
    "quantity": 1,
    "segmentKey": "national",
    "shippingAddress": {
        /* see address */
    },
    "vouchers": [
        {
            "code": "P-4118-131-AF0A2",
            "expirationDate": "/Date(1353283200000)/",
            "redemptionUrl": null,
            "voucherUrl": "http://dailyvoicetest.groupcommerce.com/voucher?SecretKey=r8PffrhdDLCyb6bpqUTJHo7WPIIpnei7PPZBIKryqDI%3d&Code=P-4118-131-AF0A2"
        }
    ]
}



Sample XML Response:
<orderDetail>
    <firstName>Sylvester</firstName>
    <items>
        <!-- see item -->
    </items>
    <isGift>false</isGift>
    <lastName>Martin</lastName>
    <offerId>5734</offerId>
    <offerOptionId>5640</offerOptionId>
    <price>
        <!--
see currency -->
    </price>
    <segmentKey>national</segmentKey>
    <shippingAddress>
        <!--
see address -->
    </shippingAddress>
    <vouchers>
        <voucher>
            <code>P-7417-3-7188D</code>
            <redemptionUrl i:nil="true"/>
            <voucherUrl>http://dailyvoicetest.groupcommerce.com/voucher?SecretKey=xHCPdamttz4ITKh250FCzZ2vaOqkSFU67HsifvaTocw%3d&amp;Code=P-7417-3-7188D</voucherUrl>
        </voucher>
    </vouchers>
</orderDetail>

Comments