The Credentials resource allows users to store their own carrier account secrets securely. This gives users the ability to reuse their credentials without providing actual secret values in every single shipment request. There can be multiple secret values stored in a single credential resource.

Scope: read_credentials, write_credentials
Note: Supported carriers and parameters can be found in Carrier Parameters page.
Note: All secret params that are stored by BoxC are encrypted at the storage layer using the Advanced Encryption Standard (AES) algorithm — AES-256.
Important: Once a credential resource is created, it is not possible to see the secret values for security reasons.
Important: If the secret values have to be updated for any reason, we recommend updating your existing Credential resource instead of creating a new one. Doing so will ensure that secret values are always up to date for previously created labels with the same Credential resource and event tracking is not affected adversely.

Actions

GET /credentials Retrieves a paginated list of credentials
GET /credentials/{id} Retrieves a credential
POST /credentials Creates a credential
PUT /credentials/{id} Updates a credential
DELETE /credentials/{id} Deletes a credential

Properties

carrier

{"carrier": "DeutschePost"}

String - The final mile carrier for this credential. Supported carriers can be found on the Carrier Parameters page.
created

{"created": "2020-10-20 10:11:12"}

String - The datetime in UTC the credential was created. Set by the system.
deleted

{"deleted": "2020-10-20 10:11:12"}

String - The datetime in UTC the credential was created. Set by the system.
id

{"id": 1234567}

Integer - The credential ID. Set by the system.
params
{
    "params": {
        "cig_username": "",
        "cig_password": "",
        "client_id": "",
        "client_secret": ""
    }
}

Object - The final mile carrier specific secret values. Supported parameters can be found on the Carrier Parameters page.

user_id

{"user_id": 12006}

Integer - The user's ID. Set by the system.
updated

{"updated": "2020-10-20 10:11:12"}

String - The datetime in UTC the credential was updated. Set by the system.
GET
/credentials/{id}
Retrieves a credential
request
GET /credentials/1234567
response

HTTP/1.1 200 OK

{
    "credential": {
        "id": 1234567,
        "user_id": 123456,
        "carrier": "DeutschePost",
        "params": {
            "ekp": "",
            "cig_password": "",
            "cig_username": "",
            "tnt_password": "",
            "tnt_username": "",
            "retoure_password": "",
            "retoure_username": "",
            "contract_participation": "",
            "gkp_username": "",
            "gkp_password": "",
            "dp_api_key": ""
        },
        "updated": "2023-11-28 10:40:00",
        "created": "2023-11-28 10:40:00",
        "deleted": false
    }
}
POST
/credentials
Creates a credential
request
POST /credentials
{
    "credential": {
        "carrier": "DHLeC",
        "params": {
            "ekp": "",
            "cig_password": "",
            "cig_username": "",
            "tnt_password": "",
            "tnt_username": "",
            "retoure_password": "",
            "retoure_username": "",
            "contract_participation": "",
            "gkp_username": "",
            "gkp_password": "",
            "dp_api_key": ""
        }
    }
}
            
response

HTTP/1.1 201 Created

{
    "credential": {
        "id": 1234567,
        "user_id": 123456,
        "carrier": "DHLeC",
        "params": {
            "ekp": "",
            "cig_password": "",
            "cig_username": "",
            "tnt_password": "",
            "tnt_username": "",
            "retoure_password": "",
            "retoure_username": "",
            "contract_participation": "",
            "gkp_username": "",
            "gkp_password": "",
            "dp_api_key": ""
        },
        "updated": "2023-11-28 12:51:52",
        "created": "2023-11-28 12:51:52",
        "deleted": false
    }
}
            
PUT
/credentials/{id}
Updates a credential
  • Only the params property can be updated.
  • New params object will replace the old one. Changing value of a single param is not possible. Make sure you provide all the values even if you are not updating their values.
request
PUT /credentials/1946
{
    "credential": {
        "params": {
            "ekp": "",
            "cig_password": "",
            "cig_username": "",
            "tnt_password": "",
            "tnt_username": "",
            "retoure_password": "",
            "retoure_username": "",
            "contract_participation": "",
            "gkp_username": "",
            "gkp_password": "",
            "dp_api_key": ""
        }
    }
}
response

HTTP/1.1 200 OK

{
    "credential": {
        "id": 1234567,
        "user_id": 123456,
        "carrier": "DHLeC",
        "params": {
            "ekp": "",
            "cig_password": "",
            "cig_username": "",
            "tnt_password": "",
            "tnt_username": "",
            "retoure_password": "",
            "retoure_username": "",
            "contract_participation": "",
            "gkp_username": "",
            "gkp_password": "",
            "dp_api_key": ""
        },
        "updated": "2023-11-28 13:00:00",
        "created": "2023-11-28 12:51:52",
        "deleted": false
    }
}
DELETE
/credentials/{id}
Deletes a credential
request
DELETE /credentials/1234567
response

HTTP/1.1 200 OK