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

# Create a sandbox report

> Create a deterministic, fully-synthetic `StatementReport` (or force a deterministic error). No file required. Report scenarios persist a `complete`, `test`-environment report, so every `/v1/reports/{id}/*` sub-endpoint works against the returned `report_id`. Requires a test key; never consumes quota.



## OpenAPI

````yaml /openapi.json post /v1/sandbox/reports
openapi: 3.1.0
info:
  title: Swippee API
  version: 1.0.0
  description: >-
    Convert Nepali bank statement PDFs into structured financial data, derive
    lending products from a parse, and read Nepal's public-sector financial
    datasets — over one REST API.
servers:
  - url: https://api.swippee.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/sandbox/reports:
    post:
      tags:
        - Sandbox
      summary: Create a sandbox report
      description: >-
        Create a deterministic, fully-synthetic `StatementReport` (or force a
        deterministic error). No file required. Report scenarios persist a
        `complete`, `test`-environment report, so every `/v1/reports/{id}/*`
        sub-endpoint works against the returned `report_id`. Requires a test
        key; never consumes quota.
      operationId: createSandboxReport
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                scenario:
                  type: string
                  description: >-
                    A report scenario, or an `error_*` scenario to force a
                    failure.
                  enum:
                    - salaried
                    - thin_file
                    - high_risk
                    - remittance
                    - error_unsupported_bank
                    - error_unsupported_document
                    - error_password_required
                    - error_image_not_tamper_verified
                    - error_tamper_detected
                  default: salaried
                override_transactions:
                  type: array
                  description: >-
                    Extra transactions appended to the scenario (balance is
                    recomputed).
                  items:
                    type: object
                    properties:
                      date:
                        type: string
                        format: date
                      description:
                        type: string
                      amount:
                        type: number
                      direction:
                        type: string
                        enum:
                          - credit
                          - debit
      responses:
        '201':
          description: Synthetic report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementReport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/Unprocessable'
components:
  schemas:
    StatementReport:
      type: object
      properties:
        report_id:
          type: string
          example: cl_abc123
        status:
          type: string
          example: complete
        data_source:
          type: string
          enum:
            - PARSED_STATEMENT
            - OCR_IMAGE
          description: >-
            How the data was obtained: parsed from the bank's PDF/Excel, or read
            from a photo/scan.
          example: PARSED_STATEMENT
        tamper_verifiable:
          type: boolean
          description: >-
            Whether the source supports document tamper-verification (false for
            OCR_IMAGE).
          example: true
        statement:
          type: object
          properties:
            bank:
              type: string
              example: Nabil Bank
            bank_code:
              type: string
              example: NABIL
            currency:
              type: string
              example: NPR
            period:
              type: object
              properties:
                from:
                  type: string
                  format: date
                to:
                  type: string
                  format: date
            opening_balance:
              type: number
            closing_balance:
              type: number
            total_transactions:
              type: integer
        signals:
          type: object
        monthly_summary:
          type: array
          items:
            type: object
        categories:
          type: object
        merchant_categories:
          type: object
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
    Transaction:
      type: object
      description: >-
        A transaction as returned by reports. `amount` is signed: POSITIVE =
        money out (debit), NEGATIVE = money in (credit).
      properties:
        transaction_id:
          type: string
          example: txn_0001
        date:
          type: string
          format: date
        name:
          type: string
          description: Raw narration as printed on the statement.
        amount:
          type: number
          description: 'Signed: positive = money out, negative = money in.'
          example: 2480
        iso_currency_code:
          type: string
          example: NPR
        balance:
          type:
            - number
            - 'null'
        merchant_name:
          type:
            - string
            - 'null'
          example: Example Store
        payment_terminal_id:
          type:
            - string
            - 'null'
          example: '2222000000000000'
        mcc:
          type:
            - string
            - 'null'
          example: '5411'
        personal_finance_category:
          type: object
          properties:
            primary:
              type: string
              example: GENERAL_MERCHANDISE
            detailed:
              type: string
              example: GENERAL_MERCHANDISE_OTHER_GENERAL_MERCHANDISE
            confidence_level:
              type: string
              enum:
                - VERY_HIGH
                - HIGH
                - MEDIUM
                - LOW
                - UNKNOWN
        counterparties:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                example: merchant
              name:
                type:
                  - string
                  - 'null'
              confidence_level:
                type: string
        payment_channel:
          type:
            - string
            - 'null'
          description: Not classified for parsed statements — null.
        pending:
          type: boolean
          example: false
    Error:
      type: object
      description: >-
        Flat, industry-standard error envelope. Branch on error_code, not the
        HTTP status.
      properties:
        error_type:
          type: string
          example: AUTHENTICATION_ERROR
        error_code:
          type: string
          example: INVALID_API_KEY
        error_message:
          type: string
          example: Unknown API key.
        display_message:
          type: string
          nullable: true
          example: null
        request_id:
          type: string
          example: req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60
        documentation_url:
          type: string
          example: https://docs.swippee.com/concepts/errors#invalid_api_key
        suggested_action:
          type: string
          example: Check your API key in the Authorization header.
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: The document could not be parsed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key from the dashboard, sent as `Authorization: Bearer
        swippee_sk_live_...`.

````