Radial Integration | 2016

Retail Order Management > Order Processing > Order Management API Tutorial > How to Build an Order Create API Request > 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> (1)
                <FulfillmentChannel>SHIP_TO_STORE</FulfillmentChannel> (2)
                <ProxyPickupDetails> (3)
                    <FirstName>Jane</FirstName> (4)
                    <LastName>Doe</LastName (5)
                    <Email>janedoe@gsicommerce.com</Email> (6)
                    <Phone>555-555-5555</Phone> (7)
                    <Relationship>Wife</Relationship> (8)
                </ProxyPickupDetails>
                ...
            </OrderItem>
        </OrderItems>
        ...
    </Order>
    ...
</OrderCreateRequest>
1 This is an example of a ship to store ShippingMethod.
2 The FulfillmentChannel is SHIP_TO_STORE.
3 An optional ProxyPickupDetails can be included to allow someone else to pickup the order from the store.
4 The first name of the additional person allowed to pickup the order.
5 The last name of the additional person.
6 The email address of the additional person.
7 The phone number of the additional person.
8 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> (1)
                <Gifting> (2)
                    <GiftCard>
                        <Message>
                            <To>Jane</To>
                            <From>John</From>
                            <Message>Enjoy the gift card</Message>
                        </Message>
                    </GiftCard>
                </Gifting>
                ...
            </OrderItem>
        </OrderItems>
        ...
    </Order>
    ...
</OrderCreateRequest>
1 The ShippingMethod is ANY_EMAIL since we will be emailing it.
2 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> (1)
                            <CustomizationId>1</CustomizationId> (2)
                            <Instructions>
                                <Instructions> (3)
                                    <Key>123</Key> (4)
                                    <Value>456</Value> (5)
                                </Instructions>
                            </Instructions>
                            <ExtendedPrice> (6)
                                <Amount>1.23</Amount>
                                <TaxData>...</TaxData>
                                <UnitPrice>1.23</UnitPrice>
                            </ExtendedPrice>
                            <ItemId>12-678</ItemId> (7)
                        </Customization>
                    </Customizations>
                </Customization>
                ...
            </OrderItem>
        </OrderItems>
        ...
    </Order>
    ...
</OrderCreateRequest>
1 A Customization element on the item, there can be multiple.
2 An optional value used to group customization instructions into logical sets.
3 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.
4 The key to identify the type of customization instruction.
5 Represents the single piece of information associated with the instruction.
6 An optional charge associated to the given customization.
7 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> (1)
                <Gifting> (2)
                    <Packslip>
                        <Message>
                            <To>Jane</To>
                            <From>John</From>
                            <Message>Happy birthday</Message>
                        </Message>
                    </Packslip>
                </Gifting>
                ...
            </OrderItem>
        </OrderItems>
        ...
    </Order>
    ...
</OrderCreateRequest>
1 Delivery instructions can be attached to an item.
2 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.

 

Copyright © 2017 Radial. All rights reserved.