POST v1/Shipments/{shipmentId}/Parcel

Add parcel to the shipment. You can only set 1 parcel per shipment. If you want to replace the parcel, you should first delete the existing parcel on the shipment.

Request Information

Requires Authorization!

URI Parameters

NameDescriptionTypeAdditional information
shipmentId

integer

Required.

Body Parameters

AddShipmentParcelInfo
NameDescriptionTypeAdditional information
CarrierAccountId

Optional identifier of CarrierAccount.

If not set, CarrierAccountId must already be set at Shipment or Order level.
If neither Order, Shipment of Parcel have set CarrierAccountId, an error is thrown.

integer

None.

GoodsDescription

string

None.

TrackingCode

string

None.

DeclaredValue

decimal number

None.

TotalCharges

decimal number

None.

Comment

string

None.

ParcelPackages

Collection of AddShipmentParcelPackage

None.

Request Formats

application/json, text/json

Sample:
{
  "CarrierAccountId": 1,
  "GoodsDescription": "sample string 1",
  "TrackingCode": "sample string 2",
  "DeclaredValue": 3.0,
  "TotalCharges": 4.0,
  "Comment": "sample string 5",
  "ParcelPackages": [
    {
      "PackageType": 1,
      "TrackingCode": "sample string 3",
      "DeliveryStatus": 1,
      "Weight": 4.0,
      "Length": 5.0,
      "Width": 6.0,
      "Height": 7.0,
      "DeliveredDate": "2021-12-02T20:19:38.216608+01:00"
    },
    {
      "PackageType": 1,
      "TrackingCode": "sample string 3",
      "DeliveryStatus": 1,
      "Weight": 4.0,
      "Length": 5.0,
      "Width": 6.0,
      "Height": 7.0,
      "DeliveredDate": "2021-12-02T20:19:38.216608+01:00"
    }
  ]
}

application/xml, text/xml

Sample:
<AddShipmentParcelInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CarrierAccountId>1</CarrierAccountId>
  <GoodsDescription>sample string 1</GoodsDescription>
  <TrackingCode>sample string 2</TrackingCode>
  <DeclaredValue>3</DeclaredValue>
  <TotalCharges>4</TotalCharges>
  <Comment>sample string 5</Comment>
  <ParcelPackages>
    <ParcelPackage>
      <Id>2</Id>
      <TrackingCode>sample string 3</TrackingCode>
      <DeliveryStatus>NotPlanned</DeliveryStatus>
      <Weight>4</Weight>
      <Length>5</Length>
      <Width>6</Width>
      <Height>7</Height>
      <DeliveredDate>2021-12-02T20:19:38.216608+01:00</DeliveredDate>
      <LastCarrierUpdate>2021-12-02T20:19:38.216608+01:00</LastCarrierUpdate>
      <LastCarrierStatus>sample string 1</LastCarrierStatus>
    </ParcelPackage>
    <ParcelPackage>
      <Id>2</Id>
      <TrackingCode>sample string 3</TrackingCode>
      <DeliveryStatus>NotPlanned</DeliveryStatus>
      <Weight>4</Weight>
      <Length>5</Length>
      <Width>6</Width>
      <Height>7</Height>
      <DeliveredDate>2021-12-02T20:19:38.216608+01:00</DeliveredDate>
      <LastCarrierUpdate>2021-12-02T20:19:38.216608+01:00</LastCarrierUpdate>
      <LastCarrierStatus>sample string 1</LastCarrierStatus>
    </ParcelPackage>
  </ParcelPackages>
</AddShipmentParcelInfo>

Response Information

Resource Description


Parcel
NameDescriptionTypeAdditional information
LastCarrierUpdate

The timestamp of the last status check with the Carrier.

date

None.

FirstDeliveryAttempt

date

None.

ShipperTrackingUrl

Gets or sets the shipper tracking URL.

Collection of string

None.

GoodsDescription

string

Max length: 50

DeliveredDate

The timestamp the complete Parcel was delivered. This timestamp is based on the DeliveryDate of all containing labels/packages.

date

None.

Params

Gets or sets the shipment parameters.

Collection of CarrierParameter

None.

ShippingLabels

Gets or sets the shipment packages.

Collection of ShippingLabel

None.

ShippingLabelFileId

Gets or sets the Id to the file (pdf) containing the generated shippinglabel.

integer

None.

ShipFrom

Gets the sender contact info

ContactInfoAddress

None.

ShipTo

Gets the addressee contact info

ContactInfoAddress

None.

Id

Gets or sets the identifier.

integer

Must be 0

TrackingCode

Gets or sets the tracking code.

string

Max length: 2147483647

CreateTimestamp

Gets or sets the create timestamp.

date

Required

ChangedTimestamp

Gets the changed timestamp.

date

Required

CarrierName

The name of the Carrier used.

string

None.

ShopId

Gets or sets the Shop identifier.

integer

Required

OrderId

Gets or sets the Order identifier.

integer

None.

CarrierAccountId

Gets or sets the Carrier account.

integer

Required

ParcelStatus

The Parcel Status.

ParcelStatusEnum

None.

IsReturn

Indicates whether the Parcel is a return shipment.

boolean

Required

Response Formats

application/json, text/json

Sample:
{
  "LastCarrierUpdate": "2021-12-02T20:19:38.216608+01:00",
  "FirstDeliveryAttempt": "2021-12-02T20:19:38.216608+01:00",
  "ShipperTrackingUrl": [
    "sample string 1",
    "sample string 2"
  ],
  "GoodsDescription": "sample string 1",
  "DeliveredDate": "2021-12-02T20:19:38.216608+01:00",
  "Params": [
    {
      "Key": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Key": "sample string 1",
      "Value": "sample string 2"
    }
  ],
  "ShippingLabels": [
    {
      "Id": 1,
      "TrackingCode": "sample string 2",
      "DeliveryStatus": 1,
      "Weight": 3.0,
      "Length": 4.0,
      "Width": 5.0,
      "Height": 6.0,
      "DeliveredDate": "2021-12-02T20:19:38.216608+01:00",
      "LastCarrierUpdate": "2021-12-02T20:19:38.216608+01:00",
      "LastCarrierStatus": "sample string 7"
    },
    {
      "Id": 1,
      "TrackingCode": "sample string 2",
      "DeliveryStatus": 1,
      "Weight": 3.0,
      "Length": 4.0,
      "Width": 5.0,
      "Height": 6.0,
      "DeliveredDate": "2021-12-02T20:19:38.216608+01:00",
      "LastCarrierUpdate": "2021-12-02T20:19:38.216608+01:00",
      "LastCarrierStatus": "sample string 7"
    }
  ],
  "ShippingLabelFileId": 1,
  "ShipFrom": {
    "Id": 1,
    "CompanyName": "sample string 2",
    "Address": "sample string 3",
    "Address2": "sample string 4",
    "StreetAddress": "sample string 5",
    "StreetAddressNumber": "sample string 6",
    "StreetAddressExtension": "sample string 7",
    "PostalCode": "sample string 8",
    "City": "sample string 9",
    "CountryId": 1,
    "CountryCode": "sample string 10",
    "CountryName": null,
    "EMail": "sample string 11",
    "Phone": "sample string 12",
    "Phone2": "sample string 13",
    "StateProvince": "sample string 14",
    "StateProvinceCode": "sample string 15"
  },
  "ShipTo": {
    "Id": 1,
    "CompanyName": "sample string 2",
    "Address": "sample string 3",
    "Address2": "sample string 4",
    "StreetAddress": "sample string 5",
    "StreetAddressNumber": "sample string 6",
    "StreetAddressExtension": "sample string 7",
    "PostalCode": "sample string 8",
    "City": "sample string 9",
    "CountryId": 1,
    "CountryCode": "sample string 10",
    "CountryName": null,
    "EMail": "sample string 11",
    "Phone": "sample string 12",
    "Phone2": "sample string 13",
    "StateProvince": "sample string 14",
    "StateProvinceCode": "sample string 15"
  },
  "Id": 2,
  "TrackingCode": "sample string 3",
  "CreateTimestamp": "2021-12-02T20:19:38.216608+01:00",
  "ChangedTimestamp": "2021-12-02T20:19:38.216608+01:00",
  "CarrierName": "sample string 6",
  "ShopId": 7,
  "OrderId": 1,
  "CarrierAccountId": 8,
  "ParcelStatus": 1,
  "IsReturn": true
}

application/xml, text/xml

Sample:
<Parcel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>2</Id>
  <TrackingCode>sample string 3</TrackingCode>
  <CreateTimestamp>2021-12-02T20:19:38.216608+01:00</CreateTimestamp>
  <ChangedTimestamp>2021-12-02T20:19:38.216608+01:00</ChangedTimestamp>
  <CarrierName>sample string 6</CarrierName>
  <ShopId>7</ShopId>
  <OrderId>1</OrderId>
  <CarrierAccountId>8</CarrierAccountId>
  <ParcelStatus>NotPlanned</ParcelStatus>
  <IsReturn>true</IsReturn>
  <LastCarrierUpdate>2021-12-02T20:19:38.216608+01:00</LastCarrierUpdate>
  <FirstDeliveryAttempt>2021-12-02T20:19:38.216608+01:00</FirstDeliveryAttempt>
  <ShipperTrackingUrl>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </ShipperTrackingUrl>
  <GoodsDescription>sample string 1</GoodsDescription>
  <DeliveredDate>2021-12-02T20:19:38.216608+01:00</DeliveredDate>
  <Params>
    <Parameters>
      <Key>sample string 1</Key>
      <Value>sample string 2</Value>
    </Parameters>
    <Parameters>
      <Key>sample string 1</Key>
      <Value>sample string 2</Value>
    </Parameters>
  </Params>
  <ShippingLabels>
    <ShippingLabels>
      <Id>1</Id>
      <TrackingCode>sample string 2</TrackingCode>
      <DeliveryStatus>NotPlanned</DeliveryStatus>
      <Weight>3</Weight>
      <Length>4</Length>
      <Width>5</Width>
      <Height>6</Height>
      <DeliveredDate>2021-12-02T20:19:38.216608+01:00</DeliveredDate>
      <LastCarrierUpdate>2021-12-02T20:19:38.216608+01:00</LastCarrierUpdate>
      <LastCarrierStatus>sample string 7</LastCarrierStatus>
    </ShippingLabels>
    <ShippingLabels>
      <Id>1</Id>
      <TrackingCode>sample string 2</TrackingCode>
      <DeliveryStatus>NotPlanned</DeliveryStatus>
      <Weight>3</Weight>
      <Length>4</Length>
      <Width>5</Width>
      <Height>6</Height>
      <DeliveredDate>2021-12-02T20:19:38.216608+01:00</DeliveredDate>
      <LastCarrierUpdate>2021-12-02T20:19:38.216608+01:00</LastCarrierUpdate>
      <LastCarrierStatus>sample string 7</LastCarrierStatus>
    </ShippingLabels>
  </ShippingLabels>
  <ShippingLabelFileId>1</ShippingLabelFileId>
  <ShipFrom>
    <Id>1</Id>
    <CompanyName>sample string 2</CompanyName>
    <Address>sample string 3</Address>
    <Address2>sample string 4</Address2>
    <StreetAddress>sample string 5</StreetAddress>
    <StreetAddressNumber>sample string 6</StreetAddressNumber>
    <StreetAddressExtension>sample string 7</StreetAddressExtension>
    <PostalCode>sample string 8</PostalCode>
    <City>sample string 9</City>
    <CountryId>1</CountryId>
    <CountryCode>sample string 10</CountryCode>
    <EMail>sample string 11</EMail>
    <Phone>sample string 12</Phone>
    <Phone2>sample string 13</Phone2>
    <StateProvince>sample string 14</StateProvince>
    <StateProvinceCode>sample string 15</StateProvinceCode>
  </ShipFrom>
  <ShipTo>
    <Id>1</Id>
    <CompanyName>sample string 2</CompanyName>
    <Address>sample string 3</Address>
    <Address2>sample string 4</Address2>
    <StreetAddress>sample string 5</StreetAddress>
    <StreetAddressNumber>sample string 6</StreetAddressNumber>
    <StreetAddressExtension>sample string 7</StreetAddressExtension>
    <PostalCode>sample string 8</PostalCode>
    <City>sample string 9</City>
    <CountryId>1</CountryId>
    <CountryCode>sample string 10</CountryCode>
    <EMail>sample string 11</EMail>
    <Phone>sample string 12</Phone>
    <Phone2>sample string 13</Phone2>
    <StateProvince>sample string 14</StateProvince>
    <StateProvinceCode>sample string 15</StateProvinceCode>
  </ShipTo>
</Parcel>