Radial Integration | 2016

Retail Order Management > Order Processing > Order Management API Tutorial > How to Build an Inventory Details API Request > InventoryDetailResponseMessage → TaxDutyQuoteRequest

InventoryDetailResponseMessage → TaxDutyQuoteRequest

A TaxDutyQuoteRequest requires a ShippingOrigin for each OrderItem. This ShippingOrigin maps from the ShippingAddress in each InventoryDetail in the InventoryDetailsResponseMessage.

Mapping

The InventoryDetailsResponseMessage field mappings start at: /InventoryDetailsResponsesMessage/InventoryDetails/InventoryDetail
The TaxDutyQuoteRequest field mappings start at: /TaxDutyQuoteRequest/Shipping/ShipGroups/ShipGroup/Items/OrderItem/Origins
The lineId attribute on InventoryDetail elements match up with the lineNumber attribute on the OrderItem elements.

InventoryDetailsResponseMessage Field TaxDutyQuoteRequest Field Transform Comment

//ShipFromAddress/Line1

//ShippingOrigin/Line1

copy as is

//ShipFromAddress/Line2

//ShippingOrigin/Line2

copy as is

//ShipFromAddress/Line3

//ShippingOrigin/Line3

copy as is

//ShipFromAddress/Line4

//ShippingOrigin/Line4

copy as is

//ShipFromAddress/City

//ShippingOrigin/City

copy as is

//ShipFromAddress/MainDivision

//ShippingOrigin/MainDivision

copy as is

//ShipFromAddress/CountryCode

//ShippingOrigin/CountryCode

copy as is

//ShipFromAddress/PostalCode

//ShippingOrigin/PostalCode

copy as is

Mapping Example

<?xml version="1.0" encoding="UTF-8"?><InventoryDetailsResponseMessage
    xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
  <InventoryDetails>
    <InventoryDetail lineId="1" (1)
                    itemId="12-345"> (2)
      ...
      <ShipFromAddress>
        <Line1>935 First Ave</Line1> (3)
        <City>King of Prussia</City> (4)
        <MainDivision>PA</MainDivision> (5)
        <CountryCode>US</CountryCode> (6)
        <PostalCode>19406</PostalCode> (7)
      </ShipFromAddress>
    </InventoryDetail>
    ...
  </InventoryDetails>
</InventoryDetailsResponseMessage>
<?xml version="1.0" encoding="UTF-8"?><TaxDutyQuoteRequest
    xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
  ...
  <Shipping>
    <ShipGroups>
      <ShipGroup chargeType="FLATRATE" id="shipgroup_1">
        <DestinationTarget ref="dest_1"/>
        <Items>
          <OrderItem lineNumber="1"> (1)
            <ItemId>12-345</ItemId> (2)
            <Origins>
              ...
              <ShippingOrigin>
                <Line1>935 First Ave</Line1> (3)
                <City>King of Prussia</City> (4)
                <MainDivision>PA</MainDivision> (5)
                <CountryCode>US</CountryCode> (6)
                <PostalCode>19406</PostalCode> (7)
              </ShippingOrigin>              ...
            </Origins>
            ...
          </OrderItem>
          ...
        </Items>
      </ShipGroup>
    </ShipGroups>
    ...
  </Shipping>
</TaxDutyQuoteRequest>

 

Copyright © 2017 Radial. All rights reserved.