SOM is responsible for shipment order management. Booking and tracking of the shipments, parcels and deliveries. Below are the endpoints (or methods) available.

# Domain Model

The domain model consists of three important objects - Shipment, Parcel and Delivery.

graph LR s(Shipment) p(Parcels) d(Deliveries) s-- has many -->p; p-- has many -->d;

# General Flow

Creating a Shipment, generating labels and tracking numbers and booking pickup involves three steps.

sequenceDiagram participant C as Client participant S as SOM C->>S: POST /shipments.create S->>C: Return Shipment with Parcels and Deliveries C->>S: POST /shipment.bookParcels S->>C: Return Shipment with Parcels and Deliveries C->>S: POST /deliveries.bookPickup S->>C: Return Delivery
  1. Create a shipment. Shipment, Parcels and Deliveries are created with a single call to shipments.create.
  2. To generate labels and tracking numbers for a Shipment, call shipments.bookParcels. This will create labels and tracking numbers for all Deliveries in the specified Shipment.
  3. The final step is to book one or all Deliveries attached to a Shipment. This is done by calling deliveries.bookPickup with the tracking number as a parameter. Once a delivery has been booked, it is handled by our booking service which will most often generate and upload an EDI file at a configured interval.

# Create Shipment

This call creates new shipment, parcels and deliveries at once in SOM. So called Composite Shipment.

# Book Parcels

Creates a booking with the shipping company. This is when tracking numbers, tracking links and shipping labels are generated.

# Book Pickup

When the shipment has received tracking numbers and labels it is time to book pickup. This call makes the actual booking and and notifies the shipping company about the delivery.

# Get Delivery

# Create and Book

Create and book shipment is essentially a wrapper for the three calls shipments.create, shipments.bookParcels and deliveries.bookPickup. It will create a shipment, generate labels and tracking numbers and finally book the created deliveries for pickup, all in one single call.

# Get Shipment

Returns the shipment by a specified parameter.

# Cancel Delivery

Cancels a delivery before it has been picked up by the carrier.

# Update Shipment

Updates a shipment

# Cancel Shipment

Cancels a shipment

# Add Parcel

Allows adding new parcel to already existing shipment. It is possible to add the parcel to the newly created (CreateShipment) carrier pickup that is not yet requested. If the shipment was booked using BookParcels, using AddParcel will book and generate a new label for the added parcel. The endpoint also works with custom booking methods. If a return shipment is connected with the provided shipment, a parcel will be added there.

Typical use case would be to generate labels separately for each parcel in a warehouse.

Last Updated: 11/23/2021, 9:15:27 AM