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": "70285df8-668e-4256-840f-2a8e7d0b6ed7", "CollectionAddress": "sample string 5", "CollectionZipCode": "sample string 6", "CollectionPhone": "sample string 7", "CollectionName": "sample string 8", "CollectionCity": "sample string 9", "CollectionCountry": "db4b22bc-6154-4c5f-8ad7-c383dd997696", "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": "2a8e5999-7bc4-4a1f-a955-40e057a60b33", "Packages": [ { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "ded379aa-0afd-44df-9f03-fe8f1167c013" }, { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "ded379aa-0afd-44df-9f03-fe8f1167c013" } ] }
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>db4b22bc-6154-4c5f-8ad7-c383dd997696</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>2a8e5999-7bc4-4a1f-a955-40e057a60b33</DestinationCountry> <DestinationEmail>sample string 12</DestinationEmail> <DestinationName>sample string 11</DestinationName> <DestinationPhone>sample string 13</DestinationPhone> <DestinationZipCode>sample string 15</DestinationZipCode> <InsuranceLevelId>70285df8-668e-4256-840f-2a8e7d0b6ed7</InsuranceLevelId> <InsuranceType>InsuranceFixedValue</InsuranceType> <Name>sample string 1</Name> <Packages> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>ded379aa-0afd-44df-9f03-fe8f1167c013</ExternalOperatorId> <Height>1</Height> <Length>1</Length> <Name>sample string 1</Name> <Weight>1</Weight> <Width>1</Width> </PackageInsertModel> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>ded379aa-0afd-44df-9f03-fe8f1167c013</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>