POST api/TDCreateParcel
Request Information
URI Parameters
None.
Body Parameters
TDCreateParcelRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Key | string |
None. |
|
| UPSAccountNumber | string |
None. |
|
| UpsUsername | string |
None. |
|
| UpsPassword | string |
None. |
|
| ItemDetailsList | Collection of LineItem |
None. |
|
| Consignee | Address |
None. |
|
| ParcelSize | ParcelSize |
None. |
|
| ReferenceNumber | string |
None. |
|
| TDServiceLevel | TDServiceLevel |
None. |
Request Formats
application/json, text/json
Sample:
{
"Key": "sample string 1",
"UPSAccountNumber": "sample string 2",
"UpsUsername": "sample string 3",
"UpsPassword": "sample string 4",
"ItemDetailsList": [
{
"SKU": "sample string 1",
"HTSCode": "sample string 2",
"CountryOfOrigin": "sample string 3",
"Quantity": 4,
"Value": 5.0,
"ProductDescription": "sample string 6",
"Currency": "sample string 7"
},
{
"SKU": "sample string 1",
"HTSCode": "sample string 2",
"CountryOfOrigin": "sample string 3",
"Quantity": 4,
"Value": 5.0,
"ProductDescription": "sample string 6",
"Currency": "sample string 7"
}
],
"Consignee": {
"FirstName": "sample string 1",
"LastName": "sample string 2",
"Street1": "sample string 3",
"Street2": "sample string 4",
"PostCode": "sample string 5",
"City": "sample string 6",
"Region": "sample string 7",
"Country": "sample string 8",
"Email": "sample string 9",
"Phone": "sample string 10"
},
"ParcelSize": {
"WeightLbs": 1.0,
"LengthInches": 2.0,
"WidthInches": 3.0,
"HeightInches": 4.0
},
"ReferenceNumber": "sample string 5",
"TDServiceLevel": 0
}
application/xml, text/xml
Sample:
<TDCreateParcelRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Iparcel.TradeDirect.Models">
<Consignee>
<City>sample string 6</City>
<Country>sample string 8</Country>
<Email>sample string 9</Email>
<FirstName>sample string 1</FirstName>
<LastName>sample string 2</LastName>
<Phone>sample string 10</Phone>
<PostCode>sample string 5</PostCode>
<Region>sample string 7</Region>
<Street1>sample string 3</Street1>
<Street2>sample string 4</Street2>
</Consignee>
<ItemDetailsList>
<LineItem>
<CountryOfOrigin>sample string 3</CountryOfOrigin>
<Currency>sample string 7</Currency>
<HTSCode>sample string 2</HTSCode>
<ProductDescription>sample string 6</ProductDescription>
<Quantity>4</Quantity>
<SKU>sample string 1</SKU>
<Value>5</Value>
</LineItem>
<LineItem>
<CountryOfOrigin>sample string 3</CountryOfOrigin>
<Currency>sample string 7</Currency>
<HTSCode>sample string 2</HTSCode>
<ProductDescription>sample string 6</ProductDescription>
<Quantity>4</Quantity>
<SKU>sample string 1</SKU>
<Value>5</Value>
</LineItem>
</ItemDetailsList>
<Key>sample string 1</Key>
<ParcelSize>
<HeightInches>4</HeightInches>
<LengthInches>2</LengthInches>
<WeightLbs>1</WeightLbs>
<WidthInches>3</WidthInches>
</ParcelSize>
<ReferenceNumber>sample string 5</ReferenceNumber>
<TDServiceLevel>Any</TDServiceLevel>
<UPSAccountNumber>sample string 2</UPSAccountNumber>
<UpsPassword>sample string 4</UpsPassword>
<UpsUsername>sample string 3</UpsUsername>
</TDCreateParcelRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
TDCreateParcelResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| TDTrackingNumber | string |
None. |
|
| UspsTrackingNumber | string |
None. |
|
| Port | string |
None. |
|
| Service | string |
None. |
|
| Weight | decimal number |
None. |
|
| ResponseCode | TDResponseCode |
None. |
|
| ResponseDescription | string |
None. |
|
| Label | TDParcelLabel |
None. |
Response Formats
application/json, text/json
Sample:
{
"TDTrackingNumber": "sample string 1",
"UspsTrackingNumber": "sample string 2",
"Port": "sample string 3",
"Service": "sample string 4",
"Weight": 5.0,
"ResponseCode": 0,
"ResponseDescription": "sample string 6",
"Label": {
"ImageFormat": 0,
"Name": "sample string 1",
"Label": "sample string 2"
}
}
application/xml, text/xml
Sample:
<TDCreateParcelResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Iparcel.TradeDirect.Models">
<Label>
<ImageFormat>ZPL</ImageFormat>
<Label>sample string 2</Label>
<Name>sample string 1</Name>
</Label>
<Port>sample string 3</Port>
<ResponseCode>Ok</ResponseCode>
<ResponseDescription>sample string 6</ResponseDescription>
<Service>sample string 4</Service>
<TDTrackingNumber>sample string 1</TDTrackingNumber>
<UspsTrackingNumber>sample string 2</UspsTrackingNumber>
<Weight>5</Weight>
</TDCreateParcelResponse>