# Create AWB (Bulk)

**Method:** `POST`

**Path:** `/api/pay/v1/orders/{orderId}/awb`

**Category:** International Payments

**Authentication:** Required

## Description

Creates one or more AWB records for a cross-border order.
Captures AWB number, date, courier name, and tracking URL.
Returns an `awb_id` for each record which is used in the subsequent file upload step.

**Prerequisites:**
- Order must exist and be in `PROCESSED` state.
- Merchant must be Cross Border Import enabled.
- Maximum 5 AWB records per request.
- AWB numbers must be unique (no duplicates within the request or existing records for any order).


## Path Parameters

- `orderId` (`string`) **required** — Order ID returned from Create Order API.

## Request Body

Content-Type: `application/json`

_None_

## Responses

- `202` — AWB records created successfully.
- `400` — Bad Request — Validation error in the request.
Possible error codes:
- `DOC_INVALID_REQUEST_BODY` — Malformed JSON or cannot parse request body
- `DOC_ORDER_ID_MISSING` — orderId path parameter is missing
- `DOC_EMPTY_AWB_REQUEST` — Empty array provided
- `DOC_AWB_MAX_LIMIT_EXCEEDED` — More than 5 AWB records in a single request
- `DOC_AWB_VALIDATION_FAILED` — Field validation failed (missing awb_number, invalid date, etc.)
- `DOC_DUPLICATE_AWB_IN_REQUEST` — Duplicate AWB numbers found within the request
- `DOC_DUPLICATE_AWB_NUMBER` — AWB number already exists for this order/merchant

- `422` — Unprocessable Entity — Order not eligible for AWB creation.
Possible error codes:
- `ORDER_NOT_FOUND` — The specified order does not exist
- `ORDER_IS_NOT_IN_PROCESSED_STATE` — Order is not in PROCESSED state

- `500` — 

---

Reference: https://localhost:3000/api/international-payments/create-awb
