{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gsma/json-schema/gsma-response-link-schema.json",
  "title": "responseLink",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gsma-links-api-openapi.yml#/components/schemas/responseLink",
  "type": "object",
  "required": [
    "linkReference",
    "sourceAccountIdentifiers",
    "status",
    "mode"
  ],
  "properties": {
    "linkReference": {
      "$ref": "#/$defs/linkReference"
    },
    "sourceAccountIdentifiers": {
      "$ref": "#/$defs/debitPartyArray"
    },
    "mode": {
      "description": "Indicates the Link mode of operation. This can be set to 'pull' (The link can be used by the client to debit the target account held by the provider), 'push' (The link can be used by the client to credit the target account held by the provider) or 'both'.",
      "allOf": [
        {
          "$ref": "#/$defs/mode"
        }
      ]
    },
    "status": {
      "description": "Indicates the status of the Link.",
      "allOf": [
        {
          "$ref": "#/$defs/status"
        }
      ]
    },
    "requestingOrganisation": {
      "$ref": "#/$defs/requestingOrganisation"
    },
    "creationDate": {
      "$ref": "#/$defs/creationDate"
    },
    "modificationDate": {
      "$ref": "#/$defs/modificationDate"
    },
    "requestDate": {
      "$ref": "#/$defs/requestDate"
    },
    "customData": {
      "$ref": "#/$defs/customDataArray"
    }
  },
  "$defs": {
    "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
    },
    "debitPartyArray": {
      "type": "array",
      "description": "A collection of key/value pairs that enable the party to be identified. Keys include MSISDN and Wallet Identifier.",
      "items": {
        "$ref": "#/$defs/party"
      },
      "maxItems": 10,
      "minItems": 1
    },
    "linkReference": {
      "type": "string",
      "description": "Indicates the Link reference. This enables a linked account to be uniquely identified.",
      "minLength": 1,
      "maxLength": 256
    },
    "mode": {
      "type": "string",
      "enum": [
        "push",
        "pull",
        "both"
      ]
    },
    "modificationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the object was modified by the API Provider."
    },
    "party": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "Provides the account identifier type.",
          "minLength": 1,
          "maxLength": 256
        },
        "value": {
          "type": "string",
          "description": "Provides the account identifier type value.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "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
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    }
  }
}