Get rates - AfterShip Shipping API - AfterShip Docs
QUICKSTART
API Quick Start
OAuth
CHANGELOG
REFERENCE
Rates
- Get rates (GET)
- Calculate rates (POST)
- Get a rate (GET)
Labels
- Get labels (GET)
- Create a label (POST)
- Get a label (GET)
Manifests
- Get manifests (GET)
- Create a manifest (POST)
- Get a manifest (GET)
Couriers
- Get all couriers (GET)
Cancel Labels
- Get the cancelled labels (GET)
- Cancel a label (POST)
- Get a cancelled label (GET)
Pickups
- Get pickups (GET)
- Create a pickup (POST)
- Get a pickup (GET)
Cancel Pickups
- Get the cancelled pickups (GET)
- Cancel a pickup (POST)
- Get a cancelled pickup (GET)
Shipper Accounts
- Get shipper accounts (GET)
- Create a shipper account (POST)
- Get a shipper account (GET)
- Delete a shipper account (DELETE)
- Update a shipper account's information (PUT)
- Update a shipper account's credentials (PATCH)
- Update a shipper account's settings (PATCH)
Specific Shipper Accounts
- Create a FedEx shipper account (POST)
- Update a FedEx shipper account (POST)
Address Validations (Beta)
- Create an address validation (POST)
Locations
- Get locations (GET)
MODEL
Envelope
Primitive
- Billing v3
- Customs v3
- Shipment v3
- Address v3
- Parcel v3
- Item v3
- Courier v3
- Reference v3
- Money v3
- PaymentMethodAccount v3
- Dimension v3
- Weight v3
- Volume v3
- Aes v3
- NoEei v3
Resource
- Rate v3
- RateRecord v3
- Label v3
- Manifest v3
- ShipperAccount v3
- CancelLabel v3
- AddressValidation (Beta) v3
- Location v3
- Pickup v3
- CancelPickup v3
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
status: string (Allowed values: calculating, calculated, failed)limit: string (Number of records per page)created_at_min: string (Start date and time of the record created)created_at_max: string (End date and time of the record created)next_token: string
Headers
Content-Type: string (required, Default: application/json)
Responses
200: Get rates
- Body (application/json)
meta: Meta data object.- Example: {"code":200,"type":"OK","message":"Everything worked as expected."}
code: integer (required)message: string (required)details: array[Error]retryable: booleandata: objectnext_token: stringlimit: integercreated_at_min: stringcreated_at_max: stringrates: array[RateRecord]
Auth
as-api-key:
- Parameters
created_at_max:created_at_min:limit:next_token:status:
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
}
]
}
]
}
}