POST api/Order/InsertOrderWithDetails

Request Information

URI Parameters

None.

Body Parameters

OrderModel
NameDescriptionTypeAdditional information
OrderDetailsModel

OrderDetails

None.

OrderImageListModel

Collection of OrderImageList

None.

OrderItemListModel

Collection of OrderItemList

None.

OrderProductListModel

Collection of OrderProductList

None.

Certificates

Collection of OrderCertificateList

None.

UserCredits

Collection of OrderUserCreditsList

None.

Transactions

Collection of OrderTransactionList

None.

Credits

OrderCreditsModel

None.

UserCoupons

Collection of OrderUserCoupon

None.

CreatedDate

string

None.

UpdatedDate

string

None.

Request Formats

application/json, text/json

Sample:
{
  "OrderDetailsModel": {
    "OrderID": 1,
    "UserAddress": "sample string 2",
    "LatitudeUserAddress": 3.0,
    "LongitudeUserAddress": 4.0,
    "PinCode": "sample string 5",
    "City": "sample string 6",
    "State": "sample string 7",
    "Country": "sample string 8",
    "UsersID": 1,
    "UserName": "sample string 9",
    "CollectorDetailID": 1,
    "CollectorName": "sample string 10",
    "OrderDate": "sample string 11",
    "Status": 12,
    "StatusName": "sample string 13",
    "OrderType": 14,
    "OrderTypeName": "sample string 15",
    "ActualWeight": 16.0,
    "Rating": 17.0,
    "EstimatedWeight": 18.0,
    "ActualAmount": 19.0,
    "Review": "sample string 20",
    "OrderNo": "sample string 21",
    "UserAddressID": 22,
    "EstimatedAmount": 23.0,
    "AirPollutionQty": 24.0,
    "LandPolluttionQty": 25.0,
    "WaterPollutionQty": 26.0,
    "Co2Qty": 27.0,
    "TreeSaverQty": 28.0,
    "BrandID": 1
  },
  "OrderImageListModel": [
    {
      "OrderID": 1,
      "OrderImageID": 2,
      "ImageURLPath": "sample string 3",
      "OrderNo": "sample string 4",
      "OrderDate": "sample string 5"
    },
    {
      "OrderID": 1,
      "OrderImageID": 2,
      "ImageURLPath": "sample string 3",
      "OrderNo": "sample string 4",
      "OrderDate": "sample string 5"
    }
  ],
  "OrderItemListModel": [
    {
      "OrderID": 1,
      "ItemID": 2,
      "ItemName": "sample string 3",
      "Quantity": 4.0,
      "QuantityUnit": "sample string 5",
      "OrderNo": "sample string 6",
      "OrderDate": "sample string 7",
      "OrderItemID": 8
    },
    {
      "OrderID": 1,
      "ItemID": 2,
      "ItemName": "sample string 3",
      "Quantity": 4.0,
      "QuantityUnit": "sample string 5",
      "OrderNo": "sample string 6",
      "OrderDate": "sample string 7",
      "OrderItemID": 8
    }
  ],
  "OrderProductListModel": [
    {
      "OrderID": 1,
      "ProductID": 2,
      "ProductName": "sample string 3",
      "Quantity": 4.0,
      "OrderNo": "sample string 5",
      "OrderDate": "sample string 6",
      "Price": 7.0,
      "OrderProductID": 8
    },
    {
      "OrderID": 1,
      "ProductID": 2,
      "ProductName": "sample string 3",
      "Quantity": 4.0,
      "OrderNo": "sample string 5",
      "OrderDate": "sample string 6",
      "Price": 7.0,
      "OrderProductID": 8
    }
  ],
  "Certificates": [
    {
      "CertificateID": 1,
      "UsersID": 2,
      "OrderID": 1,
      "Path": "sample string 3",
      "Type": 4
    },
    {
      "CertificateID": 1,
      "UsersID": 2,
      "OrderID": 1,
      "Path": "sample string 3",
      "Type": 4
    }
  ],
  "UserCredits": [
    {
      "UserCreditsID": 1,
      "UsersID": 1,
      "BrandGroupingID": 1,
      "Amount": 2.0
    },
    {
      "UserCreditsID": 1,
      "UsersID": 1,
      "BrandGroupingID": 1,
      "Amount": 2.0
    }
  ],
  "Transactions": [
    {
      "TransactionID": 1,
      "OrderID": 1,
      "Amount": 2.0,
      "PayType": 3,
      "TransactionDate": "sample string 4",
      "RewardsUsed": 5.0,
      "TransactionType": 6,
      "OrderNo": "sample string 7",
      "BreakupType": 8,
      "Cash": 9.0,
      "Bank": 10.0,
      "WasteCredit": 11.0,
      "UsersID": 12
    },
    {
      "TransactionID": 1,
      "OrderID": 1,
      "Amount": 2.0,
      "PayType": 3,
      "TransactionDate": "sample string 4",
      "RewardsUsed": 5.0,
      "TransactionType": 6,
      "OrderNo": "sample string 7",
      "BreakupType": 8,
      "Cash": 9.0,
      "Bank": 10.0,
      "WasteCredit": 11.0,
      "UsersID": 12
    }
  ],
  "Credits": {
    "WasteCreditUsed": 1.0,
    "WasteCreditAdded": 2.0,
    "RewardsUsed": 3.0
  },
  "UserCoupons": [
    {
      "UserDiscountCouponID": 1,
      "DiscountCouponID": 2,
      "CpnCount": 3,
      "UsersID": 4
    },
    {
      "UserDiscountCouponID": 1,
      "DiscountCouponID": 2,
      "CpnCount": 3,
      "UsersID": 4
    }
  ],
  "CreatedDate": "sample string 1",
  "UpdatedDate": "sample string 2"
}

application/xml, text/xml

Sample:
<OrderModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RecycleGreenAPILibrary.BusinessModel">
  <CreatedDate>sample string 1</CreatedDate>
  <UpdatedDate>sample string 2</UpdatedDate>
  <Certificates>
    <OrderCertificateList>
      <CertificateID>1</CertificateID>
      <OrderID>1</OrderID>
      <Path>sample string 3</Path>
      <Type>4</Type>
      <UsersID>2</UsersID>
    </OrderCertificateList>
    <OrderCertificateList>
      <CertificateID>1</CertificateID>
      <OrderID>1</OrderID>
      <Path>sample string 3</Path>
      <Type>4</Type>
      <UsersID>2</UsersID>
    </OrderCertificateList>
  </Certificates>
  <Credits>
    <RewardsUsed>3</RewardsUsed>
    <WasteCreditAdded>2</WasteCreditAdded>
    <WasteCreditUsed>1</WasteCreditUsed>
  </Credits>
  <OrderDetailsModel>
    <ActualAmount>19</ActualAmount>
    <ActualWeight>16</ActualWeight>
    <AirPollutionQty>24</AirPollutionQty>
    <BrandID>1</BrandID>
    <City>sample string 6</City>
    <Co2Qty>27</Co2Qty>
    <CollectorDetailID>1</CollectorDetailID>
    <CollectorName>sample string 10</CollectorName>
    <Country>sample string 8</Country>
    <EstimatedAmount>23</EstimatedAmount>
    <EstimatedWeight>18</EstimatedWeight>
    <LandPolluttionQty>25</LandPolluttionQty>
    <LatitudeUserAddress>3</LatitudeUserAddress>
    <LongitudeUserAddress>4</LongitudeUserAddress>
    <OrderDate>sample string 11</OrderDate>
    <OrderID>1</OrderID>
    <OrderNo>sample string 21</OrderNo>
    <OrderType>14</OrderType>
    <OrderTypeName>sample string 15</OrderTypeName>
    <PinCode>sample string 5</PinCode>
    <Rating>17</Rating>
    <Review>sample string 20</Review>
    <State>sample string 7</State>
    <Status>12</Status>
    <StatusName>sample string 13</StatusName>
    <TreeSaverQty>28</TreeSaverQty>
    <UserAddress>sample string 2</UserAddress>
    <UserAddressID>22</UserAddressID>
    <UserName>sample string 9</UserName>
    <UsersID>1</UsersID>
    <WaterPollutionQty>26</WaterPollutionQty>
  </OrderDetailsModel>
  <OrderImageListModel>
    <OrderImageList>
      <ImageURLPath>sample string 3</ImageURLPath>
      <OrderDate>sample string 5</OrderDate>
      <OrderID>1</OrderID>
      <OrderImageID>2</OrderImageID>
      <OrderNo>sample string 4</OrderNo>
    </OrderImageList>
    <OrderImageList>
      <ImageURLPath>sample string 3</ImageURLPath>
      <OrderDate>sample string 5</OrderDate>
      <OrderID>1</OrderID>
      <OrderImageID>2</OrderImageID>
      <OrderNo>sample string 4</OrderNo>
    </OrderImageList>
  </OrderImageListModel>
  <OrderItemListModel>
    <OrderItemList>
      <ItemID>2</ItemID>
      <ItemName>sample string 3</ItemName>
      <OrderDate>sample string 7</OrderDate>
      <OrderID>1</OrderID>
      <OrderItemID>8</OrderItemID>
      <OrderNo>sample string 6</OrderNo>
      <Quantity>4</Quantity>
      <QuantityUnit>sample string 5</QuantityUnit>
    </OrderItemList>
    <OrderItemList>
      <ItemID>2</ItemID>
      <ItemName>sample string 3</ItemName>
      <OrderDate>sample string 7</OrderDate>
      <OrderID>1</OrderID>
      <OrderItemID>8</OrderItemID>
      <OrderNo>sample string 6</OrderNo>
      <Quantity>4</Quantity>
      <QuantityUnit>sample string 5</QuantityUnit>
    </OrderItemList>
  </OrderItemListModel>
  <OrderProductListModel>
    <OrderProductList>
      <OrderDate>sample string 6</OrderDate>
      <OrderID>1</OrderID>
      <OrderNo>sample string 5</OrderNo>
      <OrderProductID>8</OrderProductID>
      <Price>7</Price>
      <ProductID>2</ProductID>
      <ProductName>sample string 3</ProductName>
      <Quantity>4</Quantity>
    </OrderProductList>
    <OrderProductList>
      <OrderDate>sample string 6</OrderDate>
      <OrderID>1</OrderID>
      <OrderNo>sample string 5</OrderNo>
      <OrderProductID>8</OrderProductID>
      <Price>7</Price>
      <ProductID>2</ProductID>
      <ProductName>sample string 3</ProductName>
      <Quantity>4</Quantity>
    </OrderProductList>
  </OrderProductListModel>
  <Transactions>
    <OrderTransactionList>
      <Amount>2</Amount>
      <Bank>10</Bank>
      <BreakupType>8</BreakupType>
      <Cash>9</Cash>
      <OrderID>1</OrderID>
      <OrderNo>sample string 7</OrderNo>
      <PayType>3</PayType>
      <RewardsUsed>5</RewardsUsed>
      <TransactionDate>sample string 4</TransactionDate>
      <TransactionID>1</TransactionID>
      <TransactionType>6</TransactionType>
      <UsersID>12</UsersID>
      <WasteCredit>11</WasteCredit>
    </OrderTransactionList>
    <OrderTransactionList>
      <Amount>2</Amount>
      <Bank>10</Bank>
      <BreakupType>8</BreakupType>
      <Cash>9</Cash>
      <OrderID>1</OrderID>
      <OrderNo>sample string 7</OrderNo>
      <PayType>3</PayType>
      <RewardsUsed>5</RewardsUsed>
      <TransactionDate>sample string 4</TransactionDate>
      <TransactionID>1</TransactionID>
      <TransactionType>6</TransactionType>
      <UsersID>12</UsersID>
      <WasteCredit>11</WasteCredit>
    </OrderTransactionList>
  </Transactions>
  <UserCoupons>
    <OrderUserCoupon>
      <CpnCount>3</CpnCount>
      <DiscountCouponID>2</DiscountCouponID>
      <UserDiscountCouponID>1</UserDiscountCouponID>
      <UsersID>4</UsersID>
    </OrderUserCoupon>
    <OrderUserCoupon>
      <CpnCount>3</CpnCount>
      <DiscountCouponID>2</DiscountCouponID>
      <UserDiscountCouponID>1</UserDiscountCouponID>
      <UsersID>4</UsersID>
    </OrderUserCoupon>
  </UserCoupons>
  <UserCredits>
    <OrderUserCreditsList>
      <Amount>2</Amount>
      <BrandGroupingID>1</BrandGroupingID>
      <UserCreditsID>1</UserCreditsID>
      <UsersID>1</UsersID>
    </OrderUserCreditsList>
    <OrderUserCreditsList>
      <Amount>2</Amount>
      <BrandGroupingID>1</BrandGroupingID>
      <UserCreditsID>1</UserCreditsID>
      <UsersID>1</UsersID>
    </OrderUserCreditsList>
  </UserCredits>
</OrderModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'OrderModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.