Get a rate - 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 a rate

GET

https://sandbox-api.aftership.com/postmen/v3/rates/{id}

Request

Security: API Key

Path Parameters

Headers

Responses

200

Get rate

Body:

application/json

meta

data

Auth

Send API Request

API Overview

Request Sample: Shell / cURL

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

Response Example

{
  "meta": {
    "code": 200,
    "type": "OK",
    "message": "Everything worked as expected."
  },
  "data": {
    "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
      }
    ]
  }
}