POST api/CreateConsolidationUnit_V1

Create Consolidation Unit

Request Information

URI Parameters

None.

Body Parameters

Create Consolidation Unit Request

WS_Repository.Models.Requests.ConsolidationUnit.CreateConsolidationUnitRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support

string

None.

Name

(Mandatory) The Name of the consolidation Unit

string

None.

DistributionDate

(Mandatory) The Date when the Shipments from CU will be distibuted to carriers at Deconsolidation Address

date

None.

Sender

(Mandatory) Sender Address

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

DeconsolidationAddress

(Mandatory) Deconsolidation Address

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

Importer

(Optional) The Importer

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

Broker

(Optional) The Broker

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "Name": "sample string 2",
  "DistributionDate": "2020-07-04T22:36:35.3118727-04:00",
  "Sender": {
    "PersonName": "sample string 1",
    "CompanyName": "sample string 2",
    "Country": "sample string 3",
    "State": "sample string 4",
    "City": "sample string 5",
    "PostalCode": "sample string 6",
    "Address1": "sample string 7",
    "Address2": "sample string 8",
    "Telephone": "sample string 9",
    "Email": "sample string 10"
  },
  "DeconsolidationAddress": {
    "PersonName": "sample string 1",
    "CompanyName": "sample string 2",
    "Country": "sample string 3",
    "State": "sample string 4",
    "City": "sample string 5",
    "PostalCode": "sample string 6",
    "Address1": "sample string 7",
    "Address2": "sample string 8",
    "Telephone": "sample string 9",
    "Email": "sample string 10"
  },
  "Importer": {
    "PersonName": "sample string 1",
    "CompanyName": "sample string 2",
    "Country": "sample string 3",
    "State": "sample string 4",
    "City": "sample string 5",
    "PostalCode": "sample string 6",
    "Address1": "sample string 7",
    "Address2": "sample string 8",
    "Telephone": "sample string 9",
    "Email": "sample string 10"
  },
  "Broker": {
    "PersonName": "sample string 1",
    "CompanyName": "sample string 2",
    "Country": "sample string 3",
    "State": "sample string 4",
    "City": "sample string 5",
    "PostalCode": "sample string 6",
    "Address1": "sample string 7",
    "Address2": "sample string 8",
    "Telephone": "sample string 9",
    "Email": "sample string 10"
  }
}

application/xml, text/xml

Sample:
<CreateConsolidationUnitRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.ConsolidationUnit">
  <Broker>
    <Address1>sample string 7</Address1>
    <Address2>sample string 8</Address2>
    <City>sample string 5</City>
    <CompanyName>sample string 2</CompanyName>
    <Country>sample string 3</Country>
    <Email>sample string 10</Email>
    <PersonName>sample string 1</PersonName>
    <PostalCode>sample string 6</PostalCode>
    <State>sample string 4</State>
    <Telephone>sample string 9</Telephone>
  </Broker>
  <DeconsolidationAddress>
    <Address1>sample string 7</Address1>
    <Address2>sample string 8</Address2>
    <City>sample string 5</City>
    <CompanyName>sample string 2</CompanyName>
    <Country>sample string 3</Country>
    <Email>sample string 10</Email>
    <PersonName>sample string 1</PersonName>
    <PostalCode>sample string 6</PostalCode>
    <State>sample string 4</State>
    <Telephone>sample string 9</Telephone>
  </DeconsolidationAddress>
  <DistributionDate>2020-07-04T22:36:35.3118727-04:00</DistributionDate>
  <Importer>
    <Address1>sample string 7</Address1>
    <Address2>sample string 8</Address2>
    <City>sample string 5</City>
    <CompanyName>sample string 2</CompanyName>
    <Country>sample string 3</Country>
    <Email>sample string 10</Email>
    <PersonName>sample string 1</PersonName>
    <PostalCode>sample string 6</PostalCode>
    <State>sample string 4</State>
    <Telephone>sample string 9</Telephone>
  </Importer>
  <Name>sample string 2</Name>
  <Sender>
    <Address1>sample string 7</Address1>
    <Address2>sample string 8</Address2>
    <City>sample string 5</City>
    <CompanyName>sample string 2</CompanyName>
    <Country>sample string 3</Country>
    <Email>sample string 10</Email>
    <PersonName>sample string 1</PersonName>
    <PostalCode>sample string 6</PostalCode>
    <State>sample string 4</State>
    <Telephone>sample string 9</Telephone>
  </Sender>
  <WS_Key>sample string 1</WS_Key>
</CreateConsolidationUnitRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'WS_Repository.Models.Requests.ConsolidationUnit.CreateConsolidationUnitRequest'.

Response Information

Resource Description

Consolidation Unit Response

WS_Repository.Models.Responses.ConsolidationUnit.CreateConsolidationUnitResponse
NameDescriptionTypeAdditional information
Id

The Id of the Consolidation Unit. Used to add the Hold, Rate o Ship request

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1
}

application/xml, text/xml

Sample:
<CreateConsolidationUnitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.ConsolidationUnit">
  <Id>1</Id>
</CreateConsolidationUnitResponse>