Before modifying an order, a system must submit an Order Detail request for the order. The Order Detail response contains the current detailed data for the order. In addition, the response includes new elements that reveal what kind of modifications are possible for the order.

  • The updatable flag indicates whether the order itself is eligible for modification
  • The AllowedUpdateTypes elements show what categories of data are eligible for modification

Is The Order Updateable?

The updatable parameter (Xpath: /OrderDetailResponse/Order/@updatable) indicates whether an order can be updated.

  • If updatable="true", the order can be updated. In a front end application, you might enable an Update Order button for the order.
  • If updatable="false", the order cannot be updated. An attempt to create an Order Modification Hold with the Order Hold API would result in an error response. In a front end application, you should disable or hide an Update Order button for the order.

What Order Data Can Be Updated?

To find out what data can be updated at the order level, read the AllowedUpdateTypes element for the order (Xpath: /OrderDetailResponse/Order/AllowedUpdateTypes). The following example shows update types at the order level.

Copy
<AllowedUpdateTypes>
    <UpdateType name="REMOVE_PROMOTION" allowed="true"></UpdateType>
    <UpdateType name="CHANGE_INSTRUCTION" allowed="true"></UpdateType>
    <UpdateType name="PAYMENT_STATUS" allowed="true"></UpdateType>
    <UpdateType name="HOLD" allowed="true"></UpdateType>
    <UpdateType name="ADD_LINE" allowed="true"></UpdateType>
    <UpdateType name="CANCEL" allowed="true"></UpdateType>
    <UpdateType name="TAX" allowed="true"></UpdateType>
    <UpdateType name="PAYMENT_METHOD" allowed="true"></UpdateType>
    <UpdateType name="ADD_INSTRUCTION" allowed="true"></UpdateType>
    <UpdateType name="CHANGE_PROMOTION" allowed="true"></UpdateType>
    <UpdateType name="REFERENCES" allowed="true"></UpdateType>
    <UpdateType name="BILLTO" allowed="true"></UpdateType>
</AllowedUpdateTypes>

What Item Data Can Be Updated?

To find out what data can be updated at the line item level, read the AllowedUpdateTypes element for the line (Xpath: /OrderDetailResponse/Order/OrderItems/OrderItem[X]/AllowedUpdateTypes). The following example shows update types at the line level.

Copy
<AllowedUpdateTypes>
    <UpdateType name="REMOVE_PROMOTION" allowed="false"></UpdateType>
    <UpdateType name="CARRIER" allowed="true"></UpdateType>
    <UpdateType name="CANCEL" allowed="true"></UpdateType>
    <UpdateType name="TAX" allowed="true"></UpdateType>
    <UpdateType name="ADD_INSTRUCTION" allowed="true"></UpdateType>
    <UpdateType name="REFERENCES" allowed="true"></UpdateType>
    <UpdateType name="CARRIER_SERVICE_CODE" allowed="true"></UpdateType>
    <UpdateType name="SHIPTO" allowed="true"></UpdateType>
    <UpdateType name="CHANGE_INSTRUCTION" allowed="true"></UpdateType>
    <UpdateType name="DELETE_LINE_RELATIONSHIP" allowed="true"></UpdateType>
    <UpdateType name="ADD_LINE_RELATIONSHIP" allowed="true"></UpdateType>
    <UpdateType name="ADD_QUANTITY" allowed="true"></UpdateType>
    <UpdateType name="CHANGE_PROMOTION" allowed="false"></UpdateType>
</AllowedUpdateTypes>

Example: Order Detail Request

The following example shows a typical Order Detail request message.

Copy
<?xml version="1.0" encoding="UTF-8"?>
<OrderDetailRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
                    orderType="SALES">
  <CustomerOrderId>000001000750</CustomerOrderId>
</OrderDetailRequest>

Example: Order Detail Response

The following example shows an Order Detail response message with the new AllowedUpdateTypes elements.

Copy
<?xml version="1.0" encoding="UTF-8"?>
<OrderDetailResponse xmlns="http://api.gsicommerce.com/schema/checkout/1.0" orderType="SALES"
                    cancellable="true">
   <Order customerOrderId="0002500000397006" levelOfService="REGULAR" updatable="true">
      <Customer customerId="0000400000460106">
         <Name>
            <LastName>TEST</LastName>
            <FirstName>TEST</FirstName>
         </Name>
         <EmailAddress>test@dashboard.gsi</EmailAddress>
         <CustomerTaxId/>
         <TaxExemptFlag>false</TaxExemptFlag>
      </Customer>
      <CreateTime>2015-06-16T14:32:46+00:00</CreateTime>
      <OrderItems>
         <OrderItem id="item2015061614324777699014" webLineId="1"
                    taxAndDutyDisplay="CONSOLIDATED_TAXES_ONLY">
            <ItemId>21-5192803</ItemId>
            <Quantity>2</Quantity>
            <Description>
               <Description>Clear Pads</Description>
            </Description>
            <Pricing>
               <Merchandise>
                  <Amount>17.98</Amount>
                  <TaxData>
                     <TaxClass>76800</TaxClass>
                     <Taxes>
                        <Tax taxType="SELLER_USE" taxability="TAXABLE">
                           <Situs>DESTINATION</Situs>
                           <Jurisdiction jurisdictionLevel="STATE" jurisdictionId="31152">PENNSYLVANIA</Jurisdiction>
                           <Imposition impositionType="General Sales and Use Tax">Sales and Use Tax</Imposition>
                           <EffectiveRate>0.060</EffectiveRate>
                           <TaxableAmount>17.98</TaxableAmount>
                           <CalculatedTax>1.08</CalculatedTax>
                        </Tax>
                     </Taxes>
                  </TaxData>
                  <UnitPrice>8.99</UnitPrice>
               </Merchandise>
               <Shipping>
                  <Amount>4.66</Amount>
                  <TaxData>
                     <TaxClass>93000</TaxClass>
                     <Taxes>
                        <Tax taxType="SELLER_USE" taxability="TAXABLE">
                           <Situs>DESTINATION</Situs>
                           <Jurisdiction jurisdictionLevel="STATE" jurisdictionId="31152">PENNSYLVANIA</Jurisdiction>
                           <Imposition impositionType="General Sales and Use Tax">Sales and Use Tax</Imposition>
                           <EffectiveRate>0.060</EffectiveRate>
                           <TaxableAmount>4.66</TaxableAmount>
                           <CalculatedTax>0.28</CalculatedTax>
                        </Tax>
                     </Taxes>
                  </TaxData>
                  <UnitPrice>0.00</UnitPrice>
               </Shipping>
               <Duty>
                  <TaxData/>
               </Duty>
            </Pricing>
            <Carrier mode="STD" displayText="Standard Ground">ANY</Carrier>
            <FulfillmentChannel>SHIP_TO_HOME</FulfillmentChannel>
            <EstimatedDeliveryDate>
               <DeliveryWindow>
                  <From>2015-06-19T14:33:48+00:00</From>
                  <To>2015-06-22T14:33:48+00:00</To>
               </DeliveryWindow>
               <ShippingWindow>
                  <From>2015-06-17T14:33:48+00:00</From>
                  <To>2015-06-17T14:33:48+00:00</To>
               </ShippingWindow>
               <Mode>LEGACY</Mode>
               <MessageType>None</MessageType>
               <Template>You can expect to receive your item(s) between {0} and {1}.</Template>
               <OriginalExpectedShipmentDate>
                  <From>2015-06-17T14:32:20+00:00</From>
                  <To>2015-06-17T14:32:20+00:00</To>
               </OriginalExpectedShipmentDate>
               <OriginalExpectedDeliveryDate>
                  <From>2015-06-19T14:32:20+00:00</From>
                  <To>2015-06-22T14:32:20+00:00</To>
               </OriginalExpectedDeliveryDate>
            </EstimatedDeliveryDate>
            <VendorId>25806</VendorId>
            <Statuses>
               <Status>
                  <Quantity>2</Quantity>
                  <Status>Scheduled</Status>
                  <StatusDate>2015-06-16T14:33:48+00:00</StatusDate>
                  <ProductAvailabilityDate>2015-06-16</ProductAvailabilityDate>
                  <Warehouse>GSI-DC227</Warehouse>
               </Status>
            </Statuses>
            <OMSLineId>1-1</OMSLineId>
            <GiftRegistryCancelUrl/>
            <ReservationId>0004200000397006</ReservationId>
            <AllowedUpdateTypes>
               <UpdateType name="SHIPTO" allowed="false"/>
            </AllowedUpdateTypes>
         </OrderItem>
         <OrderItem id="item2015061614324777699016" webLineId="2"
                    taxAndDutyDisplay="CONSOLIDATED_TAXES_ONLY">
            <ItemId>36-5192803</ItemId>
            <Quantity>1</Quantity>
            <Description>
               <Description>21 Century Clear Ear Cat Pads</Description>
            </Description>
            <Pricing>
               <Merchandise>
                  <Amount>8.99</Amount>
                  <TaxData>
                     <TaxClass>76800</TaxClass>
                     <Taxes>
                        <Tax taxType="SELLER_USE" taxability="TAXABLE">
                           <Situs>DESTINATION</Situs>
                           <Jurisdiction jurisdictionLevel="STATE" jurisdictionId="31152">PENNSYLVANIA</Jurisdiction>
                           <Imposition impositionType="General Sales and Use Tax">Sales and Use Tax</Imposition>
                           <EffectiveRate>0.060</EffectiveRate>
                           <TaxableAmount>8.99</TaxableAmount>
                           <CalculatedTax>0.54</CalculatedTax>
                        </Tax>
                     </Taxes>
                  </TaxData>
                  <UnitPrice>8.99</UnitPrice>
               </Merchandise>
               <Shipping>
                  <Amount>2.33</Amount>
                  <TaxData>
                     <TaxClass>93000</TaxClass>
                     <Taxes>
                        <Tax taxType="SELLER_USE" taxability="TAXABLE">
                           <Situs>DESTINATION</Situs>
                           <Jurisdiction jurisdictionLevel="STATE" jurisdictionId="31152">PENNSYLVANIA</Jurisdiction>
                           <Imposition impositionType="General Sales and Use Tax">Sales and Use Tax</Imposition>
                           <EffectiveRate>0.060</EffectiveRate>
                           <TaxableAmount>2.33</TaxableAmount>
                           <CalculatedTax>0.14</CalculatedTax>
                        </Tax>
                     </Taxes>
                  </TaxData>
                  <UnitPrice>0.00</UnitPrice>
               </Shipping>
               <Duty>
                  <TaxData/>
               </Duty>
            </Pricing>
            <Carrier mode="STD" displayText="Standard Ground">ANY</Carrier>
            <FulfillmentChannel>SHIP_TO_HOME</FulfillmentChannel>
            <EstimatedDeliveryDate>
               <DeliveryWindow>
                  <From>2015-06-19T14:33:48+00:00</From>
                  <To>2015-06-22T14:33:48+00:00</To>
               </DeliveryWindow>
               <ShippingWindow>
                  <From>2015-06-17T14:33:48+00:00</From>
                  <To>2015-06-17T14:33:48+00:00</To>
               </ShippingWindow>
               <Mode>LEGACY</Mode>
               <MessageType>None</MessageType>
               <Template>You can expect to receive your item(s) between {0} and {1}.</Template>
               <OriginalExpectedShipmentDate>
                  <From>2015-06-17T14:32:20+00:00</From>
                  <To>2015-06-17T14:32:20+00:00</To>
               </OriginalExpectedShipmentDate>
               <OriginalExpectedDeliveryDate>
                  <From>2015-06-19T14:32:20+00:00</From>
                  <To>2015-06-22T14:32:20+00:00</To>
               </OriginalExpectedDeliveryDate>
            </EstimatedDeliveryDate>
            <VendorId>25806</VendorId>
            <Statuses>
               <Status>
                  <Quantity>1</Quantity>
                  <Status>Scheduled</Status>
                  <StatusDate>2015-06-16T14:33:48+00:00</StatusDate>
                  <ProductAvailabilityDate>2015-06-16</ProductAvailabilityDate>
                  <Warehouse>GSI-DC227</Warehouse>
               </Status>
            </Statuses>
            <OMSLineId>2-1</OMSLineId>
            <GiftRegistryCancelUrl/>
            <ReservationId>0004200000397006</ReservationId>
            <AllowedUpdateTypes>
               <UpdateType name="PAYMENT_METHOD" allowed="true"/>
               <UpdateType name="SHIPTO" allowed="false"/>
            </AllowedUpdateTypes>
         </OrderItem>
      </OrderItems>
      <Shipping>
         <ShipGroups>
            <ShipGroup id="shipgroup_0001" chargeType="WEIGHTBASED">
               <DestinationTarget ref="address_0001"/>
               <OrderItems>
                  <Item ref="item2015061614324777699014"/>
                  <Item ref="item2015061614324777699016"/>
               </OrderItems>
            </ShipGroup>
         </ShipGroups>
         <Destinations>
            <MailingAddress id="address_0001">
               <PersonName>
                  <LastName>pal</LastName>
                  <FirstName>ADHIR</FirstName>
               </PersonName>
               <Address>
                  <Line1>9193 18th St</Line1>
                  <City>King of Prussia</City>
                  <MainDivision>PA</MainDivision>
                  <CountryCode>US</CountryCode>
                  <PostalCode>19406-1442</PostalCode>
               </Address>
               <Phone>5676565432</Phone>
            </MailingAddress>
         </Destinations>
      </Shipping>
      <Payment>
         <BillingAddress ref="address_0001"/>
         <Payments>
            <CreditCard>
               <PaymentContext>
                  <PaymentSessionId/>
                  <TenderType>VC</TenderType>
                  <PaymentAccountUniqueId isToken="true">411111vjOiXS1111</PaymentAccountUniqueId>
               </PaymentContext>
               <Amount>0.00</Amount>
               <Authorization>
                  <ResponseCode/>
                  <BankAuthorizationCode/>
                  <CVV2ResponseCode/>
                  <AVSResponseCode/>
                  <AmountAuthorized>36.00</AmountAuthorized>
               </Authorization>
               <ExpirationDate>2022-09</ExpirationDate>
               <SecureVerificationData>
                  <AuthenticationAvailable>B</AuthenticationAvailable>
               </SecureVerificationData>
            </CreditCard>
         </Payments>
         <Status>AUTHORIZED</Status>
      </Payment>
      <Currency>USD</Currency>
      <TaxHeader>
         <Error>false</Error>
      </TaxHeader>
      <Locale>en_US</Locale>
      <Status>Scheduled</Status>
      <CustomAttributes>
         <Attribute>
            <Key>CARTID</Key>
            <Value>0004200000000001384506</Value>
         </Attribute>
         <Attribute>
            <Key>ORDER_SERVICE_ORDER_ID</Key>
            <Value>41304</Value>
         </Attribute>
      </CustomAttributes>
      <Templates>
         <Template id="template_1">
            <Key>BackorderTemplate</Key>
            <Value>Arrival dependent on shipping method.</Value>
         </Template>
         <Template id="template_2">
            <Key>EDDSingleDateTemplate</Key>
            <Value>You can expect to receive your item(s) on or before {0}</Value>
         </Template>
         <Template id="template_3">
            <Key>EDDGeneralTemplate</Key>
            <Value>Arrival dependent on Ship Method selection.</Value>
         </Template>
         <Template id="template_4">
            <Key>EDDMultiDateTemplate</Key>
            <Value>You can expect to receive your item(s) between {0} and {1}.</Value>
         </Template>
      </Templates>
      <OrderHistoryUrl>http://www-petus-lvstst01-live.us.gspt.net/gsi/webstore/WFS/PETNA-PETUS-Site/en_US/-/USD/ViewOrderStatus-Start?WebstoreOrderID=0004200000397006</OrderHistoryUrl>
      <ExchangeOrders/>
      <AllowedUpdateTypes>
         <UpdateType name="BILLTO" allowed="true"/>
         <UpdateType name="ADD_INSTRUCTION" allowed="true"/>
         <UpdateType name="SHIPTO" allowed="false"/>
      </AllowedUpdateTypes>
   </Order>
</OrderDetailResponse>