API - Meta Data

Created by KloudShip Support, Modified on Fri, 8 Mar, 2024 at 7:04 PM by KloudShip Support

GET: Carrier

The Get Carrier API provides information about various carriers and their details, including carrier codes, names, descriptions, and supported label file types. This API is useful for retrieving information about available carriers for shipping and tracking purposes.


Endpoint

GET /{{BaseURL}}/MetaData/Carriers


Retrieves a list of carriers along with their details.


Request Parameters

None

 

Response Format

 The API response will be in JSON format.

 

Response Fields

  1. `id` (string): The unique identifier for the carrier.
  2. `code` (string): The code representing the carrier.
  3. `carrier` (string): The name of the carrier.
  4. `provider` (string): The provider of the carrier's services.
  5. `name` (string): The full name of the carrier.
  6. `logo` (string): URL to the carrier's logo image.
  7. `description` (string): A brief description of the carrier and its affiliation.
  8. `trackingUrl` (string): URL to the carrier's tracking page.
  9. `supportedLabelFileTypes` (array of strings): List of supported label file types (e.g., "PDF").

 

Example Response

[
    {
        "id": "64beb187bd39b3fdbb34a8b9",
        "code": "Ekart",
        "carrier": "Ekart",
        "provider": "Native",
        "name": "Ekart",
        "logo": "",
        "description": "Ekart - Native",
        "trackingUrl": "https://ekartlogistics.com/shipmenttrack/",
        "supportedLabelFileTypes": [
            "PDF"
        ]
    },
    {
        "id": "63b3df45caf18ed0b989fb7b",
        "code": "DTDC",
        "carrier": "DTDC",
        "provider": "ShipRocket",
        "name": "DTDC",
        "logo": "",
        "description": "DTDC - ShipRocket",
        "trackingUrl": "",
        "supportedLabelFileTypes": [
            "PDF"
        ]
    },
    // ... (other carrier objects)
]


Additional Notes

  • The `trackingUrl` field provides a link to the carrier's tracking page, if available.
  • The `supportedLabelFileTypes` field lists the file types supported for labels, such as "PDF".



GET: Service

The Get Service API provides information about various shipping services offered by different carriers and providers. This API allows you to retrieve details about available services, such as service names, carriers, providers, codes, and more. Use the API to integrate shipping service information into your applications and services.


Endpoint

GET /{{BaseURL}}/MetaData/Service

 

This endpoint retrieves a list of all available shipping services.

 

Query Parameters

None

 

Response

The API response will include an array of service objects with the following attributes:

  1. `id` (string): The unique identifier for the service.
  2. `service` (string): The type of service (e.g., Surface, Express, Local).
  3. `carrier` (string): The name of the carrier offering the service.
  4. `provider` (string): The provider of the service.
  5. `status` (string): The status of the service (e.g., Public).
  6. `carrierSpecificCode` (object): An object containing carrier-specific information.
  7. `name` (string): The name of the carrier-specific code.
  8. `code` (string): The code associated with the carrier-specific code.
  9. `name` (string): The name of the service.
  10. `isInternational` (boolean): Indicates whether the service is international.
  11. `maxSupportedWeight` (number): The maximum supported weight for the service.
  12. `iconText` (string): Text associated with an icon for the service.
  13. `bannerText` (string): Text associated with a banner for the service.

 

Example Response

[
  {
    "id": "64beb1e2bd39b3fdbb34a8ba",
    "service": "Surface",
    "carrier": "Ekart",
    "provider": "Native",
    "status": "Public",
    "carrierSpecificCode": {
      "name": "ECONOMY",
      "code": "ECONOMY"
    },
    "name": "Ekart Surface",
    "isInternational": false,
    "maxSupportedWeight": 0,
    "iconText": "",
    "bannerText": ""
  },
  // ... more service objects
]


Error Responses

401 Unauthorized: Authentication token is missing or invalid.

{
  "error": "Unauthorized",
  "message": "Authentication token is missing or invalid."
}



GET: Special Service

The Get Special Service API allows you to retrieve a list of special services available for different carriers and providers. Special services are additional features or options that can be added to shipments, such as insurance, fragile handling, reverse pickup, etc. This API provides information about various special services along with their corresponding details. Use this API to gather information about special services that can be added to shipments to meet specific requirements.

 

Endpoint

GET /{{BaseURL}}/MetaData/SpecialService


Request Parameters

This API does not require any request parameters.

 

Response

The response is a JSON array containing objects representing different special services available.

 

Special Service Object

Each special service object has the following attributes:

  1. `id` (string): The unique identifier for the special service.
  2. `specialService` (string): The name of the special service.
  3. `service` (string): The type of service the special service is applicable to (e.g., Surface, Express, Local).
  4. `carrier` (string): The carrier associated with the special service.
  5. `provider` (string): The provider associated with the special service.
  6. `status` (string): The status of the special service (e.g., "Public").
  7. `carrierSpecificCode` (object): An object containing carrier-specific code details.
  8. `name` (string): The name of the carrier-specific code.
  9. `code` (string): The code associated with the carrier-specific code.
  10. `iconText` (string): Text representing an icon associated with the special service.
  11. `bannerText` (string): Text to be displayed as a banner for the special service.


Example Response

[
    {
        "id": "64ccfb3a1c6eb99948b0b18d",
        "specialService": "Essential Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "ESSENTIAL",
            "code": "ESSENTIAL"
        },
        "iconText": "",
        "bannerText": ""
    },
    {
        "id": "64ccf2f41c6eb99948b0b18a",
        "specialService": "Dangerous Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "isDangerous",
            "code": "isDangerous"
        },
        "iconText": "",
        "bannerText": ""
    },
    // ... more special service objects ...
]


Error Responses

  1. `404 Not Found`: If the requested resource is not found.
  2. `500 Internal Server Error`: If there is an internal server error.


Example Usage

Response 

[
    {
        "id": "64ccfb3a1c6eb99948b0b18d",
        "specialService": "Essential Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "ESSENTIAL",
            "code": "ESSENTIAL"
        },
        "iconText": "",
        "bannerText": ""
    },
    {
        "id": "64ccf2f41c6eb99948b0b18a",
        "specialService": "Dangerous Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "isDangerous",
            "code": "isDangerous"
        },
        "iconText": "",
        "bannerText": ""
    },
    // ... more special service objects ...
]



GET: Countries

The Get Countries API allows you to retrieve a list of countries along with their corresponding information. 

- Endpoint: `{{BaseURL}}/MetaData/Country`

- Method: GET

- Response Format: JSON

 

Request Parameters for Get Countries

The Get Countries API does not require any request parameters.

 

Response Format

The API responds with a JSON array containing objects representing countries. Each country object has the following properties:

  1. `id` (string): The unique identifier of the country.
  2. `code` (string): The ISO 3166-1 alpha-2 country code.
  3. `name` (string): The name of the country.
  4. `displayName` (string): A formatted display name of the country, including the code and name.

 

Example Response

[
    {
        "id": "64da49affe01c64566f38ffc",
        "code": "AD",
        "name": "Andorra",
        "displayName": "AD - Andorra"
    },
    {
        "id": "64da49affe01c64566f390d3",
        "code": "AE",
        "name": "United Arab Emirates",
        "displayName": "AE - United Arab Emirates"
    },
    {
        "id": "64da49affe01c64566f38ff8",
        "code": "AF",
        "name": "Afghanistan",
        "displayName": "AF - Afghanistan"
    },
    // ... more countries
]


Status Codes 

  1. 200 OK: The request was successful, and the response body contains the list of countries.
  2. 500 Internal Server Error: An error occurred on the server while processing the request.



GET: Currencies

This document provides information about the "Get Currencies" API, which allows users to retrieve a list of currencies along with their respective codes and names.

  • API Endpoint: `{{BaseURL}}/MetaData/Currency`
  • HTTP Method: GET
  • Authentication: None required


Response

The API returns a JSON array containing currency objects. Each currency object has the following attributes:

  1. `code` (string): The currency code, which uniquely identifies the currency.
  2. `name` (string): The name of the currency.


Here's an example response:

[
    {
        "code": "ZWL",
        "name": "Zimbabwean Dollar"
    },
    {
        "code": "ZMW",
        "name": "Zambian Kwacha"
    },
    {
        "code": "ZAR",
        "name": "South African Rand"
    },
    {
        "code": "YER",
        "name": "Yemeni Rial"
    }
]


Example Response

[
    {
        "code": "ZWL",
        "name": "Zimbabwean Dollar"
    },
    {
        "code": "ZMW",
        "name": "Zambian Kwacha"
    },
    {
        "code": "ZAR",
        "name": "South African Rand"
    },
    {
        "code": "YER",
        "name": "Yemeni Rial"
    }
]


Error Responses

In case of an error, the API might return the following HTTP status codes along with corresponding error messages:

 

- HTTP/ 404 Not Found

{
      "error": "Resource not found"
}

 - HTTP/ 500 Internal Server Error

{
      "error": "Internal server error"
}


Rate Limiting

This API does not currently enforce rate limiting, but clients are encouraged to make requests responsibly and avoid excessive requests to ensure fair usage for all users.


Additional Notes

  1. The currency data provided by this API is based on the latest available information and may be subject to updates or changes.
  2. It is recommended to handle potential errors and exceptions gracefully in your application when consuming this API.



GET: Carrier by Provider

The Get Carrier by Provider API provides information about shipping carriers based on their provider. It returns a list of carriers with details such as carrier code, name, description, tracking URL, and supported label file types. Use this API to gather information about carriers, their tracking URLs, and supported label file types.


Endpoint

GET /{{BaseURL}}/MetaData/Carrier/{provider}


- {provider}: The name of the provider for which you want to retrieve the list of carriers. 


Response

The API returns a JSON array containing objects representing each carrier's information. Each object includes the following attributes: 

  1. id: The unique identifier of the carrier.
  2. code: The code associated with the carrier.
  3. carrier: The name of the carrier.
  4. provider: The provider of the carrier.
  5. name: The display name of the carrier.
  6. logo: The URL of the carrier's logo.
  7. description: A brief description of the carrier.
  8. trackingUrl: The URL for tracking shipments with the carrier.
  9. supportedLabelFileTypes: An array of supported label file types.

Example Response

[
    {
        "id": "64beb187bd39b3fdbb34a8b9",
        "code": "Ekart",
        "carrier": "Ekart",
        "provider": "Native",
        "name": "Ekart",
        "logo": "",
        "description": "Ekart - Native",
        "trackingUrl": "https://ekartlogistics.com/shipmenttrack/",
        "supportedLabelFileTypes": ["PDF"]
    },
    {
        "id": "63ad6325fdd1694fd6758996",
        "code": "USPS",
        "carrier": "USPS",
        "provider": "Native",
        "name": "USPS",
        "logo": "",
        "description": "USPS - Native",
        "trackingUrl": "",
        "supportedLabelFileTypes": ["PDF"]
    },
    {
        "id": "63ad5f0e8fa4fd7f87d6b803",
        "code": "Borzo",
        "carrier": "Borzo",
        "provider": "Native",
        "name": "Borzo",
        "logo": "",
        "description": "Borzo - Native",
        "trackingUrl": "",
        "supportedLabelFileTypes": ["PDF"]
    },
    {
        "id": "63ad5ed16cc42987d5e46709",
        "code": "XpressBees",
        "carrier": "XpressBees",
        "provider": "Native",
        "name": "XpressBees",
        "logo": "",
        "description": "XpressBees - Native",
        "trackingUrl": "https://www.xpressbees.com/track/",
        "supportedLabelFileTypes": ["PDF"]
    },
    {
        "id": "63ad5ebfeabacbebb85fbefb",
        "code": "Delhivery",
        "carrier": "Delhivery",
        "provider": "Native",
        "name": "Delhivery",
        "logo": "",
        "description": "Delhivery - Native",
        "trackingUrl": "https://www.delhivery.com/track/package/",
        "supportedLabelFileTypes": ["PDF"]
    },
    {
        "id": "63ad5d6d694ebc79012d06b2",
        "code": "Dunzo",
        "carrier": "Dunzo",
        "provider": "Native",
        "name": "Dunzo",
        "logo": "",
        "description": "Dunzo - Native",
        "trackingUrl": "",
        "supportedLabelFileTypes": []
    }
]


Error Codes

404 Not Found: If the provided provider does not exist or there are no carriers associated with it.



GET: Service by Provider


The Get Service by Provider API allows you to retrieve a list of available services offered by different carriers for a specific provider. This API endpoint provides information about various shipping services such as service name, carrier, carrier-specific codes, service status, and more.


Endpoint

GET /BaseURL}}/MetaData/Service/{provider_name}


Replace `{provider_name}` with the name of the desired provider for which you want to retrieve the available services.

 

Response 

The API response will be a JSON array containing objects with the following attributes for each service:

  1. `id` (string): The unique identifier for the service.
  2. `service` (string): The type of service (e.g., "Surface", "Express", "Local").
  3. `carrier` (string): The name of the carrier associated with the service.
  4. `provider` (string): The provider offering the service.
  5. `status` (string): The status of the service (e.g., "Public").
  6. `carrierSpecificCode` (object): An object containing carrier-specific code details:
  7. `name` (string): The name of the carrier-specific code (e.g., "ECONOMY").
  8. `code` (string): The code associated with the carrier-specific code (if available).
  9. `name` (string): The name of the service.
  10. `isInternational` (boolean): Indicates whether the service is international (true) or not (false).
  11. `maxSupportedWeight` (number): The maximum supported weight for the service (in an appropriate unit).
  12. `iconText` (string): Text associated with the service icon.
  13. `bannerText` (string): Text associated with the service banner.


Example Response

[
    {
        "id": "64beb1e2bd39b3fdbb34a8ba",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "ECONOMY",
            "code": "ECONOMY"
        },
        "name": "Ekart Surface",
        "isInternational": false,
        "maxSupportedWeight": 0,
        "iconText": "",
        "bannerText": ""
    },
    {
        // ... (other service objects)
    }
]


Additional Notes

  1. The `maxSupportedWeight` attribute is provided as a numerical value, where appropriate units should be considered based on your use case.
  2. If the `code` attribute within the `carrierSpecificCode` object is empty, it means no specific code is available for that service.
  3. The `iconText` and `bannerText` attributes may be utilized for displaying additional information about the service, such as icons or banners.
  4. Ensure to replace placeholders such as `{provider_name}` and adapt the API endpoint and response as needed for your application.



GET: Special Service by Provider

The "Get Special Service by Provider" API allows you to retrieve a list of special services offered by different carriers and providers. Special services are additional features or options that can be added to shipping or delivery orders. This API provides information about special services, such as their names, carriers, and provider-specific codes.

 

Endpoint

GET /{{BaseURL}}/MetaData/SpecialService/{provider}

 

Replace `{provider}` with the name of the provider for which you want to retrieve the list of special services.


Response

The API response will be a JSON array containing objects representing each special service available for the specified provider. Each object has the following properties: 

  1. `id` (string): The unique identifier for the special service.
  2. `specialService` (string): The name of the special service.
  3. `service` (string): The type of service (e.g., "Surface", "Express", "Local") to which the special service belongs.
  4. `carrier` (string): The name of the carrier associated with the special service.
  5. `provider` (string): The name of the provider offering the special service.
  6. `status` (string): The status of the special service (e.g., "Public").
  7. `carrierSpecificCode` (object): An object containing carrier-specific information about the special service.
  8. `name` (string): The name of the carrier-specific code.
  9. `code` (string): The carrier-specific code associated with the special service.
  10. `iconText` (string): A placeholder for icon text related to the special service.
  11. `bannerText` (string): A placeholder for banner text related to the special service.


Response Example

[
    {
        "id": "64ccfb3a1c6eb99948b0b18d",
        "specialService": "Essential Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "ESSENTIAL",
            "code": "ESSENTIAL"
        },
        "iconText": "",
        "bannerText": ""
    },
    {
        "id": "64ccf2f41c6eb99948b0b18a",
        "specialService": "Dangerous Goods",
        "service": "Surface",
        "carrier": "Ekart",
        "provider": "Native",
        "status": "Public",
        "carrierSpecificCode": {
            "name": "isDangerous",
            "code": "isDangerous"
        },
        "iconText": "",
        "bannerText": ""
    },
    // ... (other special service objects)
]

 

Error Responses

HTTP Status Code: 404 Not Found

  - Response Body: `{ "error": "Provider not found" }`

  - Description: Returned when the specified provider does not exist in the system.


Rate Limiting

This API does not have rate limiting implemented, but it is recommended to use it responsibly to avoid overloading the server.



 

GET: Country, States by Country Code 

The Get Country States by Country Code API allows you to retrieve information about various states and union territories in the country along with their respective codes and display names. This information can be useful for mapping and displaying state-related data in your application.


Endpoint

GET /{{BaseURL}}/MetaData/States/Country/{providerId}

 

providerId: The ID of the provider for which you want to retrieve the list of states and union territories. To get the country code, make use of the Get Countries.


Request Parameters

This API does not require any request parameters.

 

Response

The response will be a JSON array containing objects with the following fields:

  1. code: The code representing the state or union territory.
  2. name: The name of the state or union territory.
  3. displayName: The display name of the state or union territory in the format "Code - Name".

 

Example Response

[
    {
        "code": "AN",
        "name": "Andaman and Nicobar Islands",
        "displayName": "AN - Andaman and Nicobar Islands"
    },
    {
        "code": "AP",
        "name": "Andhra Pradesh",
        "displayName": "AP - Andhra Pradesh"
    },
    {
        // ... Other state/union territory objects ...
    }
]

 

Example Usage 

Response

[
    {
        "code": "AN",
        "name": "Andaman and Nicobar Islands",
        "displayName": "AN - Andaman and Nicobar Islands"
    },
    {
        "code": "AP",
        "name": "Andhra Pradesh",
        "displayName": "AP - Andhra Pradesh"
    },
    {
        // ... Other state/union territory objects ...
    }
]


Rate Limiting 

This API does not have rate limiting enforced.

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