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

# Upload batch instructions

> SDP's "upload instructions" step. `encryptedAmount` is opaque to the server (blind). Validates each contractor exists and is `ready`.




## OpenAPI

````yaml /openapi.yaml post /batches/{id}/instructions
openapi: 3.1.0
info:
  title: Confiroll payroll-api
  version: 1.0.0
  description: >
    The Confiroll BFF (backend-for-frontend) for confidential contractor payroll
    on Stellar **testnet**. It issues session JWTs (SEP-10 wallet or Privy
    email) and fee-bumps browser-signed confidential transfers (Fork B). It
    holds operational keys only, never a user's signing or viewing key.


    Every handled error returns `{ "error": string }`. Request bodies are
    limited to 256 KiB.
servers:
  - url: https://api.confiroll.com
    description: Live testnet deployment
security: []
tags:
  - name: Health
    description: Service health.
  - name: Auth
    description: Session issuance via SEP-10 (wallet) or Privy (email).
  - name: Transfers
    description: The core confidential-payout call (Fork B fee-bump).
  - name: Batch runs
    description: Run a confidential batch of payouts.
  - name: Withdrawals and disclosure
    description: >-
      Withdraw and auditor disclosure. These routes return 501; the operations
      run in the client tooling.
  - name: Session and role
    description: Resolves the signed-in user's role.
  - name: Contractors
    description: Contractor directory (public data only).
  - name: Batches
    description: SDP-aligned batch (disbursement) records.
  - name: Payouts
    description: SDP-aligned payout (payment) records.
  - name: Funding
    description: Faucet and CCTP vault state.
paths:
  /batches/{id}/instructions:
    post:
      tags:
        - Batches
      summary: Upload batch instructions
      description: >
        SDP's "upload instructions" step. `encryptedAmount` is opaque to the
        server (blind). Validates each contractor exists and is `ready`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                instructions:
                  type: array
                  items:
                    type: object
                    properties:
                      contractorId:
                        type: string
                      encryptedAmount:
                        type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  payouts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Payout'
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        contractorId:
                          type: string
                        reason:
                          type: string
      security:
        - bearerAuth: []
components:
  schemas:
    Payout:
      type: object
      description: >-
        `encryptedAmount` is opaque to the server (the employer's private
        ledger).
      properties:
        id:
          type: string
        batchId:
          type: string
        contractorId:
          type: string
        address:
          type: string
        status:
          $ref: '#/components/schemas/PayoutStatus'
        txHash:
          type: string
        error:
          type: string
        encryptedAmount:
          type: string
        createdAt:
          type: string
          format: date-time
        paidAt:
          type: string
          format: date-time
      required:
        - id
        - batchId
        - contractorId
        - status
        - createdAt
    PayoutStatus:
      type: string
      enum:
        - draft
        - ready
        - pending
        - paid
        - failed
        - canceled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A session JWT from `/auth/sep10/verify` or `/auth/privy`. Default TTL 1
        hour.

````