BOL API
  • 12 Aug 2022
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

BOL API

  • Dark
    Light

Article summary

This document describes the external API for retrieval of BOL (Bill of Lading) documents.

The protocol is based on XML data exchange with HTTP used as a transport. The data sent must be valid XML or will be rejected by the parser. Error handling will be done by always including <Errors> container in the response. The Errors element will not be returned if no errors are found. 

Connection

To connect to the site use the following HTTPS URL via regular POST method with the parameter RQXML=<your xml document>  https://api.landmarkglobal.com/v2/BOL.php

The Request and Response schemas are outlined below:    

BOLRequest

This API will receive shipping lane details (OriginFacilityCode and, optionally, DestinationFacilityCode) to locate scheduled BOL and freight details to update located BOL. At completion of the request, response will be returned with BOL number and a label. BOL label might be in one of the following formats: png, pdf, jpg or gif and encoded as either base64 or base64compressed string.

Note that use of this API requires that a recurring freight move has already been configured in Landmark's freight management system. This API does not schedule new moves or pickups; it simply makes downloading the BOL for existing freight moves possible via a web service.

<BOLRequest>

     <Login>

          <Username>demo</Username>

          <Password>demo123</Password>

     </Login>

     <ClientID>281</ClientID>

     <Test>False</Test>  <!-- Optional. If set to true, a BOL will be made, but requests will not update data in the live system.-->

     <CustomerReference>foo</CustomerReference> <!-- Optional -->

     <LabelFormat>pdf</LabelFormat>

     <!--<LabelFormat>jpg</LabelFormat>-->

     <!--<LabelFormat>png</LabelFormat>-->

     <!--<LabelFormat>gif</LabelFormat>-->

     <LabelEncoding>base64</LabelEncoding>

     <!--<LabelEncoding>base64compressed</LabelEncoding>-->

     <ShippingLane>

          <OriginFacilityCode>477</OriginFacilityCode>

          <DestinationFacilityCode>92</DestinationFacilityCode> <!-- Required when Origin facility has multiple destinations -->

     </ShippingLane>

     <FreightDetails>

          <PalletCount>2</PalletCount>

          <PackageCount>23</PackageCount> <!-- Optional -->

          <WeightUnit>kg</WeightUnit> <!-- Optional, lb by default -->

          <TotalWeight>125</TotalWeight>

     </FreightDetails>

     <PickupTime>1400+0100</PickupTime> <!-- Required when multiple pickups scheduled for the day -->

</BOLRequest>


BOLResponse

<BOLResponse>

     <Result>

          <Success>true</Success>

          <ResultMessage>Optional message</ResultMessage>

          <BOLNumber>TORL0281A20170809</BOLNumber

          <LabelImage>iVBORw0KGgoAAAANSUhEUgAABr4AAAi5AQAAAABIUDysAAAA0mIDQ...</LabelImage> <!-- Label image will be in the format and encoding passed with request. -->

     </Result>

</BOLResponse>

Possible Errors

This table lists all errors that may be returned by the BOL API endpoint.

Related Element(s)ErrorMessageDetails/Action
General Errors
User, APIUser [username] does not have permissions to this API
Failure authenticating user
User is not available. Check your username/password
N/AUnable to parse charactersEnsure that special characters are properly encoded and an encoding flag is included in your XML header.

Example: <?xml version=""1.0"" encoding=""UTF-8""?>

Example: <?xml version=""1.0"" encoding=""ISO-8859-1""?>

<Login> Errors
LoginRequired element Login not foundProvide login credentials and verify the XML can be parsed
Login name not provided


User, ClientID
Request is missing client ID
Unable to authenticate the user credentials
Client is inactive
Client has been deactivated. Permission denied
User [username] does not have permissions to client: [clientID]
Unable to determine desired client for this userIf user has access to more than one client, the ClientID is required
Username, passwordThe username/password combination provided is invalid
The username/password combination provided is disabled
Password not provided
Errors specific to BOL API
N/ANo BOLs found for specified parameters
Multiple BOLs found, please narrow your search (e.g. specify DestinationFacilityCode parameter or ScheduledPickup section)
FreightDetailsCannot update BOL with provided Freight Details
FreightDetails definition is missing or incorrect.
PalletCount definition is missing or incorrect.
TotalWeight definition is missing or incorrect.
LabelUnable to generate label at this time.
LabelFormatLabelFormat is not one of the supported formats.
LabelEncodingLabelEncoding is not one of the supported encodings.
ShippingLane

ShippingLane definition is missing or incorrect.


OriginFacilityCode is a required element.
DestinationFacilityCode definition is missing or incorrect.
PickupTimePickupTime value must consist of 5 characters in format HHMM+HHMM or HHMM-HHMM, where first HHMM represents time in 24 hour form and second HHMM with a sign represents time zone offset. Example: 1330+0100 for half past one o\'clock in the afternoon in GMT+1 time zone.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.