infinihash-com Batch API

The Batch API from infinihash-com — 4 operation(s) for batch.

Operations 4

GET /api/batch/eod/spec Get the end-of-day file column contract #
POST /api/batch/eod Ingest an end-of-day POS file and reconcile #
GET /batch/eod/spec Get the end-of-day file column contract #
POST /batch/eod Ingest an end-of-day POS file and reconcile #

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/infinihash-com:infinihash-com-batch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

infinihash-com-batch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Infinihash KYC Batch API
  version: 1.0.0
  description: 'Identity verification, KYB, sanctions screening, UBO orchestration and periodic review.


    Auth: send your key as `X-API-Key: ` (or `Authorization: Bearer `).


    Most endpoints are mounted twice — at the root (`/kyc/...`) and under `/api` (`/api/kyc/...`). Prefer the `/api` form; it is what the hosted portals and SDKs use.


    Python SDK: `pip install "git+https://github.com/Infinihash/kyc-python@v0.1.0"` (https://github.com/Infinihash/kyc-python; runnable examples in examples/).'
  contact:
    name: Infinihash
    url: https://kyc.infinihash.com
servers:
- url: https://kyc-api.infinihash.com
  description: Production
tags:
- name: Batch
paths:
  /api/batch/eod/spec:
    get:
      x-route-source:
        file: routes/batch-eod.js
        method: get
        path: /eod/spec
      summary: Get the end-of-day file column contract
      description: 'Self-service description of the EOD reconciliation file: accepted formats, JSON/CSV shapes, the row limit and each column''s name, requirement, type and meaning.'
      tags:
      - Batch
      operationId: getBatchEodSpec
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      responses:
        '200':
          description: Column contract
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodSpec'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (global per-IP limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/batch/eod:
    post:
      x-route-source:
        file: routes/batch-eod.js
        method: post
        path: /eod
      summary: Ingest an end-of-day POS file and reconcile
      description: 'Accepts an end-of-day transaction file as JSON (`{rows:[...]}`, a bare array of rows, or `{csv:"..."}`) or as a `text/csv` body (up to 50,000 rows). In order: (1) validates each row against the column contract, rejecting bad rows individually; (2) discharges the open/lapsed dl_image obligation on any card whose row carries dl_document_id or dl_number (one per card per file); (3) reconciles POS policy decisions recorded for the business date against the file and lists those with no matching row. The file itself is not stored.'
      tags:
      - Batch
      operationId: ingestBatchEod
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/BatchEodRowsBody'
              - type: array
                items:
                  $ref: '#/components/schemas/BatchEodRow'
                description: A bare array of rows.
              - $ref: '#/components/schemas/BatchEodCsvBody'
          text/csv:
            schema:
              type: string
              description: CSV with a header row naming the contract columns; business date is derived from the first accepted row.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      responses:
        '200':
          description: Reconciliation summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodResult'
        '400':
          description: no_rows (unrecognised body), parse_failed (e.g. CSV too large), or empty_file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: too_many_rows (more than 50,000)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodError'
        '429':
          description: Rate limited (global per-IP limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /batch/eod/spec:
    get:
      x-route-source:
        file: routes/batch-eod.js
        method: get
        path: /eod/spec
      summary: Get the end-of-day file column contract
      description: 'Self-service description of the EOD reconciliation file: accepted formats, JSON/CSV shapes, the row limit and each column''s name, requirement, type and meaning.'
      tags:
      - Batch
      operationId: get_batch_eod_spec
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      responses:
        '200':
          description: Column contract
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodSpec'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (global per-IP limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /batch/eod:
    post:
      x-route-source:
        file: routes/batch-eod.js
        method: post
        path: /eod
      summary: Ingest an end-of-day POS file and reconcile
      description: 'Accepts an end-of-day transaction file as JSON (`{rows:[...]}`, a bare array of rows, or `{csv:"..."}`) or as a `text/csv` body (up to 50,000 rows). In order: (1) validates each row against the column contract, rejecting bad rows individually; (2) discharges the open/lapsed dl_image obligation on any card whose row carries dl_document_id or dl_number (one per card per file); (3) reconciles POS policy decisions recorded for the business date against the file and lists those with no matching row. The file itself is not stored.'
      tags:
      - Batch
      operationId: post_batch_eod
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/BatchEodRowsBody'
              - type: array
                items:
                  $ref: '#/components/schemas/BatchEodRow'
                description: A bare array of rows.
              - $ref: '#/components/schemas/BatchEodCsvBody'
          text/csv:
            schema:
              type: string
              description: CSV with a header row naming the contract columns; business date is derived from the first accepted row.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      responses:
        '200':
          description: Reconciliation summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodResult'
        '400':
          description: no_rows (unrecognised body), parse_failed (e.g. CSV too large), or empty_file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: too_many_rows (more than 50,000)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEodError'
        '429':
          description: Rate limited (global per-IP limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BatchEodCsvBody:
      type: object
      required:
      - csv
      properties:
        business_date:
          type: string
          format: date
          description: YYYY-MM-DD; defaults to the date of the first accepted row.
        csv:
          type: string
          description: CSV text with a header row of the column names (max 8 MB / 50,000 rows).
    BatchEodSpec:
      type: object
      required:
      - formats
      - json_shape
      - csv_shape
      - max_rows
      - columns
      properties:
        formats:
          type: array
          items:
            type: string
        json_shape:
          type: string
        csv_shape:
          type: string
        max_rows:
          type: integer
        columns:
          type: array
          items:
            type: object
            required:
            - name
            - required
            - type
            - description
            properties:
              name:
                type: string
              required:
                type: boolean
              type:
                type: string
                enum:
                - string
                - number
                - date
              description:
                type: string
    BatchEodResult:
      type: object
      required:
      - ok
      - business_date
      - format
      - received
      - accepted
      - rejected
      - obligations_satisfied
      - decisions_checked
      - missing_from_file
      - missing_count
      - balanced
      properties:
        ok:
          type: boolean
          enum:
          - true
        business_date:
          type:
          - string
          - 'null'
        format:
          type: string
          enum:
          - json
          - csv
        received:
          type: integer
        accepted:
          type: integer
        rejected:
          type: array
          items:
            type: object
            required:
            - row
            - transaction_ref
            - errors
            properties:
              row:
                type:
                - integer
                - 'null'
                description: 1-based row number; null for file-level errors such as a failed obligation discharge.
              transaction_ref:
                type:
                - string
                - 'null'
              errors:
                type: array
                items:
                  type: string
        obligations_satisfied:
          type: array
          items:
            type: object
            properties:
              obligation_id:
                type: string
              card_ref:
                type: string
              transaction_ref:
                type: string
              was:
                type: string
                description: 'Prior status: open or lapsed.'
        decisions_checked:
          type: integer
          description: POS policy decisions on the business date that were compared with the file.
        missing_from_file:
          type: array
          description: POS decisions we recorded that have no matching row in the file (first 500).
          items:
            type: object
            properties:
              decision_id:
                type: string
              transaction_ref:
                type:
                - string
                - 'null'
              card_ref:
                type:
                - string
                - 'null'
              outcome:
                type: string
              reason_code:
                type: string
              decided_at:
                type: string
                format: date-time
        missing_count:
          type: integer
          description: Total number of missing decisions (may exceed the 500 listed).
        balanced:
          type: boolean
          description: true when nothing was rejected and nothing is missing.
    BatchEodRow:
      type: object
      required:
      - transaction_ref
      - card_ref
      - amount
      - occurred_at
      description: One end-of-day transaction row. Invalid rows are rejected individually (reported in `rejected`), never failing the whole file. Unknown columns are ignored.
      properties:
        transaction_ref:
          type: string
          description: Partner-unique transaction id; used to match our decision record.
        card_ref:
          type: string
          description: Partner card token; must match the card_ref sent to the policy evaluation.
        amount:
          oneOf:
          - type: number
          - type: string
          description: Transaction amount, decimal (numeric strings accepted).
        occurred_at:
          oneOf:
          - type: string
          - type: number
          description: ISO 8601 timestamp, or epoch seconds/milliseconds.
        channel:
          type: string
          description: pos | ecom | mobile (defaults to pos).
        sms_code:
          type: string
          description: 6-character SMS confirmation code (join key under the POS threshold).
        dl_number:
          type: string
          description: Driving licence number captured at point of sale.
        dl_document_id:
          type: string
          description: Uploaded DL image reference. This (or dl_number) discharges an open dl_image obligation on the card.
        submission_id:
          type: string
          description: KYC submission this cardholder maps to, if known.
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
    BatchEodRowsBody:
      type: object
      required:
      - rows
      properties:
        business_date:
          type: string
          format: date
          description: YYYY-MM-DD; defaults to the date of the first accepted row.
        rows:
          type: array
          items:
            $ref: '#/components/schemas/BatchEodRow'
    BatchEodError:
      type: object
      required:
      - error
      properties:
        error:
          type: string
        detail:
          type: string
        format:
          type: string
        max:
          type: integer
        received:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer