Through the Shipmondo API it is possible to send packages to designated service points, where the customer later can pick them up. In this guide we will explore how to create a shipment with a specified or automatically selected service point. 

This guide assumes that you already have knowledge of how to select a product, print, and create a basic shipment request. You can find that guide here

Service points

The shipment can be sent to service points (also called pickup points) by applying them to a shipment if the shipping product in question supports it. 

To find a service point based on nearest city, address, or specific service point ID, use the /pickup_points endpoint. In this example we're going to use carrier_code gls, country_code DK, and zipcode 5000. By default, we are going to receive 10 service_points, but in this example we will only take a look at the closest service point.

[
  {
    "number": "95892",
    "id": "95892",
    "company_name": "7-Eleven Odense C",
    "name": "7-Eleven Odense C",
    "address": "Vestergade 89",
    "address2": "Pakkeshop: 95892",
    "zipcode": "5000",
    "city": "Odense C",
    "country": "DK",
    "distance": 182,
    "longitude": 10.3807,
    "latitude": 55.3942,
    "agent": "gls",
    "carrier_code": "gls",
    "routing_code": null,
    "opening_hours": [
      "Man: 07:00-23:00",
      "Tir: 07:00-23:00",
      "Ons: 07:00-23:00",
      "Tor: 07:00-23:00",
      "Fre: 07:00-23:00",
      "Lør: 07:00-23:00",
      "Søn: 07:00-23:00"
    ],
    "in_delivery": true,
    "out_delivery": true
  }
]

While there is a lot of response data, all we need for specifying a specific service point in our shipment request is the number of the service point. In this case it is "95892".

Shipment request with service point

After having extracted the service_point number from the /pickup_points call, we are ready to apply it to our shipment request.

{
  "test_mode": false,
  "own_agreement": false,
  "product_code": "GLSDK_SD",
  "service_codes": "EMAIL_NT",
  "automatic_select_service_point": false,
  "sender": {
    "name": "Pakkelabels.dk ApS",
    "address1": "Strandvejen 6",
    "zipcode": "5240",
    "city": "Odense NØ",
    "country_code": "DK",
    "email": "firma@email.dk",
    "mobile": "70400407"
  },
  "receiver": {
    "name": "Lene Jensen",
    "address1": "Vindegade 112",
    "zipcode": "5000",
    "city": "Odense C",
    "country_code": "DK",
    "email": "lene@email.dk",
    "mobile": "50607080"
  },
  "service_point": {
    "id": "95892"
  },
  "parcels": [
    {
      "weight": 2000
    }
  ],
  "print": true,
  "print_at": {
    "host_name": "LAPTOP-PKL",
    "printer_name": "GK420D",
    "label_format": "zpl"
  },
  "reference": "Order 42"
}

Usually a shipment request would send to the receiver address, but because we have applied a new object called service_point to our request, the shipment will be sent to the service point.

If the shipment should be automatically sent to the closest service point (air distance) then we can set automatic_select_service_point to be true. In this case, it is not necessary to provide a service_point object.

Fandt du dit svar?