> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.returnhelper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取 API 账户信息

<Warning>
  此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问，请参阅[英文版本](/api-reference/account/get-api-info)。
</Warning>

返回您所使用的 API Key 对应账户的标识信息——数字型的 `apiId`、名称、账户类型、主要联系邮箱，以及该账户当前是否被封禁。

`apiId` 与 Return Helper 在每条 webhook 通知中发送的 `RETURNHELPER-API-ID` 请求头是同一个值。若同一台服务器会接收多个 Return Helper 账户的通知，请为每组 API Key 各调用本端点一次，在您端保存 `apiId` → 账户的映射关系，再根据该请求头把每条通知路由到正确的账户。

<h2 id="related">
  相关
</h2>

* [Webhooks → 通知请求头](/zh-Hans/webhooks#notification-headers) — `apiId` 在传入通知中出现的位置。
* [列出 Notification Endpoints](/zh-Hans/api-reference/notification/list-notification-endpoints) — 该账户已注册的通知端点。


## OpenAPI

````yaml get /api/Account/getApiInfo
openapi: 3.1.0
info:
  title: Return Helper API
  description: API documentation for Return Helper — covering User and Public endpoints.
  version: 1.0.0
servers:
  - url: https://api.returnshelper.com/uat/user
    description: Sandbox — User API
  - url: https://api.returnshelper.com/uat/public
    description: Sandbox — Public API
  - url: https://api.returnhelpercentre.com/v1/user
    description: Production — User API
  - url: https://api.returnhelpercentre.com/v1/public
    description: Production — Public API
  - url: https://api.returnhelperchina.com/user
    description: Production — User API (China)
security:
  - ApiKey: []
    ApiToken: []
paths:
  /api/Account/getApiInfo:
    get:
      tags:
        - Account
      summary: Get API account information
      operationId: ReturnUserApi_GetApiInfo
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiInfoReply'
        '401':
          description: >-
            Authentication failed. Returned when the `x-rr-apikey` or
            `x-rr-apitoken` header is missing or invalid. The body uses the
            standard `ApiResponse` envelope with `meta.error.message` describing
            the auth failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
      security:
        - ApiKey: []
          ApiToken: []
      servers:
        - url: https://api.returnshelper.com/uat/user
          description: Sandbox — User API
components:
  schemas:
    ApiInfoReply:
      type: object
      properties:
        apiId:
          type: integer
          format: int64
          description: >-
            Identifier of the API account. Sent as the RETURNHELPER-API-ID
            header on every webhook notification.
          examples:
            - 1234
        apiTypeCode:
          type:
            - string
            - 'null'
          description: Account type. Always "USER" for accounts calling the User API.
          examples:
            - USER
        apiName:
          type:
            - string
            - 'null'
          description: >-
            Account name. Sent as the RETURNHELPER-API-NAME header on every
            webhook notification.
          examples:
            - Acme Returns
        primaryEmail:
          type:
            - string
            - 'null'
          description: Primary contact email of the account.
          examples:
            - user@example.com
        isBlocked:
          type: boolean
          description: True when the account is blocked and API calls are rejected.
    ApiResponse:
      type: object
      description: >-
        Universal response envelope. Successful responses include the business
        payload as additional top-level fields alongside `correlationId` and
        `meta`. Failed responses (auth errors, validation errors) only populate
        `correlationId` and `meta`, with `meta.errorCode` and `meta.error`
        describing the failure.
      properties:
        correlationId:
          type:
            - string
            - 'null'
          description: >-
            Unique correlation ID for tracing the request through Return Helper
            systems.
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
    ApiResponseMeta:
      type: object
      description: >-
        Application-level metadata for every API response. Inspect `status` and
        `errorCode` to detect soft-error responses (validation failures arrive
        as HTTP 200 with `meta.status: 400`).
      properties:
        status:
          type: integer
          description: >-
            Application-level status code. For successful operations this
            mirrors the HTTP status (e.g. 200). For validation failures it
            reports the logical status (e.g. 400) even though the wire HTTP
            status is 200.
        data:
          type: object
          additionalProperties:
            type: string
          description: Reserved free-form metadata key/value pairs. Usually empty.
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Machine-readable error code (e.g. `VALIDATION_FAILED`). Non-null
            only when the operation failed.
        error:
          type: object
          additionalProperties: true
          description: >-
            Field-level or message-level error detail keyed by request property
            name. Empty object on success.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
      description: Your API key
    ApiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken
      description: Your API token — keep this private

````