Radial Integration | 2016

Retail Order Management > Inventory Management > Inventory API > Create Inventory Allocations

Create Inventory Allocations

The Create Inventory Allocations operation is used to reserve inventory for one or more line items. This operation is used immediately after the shopper clicks Submit Order. This operation holds the inventory for an order between the time the shopper starts the submit order process and when the webstore calls EP order create.

This operations serves two purposes:

This operation should not be used to reserve inventory for items with unlimited inventory (for example, warranties, virtual gift cards, and online gift certificates). Quantities returned for these items might be zero, which can negatively impact the operation of the webstore.

For a step-by-step guide to this API, see How to Build an Inventory Allocation API Request.

URI Summary

Operation

Action

URI Template

URI Example

Transaction Type

Unique RequestID Needed for Duplicate Detection?

Non-URI Request / Payload

Response

Create allocations

POST

/vM.m/stores/STOREID/inventory/allocations/create.xml

/v1.0/stores/ABCD/inventory/allocations/create.xml

Create an inventory reservation for one or more line items.

No

XML

200 + XML response

Schemas

Examples

One or more standard ship items

AllocationRequestMessage receives AllocationResponseMessage.

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<AllocationRequestMessage xmlns="http://schema.gspt.net/Inventory/3.0">
  <SourceId type="CHANNEL">TMSUS</SourceId>
  <ReservationId>TEST-RESERVATION-001</ReservationId>
  <Items>
    <OrderItem>
      . . .
    </OrderItem>
  </Items>
</AllocationRequestMessage>

Response XML

<?xml version="1.0" encoding="UTF-8"?>
<AllocationResponseMessage xmlns="http://schema.gspt.net/Inventory/3.0">
   <AllocationResponseList>
      <AllocationResponse>
         <ItemId>item1</ItemId>
         <WebstoreLineId>line1</WebstoreLineId>
         <AmountAllocated>0</AmountAllocated>
      </AllocationResponse>
   </AllocationResponseList>
</AllocationResponseMessage>

Multiple ISPU items

AllocationRequestMessage receives AllocationResponseMessage.

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<AllocationRequestMessage xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
                          reservationId="23faa211-dcfd-485e-a879-492e33f76f91"
                          requestId="unique-request-id">
  <OrderItem lineId="line1" itemId="item1">
    <Quantity>5</Quantity>
      <InStorePickupDetails>
          <StoreFrontId>10-1254</StoreFrontId>
          <StoreFrontName>Storefront Name</StoreFrontName>
          <StoreFrontAddress>
              <Line1>One Big Store Rd</Line1>
              <City>King Of Prussia</City>
              <MainDivision>PA</MainDivision>
              <CountryCode>US</CountryCode>
              <PostalCode>19406</PostalCode>
          </StoreFrontAddress>
      </InStorePickupDetails>
  </OrderItem>
  <OrderItem lineId="line2" itemId="item2">
    <Quantity>5</Quantity>
      <InStorePickupDetails>
          <StoreFrontId>10-1254</StoreFrontId>
          <StoreFrontName>Storefront Name</StoreFrontName>
          <StoreFrontAddress>
              <Line1>One Big Store Rd</Line1>
              <City>King Of Prussia</City>
              <MainDivision>PA</MainDivision>
              <CountryCode>US</CountryCode>
              <PostalCode>19406</PostalCode>
          </StoreFrontAddress>
      </InStorePickupDetails>
  </OrderItem>
  <OrderItem lineId="line3" itemId="item3">
        <Quantity>5</Quantity>
        <ShipmentDetails>
            <ShippingMethod>STANDARD</ShippingMethod>
            <ShipToAddress>
                <Line1>One Bagshot Row</Line1>
                <City>Bag End</City>
                <MainDivision>PA</MainDivision>
                <CountryCode>US</CountryCode>
                <PostalCode>19123</PostalCode>
            </ShipToAddress>
        </ShipmentDetails>
    </OrderItem>
</AllocationRequestMessage>

One standard ship item and one ISPU item

AllocationRequestMessage receives AllocationResponseMessage.

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<AllocationRequestMessage xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
                          reservationId="23faa211-dcfd-485e-a879-492e33f76f91"
                          requestId="globally-unique-request-id">
  <OrderItem lineId="line1" itemId="item1">
    <Quantity>5</Quantity>
    <ShipmentDetails>
      <ShippingMethod>STANDARD</ShippingMethod>
      <ShipToAddress>
        <Line1>One Bagshot Row</Line1>
        <City>Bag End</City>
        <MainDivision>PA</MainDivision>
        <CountryCode>US</CountryCode>
        <PostalCode>19123</PostalCode>
      </ShipToAddress>
    </ShipmentDetails>
  </OrderItem>
  <OrderItem lineId="line2" itemId="item2">
    <Quantity>5</Quantity>
    <InStorePickupDetails>
      <StoreFrontId>store1</StoreFrontId>
      <StoreFrontName>Gaffer's Tater Tots</StoreFrontName>
      <StoreFrontAddress>
        <Line1>One Bagshot Row</Line1>
        <City>Bag End</City>
        <MainDivision>PA</MainDivision>
        <CountryCode>US</CountryCode>
        <PostalCode>19123</PostalCode>
      </StoreFrontAddress>
    </InStorePickupDetails>
  </OrderItem>
</AllocationRequestMessage>

 

Copyright © 2017 Radial. All rights reserved.