{
  "openapi": "3.0.3",
  "info": {
    "title": "ATRShip Shipping API",
    "version": "1.0.0",
    "description": "美国本土尾程 / 国际快递面单：报价、出单、取面单、查状态、取消。"
  },
  "servers": [
    {
      "url": "https://atrship.com/api/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "客户中心「API 对接」里生成的密钥：atr_live_…（正式）或 atr_test_…（测试，模拟出单不扣钱）"
      }
    }
  },
  "paths": {
    "/channels": {
      "get": {
        "tags": [
          "渠道与报价 Rates"
        ],
        "summary": "可用渠道",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "international": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rates": {
      "post": {
        "tags": [
          "渠道与报价 Rates"
        ],
        "summary": "运费试算",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "shipTo",
                  "package"
                ],
                "properties": {
                  "shipFrom": {
                    "type": "object",
                    "required": [
                      "name",
                      "address1",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "收件人 / 寄件人姓名（也可以分开传 firstName、lastName）",
                        "example": "Jane Roe"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string",
                        "example": "5125550100"
                      },
                      "email": {
                        "type": "string"
                      },
                      "address1": {
                        "type": "string",
                        "example": "500 Congress Ave"
                      },
                      "address2": {
                        "type": "string",
                        "example": "Apt 2"
                      },
                      "city": {
                        "type": "string",
                        "example": "Austin"
                      },
                      "state": {
                        "type": "string",
                        "description": "美国填州二字码",
                        "example": "TX"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "78701"
                      },
                      "country": {
                        "type": "string",
                        "description": "国家二字码，默认 US",
                        "example": "US"
                      }
                    },
                    "description": "不传时用账户的默认寄件地址"
                  },
                  "shipTo": {
                    "type": "object",
                    "required": [
                      "name",
                      "address1",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "收件人 / 寄件人姓名（也可以分开传 firstName、lastName）",
                        "example": "Jane Roe"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string",
                        "example": "5125550100"
                      },
                      "email": {
                        "type": "string"
                      },
                      "address1": {
                        "type": "string",
                        "example": "500 Congress Ave"
                      },
                      "address2": {
                        "type": "string",
                        "example": "Apt 2"
                      },
                      "city": {
                        "type": "string",
                        "example": "Austin"
                      },
                      "state": {
                        "type": "string",
                        "description": "美国填州二字码",
                        "example": "TX"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "78701"
                      },
                      "country": {
                        "type": "string",
                        "description": "国家二字码，默认 US",
                        "example": "US"
                      }
                    }
                  },
                  "package": {
                    "type": "object",
                    "required": [
                      "length",
                      "width",
                      "height",
                      "weight"
                    ],
                    "properties": {
                      "length": {
                        "type": "number",
                        "example": 10
                      },
                      "width": {
                        "type": "number",
                        "example": 8
                      },
                      "height": {
                        "type": "number",
                        "example": 4
                      },
                      "weight": {
                        "type": "number",
                        "example": 1.5
                      },
                      "unit": {
                        "type": "string",
                        "enum": [
                          "in/lb",
                          "cm/kg",
                          "cm/g"
                        ],
                        "default": "in/lb"
                      },
                      "signature": {
                        "type": "string",
                        "enum": [
                          "none",
                          "direct",
                          "indirect",
                          "adult"
                        ],
                        "default": "none"
                      }
                    }
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "example": "TS-BLK-M"
                        },
                        "name": {
                          "type": "string",
                          "description": "英文品名",
                          "example": "Cotton T-shirt"
                        },
                        "nameCn": {
                          "type": "string",
                          "description": "中文品名（可选）"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "数量（国际件必填）",
                          "example": 1
                        },
                        "unitValue": {
                          "type": "number",
                          "description": "单件申报价值 USD（国际件必填，大于 0）",
                          "example": 12
                        },
                        "hsCode": {
                          "type": "string",
                          "description": "国际件必填"
                        },
                        "originCountry": {
                          "type": "string",
                          "description": "国际件原产国二字码"
                        },
                        "material": {
                          "type": "string",
                          "description": "国际件材质"
                        }
                      }
                    },
                    "description": "美国件可选（不传时按一件普通货物处理）；国际件必填：每件要有 name、quantity、unitValue、hsCode、originCountry、material（报价和下单都要）"
                  },
                  "channel": {
                    "type": "string",
                    "description": "只算这个渠道（可选）"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channel": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "carrier": {
                            "type": "string"
                          },
                          "available": {
                            "type": "boolean"
                          },
                          "price": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "zone": {
                            "type": "string"
                          },
                          "error": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "post": {
        "tags": [
          "订单 Orders"
        ],
        "summary": "出单（同一个 referenceNo 重复提交返回已有的单，不会重复扣费）",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "referenceNo",
                  "channel",
                  "shipTo",
                  "package"
                ],
                "properties": {
                  "referenceNo": {
                    "type": "string",
                    "description": "你们系统的订单号（最长 50 位）"
                  },
                  "channel": {
                    "type": "string",
                    "description": "渠道代码（/channels 或 /rates 返回的 channel）"
                  },
                  "expectedPrice": {
                    "type": "number",
                    "description": "报价时的价格；填了的话价格变了会返回 PRICE_CHANGED"
                  },
                  "remark": {
                    "type": "string"
                  },
                  "addressConfirmed": {
                    "type": "boolean",
                    "description": "地址核对提示有问题（ADDRESS_CHECK）时确认无误继续出单"
                  },
                  "shipFrom": {
                    "type": "object",
                    "required": [
                      "name",
                      "address1",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "收件人 / 寄件人姓名（也可以分开传 firstName、lastName）",
                        "example": "Jane Roe"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string",
                        "example": "5125550100"
                      },
                      "email": {
                        "type": "string"
                      },
                      "address1": {
                        "type": "string",
                        "example": "500 Congress Ave"
                      },
                      "address2": {
                        "type": "string",
                        "example": "Apt 2"
                      },
                      "city": {
                        "type": "string",
                        "example": "Austin"
                      },
                      "state": {
                        "type": "string",
                        "description": "美国填州二字码",
                        "example": "TX"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "78701"
                      },
                      "country": {
                        "type": "string",
                        "description": "国家二字码，默认 US",
                        "example": "US"
                      }
                    },
                    "description": "不传时用账户的默认寄件地址"
                  },
                  "shipTo": {
                    "type": "object",
                    "required": [
                      "name",
                      "address1",
                      "city",
                      "postalCode",
                      "country"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "收件人 / 寄件人姓名（也可以分开传 firstName、lastName）",
                        "example": "Jane Roe"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "company": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string",
                        "example": "5125550100"
                      },
                      "email": {
                        "type": "string"
                      },
                      "address1": {
                        "type": "string",
                        "example": "500 Congress Ave"
                      },
                      "address2": {
                        "type": "string",
                        "example": "Apt 2"
                      },
                      "city": {
                        "type": "string",
                        "example": "Austin"
                      },
                      "state": {
                        "type": "string",
                        "description": "美国填州二字码",
                        "example": "TX"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "78701"
                      },
                      "country": {
                        "type": "string",
                        "description": "国家二字码，默认 US",
                        "example": "US"
                      }
                    }
                  },
                  "package": {
                    "type": "object",
                    "required": [
                      "length",
                      "width",
                      "height",
                      "weight"
                    ],
                    "properties": {
                      "length": {
                        "type": "number",
                        "example": 10
                      },
                      "width": {
                        "type": "number",
                        "example": 8
                      },
                      "height": {
                        "type": "number",
                        "example": 4
                      },
                      "weight": {
                        "type": "number",
                        "example": 1.5
                      },
                      "unit": {
                        "type": "string",
                        "enum": [
                          "in/lb",
                          "cm/kg",
                          "cm/g"
                        ],
                        "default": "in/lb"
                      },
                      "signature": {
                        "type": "string",
                        "enum": [
                          "none",
                          "direct",
                          "indirect",
                          "adult"
                        ],
                        "default": "none"
                      }
                    }
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string",
                          "example": "TS-BLK-M"
                        },
                        "name": {
                          "type": "string",
                          "description": "英文品名",
                          "example": "Cotton T-shirt"
                        },
                        "nameCn": {
                          "type": "string",
                          "description": "中文品名（可选）"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "数量（国际件必填）",
                          "example": 1
                        },
                        "unitValue": {
                          "type": "number",
                          "description": "单件申报价值 USD（国际件必填，大于 0）",
                          "example": 12
                        },
                        "hsCode": {
                          "type": "string",
                          "description": "国际件必填"
                        },
                        "originCountry": {
                          "type": "string",
                          "description": "国际件原产国二字码"
                        },
                        "material": {
                          "type": "string",
                          "description": "国际件材质"
                        }
                      }
                    },
                    "description": "美国件可选（不传时按一件普通货物处理）；国际件必填：每件要有 name、quantity、unitValue、hsCode、originCountry、material（报价和下单都要）"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "created": {
                          "type": "boolean"
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "orderNo": {
                              "type": "string",
                              "description": "ATRShip 的单号",
                              "example": "ATR261001A1B2C3D4"
                            },
                            "referenceNo": {
                              "type": "string",
                              "description": "你们系统的订单号",
                              "example": "SO-1001"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "processing",
                                "labeled",
                                "cancelling",
                                "cancelled",
                                "exception"
                              ]
                            },
                            "channel": {
                              "type": "string"
                            },
                            "channelName": {
                              "type": "string"
                            },
                            "carrier": {
                              "type": "string",
                              "example": "usps"
                            },
                            "trackingNo": {
                              "type": "string",
                              "nullable": true
                            },
                            "trackingUrl": {
                              "type": "string",
                              "nullable": true
                            },
                            "price": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "example": "USD"
                            },
                            "zone": {
                              "type": "string",
                              "nullable": true
                            },
                            "labelReady": {
                              "type": "boolean"
                            },
                            "labelUrl": {
                              "type": "string",
                              "nullable": true
                            },
                            "test": {
                              "type": "boolean",
                              "description": "测试密钥出的模拟单"
                            },
                            "createdAt": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "402": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "403": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "409": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "422": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "订单 Orders"
        ],
        "summary": "按 referenceNo 查单",
        "parameters": [
          {
            "name": "referenceNo",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "orderNo": {
                          "type": "string",
                          "description": "ATRShip 的单号",
                          "example": "ATR261001A1B2C3D4"
                        },
                        "referenceNo": {
                          "type": "string",
                          "description": "你们系统的订单号",
                          "example": "SO-1001"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "processing",
                            "labeled",
                            "cancelling",
                            "cancelled",
                            "exception"
                          ]
                        },
                        "channel": {
                          "type": "string"
                        },
                        "channelName": {
                          "type": "string"
                        },
                        "carrier": {
                          "type": "string",
                          "example": "usps"
                        },
                        "trackingNo": {
                          "type": "string",
                          "nullable": true
                        },
                        "trackingUrl": {
                          "type": "string",
                          "nullable": true
                        },
                        "price": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "example": "USD"
                        },
                        "zone": {
                          "type": "string",
                          "nullable": true
                        },
                        "labelReady": {
                          "type": "boolean"
                        },
                        "labelUrl": {
                          "type": "string",
                          "nullable": true
                        },
                        "test": {
                          "type": "boolean",
                          "description": "测试密钥出的模拟单"
                        },
                        "createdAt": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{no}": {
      "get": {
        "tags": [
          "订单 Orders"
        ],
        "summary": "查单（运单号、状态、面单是否已出）",
        "parameters": [
          {
            "name": "no",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "orderNo，或你们的 referenceNo"
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "orderNo": {
                          "type": "string",
                          "description": "ATRShip 的单号",
                          "example": "ATR261001A1B2C3D4"
                        },
                        "referenceNo": {
                          "type": "string",
                          "description": "你们系统的订单号",
                          "example": "SO-1001"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "processing",
                            "labeled",
                            "cancelling",
                            "cancelled",
                            "exception"
                          ]
                        },
                        "channel": {
                          "type": "string"
                        },
                        "channelName": {
                          "type": "string"
                        },
                        "carrier": {
                          "type": "string",
                          "example": "usps"
                        },
                        "trackingNo": {
                          "type": "string",
                          "nullable": true
                        },
                        "trackingUrl": {
                          "type": "string",
                          "nullable": true
                        },
                        "price": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "example": "USD"
                        },
                        "zone": {
                          "type": "string",
                          "nullable": true
                        },
                        "labelReady": {
                          "type": "boolean"
                        },
                        "labelUrl": {
                          "type": "string",
                          "nullable": true
                        },
                        "test": {
                          "type": "boolean",
                          "description": "测试密钥出的模拟单"
                        },
                        "createdAt": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{no}/label": {
      "get": {
        "tags": [
          "订单 Orders"
        ],
        "summary": "下载面单（默认 PDF；format=base64 返回 JSON）",
        "parameters": [
          {
            "name": "no",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "orderNo，或你们的 referenceNo"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pdf",
                "base64"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF 文件，或 { fileName, fileType, content }"
          },
          "404": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "410": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{no}/cancel": {
      "post": {
        "tags": [
          "订单 Orders"
        ],
        "summary": "取消",
        "parameters": [
          {
            "name": "no",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "orderNo，或你们的 referenceNo"
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "done": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "orderNo": {
                              "type": "string",
                              "description": "ATRShip 的单号",
                              "example": "ATR261001A1B2C3D4"
                            },
                            "referenceNo": {
                              "type": "string",
                              "description": "你们系统的订单号",
                              "example": "SO-1001"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "processing",
                                "labeled",
                                "cancelling",
                                "cancelled",
                                "exception"
                              ]
                            },
                            "channel": {
                              "type": "string"
                            },
                            "channelName": {
                              "type": "string"
                            },
                            "carrier": {
                              "type": "string",
                              "example": "usps"
                            },
                            "trackingNo": {
                              "type": "string",
                              "nullable": true
                            },
                            "trackingUrl": {
                              "type": "string",
                              "nullable": true
                            },
                            "price": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "example": "USD"
                            },
                            "zone": {
                              "type": "string",
                              "nullable": true
                            },
                            "labelReady": {
                              "type": "boolean"
                            },
                            "labelUrl": {
                              "type": "string",
                              "nullable": true
                            },
                            "test": {
                              "type": "boolean",
                              "description": "测试密钥出的模拟单"
                            },
                            "createdAt": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "409": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          },
          "502": {
            "description": "失败：success=false，code 见文档错误码",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/balance": {
      "get": {
        "tags": [
          "账户 Account"
        ],
        "summary": "账户余额",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "balance": {
                          "type": "number"
                        },
                        "creditLimit": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}