POST api/order/OnlineOrder/OnlineOrdersAutoShip?onlineOrderID={onlineOrderID}&periodTypeID={periodTypeID}&periodDay={periodDay}&nextShipDate={nextShipDate}&areExistingItemsCleared={areExistingItemsCleared}

Allows specifying specific items as ones that should be added to an AutoShip profile once the order is completed

Request Information

URI Parameters

NameDescriptionTypeAdditional information
onlineOrderID

The ID of the Online Order containing the items that will be added

integer

Required

periodTypeID

The ID of the AutoShipPeriodType to use for the AutoShip profile that is created

integer

None.

periodDay

The day on which the AutoShip should be sent

integer

None.

nextShipDate

date

None.

areExistingItemsCleared

Whether this should replace an autoship record in OnlineOrdersAutoship or add a new record for an online order ID

boolean

Default value is True

Body Parameters

List of items that will be added to the AutoShip profile.

Collection of NewOnlineOrderDetailViewModel
NameDescriptionTypeAdditional information
ProductID

The Product ID of the item

string

None.

SourceProgrammingKey

Programming key of the 3rd party who added the item

string

None.

Quantity

The primary identifier of the order detail id

integer

None.

Price

decimal number

None.

IsAutoShip

boolean

None.

Misc

For any customizations, this holds the extra fields associated to customizations.

Collection of MiscFieldViewModel

None.

Request Formats

application/xml, text/xml

Sample:
<ListOfNewOnlineOrderDetailViewModel>
  <NewOnlineOrderDetailViewModel>
    <ProductID>sample string 1</ProductID>
    <SourceProgrammingKey>sample string 2</SourceProgrammingKey>
    <Quantity>3</Quantity>
    <Price>4</Price>
    <IsAutoShip>True</IsAutoShip>
    <Misc>
      <MiscFieldViewModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </MiscFieldViewModel>
      <MiscFieldViewModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </MiscFieldViewModel>
    </Misc>
  </NewOnlineOrderDetailViewModel>
  <NewOnlineOrderDetailViewModel>
    <ProductID>sample string 1</ProductID>
    <SourceProgrammingKey>sample string 2</SourceProgrammingKey>
    <Quantity>3</Quantity>
    <Price>4</Price>
    <IsAutoShip>True</IsAutoShip>
    <Misc>
      <MiscFieldViewModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </MiscFieldViewModel>
      <MiscFieldViewModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </MiscFieldViewModel>
    </Misc>
  </NewOnlineOrderDetailViewModel>
</ListOfNewOnlineOrderDetailViewModel>

application/json, text/json

Sample:
[
  {
    "ProductID": "sample string 1",
    "SourceProgrammingKey": "sample string 2",
    "Quantity": 3,
    "Price": 4.0,
    "IsAutoShip": true,
    "Misc": [
      {
        "Name": "sample string 1",
        "Value": "sample string 2"
      },
      {
        "Name": "sample string 1",
        "Value": "sample string 2"
      }
    ]
  },
  {
    "ProductID": "sample string 1",
    "SourceProgrammingKey": "sample string 2",
    "Quantity": 3,
    "Price": 4.0,
    "IsAutoShip": true,
    "Misc": [
      {
        "Name": "sample string 1",
        "Value": "sample string 2"
      },
      {
        "Name": "sample string 1",
        "Value": "sample string 2"
      }
    ]
  }
]

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'FormUrlEncodedFormatter' to write type 'List`1'.

Response Information

Resource Description

IOnlineOrderViewModel
NameDescriptionTypeAdditional information
ID

integer

None.

Total

decimal number

None.

TotalProductPrice

decimal number

None.

Country

string

None.

Party

IPartyInfoViewModel

None.

Items

Collection of IOnlineOrderDetailViewModel

None.

OnBehalfRepID

integer

None.

OnBehalfRepDID

string

None.

OnBehalfRepDisplayName

string

None.

Response Formats

application/xml, text/xml

Sample:
<OnlineOrderViewModel>
  <ID>0</ID>
  <Total />
  <TotalProductPrice>0</TotalProductPrice>
  <Country />
  <Party>
    <ID>0</ID>
    <PartyGUID />
    <HostCustomerName />
    <RepDID />
    <RepDisplayName />
    <PartyDate />
    <PartyInfo />
    <IsClosed>False</IsClosed>
    <IsVoided>False</IsVoided>
    <IsPartyPersisted>False</IsPartyPersisted>
    <ProjectedAutoCloseDate />
  </Party>
  <Items>
    <IOnlineOrderDetailViewModel>
      <OnlineOrderDetailId>0</OnlineOrderDetailId>
      <ProductID />
      <InventoryID>0</InventoryID>
      <DisplayName />
      <Price>0</Price>
      <Tax />
      <Quantity>0</Quantity>
      <SmallImage />
      <ParentProductID />
      <ChildDisplayName />
      <QtyOptions />
      <CurrencySymbol />
      <Misc />
      <AltText />
      <SoftAllocationExpiration />
      <AutoShipPrice />
      <IsAutoShipItem>False</IsAutoShipItem>
      <IsAutoShip>False</IsAutoShip>
      <Volume />
      <Volume2 />
      <Volume3 />
      <Volume4 />
      <VolumeT />
      <VolumeT2 />
      <VolumeT3 />
      <VolumeT4 />
      <WholesalePrice />
      <DateNextRun />
      <SavedPrice />
      <IsResourceServerImage>False</IsResourceServerImage>
    </IOnlineOrderDetailViewModel>
  </Items>
  <OnBehalfRepID />
  <OnBehalfRepDID />
  <OnBehalfRepDisplayName />
</OnlineOrderViewModel>

application/json, text/json

Sample:
{
  "ID": 0,
  "TotalProductPrice": 0.0,
  "Party": {
    "ID": 0,
    "IsClosed": false,
    "IsVoided": false,
    "IsPartyPersisted": false
  },
  "Items": [
    {
      "OnlineOrderDetailId": 0,
      "InventoryID": 0,
      "Price": 0.0,
      "Quantity": 0,
      "IsAutoShipItem": false,
      "IsAutoShip": false,
      "IsResourceServerImage": false
    }
  ]
}