Pine LabsDOCS

Upload AWB Document

PUT/api/pay/v1/orders/{orderId}/awb/{awbId}/upload

Uploads the actual AWB file (PDF/image) for a previously created AWB record.

Prerequisites:

  • AWB must exist (created via Create AWB API) with status AWB_CAPTURED.
  • File must be PDF, JPEG, or PNG format.
  • File size must not exceed 5 MB.
  • File can only be uploaded once. Re-upload is not allowed.
Requires Bearer token. Get token →

Path Parameters

FieldDetails
orderId
stringrequired

Order ID returned from Create Order API.

awbId
stringrequired

AWB ID returned from Create AWB API.

Header Parameters

FieldDetails
Request-Timestamp
stringdate-time

ISO 8601 UTC timestamp of the request. Used for idempotency and audit.

Request-ID
string

Use a global unique identifier [GUID] for the request.

Constraints
Minimum length: 1 characterMaximum length: 50 characters

Request Bodyrequired

FieldDetails
file
stringrequiredbinary

AWB file to upload.

  • Max size: 5 MB (5,242,880 bytes)
  • Allowed types: application/pdf, image/jpeg, image/jpg, image/png

Response

FieldDetails
awb_id
string

AWB identifier.

order_id
string

Order ID.

status
string

Updated to AWB_UPLOADED on success.

Allowed values:
AWB_UPLOADED

Status Codes

200AWB file uploaded successfully.
400Bad Request — Validation error in the request. Possible error codes: - `DOC_MULTIPART_CONTENT_TYPE_REQUIRED` — Content-Type must be multipart/form-data - `DOC_FILE_MISSING` — No file found in the multipart body - `DOC_INVALID_FILE_TYPE` — File type not allowed (must be PDF/JPEG/PNG) - `DOC_FILE_TOO_LARGE` — File exceeds 5 MB limit - `DOC_ORDER_ID_MISSING` — orderId path parameter is missing - `DOC_AWB_ID_MISSING` — awbId path parameter is missing
404Not Found — AWB not found.
409Conflict — AWB file already uploaded. File upload is a one-time operation.
500An unexpected error occurred on the server.
Run
Request
curl --request PUT \
  --url https://pluraluat.v2.pinepg.in/api/pay/v1/orders/v1-260520225359-aa-LHy288/awb/awb-260522-001/upload \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: multipart/form-data' \
  --header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Request-Timestamp: 2024-10-01T10:30:00Z'
{
  "awb_id": "awb-260522-001",
  "order_id": "v1-260520225359-aa-LHy288",
  "status": "AWB_UPLOADED"
}