Documents (DHL Supply Chain)
v 1.0.0
Division: DHL Supply Chain

Best for:

  • Providing an interface to the eDOC Document Management Solution
  • Customer-centric contract logistics solutions
  • Business customers of DHL Supply Chain
Region: North America
Used for: Information
Overview

The Documents API enables integration with the eDOC document management solution, provided by DHL Supply Chain. The eDOC application provides the following capabilities:

  • Sign, store, search and retrieve documents with a desktop or a mobile device.
  • Electronically store inbound & outbound paperwork, pictures, and other documents
  • Documents can be stored programmatically via Web Service/API or manually by a user
  • Tag documents for easy search and retrieval
  • Set retention limit on documents – Default 7 years. Configurable per site or per document set. Purge automatically.
  • Electronically sign documents
  • Simple workflow to manage steps (requiring multiple documents and requiring signature) and alerts for missing documents

The user interface of eDOC is accessible through the MySupplyChain.dhl.com portal

The following functionality is available through the Documents API:

  • Upload a document with metadata
  • Search for documents
  • Download documents

 

Using the API

Access to the API is granted for a specific client.  Work with your DHL contact to submit a service request to gain access to the Documents API.

 

Example Use Cases

The API's are used primarily by DHL partners to automate the storage and retrieval of documents.  Some example use cases:

  • DHL Supply Chain stores a client's Bill of Lading documents in eDOC.  An external business partner of DHL wants to build a system to automate the retrieval of the Bill of Lading documents.
  • A system generates documents that need to be securely stored in eDOC.  The Documents Upload API can be used to automate the storage of documents in eDOC for this purpose. 

 

User Guide

    Get Access

    Access to the Documents API is granted on a client-specific basks.  Please work with your DHL representative to request credentials to access the Documents APIs.

     

    Authentication

    The Documents API uses HTTP basic authentication.  A user name and password will be given when access to the API is granted.

     

    Environments

    The addressable API base URL/URI environments are:  

    URLs Environment

    https://apidsc-qa.dhl.com/dhllink/edoc/v1/document

    QA environment

    https://apidsc.dhl.com/dhllink/edoc/v1/document

    Production environment

     

    Rate limits

    Rate limits protect the DHL infrastructure from suspicious requests that exceed defined thresholds.

    The table below details the main request limits:

    Service Level Maximum calls per second Maximum calls per day
    Standard   2   1000

    Please contact api@dpdhl.com if you need a different service level. 

    When the limit is reached, you will receive an HTTP Status code: 

    429: Too many requests.  
    

     

    Upload a Document (POST)

    Use this API to upload a document to eDOC. Any type of document (pdf, image, word, etc.) can be stored. Each document should be associated with one or more searchable metadata attributes which will allow the document to be searched for and downloaded in the future.

    Request URL: (POST)

    /dhllink/edoc/v1/document

     

    Request Body:

    {
      "customerId": "CID015233",
      "facilityId": "US_1244",
      "documentType": "Bill of Lading",
      "fileName": "BOL_S5785791.pdf",
      "attribute": {
        "order#": "A12345",
        "cost": 4000,
        "shipdate": "2020-07-24T04:00:00.000Z",
        "shipment": [
          "568FG96",
          "GT45788"
        ]
      },
      "data": "JVBERi0xLjQKJeLj…"
    }

    The following fields are required:

    • customerID
    • facilityId
    • documentType
    • filename
    • attributes (one or more)
    • data

    Response:

    {
      "documentId": 48990,
      "customerId": "CID015233",
      "facilityId": "US_1244",
      "documentType": "Bill of Lading",
      "fileName": "BOL_S5785791.pdf",
      "uploaded": "2020-06-24T14:12:13.133+0000,",
      "attribute": {
        "order#": "A12345",
        "cost": 4000,
        "shipdate": "2020-07-24T04:00:00.000Z",
        "shipment": [
          "568FG96",
          "GT45788"
        ]
      }
    }

     

    Search for Documents (GET)

    Use this API to search for documents by passing a searchable attribute which was sent when uploading the document via the 'upload' API. Returns JSON array of document objects that matches the search criteria

     

    Search for a value in any metadata field

    Assume you are searching for document with order number '873467389' , the request would be as follows: 

    /dhllink/edoc/v1/document?customerId=<<customer_id>>&facilityId=<<facility_id>>&query=1024632681

     

    Search for a value in a specific metadata field

    Assume you are searching for document with Carrier ID '845AB78' , the request would be as follows: 

    /dhllink/edoc/v1/document?customerId=<<customer_id>>&facilityId=<<facility_id>>&attribute=CARRRIER_ID&query=845AB78

     

    Response:

    [
      {
        "documentId": 48990,
        "customerId": "CID005233",
        "facilityId": "US_0044",
        "documentType": "Bill of Lading",
        "fileName": "BOL_S5785791.pdf",
        "uploaded": "2020-06-24T14:12:13.133+0000,",
        "attribute": {
          "order#": "A12345",
          "shipment": [
            "568FG96",
            "GT45788"
          ]
        }
      }
    ]

     

    Download Documents (GET)

    Once a document's information has been retrieved using a search, the document ID attribute can be used to download the document:

    Resquest (GET):

    /dhllink/edoc/v1/document/<<document_id>>?customerId=<<customer_id>>&facilityId=<<facility_id>>

    Data is retrieved in base 64 format and must be decoded to produce a readable file.

    Response:

    {
      "documentId": 48990,
      "fileName": "BOL_S5785791.pdf",
      "data": "JVBERi0xLjQKJeLj…"
    }

     

    Legal Terms

    Legal Terms Content...

    1.0.0
    05.Jan.2021
    • Initial launch