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

# Validate

> Validate a message, optionally against other networks' rules too.

A message that fails to parse is reported as invalid (200), not as an error.



## OpenAPI

````yaml /rest/openapi.json post /validate
openapi: 3.1.0
info:
  description: >-
    Parse, build, validate, explain, generate and convert ISO 8583 messages.
    Intended for testing: there is no authentication. Only use test card
    numbers.
  title: ISO8583 Simulator API
  version: '1'
servers:
  - description: Public demo (LLM features off)
    url: https://api.iso8583sim.com
  - description: Local server (iso8583sim web)
    url: http://127.0.0.1:8000
security: []
paths:
  /validate:
    post:
      tags:
        - Messages
      summary: Validate
      description: >-
        Validate a message, optionally against other networks' rules too.


        A message that fails to parse is reported as invalid (200), not as an
        error.
      operationId: validate_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ValidateRequest:
      properties:
        against:
          anyOf:
            - items:
                $ref: '#/components/schemas/CardNetwork'
              type: array
            - type: 'null'
          description: >-
            Also check these networks' rules. An empty list checks every
            network.
          title: Against
        message:
          description: 'Raw ISO 8583 message: MTI, hex bitmap, then field data'
          maxLength: 32768
          title: Message
          type: string
        network:
          anyOf:
            - $ref: '#/components/schemas/CardNetwork'
            - type: 'null'
          description: Card network. Detected from the PAN when omitted.
        version:
          $ref: '#/components/schemas/ISO8583Version'
          default: '1987'
      required:
        - message
      title: ValidateRequest
      type: object
    ValidateResponse:
      properties:
        errors:
          items:
            type: string
          title: Errors
          type: array
        networks:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/NetworkResult'
              propertyNames:
                $ref: '#/components/schemas/CardNetwork'
              type: object
            - type: 'null'
          title: Networks
        valid:
          title: Valid
          type: boolean
      required:
        - valid
        - errors
      title: ValidateResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CardNetwork:
      description: Card network identifiers
      enum:
        - VISA
        - MASTERCARD
        - AMEX
        - DISCOVER
        - JCB
        - UNIONPAY
      title: CardNetwork
      type: string
    ISO8583Version:
      description: ISO 8583 protocol versions
      enum:
        - '1987'
        - '1993'
        - '2003'
      title: ISO8583Version
      type: string
    NetworkResult:
      properties:
        errors:
          items:
            type: string
          title: Errors
          type: array
        passed:
          title: Passed
          type: boolean
      required:
        - passed
        - errors
      title: NetworkResult
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````

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