POST v1/Orders/{orderId}/Shipments

Creates a new shipment for an order.

Request Information

Requires Authorization!

URI Parameters

NameDescriptionTypeAdditional information
orderId

The order identifier.

integer

Required.

Body Parameters

AddShipmentInfo
NameDescriptionTypeAdditional information
OrderId

Order identifier for which you want to add a shipment

integer

None.

WarehouseId

Optional Warehouse for which the shipment is created.

Allocated OrderRows for this shipment must have assigned this warehouse.

If not specified, the warehouse is determined based on the first OrderRow assigned to this shipment.

integer

None.

OrderRows

Optional collection of OrderRow identifiers

All orderrows must have been assigned the same warehouse.

If not specified, all shippable orderrows with allocation for the specified warehouse are added.

Collection of integer

None.

ShippingCode

Optional Shipping code for shipment.

If not provided, ShopCtrl will generate the shippingcode.

string

None.

PreferredShipDate

Optional preferred ship date.

date

None.

GeneratePickList

Optional toggle to indicate whether the picklist should be generated on creation of the shipment.

If you set this to false, you can still generate the PickList by calling the GeneratePickList API method.

If not specified (null), Generate PickList setting from Warehouse is used.

boolean

None.

GeneratePackingSlip

Optional toggle to indicate whether the packingslip should be generated on creation of the shipment.

If you set this to false, you can still generate the PackingSlip by calling the GeneratePackingSlip API method.

If not specified (null), Generate packingslip setting from shop settings are used.

boolean

None.

PackingSlipTemplateId

integer

None.

CarrierAccountId

Optional id of CarrierAccount that should be used for the shipment.

If not specified and CarrierAccountId is set for Order, CarrierAccountId from Order is used, otherwise CarrierAccountId remains blank.

CarrierAccountId can also implicitly set when you add the first parcel.

integer

None.

CashOnDeliveryPayment

optional amount to be paid to the postman when the shipment is delivered.

decimal number

None.

Parameters

Optional collection of key-value pairs.

Collection of OrderShipmentParam

None.

Request Formats

application/json, text/json

Sample:
{
  "OrderId": 1,
  "WarehouseId": 2,
  "OrderRows": [
    1,
    2
  ],
  "ShippingCode": "sample string 3",
  "PreferredShipDate": "2021-12-02T20:19:35.0604201+01:00",
  "GeneratePickList": true,
  "GeneratePackingSlip": true,
  "PackingSlipTemplateId": 1,
  "CarrierAccountId": 1,
  "CashOnDeliveryPayment": 1.0,
  "Parameters": [
    {
      "Key": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Key": "sample string 1",
      "Value": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<AddShipmentInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <OrderId>1</OrderId>
  <WarehouseId>2</WarehouseId>
  <OrderRows>
    <OrderRowId>1</OrderRowId>
    <OrderRowId>2</OrderRowId>
  </OrderRows>
  <ShippingCode>sample string 3</ShippingCode>
  <PreferredShipDate>2021-12-02T20:19:35.0604201+01:00</PreferredShipDate>
  <GeneratePickList>true</GeneratePickList>
  <GeneratePackingSlip>true</GeneratePackingSlip>
  <PackingSlipTemplateId>1</PackingSlipTemplateId>
  <CarrierAccountId>1</CarrierAccountId>
  <CashOnDeliveryPayment>1</CashOnDeliveryPayment>
  <Parameters>
    <Parameter>
      <Key>sample string 1</Key>
      <Value>sample string 2</Value>
    </Parameter>
    <Parameter>
      <Key>sample string 1</Key>
      <Value>sample string 2</Value>
    </Parameter>
  </Parameters>
</AddShipmentInfo>

Response Information

Resource Description

Result. HttpStatus OK if shipment was created succesfully


HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.