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": "35de68a2-6339-41e2-941b-a61bc515a421", "CollectionAddress": "sample string 5", "CollectionZipCode": "sample string 6", "CollectionPhone": "sample string 7", "CollectionName": "sample string 8", "CollectionCity": "sample string 9", "CollectionCountry": "90e903fd-fde5-4699-aa1d-55f20a2be8bf", "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": "68410ef6-c611-484c-b98d-9e1081a5df5c", "Packages": [ { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "484aa26f-5312-4d4a-9467-48bf59c88d8f" }, { "Name": "sample string 1", "Weight": 1.0, "Height": 1.0, "Width": 1.0, "Length": 1.0, "ExternalCode": 1, "ExternalOperatorId": "484aa26f-5312-4d4a-9467-48bf59c88d8f" } ] }
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>90e903fd-fde5-4699-aa1d-55f20a2be8bf</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>68410ef6-c611-484c-b98d-9e1081a5df5c</DestinationCountry> <DestinationEmail>sample string 12</DestinationEmail> <DestinationName>sample string 11</DestinationName> <DestinationPhone>sample string 13</DestinationPhone> <DestinationZipCode>sample string 15</DestinationZipCode> <InsuranceLevelId>35de68a2-6339-41e2-941b-a61bc515a421</InsuranceLevelId> <InsuranceType>InsuranceFixedValue</InsuranceType> <Name>sample string 1</Name> <Packages> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>484aa26f-5312-4d4a-9467-48bf59c88d8f</ExternalOperatorId> <Height>1</Height> <Length>1</Length> <Name>sample string 1</Name> <Weight>1</Weight> <Width>1</Width> </PackageInsertModel> <PackageInsertModel> <ExternalCode>1</ExternalCode> <ExternalOperatorId>484aa26f-5312-4d4a-9467-48bf59c88d8f</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>