POST api/Cargo/AddCustomerOrderPackage

Request Information

URI Parameters

None.

Body Parameters

CustomerOrderPackageModel
NameDescriptionTypeAdditional information
OrderPackageID

integer

None.

OrderID

integer

None.

PackageCount

integer

None.

Shipped

boolean

None.

OrderPackageDate

string

None.

NetWeightKg

decimal number

None.

TotalWeightKg

decimal number

None.

CustomerID

integer

None.

CompanyID

integer

None.

ShipmentTransactionDetailID

integer

None.

PackageNo

string

None.

Length

decimal number

None.

Width

decimal number

None.

Height

decimal number

None.

OrderPackageNotes

string

None.

Content_Description

string

None.

User_Name

string

None.

Edit_User_Name

string

None.

OrderPackageItems

Collection of CustomerOrderPackageItemsViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "OrderPackageID": 1,
  "OrderID": 2,
  "PackageCount": 3,
  "Shipped": true,
  "OrderPackageDate": "sample string 5",
  "NetWeightKg": 6.1,
  "TotalWeightKg": 7.1,
  "CustomerID": 8,
  "CompanyID": 9,
  "ShipmentTransactionDetailID": 10,
  "PackageNo": "sample string 11",
  "Length": 12.1,
  "Width": 13.1,
  "Height": 14.1,
  "OrderPackageNotes": "sample string 15",
  "Content_Description": "sample string 16",
  "User_Name": "sample string 17",
  "Edit_User_Name": "sample string 18",
  "OrderPackageItems": [
    {
      "CustomerOrderPackageDetailID": 1,
      "CustomerOrderPackageID": 2,
      "ItemName": "sample string 3",
      "UnitPrice": 4.1,
      "ItemCountInPackage": 5,
      "UnitId": 6,
      "CurrencyID": 7,
      "UnitDesc": "sample string 8",
      "TotalPrice": 9.1,
      "isActive": true
    },
    {
      "CustomerOrderPackageDetailID": 1,
      "CustomerOrderPackageID": 2,
      "ItemName": "sample string 3",
      "UnitPrice": 4.1,
      "ItemCountInPackage": 5,
      "UnitId": 6,
      "CurrencyID": 7,
      "UnitDesc": "sample string 8",
      "TotalPrice": 9.1,
      "isActive": true
    }
  ]
}

application/xml, text/xml

Sample:
<CustomerOrderPackageModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Layan_Cargo_API.Models">
  <CompanyID>9</CompanyID>
  <Content_Description>sample string 16</Content_Description>
  <CustomerID>8</CustomerID>
  <Edit_User_Name>sample string 18</Edit_User_Name>
  <Height>14.1</Height>
  <Length>12.1</Length>
  <NetWeightKg>6.1</NetWeightKg>
  <OrderID>2</OrderID>
  <OrderPackageDate>sample string 5</OrderPackageDate>
  <OrderPackageID>1</OrderPackageID>
  <OrderPackageItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/Layan_Cargo_API.ViewModels">
    <d2p1:CustomerOrderPackageItemsViewModel>
      <d2p1:CurrencyID>7</d2p1:CurrencyID>
      <d2p1:CustomerOrderPackageDetailID>1</d2p1:CustomerOrderPackageDetailID>
      <d2p1:CustomerOrderPackageID>2</d2p1:CustomerOrderPackageID>
      <d2p1:ItemCountInPackage>5</d2p1:ItemCountInPackage>
      <d2p1:ItemName>sample string 3</d2p1:ItemName>
      <d2p1:TotalPrice>9.1</d2p1:TotalPrice>
      <d2p1:UnitDesc>sample string 8</d2p1:UnitDesc>
      <d2p1:UnitId>6</d2p1:UnitId>
      <d2p1:UnitPrice>4.1</d2p1:UnitPrice>
      <d2p1:isActive>true</d2p1:isActive>
    </d2p1:CustomerOrderPackageItemsViewModel>
    <d2p1:CustomerOrderPackageItemsViewModel>
      <d2p1:CurrencyID>7</d2p1:CurrencyID>
      <d2p1:CustomerOrderPackageDetailID>1</d2p1:CustomerOrderPackageDetailID>
      <d2p1:CustomerOrderPackageID>2</d2p1:CustomerOrderPackageID>
      <d2p1:ItemCountInPackage>5</d2p1:ItemCountInPackage>
      <d2p1:ItemName>sample string 3</d2p1:ItemName>
      <d2p1:TotalPrice>9.1</d2p1:TotalPrice>
      <d2p1:UnitDesc>sample string 8</d2p1:UnitDesc>
      <d2p1:UnitId>6</d2p1:UnitId>
      <d2p1:UnitPrice>4.1</d2p1:UnitPrice>
      <d2p1:isActive>true</d2p1:isActive>
    </d2p1:CustomerOrderPackageItemsViewModel>
  </OrderPackageItems>
  <OrderPackageNotes>sample string 15</OrderPackageNotes>
  <PackageCount>3</PackageCount>
  <PackageNo>sample string 11</PackageNo>
  <ShipmentTransactionDetailID>10</ShipmentTransactionDetailID>
  <Shipped>true</Shipped>
  <TotalWeightKg>7.1</TotalWeightKg>
  <User_Name>sample string 17</User_Name>
  <Width>13.1</Width>
</CustomerOrderPackageModel>

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

Response Information

Resource Description

ResultModel
NameDescriptionTypeAdditional information
Success

string

None.

ErrorText

string

None.

Data

Object

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": "sample string 1",
  "ErrorText": "sample string 2",
  "Data": {}
}

application/xml, text/xml

Sample:
<ResultModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Layan_Cargo_API.Models">
  <Data />
  <ErrorText>sample string 2</ErrorText>
  <Success>sample string 1</Success>
</ResultModel>