First API Call

Step-by-step instructions for setting a request to the CargoDocs API

Step 1: Retrieve Authorization Token

Refer to Authentication and retrieve your API authentication token by passing the user credentials to the OAuth authorization URL at https://api.domain.cargodocs.com/v3/common/auoth2/token

Here is how a token is generated

curl --location --request GET 'https://api.cargodocs.com/v3/common/oauth2/token' \
--header 'Password: vH3OJ4xS$5' \
--header 'Username: Bumblebee'

The above request generates a token as follows.

{
    "token": "eyJraWQiOiJ3YitJMjNzOWRCNUh0cjBhQXVwTHVjeFwvUFhWREhlVEcyQWpTNnkyNFBjYz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiMjNmMDNlNi1lNDIwLTRjODEtOGIzZS1hOGM5MmYzZGQ0OTQiLCJkZXZpY2Vfa2V5IjoiZXUtd2VzdC0xXzMzODMxNzlmLTAyNTQtNDE4MC1hZWM4LWNhN2Q3ZTVmZTkyNCIsImV2ZW50X2lkIjoiODQ3NGEyZWQtZTYzZC00NmY5LWJlNmMtMWViNTc0YzcwZGNjIiwidG9rZW5fdXNlIjoiYWNjZXNzIiwic2NvcGUiOiJhd3MuY29nbml0by5zaWduaW4udXNlci5hZG1pbiIsImF1dGhfdGltZSI6MTY0NTUzMjIwNywiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tXC9ldS13ZXN0LTFfSnN6bUZoejRoIiwiZXhwIjoxNjQ1NTM1ODA3LCJpYXQiOjE2NDU1MzIyMDcsImp0aSI6ImNkODlhMDBhLTg3MWUtNDkzYy1hNTIwLWM3OWU2ZGEwOTUxMCIsImNsaWVudF9pZCI6IjNwZHZrbWEzdDM5bnNxamFyamlmM2k0ZmlkIiwidXNlcm5hbWUiOiJWb2x0cm9uIn0.banOsyWt57Um_XdqteVBuRDIim8Q_KG1IMRLc7bsXJNoI_fmQi95sc7a2-fCyjFG4z4ryA5dmYaXGdX3Gk7PFUyr5EYhJavt18OY7jbdU1IUNRhiI4zlngev4ibCWiTp6HSwDk9NOao8v8qgjUVwWVuNcbnNbmjnyIs0-m8NS3FtkoeC4_V5HVWYrd2XCQJFheG50qu2I2RXHmd-JfiJAGa9ALSDVIUYElkm4m0xUucHqXybwzRHszhCyDVpmR4Iz0BI8EMe5AAkJtN-rW_UJTMDlQeL7qCJJsasoeMcHWLgr3Dqq0Y21FgQu2K7JE0ZpvnRGjAE0YD4X3quXEW4NA"
}

Step 2: Consume Endpoint

Below is a sample URL with the appropriate authorization code and body.

curl --location --request GET 'https://api.cargodocs.com/v3/exchange/customers' \
--header 'Authorization: Bearer eyJraWQiOiJ3YitJMjNzOWRCNUh0cjBhQXVwTHVjeFwvUFhWREhlVEcyQWpTNnkyNFBjYz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0ODIxMzU2OC1lYTRjLTRlYTItYWJhMi0wMWRmOGRmZmJjZTMiLCJkZXZpY2Vfa2V5IjoiZXUtd2VzdC0xX2MxOTY5OWVhLWFiOWQtNGI1Yy1iNzdjLTU4YjRmMTU3YjNlNSIsImV2ZW50X2lkIjoiZTMyNGQ3MGQtZWRhNC00ZWU1LTgxYWEtMDYwYTFhNGJmODkzIiwidG9rZW5fdXNlIjoiYWNjZXNzIiwic2NvcGUiOiJhd3MuY29nbml0by5zaWduaW4udXNlci5hZG1pbiIsImF1dGhfdGltZSI6MTY0NjA4MTE0NiwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tXC9ldS13ZXN0LTFfSnN6bUZoejRoIiwiZXhwIjoxNjQ2MDg0NzQ2LCJpYXQiOjE2NDYwODExNDYsImp0aSI6IjgwZmFkNzIxLTY5ZTItNGI1OC04NzJlLTYwMDA2ZDk4Y2UxOSIsImNsaWVudF9pZCI6IjNwZHZrbWEzdDM5bnNxamFyamlmM2k0ZmlkIiwidXNlcm5hbWUiOiJWb2x0cm9uIn0.MXBobxXd5REaa5RQYF7JJz9SeKgnfHliLv5SIWoOgktIoQG8PlzxY8tfZU3Xbc95VSZCX00TxySL6jZiJ0bZuAlFvLTUnldsYs2coR2U0L2ElkWyc3owgU2d_EUICJcJi-zrwQvL-smgs3hYq-E4iZJcg00xnTl-4xgOxA9Z_MpI7KvWNjuIaXnSuUk0dDA-olkGRFOfhjPjMxYZxVuMydrS7cHqT43SpKVJE04-E6oeTwQ0aDFVRmtEF7msEp2dEC1jk4T7-z3-Oihy9EDQ9m9jnQJDTXwAZ-FZSthy6oF61-smcsMy5iiQHi0nEUsQGf-4SQ5BT7hxdeVauzz0tg'

📘

Multi-Languages Support

Here at CargoDocs API documentation; we will always give out sample codes in different development languages to support the majority of the developers. The API References endpoints have more than 20 programming languages.

This request is responded by a 200 Response Code with the following JSON.

[
    {
        "customerId": "a5df2780-ef36-419a-a50d-3b45cdcdb15e",
        "customerName": "SHIPPER",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of SHIPPER"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "260f8672-ee8b-4ce4-8992-9c13e9717467",
        "customerName": "Exporter Bank",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of Exporter Bank"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "eab3e099-e23e-4989-a3a3-b43d1abfea6c",
        "customerName": "Importer",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of Importer"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "c386bc7a-c286-4ac3-9397-0e785b1e7dd6",
        "customerName": "Importer BANK",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of Importer BANK"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45502624-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zExchange 1",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zExchange 1"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45502a0e-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zExchange 2",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zExchange 2"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45503c6d-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zExchange 7",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zExchange 7"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "4550483a-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zCarrier 4",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zCarrier 4"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "4550495a-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zExchange 10A",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zExchange 10A"
            },
            {
                "signatureId": "35b5c725-c83b-4200-8a66-5e7bc07d077e",
                "signatureText": "Electronically signed by ${signedByEmployeeName}\n on ${signingDate}"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45505c0f-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zCarrier 5",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zCarrier 5"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45509990-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "PACIFIC INTERNATIONAL LINES (PRIVATE) LIMITED",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of PACIFIC INTERNATIONAL LINES (PRIVATE) LIMITED"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "4550cf80-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "VALE INTERNATIONAL SA",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of VALE INTERNATIONAL SA"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "4dad53a5-fce4-4737-a0c7-0097497ac267",
        "customerName": "PREEM AB (PUBL)",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of PREEM AB (PUBL)"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "aebcdd03-68d8-46d3-a271-38eb09cafea8",
        "customerName": "COSCO SHIPPING LINES CO., LTD.",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of COSCO SHIPPING LINES CO., LTD."
            }
        ],
        "bdt": false
    },
    {
        "customerId": "22e3b040-9522-48ff-8194-bff34409a7af",
        "customerName": "RIO TINTO COMMERCIAL PTE. LTD.",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of RIO TINTO COMMERCIAL PTE. LTD."
            }
        ],
        "bdt": false
    },
    {
        "customerId": "fd49de7f-6c73-4335-b3ad-637c14b3afc6",
        "customerName": "Ingram Barge Company",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of Ingram Barge Company"
            }
        ],
        "bdt": true
    },
    {
        "customerId": "45510174-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "VALE S.A.",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of VALE S.A."
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45512208-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zBank 1",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zBank 1"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "45512883-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zDocPrepBank 1",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zDocPrepBank 1"
            }
        ],
        "bdt": false
    },
    {
        "customerId": "455129b7-514a-11e9-8bf4-0afcb3332b6c",
        "customerName": "zDocPrepBank 2",
        "signatures": [
            {
                "signatureId": "00000000",
                "signatureText": "Signed by ${user fullname}\nFor and on behalf of zDocPrepBank 2"
            }
        ],
        "bdt": false
    }
]