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
- Get shipper accounts
- Create a shipper account
- Get a shipper account
- Delete a shipper account
- Update a shipper account's information
- Update a shipper account's credentials
- Update a shipper account's settings
Specific Shipper Accounts
Address Validations (Beta)
Locations
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 a rate
GET
https://sandbox-api.aftership.com/postmen/v3/rates/{id}
Request
Security: API Key
Path Parameters
id(string, required): Rate id
Headers
Content-Type(string, required): Content-Type
Default: application/json
Example: application/json
Responses
200
Get rate
Body:
application/json
meta
Meta: Meta data object.
Example: {"code":200,"type":"OK","message":"Everything worked as expected."}code (integer, required): Code of Meta
message (string, required): Message of Meta
details (array[Error]): Details of Meta
retryable (boolean): Whether this request will be retryable or not
data
- RateRecord: RateRecord object: the description of rates information
- created_at (string): the timestamp of created_at, example: 2022-05-18T09:17:38+00:00
- id (string): rate id
- updated_at (string): the timestamp of updated_at, example: 2022-05-18T09:17:38+00:00
- status (string): Allowed values: calculating, calculated, failed
- rates (array[Rate]): rates array
Auth
- as-api-key:
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
}
]
}
}