Radial Integration | 2016
The Shipping
element in OrderCreateRequest
can contain different
Destinations
element types depending on the destination type. Each of these
types have different information that is expected. This page includes
examples of different destination types.
The How to Build an Order Create API Request page uses a mailing address in its example.
A StoreLocation
can be used for things such a ship to store.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<Shipping>
<ShipGroups>
<ShipGroup chargeType="FLATRATE"
id="shipGroup1">
<DestinationTarget ref="storelocation1"/> (1)
<OrderItems>
<Item ref="orderItem1"/>
</OrderItems>
</ShipGroup>
</ShipGroups>
<Destinations>
<StoreLocation id="storelocation1"> (2)
<StoreCode>123</StoreCode> (3)
<StoreName>King of Prussia</StoreName> (4)
<StoreEmail>store123@gsicommerce.com</StoreEmail> (5)
<Address> (6)
<Line1>935 1st Ave</Line1>
<City>King of Prussia</City>
<MainDivision>PA</MainDivision>
<CountryCode>US</CountryCode>
<PostalCode>19406</PostalCode>
</Address>
</StoreLocation>
</Destinations>
</Shipping>
...
</Order>
...
</OrderCreateRequest>
1 | The destination for the ship group. Notice this can be a reference to a
StoreLocation (required). |
2 | A StoreLocation destination. It contains an id attribute that can be used
in references elsewhere, like the DestinationTarget above. |
3 | A unique string that identifies the specific store. |
4 | The name of the store or the way the store is referred to. |
5 | The email address to contact the store. |
6 | The address where the store is located. |
An Email
can be used as a destination for items like electronic gift cards.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<Shipping>
<ShipGroups>
<ShipGroup chargeType="FLATRATE"
id="shipGroup1">
<DestinationTarget ref="email1"/> (1)
<OrderItems>
<Item ref="orderItem1"/>
</OrderItems>
</ShipGroup>
</ShipGroups>
<Destinations>
<Email id="email1"> (2)
<EmailAddress>janedoe@gsicommerce.com</EmailAddress> (3)
</Email>
</Destinations>
</Shipping>
...
</Order>
...
</OrderCreateRequest>
1 | The destination for the ship group. Notice this can be a reference to an
Email (required). |
2 | An Email destination. It contains an id attribute that can be used in
references elsewhere, like the DestinationTarget above. |
3 | The email address to email the purchased item to. |
You can add a ShipGroup
level Gifting
element, in the same way that you can on OrderItem
elements. This represents gift instructions to an entire ship group. The example
below is just one type of Gifting
element.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<Shipping>
<ShipGroups>
<ShipGroup chargeType="FLATRATE"
id="shipGroup1">
<DestinationTarget ref="email1"/>
<OrderItems>
<Item ref="orderItem1"/>
</OrderItems>
<Gifting>
<Packslip>
<Message>
<To>Jane</To>
<From>John</From>
<Message>Happy birthday</Message>
</Message>
</Packslip>
</Gifting>
</ShipGroup>
</ShipGroups>
<Destinations>
<Email id="email1">
<EmailAddress>janedoe@gsicommerce.com</EmailAddress>
</Email>
</Destinations>
</Shipping>
...
</Order>
...
</OrderCreateRequest>
Copyright © 2017 Radial. All rights reserved.