# API Overview

> The GHN API provides building blocks to create orders, calculate fees, sync addresses, receive webhooks, and manage support requests. All responses use JSON and consistent status codes.

## Quickstart

Follow these three steps in order to authenticate, create a test order, and receive order status.

1. **Authenticate** — Send `Token` and `ShopId` in the request headers. [Open guide](https://developer.ghn.vn/en/docs/token/get-token.md)
2. **Create order** — Send the address, parcel, and service selection. [Open endpoint](https://developer.ghn.vn/en/docs/order/create.md)
3. **Receive webhook** — Sync order status in real time. [Open guide](https://developer.ghn.vn/en/docs/webhook/callback-order-status.md)

## API Environments

Develop and test in a separate environment before switching to production.

| Environment | URL |
| --- | --- |
| Production | `https://online-gateway.ghn.vn` |
| Staging | `https://dev-online-gateway.ghn.vn` |

## Common Conventions

- Send and receive data as `application/json`.
- Use ISO 8601 timestamps and Vietnam time zone where possible.
- Amounts are in VND; weight in grams; dimensions in centimeters.
- Never write the `Token` to logs, URLs, or client-side source code.
