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.
ParcelInsertModelName | 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": "c7324041-893b-4d58-9bf2-d8e0fe849893", "CollectionAddress": "sample string 5", "CollectionZipCode": "sample string 6", "CollectionPhone": "sample string 7", "CollectionName": "sample string 8", "CollectionCity": "sample string 9", "CollectionCountry": "4472e8ab-e88b-4f2b-a373-f6a4a9cbd839", "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": "fc4a48f1-5833-4689-99f6-1d3d373a10cf", "Packages": [ { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "7ac16be9-1c94-4bd6-ad96-d36ddc33773e" }, { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "7ac16be9-1c94-4bd6-ad96-d36ddc33773e" } ] }
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>4472e8ab-e88b-4f2b-a373-f6a4a9cbd839</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>fc4a48f1-5833-4689-99f6-1d3d373a10cf</DestinationCountry> <DestinationEmail>sample string 12</DestinationEmail> <DestinationName>sample string 11</DestinationName> <DestinationPhone>sample string 13</DestinationPhone> <DestinationZipCode>sample string 15</DestinationZipCode> <InsuranceLevelId>c7324041-893b-4d58-9bf2-d8e0fe849893</InsuranceLevelId> <InsuranceType>InsuranceFixedValue</InsuranceType> <Name>sample string 1</Name> <Packages> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>7ac16be9-1c94-4bd6-ad96-d36ddc33773e</ExternalOperatorId> <Height>1</Height> <Length>1</Length> <Name>sample string 1</Name> <Weight>1</Weight> <Width>1</Width> </PackageInsertModel> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>7ac16be9-1c94-4bd6-ad96-d36ddc33773e</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
ServiceResultName | 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>