{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gsma/json-schema/gsma-response-batch-transaction-schema.json",
  "title": "responseBatchTransaction",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gsma-transactions-api-openapi.yml#/components/schemas/responseBatchTransaction",
  "type": "object",
  "required": [
    "approvalDate",
    "batchId",
    "batchStatus",
    "completionDate"
  ],
  "properties": {
    "batchId": {
      "$ref": "#/$defs/batchId"
    },
    "batchStatus": {
      "$ref": "#/$defs/batchStatus"
    },
    "approvalDate": {
      "$ref": "#/$defs/approvalDate"
    },
    "completionDate": {
      "$ref": "#/$defs/completionDate"
    },
    "batchTitle": {
      "$ref": "#/$defs/batchTitle"
    },
    "batchdescription": {
      "$ref": "#/$defs/batchDescription"
    },
    "processingFlag": {
      "$ref": "#/$defs/processingFlag"
    },
    "completedCount": {
      "$ref": "#/$defs/completedCount"
    },
    "rejectionCount": {
      "$ref": "#/$defs/rejectionCount"
    },
    "parsingSuccessCount": {
      "$ref": "#/$defs/parsingSuccessCount"
    },
    "requestingOrganisation": {
      "$ref": "#/$defs/requestingOrganisation"
    },
    "scheduledStartDate": {
      "$ref": "#/$defs/scheduledStartDate"
    },
    "creationDate": {
      "$ref": "#/$defs/creationDate"
    },
    "modificationDate": {
      "$ref": "#/$defs/modificationDate"
    },
    "requestDate": {
      "$ref": "#/$defs/requestDate"
    },
    "customData": {
      "$ref": "#/$defs/customDataArray"
    },
    "completedDate": {
      "$ref": "#/$defs/completedDate"
    }
  },
  "$defs": {
    "approvalDate": {
      "type": "string",
      "format": "date-time",
      "description": "Indicates when the batch was approved as recorded by the API."
    },
    "batchDescription": {
      "type": "string",
      "description": "Client-provided description of the batch.",
      "minLength": 0,
      "maxLength": 256
    },
    "batchId": {
      "type": "string",
      "description": "Identifier for the Batch that is assigned by the API provider. This ID is used by the client on subsequent GET or PATCH methods.",
      "minLength": 1,
      "maxLength": 256
    },
    "batchStatus": {
      "type": "string",
      "enum": [
        "created",
        "approved",
        "completed"
      ]
    },
    "batchTitle": {
      "type": "string",
      "description": "Client-provided title for the batch.",
      "minLength": 0,
      "maxLength": 256
    },
    "completedCount": {
      "type": "number",
      "format": "int32",
      "description": "Indicates the number of records that have been successful completed.",
      "minimum": 0
    },
    "completedDate": {
      "type": "string",
      "format": "date-time",
      "deprecated": true,
      "description": "Indicates when the batch was completed as recorded by the API."
    },
    "completionDate": {
      "type": "string",
      "format": "date-time",
      "description": "Indicates when the batch was completed as recorded by the API."
    },
    "creationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the object was created by the API Provider."
    },
    "customData": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "Identifies the type of additional field.",
          "minLength": 1,
          "maxLength": 256
        },
        "value": {
          "type": "string",
          "description": "Identifies the value of the additional field.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "customDataArray": {
      "type": "array",
      "description": "A collection of key/value pairs. These can be used to populate provider specific fields.",
      "items": {
        "$ref": "#/$defs/customData"
      },
      "maxItems": 20
    },
    "modificationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the object was modified by the API Provider."
    },
    "parsingSuccessCount": {
      "type": "number",
      "format": "int32",
      "description": "Indicates the number of records that have been parsed successfully.",
      "minimum": 0
    },
    "processingFlag": {
      "type": "boolean",
      "description": "Indicates whether the batch is currently undergoing processing by the API Provider."
    },
    "rejectionCount": {
      "type": "number",
      "format": "int32",
      "description": "Indicates the number of records that have been rejected, either during parsing or during final processing.",
      "minimum": 0
    },
    "requestDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time of the request as supplied by the client."
    },
    "requestingOrganisation": {
      "type": "object",
      "description": "An object that details the originating organisation of the request.",
      "required": [
        "requestingOrganisationIdentifierType",
        "requestingOrganisationIdentifier"
      ],
      "properties": {
        "requestingOrganisationIdentifierType": {
          "type": "string",
          "description": "Identifies the identifier type of the requesting organisation.",
          "enum": [
            "lei",
            "swiftbic",
            "organisationid"
          ]
        },
        "requestingOrganisationIdentifier": {
          "type": "string",
          "description": "Contains the requesting organisation identifier.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "scheduledStartDate": {
      "type": "string",
      "format": "date-time",
      "description": "If the batch has been scheduled, the expected start time is provided here."
    }
  }
}