Document Retrieval REST Service

Document Retrieval Web Service
Southeastern Freight Lines provides a web service that allows partners to send HTTP requests
to automatically retrieve documents. To use this service, you must have a MySEFL account associated with the pro numbers.
To sign up for a MySEFL account: request an ID and password.

General REST Service Information
The SEFL Document Retrieval service uses a REST architecture to expose an endpoint that will accept a JSON body and parse it to retrieve documents for pro numbers.

To use this service, send an HTTP POST request to the web service endpoint found below.
The web service will receive this request, validate, and return a response.

Endpoint: http://www.sefl.com/document-retrieval/

Request

Example Request includes:
  • "imageTypes" : list of requested document types.
    • "BL" : Bill of Lading
    • "DR" : Delivery receipts
    • "LA" : Letter of Authorization
    • "RC" : Reconsignment Letter
    • "LR" : Lumper Receipt/Payment
    • "PL" : Packing List/Slip
    • "WI" : Weight & Inspection Certification
  • "associated" : boolean to return documents for associated pros. default=false
  • "format" : format of documents. default=pdf

Response

Example Response includes for each document:
  • "pro" : pro number of this document
  • "base64Image" : field which will then have to be decoded back to binary in order to be viewed
  • "fileExt" : file extension of document
  • "type" : type of shipping document
    • "Bill of Lading"
    • "Delivery Receipt"
    • "Letter of Authorization"
    • "Reconsignment Letter (possibly confidential)"
    • "Lumper Receipt"
    • "Packing List"
    • "W&I"
  • "error" : any error message if we were unable to retrieve the document

Headers
For validating login credentials, a header named Authorization is required.
The value of this header should be a string containing 'Basic ' followed by a base 64 encoded string
containing your MySEFL username and password (use the format username:password).
Below is an object containing the required headers with example values:
    headers: {
        "Authorization" : "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", 
        "Content-Type" : "application/json",
        "Accept" : "application/json"
    }
                                
Error Responses
In the event that a required header is missing, or if the login validation fails, an empty HTTP response will be returned with a status of 401 - Unauthorized. The web service will return a response in all cases, however if an error occurs, documents will not be returned. If a server error occurs, the response will contain a fault message.

In some cases, the request may not pass our internal validation, such as the MySEFL account not having access to a pro.
In these cases, an error message will be returned that specifies which validation failed, for example:
    {
        "pro": "123456789",
        "type": "",
        "version": "",
        "fileExt": "",
        "base64Image": "",
        "error": "This Login ID does not have access to 123456789"
    }
                                
Developer Testing
Developers may test connection and validation by sending an HTTP POST request to the following endpoint:
https://www.sefl.com/document-retrieval/example
This will test the connection, perform server-side login validation, and return a test document.