- Print
- DarkLight
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) | ErrorMessage | Details/Action |
---|---|---|
General Errors | ||
User, API | User [username] does not have permissions to this API | |
Failure authenticating user | ||
User is not available. Check your username/password | ||
N/A | Unable to parse characters | Ensure 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 | ||
Login | Required element Login not found | Provide 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 user | If user has access to more than one client, the ClientID is required | |
Username, password | The username/password combination provided is invalid | |
The username/password combination provided is disabled | ||
Password not provided | ||
Errors specific to BOL API | ||
N/A | No BOLs found for specified parameters | |
Multiple BOLs found, please narrow your search (e.g. specify DestinationFacilityCode parameter or ScheduledPickup section) | ||
FreightDetails | Cannot update BOL with provided Freight Details | |
FreightDetails definition is missing or incorrect. | ||
PalletCount definition is missing or incorrect. | ||
TotalWeight definition is missing or incorrect. | ||
Label | Unable to generate label at this time. | |
LabelFormat | LabelFormat is not one of the supported formats. | |
LabelEncoding | LabelEncoding 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. | ||
PickupTime | PickupTime 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. |