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:
- `id` (string): The unique identifier for the carrier account.
- `name` (string): The name of the carrier account.
- `carrier` (string): The name of the carrier associated with the account.
- `provider` (string): The provider associated with the carrier account.
- `status` (string): The status of the carrier account (Enabled/Disabled).
- `credentials` (array): An array of authentication credential objects associated with the carrier account. Each credential object contains the following attributes:
- `token` (string): The authentication token.
- `xbKey` (string): The XpressBees key (if applicable).
- `xbForwardBusinessAccountName` (string): The XpressBees forward business account name (if applicable).
- `xbReverseBusinessAccountName` (string): The XpressBees reverse business account name (if applicable).
- `clientSecret` (string): The client secret.
- `userName` (string): The username.
- `password` (string): The password.
- `isTest` (boolean): Indicates whether the credentials are for testing purposes (true/false).
- `config` (object): A configuration object containing carrier-specific settings. The attributes within the config object include:
- `IsTrackingWebhookEnabled` (string): Indicates whether the tracking webhook is enabled for the carrier account.
- `XBTestAwbNumberPrefix` (string): XpressBees test AWB number prefix (if applicable).
- `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
- `id` (string) - The unique identifier of the carrier account.
- `name` (string) - The human-readable name of the carrier account.
- `carrier` (string) - The name of the carrier associated with the account.
- `provider` (string) - The provider of the carrier account (e.g., "Native").
- `status` (string) - The status of the carrier account (e.g., "Enabled").
- `credentials` (array) - An array of credential objects associated with the carrier account.
- `token` (string) - The token associated with the credential.
- `isTest` (boolean) - Indicates whether the credential is for testing purposes.
- `config` (object) - Configuration settings for the carrier account.
- `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" } } ```
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article