PUT api/AutoShipSchedule/Update?autoShipScheduleID={autoShipScheduleID}

Updates an existing AutoShip Profile. Only supports Tokenized Payments, defaults to Invoice Payment.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
autoShipScheduleID

AutoShipScheduleID found on an AutoShip Profile's URL

integer

Required

Body Parameters

CreateAutoShipScheduleViewModel
NameDescriptionTypeAdditional information
RepDID

The representative in context.

string

Required

RepID

The representative ID in context.

integer

None.

CustomerDID

The customer in context. Optional, if passed overrides the RepNumber.

string

None.

OrderID

The order in context. If AutoShip profiles are made from an order we want to associate it with the profile. This means this call must come AFTER a successful order export.

integer

None.

ShippingAddress

Shipping Address

AddressViewModelAddress

None.

StartDate

Start Date of the profile

date

Required

StopDate

Start Date of the profile

date

None.

DateNextRun

date

None.

PeriodTypeID

PeriodTypeID of the profile.

integer

Required

PeriodDay

PeriodDay of the profile.

integer

None.

ShipMethodID

ShipMethodID of the profile.

integer

Required

AutoShipRuleID

AutoShipRuleID of the profile.

integer

None.

OverrideShipping

OverrideShipping of the profile.

boolean

None.

ShippingTotal

Shipping Total of the profile.

decimal number

None.

Items

Items if profile.

Collection of AutoShipScheduleItemViewModel

None.

PaymentInfo

Payment information associated to profile.

TokenizedPaymentProfileViewModel

None.

Request Formats

application/xml, text/xml

Sample:
<CreateAutoShipScheduleViewModel>
  <RepDID>sample string 1</RepDID>
  <RepID>1</RepID>
  <CustomerDID>sample string 2</CustomerDID>
  <OrderID>1</OrderID>
  <ShippingAddress>
    <ID>1</ID>
    <Description>sample string 2</Description>
    <Street1>sample string 3</Street1>
    <Street2>sample string 4</Street2>
    <City>sample string 5</City>
    <Company>sample string 6</Company>
    <State>sample string 7</State>
    <PostalCode>sample string 8</PostalCode>
    <County>sample string 9</County>
    <Country>sample string 10</Country>
    <Phone>sample string 11</Phone>
    <Email>sample string 12</Email>
    <FirstName>sample string 13</FirstName>
    <LastName>sample string 14</LastName>
    <SpecialInstructions>sample string 15</SpecialInstructions>
    <SuggestedAddress>True</SuggestedAddress>
    <IsHiddenOnCart>True</IsHiddenOnCart>
    <IsOverrideAddress>True</IsOverrideAddress>
    <IsDefaultProfile>64</IsDefaultProfile>
  </ShippingAddress>
  <StartDate>01/09/2025 02:10:15</StartDate>
  <StopDate>01/09/2025 02:10:15</StopDate>
  <DateNextRun>01/09/2025 02:10:15</DateNextRun>
  <PeriodTypeID>6</PeriodTypeID>
  <PeriodDay>7</PeriodDay>
  <ShipMethodID>8</ShipMethodID>
  <AutoShipRuleID>9</AutoShipRuleID>
  <OverrideShipping>True</OverrideShipping>
  <ShippingTotal>11</ShippingTotal>
  <Items>
    <AutoShipScheduleItemViewModel>
      <ProductID>sample string 1</ProductID>
      <Quantity>1</Quantity>
    </AutoShipScheduleItemViewModel>
    <AutoShipScheduleItemViewModel>
      <ProductID>sample string 1</ProductID>
      <Quantity>1</Quantity>
    </AutoShipScheduleItemViewModel>
  </Items>
  <PaymentInfo>
    <TokenizedPaymentAccountID>1</TokenizedPaymentAccountID>
    <Detail1>sample string 2</Detail1>
    <Detail2>sample string 3</Detail2>
    <Detail3>sample string 4</Detail3>
    <Detail4>sample string 5</Detail4>
    <Detail5>sample string 6</Detail5>
    <Detail6>sample string 7</Detail6>
    <Detail7>sample string 8</Detail7>
    <Detail8>sample string 9</Detail8>
    <Detail9>sample string 10</Detail9>
    <Detail10>sample string 11</Detail10>
    <Detail11>sample string 12</Detail11>
    <Detail12>sample string 13</Detail12>
    <Detail13>sample string 14</Detail13>
    <Detail14>sample string 15</Detail14>
    <Detail15>sample string 16</Detail15>
    <Detail16>sample string 17</Detail16>
    <Detail17>sample string 18</Detail17>
    <Detail18>sample string 19</Detail18>
    <Detail19>sample string 20</Detail19>
    <Detail20>sample string 21</Detail20>
    <CreatedBy>sample string 22</CreatedBy>
    <DateCreated>01/09/2025 02:10:15</DateCreated>
  </PaymentInfo>
</CreateAutoShipScheduleViewModel>

application/json, text/json

Sample:
{
  "RepDID": "sample string 1",
  "RepID": 1,
  "CustomerDID": "sample string 2",
  "OrderID": 1,
  "ShippingAddress": {
    "ID": 1,
    "Description": "sample string 2",
    "Street1": "sample string 3",
    "Street2": "sample string 4",
    "City": "sample string 5",
    "Company": "sample string 6",
    "State": "sample string 7",
    "PostalCode": "sample string 8",
    "County": "sample string 9",
    "Country": "sample string 10",
    "Phone": "sample string 11",
    "Email": "sample string 12",
    "FirstName": "sample string 13",
    "LastName": "sample string 14",
    "SpecialInstructions": "sample string 15",
    "SuggestedAddress": true,
    "IsHiddenOnCart": true,
    "IsOverrideAddress": true,
    "IsDefaultProfile": 64
  },
  "StartDate": "2025-01-09T02:10:15.8816155-05:00",
  "StopDate": "2025-01-09T02:10:15.8816155-05:00",
  "DateNextRun": "2025-01-09T02:10:15.8972243-05:00",
  "PeriodTypeID": 6,
  "PeriodDay": 7,
  "ShipMethodID": 8,
  "AutoShipRuleID": 9,
  "OverrideShipping": true,
  "ShippingTotal": 11.0,
  "Items": [
    {
      "ProductID": "sample string 1",
      "Quantity": 1
    },
    {
      "ProductID": "sample string 1",
      "Quantity": 1
    }
  ],
  "PaymentInfo": {
    "TokenizedPaymentAccountID": 1,
    "Detail1": "sample string 2",
    "Detail2": "sample string 3",
    "Detail3": "sample string 4",
    "Detail4": "sample string 5",
    "Detail5": "sample string 6",
    "Detail6": "sample string 7",
    "Detail7": "sample string 8",
    "Detail8": "sample string 9",
    "Detail9": "sample string 10",
    "Detail10": "sample string 11",
    "Detail11": "sample string 12",
    "Detail12": "sample string 13",
    "Detail13": "sample string 14",
    "Detail14": "sample string 15",
    "Detail15": "sample string 16",
    "Detail16": "sample string 17",
    "Detail17": "sample string 18",
    "Detail18": "sample string 19",
    "Detail19": "sample string 20",
    "Detail20": "sample string 21",
    "CreatedBy": "sample string 22"
  }
}

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 'CreateAutoShipScheduleViewModel'.

Response Information

Resource Description

IOperationResult
NameDescriptionTypeAdditional information
IsSuccessful

boolean

None.

ValidationErrors

Dictionary of string [key] and string [value]

None.

Value

Object

None.

Response Formats

application/xml, text/xml

Sample:
<OperationResult>
  <IsSuccessful>False</IsSuccessful>
  <ValidationErrors />
  <Value />
</OperationResult>

application/json, text/json

Sample:
{
  "IsSuccessful": false,
  "ValidationErrors": {}
}