OrderCreateRequest OrderItem Examples
OrderCreateRequest OrderItem Examples
The OrderItem
elements can contain a wide range of information. Below are
some examples of different types of items or different OrderItem
fields.
Ship To Home
The How to Build an Order Create API Request
page uses a simple ship to home OrderItem
in its example.
Ship To Store
A customer can choose to have an item shipped to a store near them where they
can pick it up. The destination for the item will be a StoreLocation
. See the
store location shipping example.
A ship to store item may have ProxyPickupDetails
which defines an alternate
person that can pickup the item.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<OrderItems>
<OrderItem id="orderItem1"
webLineId="1">
<ItemId>12-345</ItemId>
...
<ShippingMethod displayText="Standard Ground">STS_SGND</ShippingMethod>
<!-- see NOTE1 -->
<FulfillmentChannel>SHIP_TO_STORE</FulfillmentChannel> <!-- see NOTE2 -->
<ProxyPickupDetails> <!-- see NOTE3 -->
<FirstName>Jane</FirstName> <!-- see NOTE4 -->
<LastName>Doe</LastName> <!-- see NOTE5 -->
<Email>janedoe@gsicommerce.com</Email> <!-- see NOTE6 -->
<Phone>555-555-5555</Phone> <!-- see NOTE7 -->
<Relationship>Wife</Relationship> <!-- see NOTE8 -->
</ProxyPickupDetails>
...
</OrderItem>
</OrderItems>
...
</Order>
...
</OrderCreateRequest>
NOTE1 | This is an example of a ship to store ShippingMethod . |
NOTE2 | The FulfillmentChannel is SHIP_TO_STORE. |
NOTE3 | An optional ProxyPickupDetails can be included to allow someone else to
pickup the order from the store. |
NOTE4 | The first name of the additional person allowed to pickup the order. |
NOTE5 | The last name of the additional person. |
NOTE6 | The email address of the additional person. |
NOTE7 | The phone number of the additional person. |
NOTE8 | The relationship of the additional person to the customer in the order. |
Virtual Gift Card
Virtual or electronic gift cards can be sent to emails. See the
Email shipping example for what
the shipping section looks like. This example will show what the OrderItem
itself looks like for a virtual gift card.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<OrderItems>
<OrderItem id="orderItem1"
webLineId="1">
<ItemId>12-345</ItemId>
...
<ShippingMethod displayText="Email delivery">ANY_EMAIL</ShippingMethod>
<!-- see NOTE1 -->
<Gifting> <!-- see NOTE2 -->
<GiftCard>
<Message>
<To>Jane</To>
<From>John</From>
<Message>Enjoy the gift card</Message>
</Message>
</GiftCard>
</Gifting>
...
</OrderItem>
</OrderItems>
...
</Order>
...
</OrderCreateRequest>
NOTE1 | The ShippingMethod is ANY_EMAIL since we will be emailing it. |
NOTE2 | The Gifting element contains a GiftCard with a To , From , and
Message . This is not required. |
Customizations
An item can contains multiple customizations as described in this example.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<OrderItems>
<OrderItem id="orderItem1"
webLineId="1">
<ItemId>12-345</ItemId>
...
<Customization>
<Customizations>
<Customization> <!-- see NOTE1 -->
<CustomizationId>1</CustomizationId> <!-- see NOTE2 -->
<Instructions>
<Instructions> <!-- see NOTE3 -->
<Key>123</Key> <!-- see NOTE4 -->
<Value>456</Value> <!-- see NOTE5 -->
</Instructions>
</Instructions>
<ExtendedPrice> <!-- see NOTE6 -->
<Amount>1.23</Amount>
<TaxData>...</TaxData>
<UnitPrice>1.23</UnitPrice>
</ExtendedPrice>
<ItemId>12-678</ItemId> <!-- see NOTE7 -->
</Customization>
</Customizations>
</Customization>
...
</OrderItem>
</OrderItems>
...
</Order>
...
</OrderCreateRequest>
NOTE1 | A Customization element on the item, there can be multiple. |
NOTE2 | An optional value used to group customization instructions into logical sets. |
NOTE3 | An instruction for this customization. There can be multiple. The webstore and warehouse need to be on the same page with regard to the possible key/value pairs these instructions can contain. |
NOTE4 | The key to identify the type of customization instruction. |
NOTE5 | Represents the single piece of information associated with the instruction. |
NOTE6 | An optional charge associated to the given customization. |
NOTE7 | An identifier used to identify the item used for customization. |
Miscellaneous Elements
Below are some additional fields that can be included as part of an item.
<?xml version="1.0" encoding="UTF-8"?>
<OrderCreateRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
requestId="123456789">
<Order customerOrderId="12345">
...
<OrderItems>
<OrderItem id="orderItem1"
webLineId="1">
<ItemId>12-345</ItemId> ...
<DeliveryInstructions>Leave under the front doormat.</DeliveryInstructions>
<!-- see NOTE1 -->
<Gifting> <!-- see NOTE2 -->
<Packslip>
<Message>
<To>Jane</To>
<From>John</From>
<Message>Happy birthday</Message>
</Message>
</Packslip>
</Gifting>
...
</OrderItem>
</OrderItems>
...
</Order>
...
</OrderCreateRequest>
NOTE1 | Delivery instructions can be attached to an item. |
NOTE2 | An item can have a Gifting element which can contain various things like
this gift message. Alternatively, a ShipGroup can have
Gifting elements as well. See the
shipping gifting example. |