API - Carrier Account

Created by KloudShip Support, Modified on Thu, 7 Mar, 2024 at 6:12 PM by KloudShip Support Admin

Get: Carrier Account

 

The Get Carrier Account API allows you to retrieve information about carrier accounts available in your system. This information includes carrier-specific details, authentication credentials, and configuration settings.

Endpoint

```
GET /{{BaseURL}}/CarrierAccounts
```

 

Parameters

 

None

 

Response

 

The API response will be a JSON array containing carrier account objects. Each object will have the following attributes:

 

  1. `id` (string): The unique identifier for the carrier account.
  2. `name` (string): The name of the carrier account.
  3. `carrier` (string): The name of the carrier associated with the account.
  4. `provider` (string): The provider associated with the carrier account.
  5. `status` (string): The status of the carrier account (Enabled/Disabled).
  6. `credentials` (array): An array of authentication credential objects associated with the carrier account. Each credential object contains the following attributes:
    1. `token` (string): The authentication token.
    2. `xbKey` (string): The XpressBees key (if applicable).
    3. `xbForwardBusinessAccountName` (string): The XpressBees forward business account name (if applicable).
    4. `xbReverseBusinessAccountName` (string): The XpressBees reverse business account name (if applicable).
    5. `clientSecret` (string): The client secret.
    6. `userName` (string): The username.
    7. `password` (string): The password.
    8. `isTest` (boolean): Indicates whether the credentials are for testing purposes (true/false).
  7. `config` (object): A configuration object containing carrier-specific settings. The attributes within the config object include:
    1. `IsTrackingWebhookEnabled` (string): Indicates whether the tracking webhook is enabled for the carrier account.
    2. `XBTestAwbNumberPrefix` (string): XpressBees test AWB number prefix (if applicable).
    3. `XBTestReverseAwbNumberPrefix` (string): XpressBees test reverse AWB number prefix (if applicable).

 

Example Response 

[
    {
        "id": "64dc73bc822cae68cb08eb01",
        "name": "Delhivery Native",
        "carrier": "Delhivery",
        "provider": "Native",
        "status": "Enabled",
        "credentials": [
            {
                "token": "*9bb3",
                "isTest": false
            },
            {
                "token": "*c2c8",
                "isTest": true
            }
        ],
        "config": {
            "IsTrackingWebhookEnabled": "*ue"
        }
    },
    // ... (other carrier account objects)
]
```

 

Status Codes

  • `200 OK`: The request was successful, and the response contains the list of carrier accounts.
  • `500 Internal Server Error`: An error occurred on the server while processing the request.


Get: Carrier Account by ID

Endpoint

 

```
GET /{{BaseURL}}/CarrierAccount/{accountId}
```

 

Parameters

 

- `:accountId` (string, required) - The unique identifier of the carrier account.

 

Response

 

The response will be a JSON object containing the details of the requested carrier account.

 

{
    "id": "64cc9ac67a2876f1b3244142",
    "name": "Delhivery",
    "carrier": "Delhivery",
    "provider": "Native",
    "status": "Enabled",
    "credentials": [
        {
            "token": "*c2c8",
            "isTest": true
        },
        {
            "token": "*9bb3",
            "isTest": false
        }
    ],
    "config": {
        "IsTrackingWebhookEnabled": "*ue"
    }
}
```

 

Properties 

  1. `id` (string) - The unique identifier of the carrier account.
  2. `name` (string) - The human-readable name of the carrier account.
  3. `carrier` (string) - The name of the carrier associated with the account.
  4. `provider` (string) - The provider of the carrier account (e.g., "Native").
  5. `status` (string) - The status of the carrier account (e.g., "Enabled").
  6. `credentials` (array) - An array of credential objects associated with the carrier account.
  7. `token` (string) - The token associated with the credential.
  8. `isTest` (boolean) - Indicates whether the credential is for testing purposes.
  9. `config` (object) - Configuration settings for the carrier account.
  10. `IsTrackingWebhookEnabled` (string) - Indicates whether the tracking webhook is enabled.

 

Example Request

GET /CarrierAccount/64cc9ac67a2876f1b3244142
```

Example Response

{
    "id": "64cc9ac67a2876f1b3244142",
    "name": "Delhivery",
    "carrier": "Delhivery",
    "provider": "Native",
    "status": "Enabled",
    "credentials": [
        {
            "token": "*c2c8",
            "isTest": true
        },
        {
            "token": "*9bb3",
            "isTest": false
        }
    ],
    "config": {
        "IsTrackingWebhookEnabled": "*ue"
    }
}
```




API - Carrier AccountAPI - Carrier Account

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article