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

# Claim affiliate balance

> Claim the full available balance in one custody and frozen payout bucket. Pass claimBucketId from affiliate stats to select a bucket; omission preserves oldest-bucket selection.

**/v1/affiliates/\{affiliateId}/claim**


## OpenAPI

````yaml https://orchestration.flashnet.xyz/openapi.json POST /v1/affiliates/{affiliateId}/claim
openapi: 3.1.0
info:
  title: Flashnet Orchestrator API
  version: 0.1.0
  description: >-
    Partner API for quotes, orders, standing deposits, webhooks, and affiliates.
    Operations marked x-excluded are omitted from the documentation navigation;
    internal, pay-link, SSE, and provider-integration routes are outside this
    registry.
servers:
  - url: https://orchestration.flashnet.xyz
security: []
tags:
  - name: Orchestration
    description: >-
      Routes, limits, estimates, quotes, orders, onramp, and ZeroConf decisions
      for one-off swaps.
  - name: Standing Deposit Addresses
    description: >-
      Permanent per-customer deposit addresses bound to one immutable conversion
      instruction.
  - name: Webhooks
    description: >-
      Registration of HTTPS endpoints for order status events and recovery
      events.
  - name: Affiliates
    description: Registered fee recipients, their accrued balances, and claims.
  - name: Accumulation Addresses
    description: >-
      Legacy reusable addresses that convert one source asset into Spark BTC or
      USDB.
  - name: Liquidations
    description: >-
      Legacy Bitcoin L1 deposit addresses that convert each output to a
      configured destination.
  - name: System
  - name: Explorer
  - name: Dashboard
  - name: Affiliate Dashboard
paths:
  /v1/affiliates/{affiliateId}/claim:
    post:
      tags:
        - Affiliates
      summary: Claim affiliate balance
      description: >-
        Claim the full available balance in one custody and frozen payout
        bucket. Pass claimBucketId from affiliate stats to select a bucket;
        omission preserves oldest-bucket selection.
      operationId: postV1AffiliatesAffiliateIdClaim
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: affiliateId
          in: path
        - schema:
            type: string
            minLength: 1
          required: true
          name: X-Idempotency-Key
          in: header
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AffiliateClaimCreateRequest'
      responses:
        '201':
          description: Claim created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateClaimResponse'
        '400':
          description: Invalid request or insufficient balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Payout path quote temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AffiliateClaimCreateRequest:
      type: object
      properties:
        claimBucketId:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: >-
            Opaque balance ID returned by affiliate stats. Selects one custody
            and frozen payout bucket.
        settlementChain:
          type: string
          minLength: 1
        settlementAsset:
          type: string
          minLength: 1
        payoutChain:
          $ref: '#/components/schemas/Chain'
        payoutAsset:
          type: string
          minLength: 1
        payoutAddress:
          type: string
          minLength: 1
          description: >-
            Server canonicalizes by trimming leading/trailing whitespace; case
            is preserved.
      additionalProperties: false
    AffiliateClaimResponse:
      type: object
      properties:
        claim:
          $ref: '#/components/schemas/AffiliateClaim'
      required:
        - claim
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      additionalProperties: false
    Chain:
      type: string
      enum:
        - arbitrum
        - arc
        - avalanche
        - base
        - bitcoin
        - bsc
        - ethereum
        - hedera
        - hypercore
        - hyperevm
        - lightning
        - litecoin
        - monad
        - monero
        - optimism
        - plasma
        - polygon
        - robinhood
        - sei
        - solana
        - spark
        - tempo
        - ton
        - tron
        - xrp
        - zcash
    AffiliateClaim:
      type: object
      properties:
        id:
          type: string
        affiliateId:
          type: string
        amount:
          type: string
        settlementChain:
          type: string
        settlementAsset:
          type: string
        payoutChain:
          $ref: '#/components/schemas/Chain'
        payoutAsset:
          type: string
        payoutAddress:
          type: string
        status:
          type: string
          enum:
            - processing
            - completed
            - failed
        txHash:
          type:
            - string
            - 'null'
        relayRequestId:
          type:
            - string
            - 'null'
        operationId:
          type:
            - string
            - 'null'
        errorMessage:
          type:
            - string
            - 'null'
        nextAttemptAt:
          type: string
        attempts:
          type: integer
        createdAt:
          type: string
        completedAt:
          type:
            - string
            - 'null'
      required:
        - id
        - affiliateId
        - amount
        - settlementChain
        - settlementAsset
        - payoutChain
        - payoutAsset
        - payoutAddress
        - status
        - txHash
        - relayRequestId
        - operationId
        - errorMessage
        - nextAttemptAt
        - attempts
        - createdAt
        - completedAt
      additionalProperties: false
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Partner API key in the form `Authorization: Bearer fn_...`.'

````

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