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

# 授权详情

> Returns one purchase instruction of the token's customer with its `mandates` and `usages`.

`usages` 是原始使用记录；Portal 展示已用和剩余金额时由调用方自行汇总。

授权响应中的 `client_reference_id` 是指令自身的字段。通过 portal 创建的指令由 Clink 生成随机值；它不是创建请求的 `request_id`，也不是[获取凭证](https://docs.clinkbill.com/cn/api-reference/agent-portal/get_credential.md)和[回报支付结果](https://docs.clinkbill.com/cn/api-reference/agent-portal/report_credential_result.md)时发送的 `client_reference_id`。不要用它做对账。


## OpenAPI

````yaml GET /agent/platform/authorizations/{instructionId}
openapi: 3.1.0
info:
  title: Clink Agent Portal API
  description: >-
    Agent Portal APIs let an Agent platform read and manage one user's Clink
    account with a portal user token: payment methods, orders, refunds, purchase
    instructions, payment credentials, payment results, and settings.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com
    description: Sandbox
security:
  - PortalToken: []
paths:
  /agent/platform/authorizations/{instructionId}:
    get:
      summary: Get authorization
      description: >-
        Returns one purchase instruction of the token's customer with its
        `mandates` and `usages`.
      operationId: getAuthorization
      parameters:
        - name: instructionId
          in: path
          required: true
          description: Instruction ID.
          schema:
            type: string
            example: inst_...
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    description: '`200` on success.'
                    example: 200
                  msg:
                    type: string
                    description: Result message.
                    example: Success
                  data:
                    $ref: '#/components/schemas/Authorization'
              example:
                code: 200
                msg: Success
                data:
                  instruction_id: inst_...
                  client_reference_id: 0f1e2d3c-...
                  payment_instrument_id: pi_...
                  card_last_four: '4242'
                  card_type: VIRTUAL_CARD
                  card_scheme: VISA
                  title: Example authorization
                  description: Purchase authorization
                  total_amount_limit: 100
                  currency_code: USD
                  effective_until_time: '2026-02-01T00:00:00Z'
                  is_recurring: false
                  status: ACTIVE
                  agent_info: {}
                  mandates: []
                  usages: []
        '401':
          description: Missing, expired, or invalid portal token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Wrong token audience, missing scope, or a platform client token used
            instead of a portal token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The instruction does not exist or belongs to another customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Authorization:
      type: object
      properties:
        instruction_id:
          type: string
          description: Instruction ID.
          example: inst_...
        client_reference_id:
          type: string
          description: >-
            The instruction's own reference. For instructions created through
            the portal, Clink generates a random value. It is not the create
            request's `request_id` and not the `client_reference_id` used for
            credentials and result reports; do not use it to reconcile a
            purchase.
          example: 0f1e2d3c-...
        payment_instrument_id:
          type: string
          description: Payment method the instruction uses.
          example: pi_...
        card_last_four:
          type: string
          description: Last four digits of the card.
          example: '4242'
        card_type:
          type: string
          description: Card type, for example `VIRTUAL_CARD`.
          example: VIRTUAL_CARD
        card_scheme:
          type: string
          description: Card scheme, for example `VISA`.
          example: VISA
        title:
          type: string
          description: Instruction title.
          example: Example authorization
        description:
          type: string
          description: Instruction description.
          example: Purchase authorization
        total_amount_limit:
          type: number
          description: Total amount limit of the instruction.
          example: 100
        currency_code:
          type: string
          description: Currency code.
          example: USD
        effective_until_time:
          type: string
          description: Last time the instruction can be used.
          format: date-time
          example: '2026-02-01T00:00:00Z'
        is_recurring:
          type: boolean
          description: Whether the instruction contains recurring mandates.
          example: false
        status:
          type: string
          description: >-
            Instruction status, for example `CREATED`, `PENDING`, or `ACTIVE`. A
            new instruction becomes `ACTIVE` only after the user approves it.
          example: ACTIVE
        agent_info:
          type: object
          description: Agent that created the instruction.
        mandates:
          type: array
          description: Mandates of the instruction.
          items:
            type: object
            description: Mandate.
        usages:
          type: array
          description: Raw usage records. Compute used and remaining amounts from them.
          items:
            type: object
            description: Usage record.
    ErrorResponse:
      type: object
      description: Business errors use the standard envelope without `data`.
      properties:
        code:
          type: integer
          description: >-
            Numeric business error code. Judge an error by the HTTP status
            together with `code`, not by a string error code.
        msg:
          type: string
          description: Human-readable description.
  securitySchemes:
    PortalToken:
      type: http
      scheme: bearer
      description: >-
        Portal user token from `POST /agent/cwallet/platform/portal/tokens`.
        Reads require `portal:read`; writes require `portal:write`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.