POST: /api/v1/ShipmentRate
This document provides information about the `POST /api/v1/ShipmentRate` endpoint, which allows you to get shipment rate estimates for a given shipment request.
Endpoint
``` POST https://api-qa.kloudship.com:96/api/v1/ShipmentRate ```
Headers
- `transactionId` (required): A unique identifier for the transaction.
Body
The request body should be in JSON format and include the following parameters:
- `addressFrom` (object, required): The origin address details.
- `name` (string, required): Name of the sender or return center.
- `company` (string): Company name of the sender.
- `street1` (string, required): First line of the sender's address.
- `street2` (string): Second line of the sender's address.
- `city` (string, required): City of the sender's address.
- `state` (string, required): State of the sender's address.
- `zip` (string, required): ZIP or postal code of the sender's address.
- `country` (string, required): Country code (ISO 3166-1 alpha-2) of the sender's address.
- `phone` (string, required): Phone number of the sender.
- `email` (string, required): Email address of the sender.
- `verify` (boolean): Indicates whether the address needs to be verified.
- `latitude` (number): Latitude coordinate of the sender's address.
- `longitude` (number): Longitude coordinate of the sender's address.
- `addressTo` (object, required): The destination address details.
- (Same structure as `addressFrom`)
- `package` (object, required): Package details.
- `packageType` (string, required): Type of the package (e.g., "Parcel").
- `length`, `width`, `height` (numbers, required): Dimensions of the package in inches.
- `weight` (number, required): Weight of the package in pounds.
- `deliveryType` (string, required): Type of delivery ("SCHEDULED" in this example).
- `paymentmethod` (string, required): Payment method ("Prepaid" in this example).
- `valueAmount` (number, required): Value of the shipment.
Response
The response will be in JSON format and will contain the following fields:
- `rates` (array): An array of rate estimates for different carriers and services.
- `carrier` (object): Carrier information.
- `carrierAccount` (object): Carrier account information.
- `service` (object): Service details.
- `ValueCurrency` (string): Currency code for the rates.
- `totalFee` (number): Total fee for the shipment.
- `finalWeight` (number): Final weight of the shipment.
- `finalVolume` (number): Final volume of the shipment.
- `fee` (array): Array of fee details.
- `packageNumber` (number): Package number.
- `cost` (number): Cost value.
- `costType` (string): Type of cost (e.g., "Base", "COD", "Delivery").
- `FinalWeightUnit` (string): Unit of measurement for the final weight.
- `FinalDimensionUnit` (string): Unit of measurement for the final dimensions.
- Additional carrier-specific fields as required.
- `errors` (array): An array of error messages related to carriers.
- `source` (string): Source of the error.
- `carrierCode` (string): Carrier code.
- `carrierAccountId` (string): Carrier account ID.
- `carrierAccountName` (string): Carrier account name.
- `code` (string): Error code.
- `message` (string): Error message.
- `warnings` (array): An array of warning messages.
Example Request
{ "addressFrom": { "name": "Return Center", ... }, "addressTo": { "name": "Front Desk", ... }, "package": { "packageType": "Parcel", ... }, ... }
Example Response
{ "rates": [ { "carrier": { "id": "63ad5ed16cc42987d5e46709", ... }, ... }, { "carrier": { "id": "63ad5d6d694ebc79012d06b2", ... }, ... } ], "errors": [ { "source": "KloudShip.CSA", ... }, { "source": "KloudShip.CSA", ... } ], "warnings": [] } ```
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