{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thomson-reuters/main/json-schema/thomson-reuters-trta-athena-models-api-v4-queries-rollforward-request-schema.json",
  "title": "TRTA.Athena.Models.Api.V4.Queries.RollforwardRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thomson-reuters-datasets-api-v1-openapi.yml#/components/schemas/TRTA.Athena.Models.Api.V4.Queries.RollforwardRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the rollforward operation."
    },
    "period": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "string",
          "description": "Start date of the period (DD/MM/YYYY)."
        },
        "endDate": {
          "type": "string",
          "description": "End date of the period (DD/MM/YYYY)."
        }
      }
    },
    "purpose": {
      "type": "string",
      "description": "Purpose of the rollforward."
    },
    "RETURNDETAILS": {
      "type": "object",
      "properties": {
        "ADD": {
          "type": "array",
          "description": "List of returns to add.",
          "items": {
            "$ref": "#/$defs/ReturnAdd"
          }
        },
        "UPDATE": {
          "type": "array",
          "description": "List of returns to update.",
          "items": {
            "$ref": "#/$defs/ReturnUpdate"
          }
        },
        "REMOVE": {
          "type": "array",
          "description": "List of returns to remove.",
          "items": {
            "$ref": "#/$defs/ReturnRemove"
          }
        }
      }
    }
  },
  "$defs": {
    "ReturnAdd": {
      "type": "object",
      "properties": {
        "ENTITYID": {
          "type": "string",
          "format": "uuid",
          "description": "Entity ID to add."
        },
        "TEMPLATEID": {
          "type": "string",
          "format": "uuid",
          "description": "Template ID for the return."
        },
        "TEMPLATEFAMILYNAME": {
          "type": "string",
          "description": "Name of the template family."
        },
        "RETURNNAME": {
          "type": "string",
          "description": "Name of the return."
        }
      }
    },
    "ReturnRemove": {
      "type": "object",
      "properties": {
        "ENTITYID": {
          "type": "string",
          "format": "uuid",
          "description": "Entity ID to remove."
        }
      }
    },
    "ReturnUpdate": {
      "type": "object",
      "properties": {
        "ENTITYID": {
          "type": "string",
          "format": "uuid",
          "description": "Entity ID to update."
        },
        "TEMPLATEID": {
          "type": "string",
          "format": "uuid",
          "description": "Template ID for the return (optional)."
        },
        "TEMPLATEFAMILYNAME": {
          "type": "string",
          "description": "Name of the template family."
        },
        "RETURNNAME": {
          "type": "string",
          "description": "Name of the return."
        }
      }
    }
  }
}