AWB Printing
AWB (Air Waybill) printing allows merchants to generate and print shipping labels directly from the EasyStore admin panel without leaving the platform.
How It Works
- Merchant selects orders to print AWB from EasyStore admin panel
- Merchant clicks "Print AWB" button
- EasyStore sends a request to your registered AWB URL with order/fulfillment details
- Your app generates the shipping label from your logistics platform
- Your app returns the AWB URL for printing
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│ AWB Printing Flow │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Merchant │ │ EasyStore │ │ Your App │ │ Logistics │
│ Admin Panel │ │ Server │ │ Server │ │ API │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │ │
│ 1. Select Orders │ │ │
│ Click "Print │ │ │
│ AWB" Button │ │ │
│ ─────────────────►│ │ │
│ │ │ │
│ │ 2. POST Request │ │
│ │ ─────────────────►│ │
│ │ • order_id │ │
│ │ • fulfillment_id │ │
│ │ • shop domain │ │
│ │ │ │
│ │ │ 3. Fetch AWB/Label│
│ │ │ ─────────────────►│
│ │ │ • tracking_number │
│ │ │ │
│ │ │ 4. Return PDF/ │
│ │ │ Label Data │
│ │ │ ◄─────────────────│
│ │ │ │
│ │ 5. Return AWB URL │ │
│ │ ◄─────────────────│ │
│ │ { │ │
│ │ "type": "link", │ │
│ │ "url": "..." │ │
│ │ } │ │
│ │ │ │
│ 6. Open AWB URL │ │ │
│ ◄─────────────────│ │ │
│ (New Tab/Window) │ │ │
│ │ │ │
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│ 📄 PDF/Label Displayed │
│ ┌───────────────────────────────────────────────────────────────────────────────────┐ │
│ │ ╔═══════════════════════════════════════════════════════════════════════════╗ │ │
│ │ ║ SHIPPING LABEL ║ │ │
│ │ ╠═══════════════════════════════════════════════════════════════════════════╣ │ │
│ │ ║ FROM: TO: ║ │ │
│ │ ║ Merchant Store Customer Name ║ │ │
│ │ ║ 123 Sender Street 456 Receiver Street ║ │ │
│ │ ║ City, State 12345 City, State 67890 ║ │ │
│ │ ╠═══════════════════════════════════════════════════════════════════════════╣ │ │
│ │ ║ ████████████████████████████████████████ ║ │ │
│ │ ║ ██ BARCODE: EN813659438MY ██ ║ │ │
│ │ ║ ████████████████████████████████████████ ║ │ │
│ │ ╚═══════════════════════════════════════════════════════════════════════════╝ │ │
│ └───────────────────────────────────────────────────────────────────────────────────┘ │
│ Merchant can print the label directly from browser │
└─────────────────────────────────────────────────────────────────────────────────────────┘
Registering Your AWB URL
To register your AWB endpoints, please email dev@easystore.co with the following information:
- Your app name
- AWB URL endpoints for the topics you want to support:
awb/single- Single AWB printingawb/bulk- Bulk AWB printing
EasyStore team will manually configure the endpoints for your app.
Request Headers
EasyStore includes the following headers with each AWB request:
| Header | Value |
|---|---|
Easystore-Topic |
awb/single or awb/bulk |
Easystore-Shop-Domain |
Store's EasyStore domain (e.g., myshop.easy.co) |
Easystore-Hmac-Sha256 |
HMAC-SHA256 signature of payload using app secret |
Content-Type |
application/json |
User-Agent |
EasyStore |
Request Format
Single AWB (awb/single)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Single order ID |
fulfillment_id |
int | Yes | Fulfillment ID |
fulfillment_order_id |
int | Optional | Fulfillment order ID |
{
"id": 12345,
"fulfillment_id": 67890,
"fulfillment_order_id": 11111
}
Bulk AWB (awb/bulk)
| Parameter | Type | Required | Description |
|---|---|---|---|
ids |
array | Yes | Array of order IDs |
{
"ids": [12345, 12346, 12347]
}
Response Format
The response format is the same as the Order Fulfillment response format. Your endpoint can return different URLs to handle AWB-specific functionality.
| Field | Type | Description |
|---|---|---|
type |
string | Either "link" (success) or "message" (error/info) |
url |
string | The redirect URL (only when type is "link") |
message |
string | Error/info message (only when type is "message") |
style |
string | Message style, e.g., "error" (only when type is "message") |
Link Response (type: "link")
EasyStore will open the provided URL as an iframe within the Admin Panel. Return a URL that renders your AWB printing interface.
{
"type": "link",
"url": "https://apps.easystore.co/logistics/{app_handle}/awb?shop={shop}&order_id={id}"
}
Message Response (type: "message")
Display a toast notification in the Admin Panel for errors or information.
{
"type": "message",
"message": "AWB not available for this order",
"style": "error"
}
Best Practice
💡 Tip: Show a "Print AWB" button on your fulfillment success page. After a successful fulfillment, display a "Print AWB" button directly in your success page. This provides a smoother operation flow for merchants, allowing them to immediately print shipping labels without navigating away.
Next Steps
Learn how to keep order status up-to-date with Parcel Status Update.