Skip to content

Stock & Swap Shipment

Stock and Swap shipments can also be created using the API.

Create shipment for Stock

Creating a new Stock Shipment using Delayed Receiver functionality.

The creation of the shipment with delayed receiver functionality is almost exactly the same as creating a normal LocalPupShipment. When creating a LocalPupShipment with delayed receiver functionality you should call CreateLocalShipment with the following exceptions. See also CreateLocalShipment.

{
    ...                         
    "ToUserUid": null,                  # Leave null, we will specify it later.
    "IsReceiverDelayed":true,           # Specify to true, to prevent validation.
}

When the shipment is created the package can be delivered in the locker at the pick up point, using the DeliveryCode returned by the CreateLocalShipment call. When delivered (or at any state before delivery) you can set the recipient of the shipment by making a call to SetShipmentReceiver. See also SetShipmentReceiver.

{   
    "ShipmentUid": "472843a43...6f07fd6eabe4",  # Unique id of the shipment to specify receiver on.
    "ToUserUid": "638f2fa472...86f07fd6ea2fa",  # Unique id of the user to specify as the receiver.
}

Create shipment for Swapping

The creation of the shipment as a swap for an existing shipment is almost exactly the same as creating a normal LocalPupShipment. When creating a LocalPupShipment that should be a swap of an existing shipment you should call CreateLocalShipment with the following exceptions. See also CreateLocalShipment.

{
    ...                         
    "SwapsShipmentUid": "...",          # Specify the shipment unique id to swap with.
}

When the specified SwapsShipmentUid exists, the newly created shipment will be registered as a swap for the existing shipment. This means that DeliveryCode code of the newly created shipment is exactly the same as the PickUp code of the specified SwapsShipmentUid. This assumes that when the SwapsShipmentUid is being picked up from the locker, the user also delivers (swaps) another item in the same locker. If this is the case, the original SwapsShipmentUid will advance to Received and the newly created shipment will advance to Arrived.