# QUICKSTART

## API Quick Start
- [Authentication](/content/docs/shipping/quickstart/authentication/index.html)
- [SignString](/content/docs/shipping/quickstart/authentication/sign-string/index.html)

## OAuth
- [Overview](/content/docs/shipping/quickstart/authentication/oauth/overview/index.html)
- [Getting Started](/content/docs/shipping/quickstart/authentication/oauth/getting-started/index.html)
- [Scope List](/content/docs/shipping/quickstart/authentication/oauth/available-scopes/index.html)
- [Rate Limit](/content/docs/shipping/quickstart/rate-limit/index.html)
- [Body Envelope](/content/docs/shipping/quickstart/body-envelope/index.html)
- [Request Errors](/content/docs/shipping/quickstart/request-errors/index.html)

## CHANGELOG
- [Changelog](/content/docs/shipping/changelog/index.html)

## REFERENCE
- [API Overview v3](/content/docs/shipping/260ddb42f20a9-api-overview/index.html)

### Rates
- [Get rates](/content/docs/shipping/99f88b084657b-get-rates/index.html)
- [Calculate rates](/content/docs/shipping/f4353677b8ac1-calculate-rates/index.html)
- [Get a rate](/content/docs/shipping/dc0944cbb5839-get-a-rate/index.html)

### Labels
- [Get labels](/content/docs/shipping/c056230c3b6c4-get-labels/index.html)
- [Create a label](/content/docs/shipping/c665e0489b6d9-create-a-label/index.html)
- [Get a label](/content/docs/shipping/1aa84af009bb2-get-a-label/index.html)

### Manifests
- [Get manifests](/content/docs/shipping/8ba86e501d12e-get-manifests/index.html)
- [Create a manifest](/content/docs/shipping/467d57d8c1766-create-a-manifest/index.html)
- [Get a manifest](/content/docs/shipping/9ca3cc790beee-get-a-manifest/index.html)

### Couriers
- [Get all couriers](/content/docs/shipping/89c99df22fcd7-get-all-couriers/index.html)

### Cancel Labels
- [Get the cancelled labels](/content/docs/shipping/24ec02f862c50-get-the-cancelled-labels/index.html)
- [Cancel a label](/content/docs/shipping/4c82fee7cfe54-cancel-a-label/index.html)
- [Get a cancelled label](/content/docs/shipping/f173ecb472bca-get-a-cancelled-label/index.html)

### Pickups
- [Get pickups](/content/docs/shipping/x8mxu5wa7m6y3-get-pickups/index.html)
- [Create a pickup](/content/docs/shipping/bzel9ue0joeds-create-a-pickup/index.html)
- [Get a pickup](/content/docs/shipping/ytjdnwbl7dqxb-get-a-pickup/index.html)

### Cancel Pickups
- [Get the cancelled pickups](/content/docs/shipping/35p8o3dsqpaqc-get-the-cancelled-pickups/index.html)
- [Cancel a pickup](/content/docs/shipping/nmi7kbs8wavn2-cancel-a-pickup/index.html)
- [Get a cancelled pickup](/content/docs/shipping/lgdp9svgf645n-get-a-cancelled-pickup/index.html)

### Shipper Accounts
- [Get shipper accounts](/content/docs/shipping/5742112a2c755-get-shipper-accounts/index.html)
- [Create a shipper account](/content/docs/shipping/02bbb6a0e0b27-create-a-shipper-account/index.html)
- [Get a shipper account](/content/docs/shipping/51195022963fd-get-a-shipper-account/index.html)
- [Delete a shipper account](/content/docs/shipping/cef1918aaf9df-delete-a-shipper-account/index.html)
- [Update a shipper account's information](/content/docs/shipping/a57d4ec851992-update-a-shipper-account-s-information/index.html)
- [Update a shipper account's credentials](/content/docs/shipping/093809311940d-update-a-shipper-account-s-credentials/index.html)
- [Update a shipper account's settings](/content/docs/shipping/0xlo21h5n3o1j-update-a-shipper-account-s-settings/index.html)

### Specific Shipper Accounts
- [Create a FedEx shipper account](/content/docs/shipping/c1hmaoymtcjf2-create-a-fed-ex-shipper-account/index.html)
- [Update a FedEx shipper account](/content/docs/shipping/alkwtehrfwa1s-update-a-fed-ex-shipper-account/index.html)

### Address Validations (Beta)
- [Create an address validation](/content/docs/shipping/f88a36ecf54a2-create-an-address-validation/index.html)

### Locations
- [Get locations](/content/docs/shipping/bdb851fc7dfdc-get-locations/index.html)

## MODEL

### Envelope
- [Meta](/content/docs/shipping/model/envelope/meta/index.html)
- [Error](/content/docs/shipping/model/envelope/error/index.html)

### Primitive
- [Billing](/content/docs/shipping/model/primitive/billing/index.html)
- [Customs](/content/docs/shipping/model/primitive/customs/index.html)
- [Shipment](/content/docs/shipping/model/primitive/shipment/index.html)
- [Address](/content/docs/shipping/model/primitive/address/index.html)
- [Parcel](/content/docs/shipping/model/primitive/parcel/index.html)
- [Item](/content/docs/shipping/model/primitive/item/index.html)
- [Courier](/content/docs/shipping/model/primitive/courier/index.html)
- [Reference](/content/docs/shipping/model/primitive/reference/index.html)
- [Money](/content/docs/shipping/model/primitive/money/index.html)
- [PaymentMethodAccount](/content/docs/shipping/model/primitive/payment-method-account/index.html)
- [Dimension](/content/docs/shipping/model/primitive/dimension/index.html)
- [Weight](/content/docs/shipping/model/primitive/weight/index.html)
- [Volume](/content/docs/shipping/model/primitive/volume/index.html)
- [Aes](/content/docs/shipping/model/primitive/aes/index.html)
- [NoEei](/content/docs/shipping/model/primitive/no-eei/index.html)

### Resource
- [Rate](/content/docs/shipping/model/resource/rate/index.html)
- [RateRecord](/content/docs/shipping/model/resource/rate-record/index.html)
- [Label](/content/docs/shipping/model/resource/label/index.html)
- [Manifest](/content/docs/shipping/model/resource/manifest/index.html)
- [ShipperAccount](/content/docs/shipping/model/resource/shipper-account/index.html)
- [CancelLabel](/content/docs/shipping/model/resource/cancel-label/index.html)
- [AddressValidation (Beta)](/content/docs/shipping/model/resource/address-validation/index.html)
- [Location](/content/docs/shipping/model/resource/location/index.html)
- [Pickup](/content/docs/shipping/model/resource/pickups/index.html)
- [CancelPickup](/content/docs/shipping/model/resource/cancel-pickup/index.html)

### Carrier Guide
- [Supported Carriers](/content/docs/shipping/carrier-guide-supported-couriers/index.html)

### ENUM
- [Shipper Accounts Credentials](/content/docs/shipping/enum/shipper-accounts-credentials/index.html)
- [Service Types and Service Options List](/content/docs/shipping/enum/service-options-lists/index.html)
- [All Service Options](/content/docs/shipping/enum/all-service-options/index.html)

### Webhook
- [Webhook Overview](/content/docs/shipping/webhook/webhook-overview/index.html)
- [Webhook Specifications](/content/docs/shipping/webhook/webhook-specifications/index.html)
- [Webhook Signature](/content/docs/shipping/webhook/webhook-signature/index.html)
- [Webhook Outgoing IPs](/content/docs/shipping/webhook/webhook-outgoing-ips/index.html)

### SDK
- [Java SDK](https://github.com/AfterShip/shipping-sdk-java)
- [Node.js SDK](https://github.com/postmen/postmen-sdk-js)

### Open Source
- [phone](https://github.com/AfterShip/phone)
- [email-verifier](https://github.com/AfterShip/email-verifier)

### Support
- [Contact Support](https://support.postmen.com/en/)

# Calculate rates

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

### Request

Security: API Key

### Headers
- Content-Type: application/json

### Body

```json
{
  "shipper_accounts": [
    {
      "id": "3ba41ff5-59a7-4ff0-8333-64a4375c7f21"
    }
  ],
  "shipment": {
    "ship_from": {
      "contact_name": "AfterShip Shipping",
      "company_name": "AfterShip Shipping",
      "street1": "230 W 200 S LBBY",
      "city": "Salt Lake City",
      "state": "UT",
      "postal_code": "84101",
      "country": "USA",
      "phone": "123456789",
      "email": "test@test.com"
    },
    "ship_to": {
      "contact_name": "AfterShip Shipping",
      "company_name": "AfterShip Shipping",
      "street1": "230 W 200 S LBBY",
      "city": "Salt Lake City",
      "state": "UT",
      "postal_code": "84101",
      "country": "USA",
      "phone": "123456789",
      "email": "test@test.com"
    },
    "parcels": [
      {
        "box_type": "custom",
        "dimension": {
          "width": 10,
          "height": 10,
          "depth": 10,
          "unit": "cm"
        },
        "items": [
          {
            "description": "Food Bar",
            "quantity": 1,
            "price": {
              "currency": "USD",
              "amount": 100
            },
            "item_id": "1234567",
            "origin_country": "CHN",
            "weight": {
              "unit": "kg",
              "value": 10
            },
            "sku": "imac2014",
            "hs_code": "1006.30"
          }
        ],
        "description": "Food XS",
        "weight": {
          "unit": "kg",
          "value": 10
        }
      }
    ],
    "return_to": {
      "contact_name": "AfterShip Shipping",
      "street1": "This is the first streeet",
      "street2": "This is the second streeet",
      "city": "New York",
      "state": "New York",
      "postal_code": "10001",
      "country": "USA",
      "phone": "1-123-456-5496",
      "email": "test@test.test",
      "type": "residential"
    },
    "delivery_instructions": "handle with care"
  }
}
```

### Send API Request

**Shell / cURL**

```bash
curl --request POST \
  --url https://sandbox-api.aftership.com/postmen/v3/rates \
  --header 'Content-Type: application/json' \
  --header 'as-api-key: ' \
  --data '{...}'
```

### Response Example

```json
{
  "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": [
      {...}
    ]
  }
}
```
