Send & Receive Shipment
Creating a new Sending or Receiving Shipment.
Create shipment for Sending
This sample creates a new shipment that will be send from you, as a Dispatcher, to another MyPup account, using the same PickUpPoint. Shipment type: LocalPupShipment.
- Make sure you know the receiving account (
UserUid
) by creating a new one, or retrieving an existing one, using a single call to CreateOrGetAccount. After this call you should have a validUserUid
. - Determine the PickUpPoint (
PupUid
) which you would like to use for the shipment using a call to GetPickUpPoints. You do not have to worry about available lockers at this time since the shipment creation logic will check that for you. After this call you should have a validPupUid
. - Register the shipment using a CreateLocalShipment call. When calling you should specify previously retrieved unique ids to the
PupUid
andToUserUid
field. Since you, as a Dispatcher will be sending the shipment, you can set theFromUserUid
field to null. Also make sure you have theDimension
set to a valid value.
Create shipment for Receiving
This sample creates a new shipment that will be send by another MyPup account to you, the Dispatcher, using the same PickUpPoint. Shipment type: LocalPupShipment.
- Make sure you know the sending account (
UserUid
) by creating a new one, or retrieving an existing one, using a single call to CreateOrGetAccount. After this call you should have a validUserUid
. - Determine the PickUpPoint (
PupUid
) which you would like to use for the shipment using a call to GetPickUpPoints. You do not have to worry about available lockers at this time since the shipment creation logic will check that for you. After this call you should have a validPupUid
. - Register the shipment using a CreateLocalShipment call. When calling you should specify previously retrieved unique ids to the
PupUid
andFromUserUid
field. Since you, as a Dispatcher will be receiving the shipment, you can set theToUserUid
field to null. Also make sure you have theDimension
set to a valid value.