Get Shipping Rates

This endpoint allows the merchant to get shipping rates for a future shipment.

SecurityOAuth2
Request
header Parameters
x-api-key
required
string
tenant-id
required
string
Request Body schema: application/json
required
merchant
string
Default: "Primary merchant ID if only 1 registered"

ID of the merchant

entity_type
string
Default: "FORWARD"
Enum: "FORWARD" "REVERSE"
Array of objects (Carrier Account Request)

List of carrier accounts for which shipping rate is requested.

object (Payment Request)

Payment details including the total value of the shipment and any pending Cash on Delivery amount.

object (Customs)

Customs declaration details such as total declared value.

object (Collection Object)

Collection details chosen for the shipment, such as scheduled collection date.

object (Delivery Object)

Delivery details chosen for the shipment, such as chosen delivery type and scheduled delivery date.

required
Location Request (object) or Shipping Rate Location Request (object)

Pickup address for the shipment. You can either pass a free-form address or a predefined location.

For forward shipments, you must pass a predefined pickup location. Carriyo will copy the contact and address fields from the specified location. To specify the location, you can use Carriyo's internal location ID (partner_location_id), or your own location code (partner_location_code) as defined when you created the location in Carriyo.

For reverse shipments, you can pass the customer's pickup address as a free-form pickup address.

required
Shipping Rate Location Request (object) or Location Request (object)

Dropoff address for the shipment. You can either pass a free-form address or a predefined location.

For forward shipments, you can pass the customer's dropoff address as a free-form address.

For reverse shipments, you must pass a predefined dropoff location. Carriyo will copy the contact and address fields from the specified location. To specify the location, you can use Carriyo's internal location ID (partner_location_id), or your own location code (partner_location_code) as defined when you created the location in Carriyo.

Array of objects (Item)

List of individual items or SKUs in a shipment.

required
Array of objects (Parcel Request)

(One of parcels or freight required) List of parcels in a B2C shipment.

object (Freight request)

(One of parcels or freight required) List of packages of type pallet or carton in a B2B shipment.

object (Custom Attributes)

Custom attributes in the form of a map:

{"attribute1" : ["value1", "value2"], "attribute2" : ["value1", "value2"]}

Please Note: You can only use custom attributes if you are subscribed to this feature.

Responses
200
post/checkout/shipping-rates
Request samples
application/json
{
  • "merchant": "MY_BRAND",
  • "entity_type": "FORWARD",
  • "carrier_accounts": [
    ],
  • "payment": {
    },
  • "customs": {
    },
  • "collection": {
    },
  • "delivery": {
    },
  • "pickup": {
    },
  • "dropoff": {
    },
  • "items": [
    ],
  • "parcels": [
    ],
  • "freight": {
    },
  • "custom_attributes": {
    }
}
Response samples
application/json
{
  • "shipping_rates": [
    ]
}