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

# Get Ofac Batch

> Get the status of an OFAC batch.



## OpenAPI

````yaml /api-reference/openapi.json get /ofac/searches/batches/{batch_id}
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /ofac/searches/batches/{batch_id}:
    get:
      tags:
        - OFAC
      summary: Get Ofac Batch
      description: Get the status of an OFAC batch.
      operationId: get_ofac_batch_ofac_searches_batches__batch_id__get
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: OFAC Batch ID
            description: The unique identifier of the OFAC batch to download.
            examples:
              - c1182ab3-5235-4359-8354-b820ad67cb38
          description: The unique identifier of the OFAC batch to download.
      responses:
        '200':
          description: Retrieved status of the OFAC batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.OFACBatchResponse'
        '404':
          description: The OFAC batch does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
                title: ResourceNotFound
                description: Could not locate the resource for the given URI.
                examples:
                  - code: 1
                    message: Could not locate the resource for the given URI.
                    metadata: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.OFACBatchResponse:
      properties:
        id:
          type: string
          format: uuid
          title: OFAC Batch ID
          description: The unique identifier of the OFAC batch.
          examples:
            - a2e702a1-34b6-4401-bc1c-2d5d07b2a957
        name:
          type: string
          title: Name
          description: The name of the ofac batch file
          examples:
            - ofac_batch_1.csv
        similarity_threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Threshold
          description: The similarity threshold for the OFAC search
          examples:
            - 0.9
            - 0.95
            - 0.99
        state:
          $ref: '#/components/schemas/TaskState'
          description: The current processing state of the ofac batch
          examples:
            - COMPLETED
        entities_count:
          type: integer
          title: Entities Count
          description: Total number of entities in the batch
          examples:
            - 100
        valid_entities_count:
          type: integer
          title: Valid Entities Count
          description: Total number of valid entities in the batch
          examples:
            - 100
        entities_with_match_count:
          type: integer
          title: Entities With Match Count
          description: Total number of entities with a match in the batch
          examples:
            - 10
        invalid_entities_count:
          type: integer
          title: Invalid Entities Count
          description: Total number of invalid entities in the batch
          examples:
            - 10
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the ofac batch was created
          examples:
            - '2026-08-31T10:31:07.823202'
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
          description: When the ofac batch was updated
          examples:
            - '2026-08-31T10:31:07.823211'
      type: object
      required:
        - id
        - name
        - similarity_threshold
        - state
        - entities_count
        - valid_entities_count
        - entities_with_match_count
        - invalid_entities_count
        - created_at
      title: OFACBatchResponse (v1)
    APIError:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - code
        - message
      title: APIError
      description: >-
        APIError is a Pydantic model for standardizing error responses from the
        API.


        This class is used internally by APIException for JSON serialization.

        Users should typically work with APIException directly in exception
        catalogs.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskState:
      enum:
        - PENDING
        - EXECUTING
        - COMPLETED
        - FAILED
        - CANCELLED
      title: TaskState
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````