{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-payout-batch-schema.json",
  "title": "PayoutBatch",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-payout-batches-api-openapi.yml#/components/schemas/PayoutBatch",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^(sample_)?batch_",
      "description": "Prefixed id (`batch_…`)"
    },
    "object": {
      "type": "string",
      "enum": [
        "payout_batch"
      ]
    },
    "program_id": {
      "type": "string",
      "pattern": "^(sample_)?prg_",
      "description": "Prefixed id (`prg_…`)"
    },
    "term": {
      "type": "string",
      "enum": [
        "net_15",
        "net_30",
        "net_60"
      ]
    },
    "period_start": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601, UTC"
    },
    "period_end": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601, UTC"
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "ISO-4217"
    },
    "total_minor": {
      "type": "integer",
      "description": "Integer minor units (cents, pence). Never a float, never a string."
    },
    "payout_count": {
      "type": "integer"
    },
    "generated_by_user_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "executed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO-8601, UTC"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601, UTC"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601, UTC"
    }
  },
  "required": [
    "id",
    "object",
    "program_id",
    "term",
    "period_start",
    "period_end",
    "currency",
    "total_minor",
    "payout_count",
    "generated_by_user_id",
    "executed_at",
    "created_at",
    "updated_at"
  ]
}