Tenant App
We define "Tenant Apps" as one-stop-shop service apps that combine services for users or tenants in a residential or commercial building.
The MyPup API is primarily focused on enabling customers, who have their own MyPup pick up point(s), to integrate the pick up point(s) into their own (business) processes. The point of view of the API is therefore as an administrative user. Alternatively, Tenant Apps serve a different purpose and primarily view the MyPup service from the end user.
When integrating the MyPup API keep in mind that you are an "administrative" user to the MyPup platform. This means that you, as a Tenant App builder, can see and interact with all shipments within a single pick up point. This means that you are responsible for filtering out the correct user's data.
Blow you'll see a list of common use cases for Tenant Apps and how you can implement it.
Automatic account creation
When a user registers with the Tenant App (e.g. a new resident to a building or an employee in an office) you'll most probably want to automatically create a user with the MyPup platform. You can do this by follow the next steps:
- Let the user choose a pick up point. You can do this either automatically or using the pick up point's name.
- Create a user account for the user and specify the previously choosen pick up point at the request. Only the e-mail address and first or last name is required. Also explicitly set the canRemoveAutomatically value to true at the mutationConfig attribute of the call. This will make sure that the account is automatically removed when it isn't using the MyPup service anymore.
- Please note that the new user needs to be aware that parcels are delivered using the MyPup service. The user therefore is required to read and accept the privacy policy at https://my-pup.com/privacy and general conditions at https://my-pup.com/privacy.
- Once an account the account is created you'll receive a UserUid. This identifier should, from now on, be used within the Tenant App for this specific user.
- You are also responsible for informing the user about the delivery address (see below).
- Users are uniquely identified by the user's e-mail address. When an e-mail address already exists, but it is already linked to another pick up point, you'll have to inform the user to change the user's main pick up point at https://login.mypup.app/.
Show delivery address
The delivery address and code are very important when using the MyPup service. Once users register with MyPup they'll receive a unique delivery address and delivery code. Users need to use this address and code when they orther something online.
- Query the user's unique delivery code and delivery address by getting the mailcode and delivery address for this user.
- Ensure that both mail code and delivery address is clearly shown to the user. Inform the user to use the first part of the mail code as the first name, and the last part as the last name when ordering something online.
Receiving a parcel
When a user receives a parcel using the MyPup service, they'll automatically receive an e-mail and text message. This message contains a unique pick up PIN code and locker number. With this info the user can unlock the locker (once) to collect their parcel.
Parcels in transit
- Within the Tenant App you can (optionally) show the list of parcels that are being delivered (but not yet arrived).
- Use a call to GetReceiveShipments with
ShipmentState
set toWaitForDropoff
to get all shipments that are in transit to the pick up point. You'll have to query (filter out) for theUserUid
here.
Parcels to collect
- You can also (optionally) show the list of parcels that are ready for collection (pick up).
- Use a call to GetReceiveShipments with
ShipmentState
set toReadyForPickUp
to get all shipments that are ready for pick up. You'll have to query (filter out) for theUserUid
here. - You can then show the PIN code and optional QR code by getting the PickUp Code and QR. The user can use this info to unlock the locker.
- You can also allow the user to unlock the locker by a single unlock call. Please note that you are still an administrative user and you'll have to make sure that you'll only unlock when the shipment's state is
ReadyForPickUp
.
Sending a parcel
Sending a parcel isn't currently supported via the API. Please redirect users to the MyPup web site at https://login.mypup.app/.
Example Sketeches