Booking API
Booking Multi-Parcel Shipments With Skrym
The booking.BookShipment
API books the delivery of parcels with the specified transport method.
It works with the transporters' APIs as depicted in the diagram below:
The endpoint responds with 200
only if the booking has been successfully made with the transporter and we have acquired the labels.
If we cannot acquire the labels from the transporter, Skrym labels will be generated instead.
Example request
{"bookingReference": "book-1","wmsReference": "","parcels": [{"reference": "book-1-parcel-1","physicalProperties": {"weight": 1000,"length": 200,"height": 100,"width": 100}}],"origin": {"countryCode": "SE","postalCode": "17076","city": "Solna","address": "Rådjursstigen 22"},"destination": {"countryCode": "SE","postalCode": "41111","city": "Göteborg","address": "Karin Boyes gata 7"},"receiver": {"name": "Test Person","phone": "+41234567890","email": "test.person@test.com","address": {"countryCode": "SE","postalCode": "41111","city": "Göteborg","address": "Karin Boyes gata 7"}},"addons": {},"transporter": "Postnord","transportMethod": "Parcel","workstation": {"reference": "","currentUser": ""}}
Endpoint Schema:
Once successfully booked, you can trigger printing of the labels via Printing API, or you can handle this yourself using the label data returned from the booking.
In case of an unsuccessful booking, you can call the endpoint again to retry the booking.
Retries
There can be various reasons for a booking to fail, such as the transporter's API being down or the transporter not having the capacity to handle the shipment at that time.
Skrym also allows you to book shipments for multiple parcels using any of the transporter services available in its system. However, if the transporter does not support multi-parcel shipments, Skrym will book the shipment as multiple single-parcel shipments. This can sometimes lead to partial bookings, where some parcels are successfully booked and others are not.
To address partially successful or completely failed bookings, Skrym has introduced a new endpoint called RetryBooking
. This endpoint allows you to book all failed parcels that were not successfully booked in the initial booking.
Endpoint Schema: