Get rates - AfterShip Shipping API - AfterShip Docs

QUICKSTART

API Quick Start

OAuth

CHANGELOG

REFERENCE

Rates

Labels

Manifests

Couriers

Cancel Labels

Pickups

Cancel Pickups

Shipper Accounts

Specific Shipper Accounts

Address Validations (Beta)

Locations

MODEL

Envelope

Primitive

Resource

Carrier Guide

ENUM

Webhook

SDK

Open Source

Support

Get rates

GET: https://sandbox-api.aftership.com/postmen/v3/rates

Get rates The array contains rates object information. Please refer to rate record object for details.

Request

Security: API Key

Query Parameters

Headers

Responses

200: Get rates

Auth

as-api-key:

Request Sample: Shell / cURL

curl --request GET \
  --url https://sandbox-api.aftership.com/postmen/v3/rates \
  --header 'Content-Type: application/json' \
  --header 'as-api-key: '

Response Example

{
  "meta": {
    "code": 200,
    "type": "OK",
    "message": "Everything worked as expected."
  },
  "data": {
    "next_token": "string",
    "limit": 0,
    "created_at_min": "string",
    "created_at_max": "string",
    "rates": [
      {
        "created_at": "2015-09-09T07:49:54.060Z",
        "id": "ad1f9340-608d-4a30-be0e-b0a62e07e4cc",
        "updated_at": "2015-09-09T07:49:57.360Z",
        "status": "calculated",
        "rates": [
          {
            "charge_weight": {
              "value": 1.5,
              "unit": "kg"
            },
            "total_charge": {
              "amount": 429.57,
              "currency": "HKD"
            },
            "shipper_account": {
              "id": "00000000-0000-0000-0000-000000000000",
              "slug": "dhl",
              "description": "DHL Sandbox"
            },
            "service_type": "dhl_express_worldwide",
            "service_name": "dhl_express_worldwide",
            "pickup_deadline": "2015-09-01T18:00:00+00:00",
            "booking_cut_off": "2015-09-01T17:00:00+00:00",
            "delivery_date": "2015-09-01T23:00:00+00:00",
            "transit_time": 1,
            "detailed_charges": [
              {
                "type": "base",
                "charge": {
                  "amount": 387,
                  "currency": "HKD"
                }
              },
              {
                "type": "fuel_surcharge",
                "charge": {
                  "amount": 42.57,
                  "currency": "HKD"
                }
              }
            ],
            "error_message": null,
            "info_message": null
          },
          {
            "charge_weight": {
              "value": 1.5,
              "unit": "kg"
            },
            "total_charge": {
              "amount": 528,
              "currency": "HKD"
            },
            "shipper_account": {
              "id": "00000000-0000-0000-0000-000000000000",
              "slug": "dhl",
              "description": "DHL Sandbox"
            },
            "service_type": "dhl_express_easy",
            "service_name": "dhl_express_easy",
            "pickup_deadline": "2015-09-01T18:00:00+00:00",
            "booking_cut_off": "2015-09-01T17:00:00+00:00",
            "delivery_date": "2015-09-01T23:00:00+00:00",
            "transit_time": 1,
            "detailed_charges": [
              {
                "type": "base",
                "charge": {
                  "amount": 528,
                  "currency": "HKD"
                }
              }
            ],
            "error_message": null,
            "info_message": null
          }
        ]
      }
    ]
  }
}