POST api/order/Order

Allows for the creation of a new (permanent) order for the given representative or customer. New order will be created in entered status.

Request Information

URI Parameters

None.

Body Parameters

CreateOrderViewModel
NameDescriptionTypeAdditional information
RepDID

The representative in context.

string

None.

RepID

The representative ID in context.

integer

None.

CustomerDID

The customer in context.

string

None.

PartyID

The party in context.

integer

None.

OrderDate

Order Date of the order.

date

Required

BonusDate

Bonus date of the order. Optional. By default will use the value at OrderDate field.

date

None.

MarketShowID

Identifier of the market show to associate to this order.

integer

Required

BillingAddress

The billing Address.

AddressViewModelAddress

None.

ShippingAddress

The shipping Address.

AddressViewModelAddress

None.

ShipGeoCode

The ship geo code of the order. This is automatically calculated by Freedom, but can be overriden by the client if required. Do not send if you want that Freedom finds this value.

string

None.

InvoiceNotes

Invoice notes to the order. These notes are included in some shipping batch out files.

string

None.

ShipMethodID

Shipping method identifier associated to the order.

integer

None.

TaxExemptCodeID

Tax exempt code identifier associated to the order.

integer

None.

IsTaxExempt

Flag that indicates whether the order is tax exempt or not.

boolean

None.

CurrencyTypeID

Currency Type identifier associated to the order.

integer

Required

SendAutoresponders

Indicates whether or not to send the AR related to order creation. Optional. Default is true.

boolean

None.

ShippingTotal

Overrides the default shipping calculation with the amount passed in.

decimal number

None.

ShippingTax

Overrides the default shipping tax calculation with the amount passed in.

decimal number

None.

HandlingFee

Overrides the default handling calculation with the amount passed in.

decimal number

None.

HandlingTax

Overrides the default handling tax calculation with the amount passed in.

decimal number

None.

InvoiceNumber

This value overrides the use of Order# as Invoice#

string

None.

OrderDetails

Order lines associated to the order.

Collection of OrderDetailWithOverridesViewModel

None.

PaymentInfo

Payment information associated to the order.

PaymentViewModel

None.

OrderMisc

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

Collection of MiscFieldViewModel

None.

Request Formats

application/xml, text/xml

Sample:
<CreateOrderViewModel>
  <RepDID>sample string 1</RepDID>
  <RepID>1</RepID>
  <CustomerDID>sample string 2</CustomerDID>
  <PartyID>1</PartyID>
  <OrderDate>01/09/2025 01:49:54</OrderDate>
  <BonusDate>01/09/2025 01:49:54</BonusDate>
  <MarketShowID>4</MarketShowID>
  <BillingAddress>
    <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>
  </BillingAddress>
  <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>
  <ShipGeoCode>sample string 5</ShipGeoCode>
  <InvoiceNotes>sample string 6</InvoiceNotes>
  <ShipMethodID>1</ShipMethodID>
  <TaxExemptCodeID>1</TaxExemptCodeID>
  <IsTaxExempt>True</IsTaxExempt>
  <CurrencyTypeID>1</CurrencyTypeID>
  <SendAutoresponders>True</SendAutoresponders>
  <ShippingTotal>1</ShippingTotal>
  <ShippingTax>1</ShippingTax>
  <HandlingFee>1</HandlingFee>
  <HandlingTax>1</HandlingTax>
  <InvoiceNumber>sample string 9</InvoiceNumber>
  <OrderDetails>
    <OrderDetailWithOverridesViewModel>
      <Quantity>1</Quantity>
      <ProductID>sample string 2</ProductID>
      <PriceTaxFields>
        <Price>1</Price>
        <TaxableAmount>2</TaxableAmount>
        <Tax>1</Tax>
      </PriceTaxFields>
      <VolumeFields>
        <Volume>1</Volume>
        <Volume2>2</Volume2>
        <Volume3>3</Volume3>
        <Volume4>4</Volume4>
      </VolumeFields>
      <OtherPriceFields>
        <OtherPrice>1</OtherPrice>
        <OtherPrice2>2</OtherPrice2>
        <OtherPrice3>3</OtherPrice3>
        <OtherPrice4>4</OtherPrice4>
      </OtherPriceFields>
      <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>
    </OrderDetailWithOverridesViewModel>
    <OrderDetailWithOverridesViewModel>
      <Quantity>1</Quantity>
      <ProductID>sample string 2</ProductID>
      <PriceTaxFields>
        <Price>1</Price>
        <TaxableAmount>2</TaxableAmount>
        <Tax>1</Tax>
      </PriceTaxFields>
      <VolumeFields>
        <Volume>1</Volume>
        <Volume2>2</Volume2>
        <Volume3>3</Volume3>
        <Volume4>4</Volume4>
      </VolumeFields>
      <OtherPriceFields>
        <OtherPrice>1</OtherPrice>
        <OtherPrice2>2</OtherPrice2>
        <OtherPrice3>3</OtherPrice3>
        <OtherPrice4>4</OtherPrice4>
      </OtherPriceFields>
      <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>
    </OrderDetailWithOverridesViewModel>
  </OrderDetails>
  <PaymentInfo>
    <ID>1</ID>
    <PaymentTypeID>2</PaymentTypeID>
    <PaymentDate>01/09/2025 01:49:54</PaymentDate>
    <OrderID>1</OrderID>
    <Amount>4</Amount>
    <Detail1>sample string 5</Detail1>
    <Detail2>sample string 6</Detail2>
    <Detail3>sample string 7</Detail3>
    <Detail4>sample string 8</Detail4>
    <Detail5>sample string 9</Detail5>
    <Detail6>sample string 10</Detail6>
    <StatusTypeID>11</StatusTypeID>
    <MarketShowID>1</MarketShowID>
    <Detail7>sample string 12</Detail7>
    <Detail8>sample string 13</Detail8>
    <Detail9>sample string 14</Detail9>
    <Detail10>sample string 15</Detail10>
    <Detail11>sample string 16</Detail11>
    <Detail12>sample string 17</Detail12>
    <CCAccount>sample string 18</CCAccount>
    <CCAccountID>1</CCAccountID>
    <PartyPaymentID>1</PartyPaymentID>
    <PartyRewardID>1</PartyRewardID>
    <IsDoNotRecall>True</IsDoNotRecall>
    <ImportBatchID>20</ImportBatchID>
    <DataRepairNotes>sample string 21</DataRepairNotes>
    <DebitCardAccountID>1</DebitCardAccountID>
    <GiftCardAccountID>1</GiftCardAccountID>
    <ECheckAccountID>1</ECheckAccountID>
    <CurrencyTypeID>1</CurrencyTypeID>
    <Detail13>sample string 22</Detail13>
    <Detail14>sample string 23</Detail14>
    <Detail15>sample string 24</Detail15>
    <Detail16>sample string 25</Detail16>
    <Detail17>sample string 26</Detail17>
    <Detail18>sample string 27</Detail18>
    <DisconnectedAccountID>1</DisconnectedAccountID>
    <PartyID>1</PartyID>
    <IsBypass>True</IsBypass>
    <TokenizedPaymentAccountID>1</TokenizedPaymentAccountID>
    <Detail19>sample string 28</Detail19>
    <PromissoryAmount>29</PromissoryAmount>
    <PromissoryPaymentID>1</PromissoryPaymentID>
    <CreatedBy>sample string 30</CreatedBy>
    <DateCreated>01/09/2025 01:49:54</DateCreated>
    <LastModifiedBy>sample string 32</LastModifiedBy>
    <DateLastModified>01/09/2025 01:49:54</DateLastModified>
    <Detail20>sample string 33</Detail20>
    <Detail21>sample string 34</Detail21>
    <Detail22>sample string 35</Detail22>
    <Detail23>sample string 36</Detail23>
    <Detail24>sample string 37</Detail24>
    <Detail25>sample string 38</Detail25>
  </PaymentInfo>
  <OrderMisc>
    <MiscFieldViewModel>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </MiscFieldViewModel>
    <MiscFieldViewModel>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </MiscFieldViewModel>
  </OrderMisc>
</CreateOrderViewModel>

application/json, text/json

Sample:
{
  "RepDID": "sample string 1",
  "RepID": 1,
  "CustomerDID": "sample string 2",
  "PartyID": 1,
  "OrderDate": "2025-01-09T01:49:54.4318489-05:00",
  "BonusDate": "2025-01-09T01:49:54.4318489-05:00",
  "MarketShowID": 4,
  "BillingAddress": {
    "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
  },
  "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
  },
  "ShipGeoCode": "sample string 5",
  "InvoiceNotes": "sample string 6",
  "ShipMethodID": 1,
  "TaxExemptCodeID": 1,
  "IsTaxExempt": true,
  "CurrencyTypeID": 1,
  "SendAutoresponders": true,
  "ShippingTotal": 1.0,
  "ShippingTax": 1.0,
  "HandlingFee": 1.0,
  "HandlingTax": 1.0,
  "InvoiceNumber": "sample string 9",
  "OrderDetails": [
    {
      "Quantity": 1,
      "ProductID": "sample string 2",
      "PriceTaxFields": {
        "Price": 1.0,
        "TaxableAmount": 2.0,
        "Tax": 1.0
      },
      "VolumeFields": {
        "Volume": 1.0,
        "Volume2": 2.0,
        "Volume3": 3.0,
        "Volume4": 4.0
      },
      "OtherPriceFields": {
        "OtherPrice": 1.0,
        "OtherPrice2": 2.0,
        "OtherPrice3": 3.0,
        "OtherPrice4": 4.0
      },
      "Misc": [
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        }
      ]
    },
    {
      "Quantity": 1,
      "ProductID": "sample string 2",
      "PriceTaxFields": {
        "Price": 1.0,
        "TaxableAmount": 2.0,
        "Tax": 1.0
      },
      "VolumeFields": {
        "Volume": 1.0,
        "Volume2": 2.0,
        "Volume3": 3.0,
        "Volume4": 4.0
      },
      "OtherPriceFields": {
        "OtherPrice": 1.0,
        "OtherPrice2": 2.0,
        "OtherPrice3": 3.0,
        "OtherPrice4": 4.0
      },
      "Misc": [
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        }
      ]
    }
  ],
  "PaymentInfo": {
    "ID": 1,
    "PaymentTypeID": 2,
    "PaymentDate": "2025-01-09T01:49:54.4318489-05:00",
    "OrderID": 1,
    "Amount": 4.0,
    "Detail1": "sample string 5",
    "Detail2": "sample string 6",
    "Detail3": "sample string 7",
    "Detail4": "sample string 8",
    "Detail5": "sample string 9",
    "Detail6": "sample string 10",
    "StatusTypeID": 11,
    "MarketShowID": 1,
    "Detail7": "sample string 12",
    "Detail8": "sample string 13",
    "Detail9": "sample string 14",
    "Detail10": "sample string 15",
    "Detail11": "sample string 16",
    "Detail12": "sample string 17",
    "CCAccount": "sample string 18",
    "CCAccountID": 1,
    "PartyPaymentID": 1,
    "PartyRewardID": 1,
    "ImportBatchID": 20,
    "DataRepairNotes": "sample string 21",
    "DebitCardAccountID": 1,
    "GiftCardAccountID": 1,
    "ECheckAccountID": 1,
    "CurrencyTypeID": 1,
    "Detail13": "sample string 22",
    "Detail14": "sample string 23",
    "Detail15": "sample string 24",
    "Detail16": "sample string 25",
    "Detail17": "sample string 26",
    "Detail18": "sample string 27",
    "DisconnectedAccountID": 1,
    "PartyID": 1,
    "IsBypass": true,
    "TokenizedPaymentAccountID": 1,
    "Detail19": "sample string 28",
    "PromissoryAmount": 29.0,
    "CreatedBy": "sample string 30",
    "LastModifiedBy": "sample string 32",
    "DateLastModified": "2025-01-09T01:49:54.4318489-05:00",
    "Detail20": "sample string 33",
    "Detail21": "sample string 34",
    "Detail22": "sample string 35",
    "Detail23": "sample string 36",
    "Detail24": "sample string 37",
    "Detail25": "sample string 38"
  },
  "OrderMisc": [
    {
      "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 'CreateOrderViewModel'.

Response Information

Resource Description

ApiResultOfOrderSummaryViewModel
NameDescriptionTypeAdditional information
Result

OrderSummaryViewModel

None.

IsSuccessful

boolean

None.

MessageTranslationKey

string

None.

Message

string

None.

Messages

Collection of ApiResultMessage

None.

Response Formats

application/xml, text/xml, application/json, text/json

Sample:

Sample not available.