Rate Shop and Get Single Rate

This API contains 2 operations, rate shop and single rate. Rate shop will fetch rates for all carrier services based on the given addresses (From and To), weight, and dimension for given parcelType. If parcelType is not provided, it will default to PKG. Single rate will get rate for specific service and special service (if requested) based on the given addresses (From and To), weight, and dimension, parcelType and serviceId with or without specialServices. Single rate will be used mainly to a rate a shipment before creating shipment.

SecuritybearerAuth
Request
header Parameters
X-PB-Developer-Partner-Id
string

This is the Developer Partner ID. When the developer is the only partner, this field is not required.

compactResponse
boolean

The header defines if the response required is detailed or compact. When value is set to true, it will only return rates object in response.

Example: true
Request Body schema: application/json
One of:
required
object

Sender address details

required
object

Parcel dimension, weight and respective unit of measurement

carrierAccounts
required
Array of strings

It provides a single carrier account Id in case of single rate request. It can be referred from response of Get Carrier Accounts API.

parcelType
required
string

Parcel Type its value can be referred from response of Get Parcel Types API.

serviceId
required
string

Service to be used for rating, it can be referred from response of Get Services API

Array of objects (SpecialService)

Special services to be used for rating, it can be referred from response of Get Special Services API

required
object

Recipient address details

Responses
200

The Rating is done for the shipment(s).

400

Invalid request.

401

The request could not be authorized.

500

The request could not be completed due to an internal error.

post/api/v1/rates
Request samples
application/json
{
  • "fromAddress": {
    },
  • "parcel": {
    },
  • "carrierAccounts": [
    ],
  • "parcelType": "PKG",
  • "serviceId": "EM",
  • "specialServices": [
    ],
  • "toAddress": {
    }
}
Response samples
application/json
{
  • "errors": [
    ],
  • "fromAddress": {
    },
  • "parcel": {
    },
  • "rates": [
    ],
  • "toAddress": {
    }
}