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.

LocationUnit

(Optional, Mandatory when IsFedExLocationId selected) 2Ship location ID to use for Rate / Ship the cu. If not set than will use the sender address to match the right Location to use.

integer

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.

PreferredCarrierId

(Optional) Preferred Carrier ID

integer

None.

PreferredServiceCode

(Optional) Preferred Service Code

string

None.

IsFedExConsolidationUnit

(Optional) true Used for FedEx IPD, IED, IDD, false for other carriers Consolidation unit

boolean

None.

FedExFacilityLocationId

(Optional) Used for FedEx Facility location ID provided by FedEx

string

None.

FedExConsolidationType

(Optional) Used for FedEx, type of CU, IDD, IPD, IED

WS_Repository.Models.Requests.ConsolidationUnit.FedExConsolidationType

None.

SoldTo

(Optional) Mandatory when FedEx Consolidation Type, optional in rest

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

Exporter

(Optional) Exporter of records

WS_Repository.Models.Requests.ConsolidationUnit.Contact

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "Name": "sample string 2",
  "DistributionDate": "2022-07-06T00:40:22.8030808-04:00",
  "LocationUnit": 5,
  "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"
  },
  "PreferredCarrierId": 6,
  "PreferredServiceCode": "sample string 7",
  "IsFedExConsolidationUnit": true,
  "FedExFacilityLocationId": "sample string 9",
  "FedExConsolidationType": 0,
  "SoldTo": {
    "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"
  },
  "Exporter": {
    "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>2022-07-06T00:40:22.8030808-04:00</DistributionDate>
  <Exporter>
    <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>
  </Exporter>
  <FedExConsolidationType>PriorityDistribution</FedExConsolidationType>
  <FedExFacilityLocationId>sample string 9</FedExFacilityLocationId>
  <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>
  <IsFedExConsolidationUnit>true</IsFedExConsolidationUnit>
  <LocationUnit>5</LocationUnit>
  <Name>sample string 2</Name>
  <PreferredCarrierId>6</PreferredCarrierId>
  <PreferredServiceCode>sample string 7</PreferredServiceCode>
  <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>
  <SoldTo>
    <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>
  </SoldTo>
  <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>