POST api/Parcel/Create?authToken={authToken}
Creates a Parcel.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| authToken |
The authentication token. |
string |
Required |
Body Parameters
The model.
ParcelInsertModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Name | string |
Required Max length: 256 |
|
| Comments | string |
Max length: 256 |
|
| Reference | string |
Max length: 20 |
|
| ATCode | string |
Max length: 80 |
|
| InsuranceType | InsuranceType |
None. |
|
| InsuranceLevelId | globally unique identifier |
None. |
|
| CollectionAddress | string |
Required Max length: 256 |
|
| CollectionZipCode | string |
Required Max length: 128 |
|
| CollectionPhone | string |
Max length: 256 |
|
| CollectionName | string |
Max length: 256 |
|
| CollectionCity | string |
Required Max length: 128 |
|
| CollectionCountry | globally unique identifier |
Required |
|
| DestinationName | string |
Max length: 256 |
|
| DestinationEmail | string |
Required Max length: 128 |
|
| DestinationPhone | string |
Max length: 128 |
|
| DestinationAddress | string |
Required Max length: 190 |
|
| DestinationZipCode | string |
Required Max length: 128 |
|
| DestinationCity | string |
Required Max length: 128 |
|
| DestinationCountry | globally unique identifier |
Required |
|
| Packages | Collection of PackageInsertModel |
None. |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"Comments": "sample string 2",
"Reference": "sample string 3",
"ATCode": "sample string 4",
"InsuranceType": 1,
"InsuranceLevelId": "6aa6f7dd-036a-4aa6-9d67-a35dcb3db11d",
"CollectionAddress": "sample string 5",
"CollectionZipCode": "sample string 6",
"CollectionPhone": "sample string 7",
"CollectionName": "sample string 8",
"CollectionCity": "sample string 9",
"CollectionCountry": "29b12ef1-4a60-4e0e-bf47-81b72ee9ebaa",
"DestinationName": "sample string 11",
"DestinationEmail": "sample string 12",
"DestinationPhone": "sample string 13",
"DestinationAddress": "sample string 14",
"DestinationZipCode": "sample string 15",
"DestinationCity": "sample string 16",
"DestinationCountry": "cc1deba2-a01e-4f1b-b908-6d8ea1ef0e26",
"Packages": [
{
"Name": "sample string 1",
"Weight": 1.0,
"Height": 1.0,
"Width": 1.0,
"Length": 1.0,
"ExternalCode": 1,
"ExternalOperatorId": "1b82fd2f-ded8-42d2-984a-157f5e5e3215"
},
{
"Name": "sample string 1",
"Weight": 1.0,
"Height": 1.0,
"Width": 1.0,
"Length": 1.0,
"ExternalCode": 1,
"ExternalOperatorId": "1b82fd2f-ded8-42d2-984a-157f5e5e3215"
}
]
}
application/xml, text/xml
Sample:
<ParcelInsertModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BOP.Apps.Web.Areas.Api.Models">
<ATCode>sample string 4</ATCode>
<CollectionAddress>sample string 5</CollectionAddress>
<CollectionCity>sample string 9</CollectionCity>
<CollectionCountry>29b12ef1-4a60-4e0e-bf47-81b72ee9ebaa</CollectionCountry>
<CollectionName>sample string 8</CollectionName>
<CollectionPhone>sample string 7</CollectionPhone>
<CollectionZipCode>sample string 6</CollectionZipCode>
<Comments>sample string 2</Comments>
<DestinationAddress>sample string 14</DestinationAddress>
<DestinationCity>sample string 16</DestinationCity>
<DestinationCountry>cc1deba2-a01e-4f1b-b908-6d8ea1ef0e26</DestinationCountry>
<DestinationEmail>sample string 12</DestinationEmail>
<DestinationName>sample string 11</DestinationName>
<DestinationPhone>sample string 13</DestinationPhone>
<DestinationZipCode>sample string 15</DestinationZipCode>
<InsuranceLevelId>6aa6f7dd-036a-4aa6-9d67-a35dcb3db11d</InsuranceLevelId>
<InsuranceType>InsuranceFixedValue</InsuranceType>
<Name>sample string 1</Name>
<Packages>
<PackageInsertModel>
<ExternalCode>1</ExternalCode>
<ExternalOperatorId>1b82fd2f-ded8-42d2-984a-157f5e5e3215</ExternalOperatorId>
<Height>1</Height>
<Length>1</Length>
<Name>sample string 1</Name>
<Weight>1</Weight>
<Width>1</Width>
</PackageInsertModel>
<PackageInsertModel>
<ExternalCode>1</ExternalCode>
<ExternalOperatorId>1b82fd2f-ded8-42d2-984a-157f5e5e3215</ExternalOperatorId>
<Height>1</Height>
<Length>1</Length>
<Name>sample string 1</Name>
<Weight>1</Weight>
<Width>1</Width>
</PackageInsertModel>
</Packages>
<Reference>sample string 3</Reference>
</ParcelInsertModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ServiceResult| Name | Description | Type | Additional information |
|---|---|---|---|
| ErrorCode | ServiceErrorCode |
None. |
|
| ErrorMessage | Collection of string |
None. |
|
| Success | boolean |
None. |
Response Formats
application/json, text/json
Sample:
{
"ErrorCode": 0,
"ErrorMessage": [
"sample string 1",
"sample string 2"
],
"Success": true
}
application/xml, text/xml
Sample:
<ServiceResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BOP.Common.Infrastructure.ApiObjects.Results">
<ErrorCode>None</ErrorCode>
<ErrorMessage xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</ErrorMessage>
<Success>true</Success>
</ServiceResult>