Common | UploadAttachment

A specialized utility interface used to upload supporting documents (e.g., medical certificates, passport copies, death certificates) required for specific business processes. This interface converts your local files into permanent URLs for system reference.

Operational Workflow:
Upload File: Use this interface to upload the necessary attachment. The system will return a unique attachment URL.
Bind to Request: After obtaining the URL, you must include it in the attachments field of the target business interface (such as submit cancellation ).
Process Integration: The uploaded documents will then be attached to the specific business ticket, allowing the airline or platform auditors to verify the request.

Notice:
File Constraints: Supports common formats (e.g., JPG, PNG, PDF). Please ensure the file size does not exceed the maximum limit (default: 10MB).
Temporal Sequence: This interface must be invoked before submitting the final business request to ensure the attachment URL is ready for binding.

POST

/flight/common

Parameter

Field Mandatory Type Scope Description
action required String UploadAttachments
key required String API security key applied from AeroHub.
signature required String Refer to the Guidelines for generation.
timestamp required Int The ‘timestamp’ field should be a 10-digit Unix timestamp in seconds, used for encryption and data verification.
version optional String API version information, e.g. “3.2.0”.
request required Object
  attachments required Object[] Attachment. The supported file types are as follows,JPG, JPEG, PNG, PDF. Maximum single upload file size: 10M.
    name required String File name with extension.
    content required String File content text, converted by the original file with base64 encoding.

Request_Example:

{
    "action": "UploadAttachments",
    "version": "v2.0.3",
    "key": "{{key}}",
    "signature": "{{signature}}",
    "timestamp": {{timestamp}},
    "request": {
        "attachments": [
            {
                "name": "QA.JPG",
                "content": "f3b7288cd66c26cb087f70501641a1ea"
            }
        ]
    }
}

Response

Field Type Description
status Int 0: Succeeded
Others: Failed
Refer to “Status Code” below for details.
msg String Return message, maximum 64 characters.
attachments Object[]
  name String File name with extension.
  url String File url.

Success-Response:

{
    "action": "UploadAttachments",
    "version": "v2.0.3",
    "key": "{{key}}",
    "signature": "{{signature}}",
    "timestamp": {{timestamp}},
    "request": {
        "attachments": [
            {
                "name": "QA.JPG",
                "content": "f3b7288cd66c26cb087f70501641a1ea"
            }
        ]
    }
}

Status Code

Name Description
1000 General system error
1001 attachments required
1004 {name} attachment type [{extension of name}] not support

Error-Response

{
    "status": 1000,
    "msg": "General system error"
}
Author:admin  Create time:2025-12-16 14:26
Last editor:AeroHub  Update time:2026-03-19 18:20