{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliatebase-io/json-schema/affiliatebase-io-paginated-payouts-schema.json",
  "title": "PaginatedPayouts",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliatebase-io-payouts-api-openapi.yml#/components/schemas/PaginatedPayouts",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Payout"
      }
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "$defs": {
    "Pagination": {
      "type": "object",
      "required": [
        "previous_page",
        "current_page",
        "next_page",
        "count",
        "limit",
        "total_pages",
        "total_count"
      ],
      "properties": {
        "previous_page": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "current_page": {
          "type": "integer"
        },
        "next_page": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "count": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "total_pages": {
          "type": "integer"
        },
        "total_count": {
          "type": "integer"
        }
      }
    },
    "Payout": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "amount": {
          "type": "integer"
        },
        "currency": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "paid_at": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "format": "date-time"
            }
          ]
        },
        "payment_reference": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}