Skip to content

Account & Location Validation

This sample demonstrates how a carrier, marketplace, or webshop can offer locker delivery during checkout while supporting both MyPup and non-MyPup locker networks.

Customers proceed through the normal checkout process and choose between home delivery and locker delivery. Additional validation is only required when a MyPup locker location is selected.

Flow

  1. The customer proceeds to checkout and enters their delivery information.
  2. The customer selects a delivery method:

    1. Regular Home Delivery If the customer selects Regular Home Delivery, verify whether the entered delivery address matches a known MyPup hub address using /V1/PickupPoints/GetDeliveryAddresses.
      1. If the address matches a MyPup hub address, notify the customer that a MyPup hub address has been entered and present the following options:
        • Use Regular Home Delivery. If the customer chooses Regular Home Delivery, require the customer to replace the MyPup hub address with their own address.
        • Delivery to MyPup locker. If the customer chooses Delivery to MyPup Locker, continue to locker selection (step 2.2).
      2. If the address does not match a MyPup hub address, continue with regular home delivery.
    2. Delivery to locker If the customer selects Delivery to Locker, show available locker locations using /V1/PickupPoints/GetDeliveryAddresses.
      1. If the customer selects a location that is not a MyPup location, continue using the carrier's regular parcel locker process.
      2. If the customer selects a location that is a MyPup location, request the customer's email address and/or MyPup delivery code, and validate the provided information using /V1/Accounts/CheckAccountDeliveryDetails.
        1. If no matching MyPup account is found, display an error message and offer the customer the option to create a MyPup account by redirecting them to the MyPup registration page. After creating an account, the customer receives a MyPup delivery code and can continue the checkout process. If the customer chooses not to create an account, an alternative delivery method should be selected.
        2. If a matching MyPup account is found, verify that the selected locker location corresponds with the customer's assigned MyPup hub by combining information from /V1/PickupPoints/GetPickUpPoints (see also GetPickUpPoints) and /V1/PickupPoints/GetDeliveryAddresses.
          1. If the correct MyPup hub has been selected, use the associated MyPup delivery code on the shipment label.
          2. If a different MyPup hub was selected:
            1. Retrieve the correct hub address assigned to the customer.
            2. Replace the selected destination address with the correct MyPup hub address.
            3. Apply the MyPup delivery code to the shipment label.

    Warning

    The MyPup delivery code must not be displayed to the customer anywhere in the checkout flow.

  3. Create the expected delivery by sending shipment and tracking information to MyPup using the agreed carrier-specific endpoint /V1/Logistics/CreateExpectedDelivery/{CarrierName}.

    Note

    This endpoint will be created on your request, ask your contact person for this.

  4. The shipment is delivered to the MyPup hub. After delivery, MyPup shares shipment status and tracking updates back to the carrier using the agreed callback URL until the shipment has been collected by the customer.

Flowchart

flowchart TD
    A[Customer enters delivery information] --> B{Delivery method?}
    B -- Home delivery --> C{Known MyPup hub address?<br/>GetDeliveryAddresses}
    C -- No --> D[Regular home delivery]
    C -- Yes --> E{Customer choice}
    E -- Home delivery --> F[Customer replaces hub address<br/>with own address] --> D
    E -- MyPup locker --> G
    B -- Locker delivery --> G[Show locker locations<br/>GetDeliveryAddresses]
    G --> H{MyPup location selected?}
    H -- No --> I[Carrier's regular parcel locker process]
    H -- Yes --> J{Matching MyPup account?<br/>CheckAccountDeliveryDetails}
    J -- No --> K[Offer MyPup registration<br/>or alternative delivery method]
    J -- Yes --> L{Selected hub matches<br/>customer's assigned hub?}
    L -- No --> M[Replace destination with<br/>customer's assigned hub address]
    L -- Yes --> N[Put delivery code on label]
    M --> N
    N --> O[Send shipment to MyPup<br/>CreateExpectedDelivery]
    O --> P[MyPup sends status updates<br/>to the callback URL]