# 查询 Global Account 详情

> 通过 Global Account ID 或账号查询 Global Account 详情。

```yaml
openapi: 3.1.0
info:
  title: 查询 Global Account 详情
  version: 1.0.0
  description: 通过 Global Account ID 或账号查询 Global Account 详情。
paths:
  /api/v1/account/global/getDetail:
    post:
      summary: 查询 Global Account 详情
      description: 通过 Global Account ID 或账号查询 Global Account 详情。
      parameters:
        - name: apikey
          in: header
          required: true
          description: Onerway 分配的账户服务 API key 请求 Header；必须使用与请求域名相同环境的值。
          schema:
            type: string
            description: Onerway 分配的账户服务 API key 请求 Header；必须使用与请求域名相同环境的值。
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                requestId:
                  type: string
                  description: 请求 ID，用于链路追踪。
                globalAccountId:
                  type: string
                  description: 数字格式的 Global Account ID，通常来自创建接口响应。
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - 未传 `globalAccountNo` 时必填；如两个标识同时传入，必须指向同一个 Global Account。
                globalAccountNo:
                  type: string
                  description: Global Account 账号，可作为查询账户详情的业务标识。
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - 未传 `globalAccountId` 时必填；如两个标识同时传入，必须指向同一个 Global Account。
                onBehalfOf:
                  type: string
                  description: 平台商户代子客户查询时传入的子客户标识。Global Account 必须属于该子客户，且调用方必须具备该子客户的操作权限。
            examples:
              query-global-account-by-id:
                summary: 按 ID 查询 Global Account
                value:
                  requestId: REQ-GA-20260423-0002
                  globalAccountId: "1001"
      responses:
        "200":
          description: Global Account 详情
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Global Account 详情查询是否处理成功。当该值为 `false` 时，请读取 `respCode` 与 `respMsg`
                      判断失败原因，不要将 `data` 作为账户详情使用。
                  respCode:
                    type: string
                    description: Global Account API 业务响应码；成功响应码为 `20000`。
                  respMsg:
                    type: string
                    description: 响应码对应的提示或错误说明。
                  data:
                    type: object
                    properties:
                      globalAccountId:
                        type: string
                        description: Global Account ID。
                      globalAccountNo:
                        type: string
                        description: Global Account 账号。
                      globalAccountInfoId:
                        type:
                          - string
                          - "null"
                        description: 机构侧账户信息 ID。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: May be empty for DBS. CLEARBANK and BANKING_CIRCLE usually return it after
                              successful creation. Do not rely on this field as
                              the primary query identifier for the Global
                              Account.
                            zh: DBS 机构可能为空；CLEARBANK、BANKING_CIRCLE 创建成功后通常返回。接入时不应依赖该字段作为 Global Account
                              的主查询标识。
                      globalAccountName:
                        type: string
                        description: Global Account 展示名称。
                      customerId:
                        type: string
                        description: 客户标识。
                      customerName:
                        type: string
                        description: 客户名称。
                      mainAccountNo:
                        type:
                          - string
                          - "null"
                        description: 关联主账户账号。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Returned when the account is associated with a main account. It may be empty
                              when no main account is associated.
                            zh: 账户关联主账户时返回；未关联时可能为空。
                      mainAccountName:
                        type:
                          - string
                          - "null"
                        description: 关联主账户名称。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Returned when the account is associated with a main account. It may be empty
                              when no main account is associated.
                            zh: 账户关联主账户时返回；未关联时可能为空。
                      iban:
                        type:
                          - string
                          - "null"
                        description: IBAN（International Bank Account Number）。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the associated MA information is filled in and whether
                              the institution returns it after successful
                              creation.
                            zh: 依赖关联 MA 信息是否填写，以及创建成功时机构是否返回；可能为空。
                      bankCode:
                        type:
                          - string
                          - "null"
                        description: 银行代码。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the associated MA information is filled in and whether
                              the institution returns it after successful
                              creation.
                            zh: 依赖关联 MA 信息是否填写，以及创建成功时机构是否返回；可能为空。
                      swiftCode:
                        type:
                          - string
                          - "null"
                        description: SWIFT Code。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the associated MA information is filled in and whether
                              the institution returns it after successful
                              creation.
                            zh: 依赖关联 MA 信息是否填写，以及创建成功时机构是否返回；可能为空。
                      bankAddress:
                        type:
                          - string
                          - "null"
                        description: 银行地址。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the associated MA information is filled in and whether
                              the institution returns it after successful
                              creation.
                            zh: 依赖关联 MA 信息是否填写，以及创建成功时机构是否返回；可能为空。
                      bankName:
                        type:
                          - string
                          - "null"
                        description: 银行名称。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the associated MA information is filled in and whether
                              the institution returns it after successful
                              creation.
                            zh: 依赖关联 MA 信息是否填写，以及创建成功时机构是否返回；可能为空。
                      bankCountry:
                        type: string
                        description: Global Account 开户银行所在国家或地区代码，按 [ISO 3166-1
                          alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
                          两位字母代码读取。
                      bizTypeList:
                        type: array
                        description: 该 Global Account 支持的业务类型列表项。
                        items:
                          type: string
                          enum:
                            - COBO
                            - POBO
                          x-enum-descriptions:
                            COBO: 收款业务，用于承接收单场景的资金入账。
                            POBO: 付款业务，用于资金转出场景。
                      supportCurrencies:
                        type: array
                        description: 该 Global Account 支持的币种列表项，使用 ISO 4217 三位字母货币代码。
                        items:
                          type: string
                      institution:
                        type:
                          - string
                          - "null"
                        description: 金融机构。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Usually returned after successful creation. It may be empty in other
                              lifecycle states.
                            zh: 创建成功时通常返回；其他生命周期状态下可能为空。
                      webhookUrl:
                        type:
                          - string
                          - "null"
                        description: 账户服务通知 URL。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Depends on whether the account-service notification URL is configured.
                            zh: 依赖账户服务通知 URL 是否已配置；可能为空。
                      operatingEntity:
                        type:
                          - string
                          - "null"
                        description: 经营主体。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Usually returned after successful creation. It may be empty in other
                              lifecycle states.
                            zh: 创建成功时通常返回；其他生命周期状态下可能为空。
                      status:
                        type: string
                        description: Global Account 生命周期状态，商户应以该字段判断账户是否可进入后续收单收款或资金转出流程。
                        enum:
                          - Processing
                          - Failed
                          - Active
                          - Suspended
                          - Supervised
                          - Deleted
                          - Closed
                        x-enum-descriptions:
                          Processing: Global Account 开通处理中。
                          Failed: Global Account 开通失败。
                          Active: Global Account 已开通，可进入后续收单收款或资金转出流程。
                          Suspended: Global Account 已暂停。
                          Supervised: Global Account 处于监管状态，可见但当前不可用。
                          Deleted: Global Account 已逻辑删除。
                          Closed: Global Account 已关闭。
                      globalActiveTime:
                        type: string
                        description: Global Account 开通时间。
                      addressCity:
                        type: string
                        description: 银行所在城市。
                      addressPostalCode:
                        type: string
                        description: 银行地址邮编。
                      onBehalfOf:
                        type:
                          - string
                          - "null"
                        description: Onerway 回显的子客户标识。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Returned when the request was made on behalf of a child customer.
                            zh: 代子客户调用时返回。
                    description: Global Account 详情。
                  error:
                    type:
                      - object
                      - "null"
                    properties:
                      type:
                        type: string
                        description: 标准化错误类型。
                      code:
                        type: string
                        description: 对外业务错误码，通常与 `respCode` 对齐。
                      message:
                        type: string
                        description: 可读错误信息。
                      param:
                        type:
                          - string
                          - "null"
                        description: 触发错误的请求字段名。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Returned when the error can be associated with a request field.
                            zh: 错误可关联到请求字段时返回。
                      requestId:
                        type:
                          - string
                          - "null"
                        description: 用于排查问题的请求 ID。
                        x-onerway-value:
                          nullable: true
                          empty: true
                          when:
                            en: Returned when the request ID is available in the failure context.
                            zh: 失败上下文中可取得请求 ID 时返回。
                    description: 账户服务返回的结构化错误信息。
                    x-onerway-value:
                      nullable: true
                      when:
                        en: Returned when the Global Account request fails.
                        zh: Global Account 请求失败时返回。
              examples:
                query-global-account-by-id:
                  summary: Global Account 详情
                  value:
                    success: true
                    respCode: "20000"
                    respMsg: Success
                    data:
                      globalAccountId: "1001"
                      globalAccountNo: GA-DEMO-0001
                      globalAccountName: Acme USD Collection
                      customerId: CUS-EXAMPLE-001
                      customerName: Acme Ltd
                      mainAccountNo: MAIN-ACCOUNT-001
                      mainAccountName: Main Account
                      iban: GB29NWBK60161331926819
                      bankCode: NWBKGB2L
                      swiftCode: NWBKGB2LXXX
                      bankAddress: 1 Example Street
                      bankName: Example Bank
                      bankCountry: GB
                      bizTypeList:
                        - COBO
                        - POBO
                      supportCurrencies:
                        - USD
                        - EUR
                      institution: Example Institution
                      webhookUrl: https://merchant.example.com/hooks/account
                      operatingEntity: Example Entity
                      status: Active
                      globalActiveTime: 2026-04-23T06:31:18.266Z
                      addressCity: London
                      addressPostalCode: EC1A1BB
```
