{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/citi/main/json-schema/citi-mandate-response-schema.json",
  "title": "mandate_response",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-emandateservices-api-openapi.yml#/components/schemas/mandate_response",
  "type": "object",
  "required": [
    "mandate_acceptance"
  ],
  "properties": {
    "mandate_acceptance": {
      "type": "array",
      "description": "Indicates whether the mandate request was accepted or rejected or in-progress.<br> Accepted - 'Yes'<br>In-Progress, Rejected - 'No'<br>Possible DDI status for BACS -'Active', 'Cancelled', 'Complete', 'Pending', 'Ready for Export', 'Exported'<br> Possible DDI status for SEPA -'Active', 'Cancelled', 'Complete', 'Pending'<br> Possible Mandate status for HK - 'Processed', 'CB-Rejected', 'Deleted'",
      "items": {
        "$ref": "#/$defs/acceptance_detail"
      }
    }
  },
  "$defs": {
    "acceptance_detail": {
      "type": "object",
      "required": [
        "accepted",
        "mandate_request_identification",
        "reasons",
        "scheme_identification"
      ],
      "properties": {
        "accepted": {
          "type": "string",
          "description": "Indicates whether the mandate request was accepted or rejected.<br><br>Accepted - 'Yes' <br> In-Progress, Rejected - 'No'"
        },
        "mandate_identification": {
          "type": "string",
          "description": "Mandate Id is to retreive the status of mandate."
        },
        "mandate_request_identification": {
          "type": "string",
          "description": "Encoded resource ID from Sentenial, which must be used for Inquiring Mandate."
        },
        "reasons": {
          "type": "array",
          "description": "Reasons to populate when mandate rejected.",
          "items": {
            "$ref": "#/$defs/reason"
          }
        },
        "scheme_identification": {
          "type": "string",
          "description": "Encoded scheme ID from Sentenial, which must be used for Inquiring mandate."
        }
      }
    },
    "reason": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Reason, as published in an external reason code list. <br>ExternalMandateReason1Code<br> Cannot be used at the same time as reason_properitory (below) (schemavalidation)."
        },
        "description": {
          "type": "string",
          "description": "Reason, in a description form. <br> Cannot be used at the same time as reason_code (above) (schema validation)."
        }
      }
    }
  }
}