POST api/Parcel/Create?authToken={authToken}

Creates a Parcel.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
authToken

The authentication token.

string

Required

Body Parameters

The model.

ParcelInsertModel
NameDescriptionTypeAdditional 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": "55d894ac-f2dc-473e-97ca-4141e36432dd",
  "CollectionAddress": "sample string 5",
  "CollectionZipCode": "sample string 6",
  "CollectionPhone": "sample string 7",
  "CollectionName": "sample string 8",
  "CollectionCity": "sample string 9",
  "CollectionCountry": "e35a8795-030c-4a16-b65b-1b12715b2667",
  "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": "029bcba1-3e9f-4b86-91a6-3f7f93bdd1ce",
  "Packages": [
    {
      "Name": "sample string 1",
      "Weight": 1.0,
      "Height": 1.0,
      "Width": 1.0,
      "Length": 1.0,
      "ExternalCode": 1,
      "ExternalOperatorId": "4523765e-fa9f-4b22-85f3-6dac932698fa"
    },
    {
      "Name": "sample string 1",
      "Weight": 1.0,
      "Height": 1.0,
      "Width": 1.0,
      "Length": 1.0,
      "ExternalCode": 1,
      "ExternalOperatorId": "4523765e-fa9f-4b22-85f3-6dac932698fa"
    }
  ]
}

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>e35a8795-030c-4a16-b65b-1b12715b2667</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>029bcba1-3e9f-4b86-91a6-3f7f93bdd1ce</DestinationCountry>
  <DestinationEmail>sample string 12</DestinationEmail>
  <DestinationName>sample string 11</DestinationName>
  <DestinationPhone>sample string 13</DestinationPhone>
  <DestinationZipCode>sample string 15</DestinationZipCode>
  <InsuranceLevelId>55d894ac-f2dc-473e-97ca-4141e36432dd</InsuranceLevelId>
  <InsuranceType>InsuranceFixedValue</InsuranceType>
  <Name>sample string 1</Name>
  <Packages>
    <PackageInsertModel>
      <ExternalCode>1</ExternalCode>
      <ExternalOperatorId>4523765e-fa9f-4b22-85f3-6dac932698fa</ExternalOperatorId>
      <Height>1</Height>
      <Length>1</Length>
      <Name>sample string 1</Name>
      <Weight>1</Weight>
      <Width>1</Width>
    </PackageInsertModel>
    <PackageInsertModel>
      <ExternalCode>1</ExternalCode>
      <ExternalOperatorId>4523765e-fa9f-4b22-85f3-6dac932698fa</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
NameDescriptionTypeAdditional 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>