v1

latestOpenAPI 3.1.02026-07-1270243932.3 KB
Rates at Checkout

Generate a live rates request

Initiates a live rates request. Include either the object ID for an existing address record or a fully formed address object when entering an address value. You can also enter the object ID of an existing user parcel template or a fully formed user parcel template object as the parcel value.

post/live-rates

Headers

SHIPPO-API-VERSIONstring
Example:2018-02-08

Optional string used to pick a non-default API version to use. See our <a href="https://docs.goshippo.com/docs/api_concepts/apiversioning/">API version</a> guide.

Request body

Example request

{
  "address_from": {
    "name": "Shwan Ippotle",
    "company": "Shippo",
    "street1": "215 Clayton St.",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94117",
    "country": "US",
    "phone": "+1 555 341 9393",
    "email": "shippotle@shippo.com",
    "is_residential": true,
    "metadata": "Customer ID 123456",
    "validate": true
  },
  "address_to": {
    "name": "Shwan Ippotle",
    "company": "Shippo",
    "street1": "215 Clayton St.",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94117",
    "country": "US",
    "phone": "+1 555 341 9393",
    "email": "shippotle@shippo.com",
    "is_residential": true,
    "metadata": "Customer ID 123456",
    "validate": true
  },
  "line_items": [
    {
      "currency": "USD",
      "manufacture_country": "US",
      "max_delivery_time": "2016-07-23T00:00:00Z",
      "max_ship_time": "2016-07-23T00:00:00Z",
      "quantity": 20,
      "sku": "HM-123",
      "title": "Hippo Magazines",
      "total_price": "12.1",
      "variant_title": "June Edition",
      "weight": "0.4",
      "weight_unit": "lb",
      "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"
    }
  ],
  "parcel": {
    "extra": {
      "COD": {
        "amount": "5.5",
        "currency": "USD",
        "payment_method": "CASH"
      },
      "insurance": {
        "amount": "5.5",
        "content": "Laptop",
        "currency": "USD",
        "provider": "UPS"
      }
    },
    "metadata": "Customer ID 123456",
    "mass_unit": "lb",
    "weight": "1",
    "distance_unit": "in",
    "height": "1",
    "length": "1",
    "width": "1",
    "object_created": "2014-07-09T02:19:13.174Z",
    "object_id": "adcfdddf8ec64b84ad22772bce3ea37a",
    "object_owner": "shippotle@shippo.com",
    "object_state": "VALID",
    "object_updated": "2014-07-09T02:19:13.174Z"
  }
}

Response

Paginated list of live rates

nextstring
previousstring
countinteger

Example response

{
  "next": "baseurl?page=3&results=10",
  "previous": "baseurl?page=1&results=10",
  "count": 123,
  "results": [
    {
      "amount": "5.5",
      "amount_local": "5.5",
      "currency": "USD",
      "currency_local": "USD",
      "estimated_days": 2,
      "title": "Shipping Option 1"
    }
  ]
}