Outbound Message Types

An outbound message is a message that is sent from LogTrade to the carrier.

There are several different outgoing messages types available. The only mandatory type is ShippingInstruction. All messages consist of all information that LogTrade has about the consignment, any information that is not necessary/wanted should just be skipped on the carrier side. It is important that all messages are received, and response is HTTP 200, so just skip information that is not wanted. See below table for more information about each message type.

Message TypeMessage FunctionsMandatoryDescription
ValidationRequestOriginalNoThis message gives the carrier the possibility to validate all data in a request. 
BookingRequestOriginal, Replace, CancellationNoThis message is used for preliminary bookings and the updates/cancellations to the booking.
ShippingInstructionOriginalYesThis message is the final consignment. After this the consignment cannot be changed or cancelled. 

Validation request

A validation request is used if the carrier wants to validate data before accepting a consignment. The validation request is sent every time a consignment is asked to be created in the status Prepared or Released in LogTrade. This means that it is not possible to print labels or documents if the validation request fails. This message type is not mandatory. A validation request that fails also expects a message that should be shown to the customer about the validation error.

Examples of validations that are common is 

  • Correct customer number
  • Zip codes
  • Destination countries or regions
  • Weight limits
  • Volume limits
  • Load meter limits
  • Additional services in combination with product, customer number

NOTE: If the validation endpoint is not responding the consignment cannot be created.

The endpoint needs to respond with HTTP 200 and "success": true. If there is a validation error success should be set to false and a human-readable message should be applied.

An example endpoint can be found here.

Response body needs to look like this:

  "success": true,
  "messages": [

Booking request

BookingRequest is sent to the carrier when the consignment is asked to be created in the status Prepared in LogTrade. The first time a consignment is prepared a BookingRequest is sent with the value Original in the MessageFunction tag. If a consignment is changed (for example from 1 package to 1 pallet) a new BookingRequest will be sent with the value Replace in MessageFunction. If a user chooses to delete a consignment in LogTrade a BookingRequest with the value Cancellation in MessageFunction is sent to the carrier. All responses to a BookingRequest should be HTTP 200.

If ValidationRequest is used this message is sent to the carrier before the BookingRequest. The BookingRequest will only be sent if the ValidationRequest is successful.

Shipping instruction

ShippingInstruction is sent to the carrier when the consignment created or changed to status Released in LogTrade. A ShippingInstruction can only have value Original in tag MessageFunction. When a consignment has been released and the ShippingInstruction has been sent no more outbound messages will be sent.