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

# Fulfill Refresh Request

> The subject owner marks a refresh request as fulfilled by pointing it to
a specific snapshot. Two patterns are supported:
- **Snapshot confirmation**: point to the existing latest snapshot if no
  attribute changes are needed.
- **Attribute refresh**: first apply a new update (propose + apply to create
  a new snapshot), then fulfill pointing to the new version.

Requires ownership of the subject.




## OpenAPI

````yaml POST /v1/subjects/{subject_type}/{subject_id}/refresh-requests/{request_id}/fulfill
openapi: 3.1.0
info:
  title: Tally Platform API
  version: '1.0'
  description: >
    The Tally Platform API is a versioned REST API for managing business
    identity

    state, counterparty access grants, and refresh workflows.


    All tenant-scoped endpoints require an `Authorization: Bearer <token>`
    header

    containing a valid Firebase Auth JWT. Tokens are issued by Google Identity

    Platform (GCIP) after sign-in at your environment's app domain.


    **Base URLs**

    | Environment | URL |

    |-------------|-----|

    | Staging | `https://tally-platform-api-xwka6vu2kq-ue.a.run.app` |

    | Production | `https://tally-platform-api-iikaevm4pq-ue.a.run.app` |
  contact:
    email: support@tallychannel.com
servers:
  - url: https://tally-platform-api-xwka6vu2kq-ue.a.run.app
    description: Staging
  - url: https://tally-platform-api-iikaevm4pq-ue.a.run.app
    description: Production
security:
  - BearerAuth: []
tags:
  - name: System
    description: Health checks and service metadata. No authentication required.
  - name: Tenants
    description: Tenant creation and member management.
  - name: Grants
    description: >-
      Access grant lifecycle — create, list, revoke. Controls which counterparty
      tenants can read which subjects.
  - name: Identity State
    description: >-
      Initial snapshot creation. Writes the first versioned state record for a
      subject.
  - name: Snapshots
    description: >-
      Read identity state — latest, history, by ID, export, chain proof, and
      diff.
  - name: Updates
    description: Propose and apply RFC 6902 patch updates to create new snapshot versions.
  - name: Transfer Offers
    description: Consensual `tenant_owner` role transfer handshake between principals.
  - name: Refresh Requests
    description: >-
      Counterparty-initiated requests for attribute updates or snapshot
      confirmation.
  - name: Webhooks
    description: Webhook subscription management and secret rotation.
paths:
  /v1/subjects/{subject_type}/{subject_id}/refresh-requests/{request_id}/fulfill:
    post:
      tags:
        - Refresh Requests
      summary: Fulfill a refresh request
      description: >
        The subject owner marks a refresh request as fulfilled by pointing it to

        a specific snapshot. Two patterns are supported:

        - **Snapshot confirmation**: point to the existing latest snapshot if no
          attribute changes are needed.
        - **Attribute refresh**: first apply a new update (propose + apply to
        create
          a new snapshot), then fulfill pointing to the new version.

        Requires ownership of the subject.
      operationId: fulfillRefreshRequest
      parameters:
        - $ref: '#/components/parameters/subject_type'
        - $ref: '#/components/parameters/subject_id'
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                snapshot_id:
                  type: string
                  format: uuid
                  description: The snapshot that satisfies this request.
              required:
                - snapshot_id
      responses:
        '200':
          description: Request fulfilled.
          content:
            application/json:
              schema:
                type: object
                properties:
                  refresh_request:
                    $ref: '#/components/schemas/RefreshRequestRecord'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    subject_type:
      name: subject_type
      in: path
      required: true
      schema:
        type: string
        enum:
          - individual
          - organization
      description: Subject type discriminator.
    subject_id:
      name: subject_id
      in: path
      required: true
      schema:
        type: string
      description: Stable subject identifier within its type namespace.
      example: subj-f71e30bc
  schemas:
    RefreshRequestRecord:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
        subject_type:
          type: string
        subject_id:
          type: string
        requesting_tenant_id:
          type: string
        origin_type:
          type: string
          enum:
            - owner
            - grant
        reason_code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        requested_paths:
          type: array
          items:
            type: string
          nullable: true
          description: JSON Pointer paths to specific attributes being requested.
        status:
          type: string
          enum:
            - pending
            - fulfilled
            - expired
        fulfilled_snapshot_id:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        fulfilled_at:
          type: string
          format: date-time
          nullable: true
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: validation_error
            message:
              type: string
              description: Human-readable error message.
              example: Request body failed schema validation.
            details:
              type: array
              items:
                $ref: '#/components/schemas/ErrorDetail'
            request_id:
              type: string
              description: Request ID for tracing. Injected server-side.
              example: req_01j2k3m4n5
          required:
            - code
            - message
      required:
        - error
    ErrorDetail:
      type: object
      properties:
        path:
          type: string
          description: JSON Pointer to the field that caused the error.
          example: /subject_id
        message:
          type: string
          example: subject_id is required.
        code:
          type: string
          example: invalid_type
      required:
        - path
        - message
  responses:
    ValidationError:
      description: Request body or parameter failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: validation_error
              message: Request body failed schema validation.
              details:
                - path: /subject_id
                  message: subject_id is required.
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: unauthorized
              message: Authentication required.
    Forbidden:
      description: Authenticated but insufficient role or missing grant.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: forbidden
              message: Owner or grant required.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Firebase Auth JWT issued by Google Identity Platform.
        Obtain a token by signing in at your app domain and calling
        `firebase.auth().currentUser.getIdToken()`.

````