{
  "swagger": "2.0",
  "info": {
    "version": "1.2.0",
    "title": "Consumer Data Right (CDR) Register - Participant Discovery APIs"
  },
  "schemes": [
    "https"
  ],
  "basePath": "/cdr-register/v1",
  "paths": {
    "/{industry}/data-holders/brands": {
      "get": {
        "tags": [
          "DataHolderBrands"
        ],
        "summary": "Get Data Holder Brands from the CDR Register",
        "operationId": "GetDataHolderBrands",
        "x-version": "1",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/Industry"
          },
          {
            "name": "updated-since",
            "in": "query",
            "description": "",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "page",
            "in": "query",
            "description": "",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "page-size",
            "in": "query",
            "description": "",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "$ref": "#/parameters/Authorization"
          },
          {
            "$ref": "#/parameters/XV"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "x-v": {
                "type": "string",
                "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with."
              }
            },
            "schema": {
              "$ref": "#/definitions/ResponseRegisterDataHolderBrandList"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "406": {
            "description": "Not Acceptable"
          }
        },
        "x-scopes": [
          "cdr-register:bank:read"
        ]
      }
    },
    "/{industry}/data-recipients/brands/{dataRecipientBrandId}/software-products/{softwareProductId}/ssa": {
      "get": {
        "tags": [
          "SoftwareStatementAssertion"
        ],
        "summary": "Get a Software Statement Assertion (SSA) for a software product on the CDR Register to be used for Dynamic Client Registration with a Data Holder",
        "operationId": "GetSoftwareStatementAssertion",
        "x-version": "2",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/Industry"
          },
          {
            "name": "dataRecipientBrandId",
            "in": "path",
            "description": "Unique id for the Accredited Data Recipient Brand that the Software Product is associated with in the CDR Register. Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
            "required": true,
            "type": "string"
          },
          {
            "name": "softwareProductId",
            "in": "path",
            "description": "Unique id for the Accredited Data Recipient Software Product in the CDR Register. Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/Authorization"
          },
          {
            "$ref": "#/parameters/XV"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "x-v": {
                "type": "string",
                "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with."
              }
            },
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "406": {
            "description": "Not Acceptable"
          }
        },
        "x-scopes": [
          "cdr-register:bank:read"
        ]
      }
    },
    "/{industry}/data-recipients/brands/software-products/status": {
      "get": {
        "tags": [
          "Software Products Status"
        ],
        "summary": "Get the statuses for software products from the CDR Register",
        "operationId": "GetSoftwareProductsStatus",
        "x-version": "1",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/Industry"
          },
          {
            "$ref": "#/parameters/XV"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "x-v": {
                "type": "string",
                "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with."
              }
            },
            "schema": {
              "$ref": "#/definitions/SoftwareProductsStatusList"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "406": {
            "description": "Not Acceptable"
          }
        }
      }
    },
    "/{industry}/data-recipients/status": {
      "get": {
        "tags": [
          "Data Recipients Status"
        ],
        "summary": "Get the statuses for Data Recipients from the CDR Register",
        "operationId": "GetDataRecipientStatus",
        "x-version": "1",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/Industry"
          },
          {
            "$ref": "#/parameters/XV"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "x-v": {
                "type": "string",
                "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with."
              }
            },
            "schema": {
              "$ref": "#/definitions/DataRecipientsStatusList"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "406": {
            "description": "Not Acceptable"
          }
        }
      }
    },
    "/{industry}/data-recipients": {
      "get": {
        "tags": [
          "Data Recipients"
        ],
        "summary": "Get Data Recipients from the CDR Register",
        "operationId": "GetDataRecipients",
        "x-version": "2",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/Industry"
          },
          {
            "$ref": "#/parameters/XV"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "x-v": {
                "type": "string",
                "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with."
              }
            },
            "schema": {
              "$ref": "#/definitions/ResponseRegisterDataRecipientList"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/ResponseErrorList"
            }
          },
          "406": {
            "description": "Not Acceptable"
          }
        }
      }
    }
  },
  "parameters": {
    "Authorization": {
      "name": "Authorization",
      "in": "header",
      "required": true,
      "description": "An Authorisation Token as per [RFC6750](https://tools.ietf.org/html/rfc6750)",
      "type": "string"
    },
    "XV": {
      "name": "x-v",
      "in": "header",
      "required": false,
      "description": "The [version](https://consumerdatastandardsaustralia.github.io/standards/#response-headers) of the API end point that the CDR Register has responded with",
      "type": "string"
    },
    "Industry": {
      "name": "industry",
      "in": "path",
      "description": "The industry the participant is retrieving data for (Banking, etc)",
      "required": true,
      "enum": [
        "banking"
      ],
      "type": "string"
    }
  },
  "definitions": {
    "ResponseRegisterDataHolderBrandList": {
      "description": "Response containing a list of CDR Register Data Holder Brand objects",
      "required": [
        "data",
        "links",
        "meta"
      ],
      "type": "object",
      "properties": {
        "data": {
          "description": "Response data for the query",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/RegisterDataHolderBrand"
          }
        },
        "links": {
          "$ref": "#/definitions/LinksPaginated"
        },
        "meta": {
          "$ref": "#/definitions/MetaPaginated"
        }
      }
    },
    "RegisterDataHolderBrand": {
      "required": [
        "dataHolderBrandId",
        "brandName",
        "industry",
        "logoUri",
        "legalEntity",
        "status",
        "endpointDetail",
        "authDetails",
        "lastUpdated"
      ],
      "type": "object",
      "properties": {
        "dataHolderBrandId": {
          "description": "Unique id of the Data Holder Brand issued by the CDR Register. Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "brandName": {
          "description": "The name of Data Holder Brand",
          "type": "string"
        },
        "industry": {
          "description": "The industry the Data Holder brand belongs to (Banking, etc)",
          "enum": [
            "banking"
          ],
          "type": "string"
        },
        "logoUri": {
          "description": "Brand logo URI",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "legalEntity": {
          "$ref": "#/definitions/LegalEntityDetail"
        },
        "status": {
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "REMOVED"
          ],
          "type": "string"
        },
        "endpointDetail": {
          "$ref": "#/definitions/RegisterDataHolderBrandServiceEndpoint"
        },
        "authDetails": {
          "type": "array",
          "uniqueItems": false,
          "items": {
            "$ref": "#/definitions/RegisterDataHolderAuth"
          }
        },
        "lastUpdated": {
          "description": "The date/time that the Data Holder Brand data was last updated in the Register ",
          "type": "string",
          "format": "date-time",
          "x-cds-type": "DateTimeString"
        }
      }
    },
    "SoftwareProductsStatusList": {
      "required": [
        "softwareProducts"
      ],
      "type": "object",
      "properties": {
        "softwareProducts": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/definitions/SoftwareProductStatus"
          }
        }
      }
    },
    "SoftwareProductStatus": {
      "required": [
        "softwareProductId",
        "softwareProductStatus"
      ],
      "type": "object",
      "properties": {
        "softwareProductId": {
          "description": "Unique id of the software product issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "softwareProductStatus": {
          "description": "Software product status in the CDR Register",
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "REMOVED"
          ],
          "type": "string"
        }
      }
    },
    "DataRecipientsStatusList": {
      "required": [
        "dataRecipients"
      ],
      "type": "object",
      "properties": {
        "dataRecipients": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataRecipientStatus"
          }
        }
      }
    },
    "DataRecipientStatus": {
      "required": [
        "dataRecipientId",
        "dataRecipientStatus"
      ],
      "type": "object",
      "properties": {
        "dataRecipientId": {
          "description": "Unique id of the Data Recipient issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "dataRecipientStatus": {
          "description": "Data Recipient status in the CDR Register",
          "enum": [
            "ACTIVE",
            "SUSPENDED",
            "REVOKED",
            "SURRENDERED"
          ],
          "type": "string"
        }
      }
    },
    "ResponseRegisterDataRecipientList": {
      "description": "Response containing a list of Data Recipients in the CDR Register",
      "required": [
        "data",
        "links",
        "meta"
      ],
      "type": "object",
      "properties": {
        "data": {
          "description": "Response data for the query",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/RegisterDataRecipient"
          }
        }
      }
    },
    "RegisterDataRecipient": {
      "required": [
        "legalEntityId",
        "legalEntityName",
        "accreditationNumber",
        "industry",
        "logoUri",
        "status",
        "lastUpdated"
      ],
      "type": "object",
      "properties": {
        "legalEntityId": {
          "description": "Unique id of the Data Recipient Legal Entity issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "legalEntityName": {
          "description": "Legal name of the Data Recipient",
          "type": "string"
        },
        "accreditationNumber": {
          "description": "CDR Register issued human readable unique number given to Data Recipients upon accreditation",
          "type": "string"
        },
        "industry": {
          "enum": [
            "banking"
          ],
          "type": "string"
        },
        "logoUri": {
          "description": "Legal Entity logo URI",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "dataRecipientBrands": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataRecipientBrandMetaData"
          }
        },
        "status": {
          "enum": [
            "ACTIVE",
            "SUSPENDED",
            "REVOKED",
            "SURRENDERED"
          ],
          "type": "string"
        },
        "lastUpdated": {
          "format": "date-time",
          "description": "The date/time that the Legal Entity was last updated in the CDR Register",
          "type": "string",
          "x-cds-type": "DateTimeString"
        }
      }
    },
    "DataRecipientBrandMetaData": {
      "description": "Metadata related to Data Recipient Brand",
      "required": [
        "dataRecipientBrandId",
        "brandName",
        "logoUri",
        "status"
      ],
      "type": "object",
      "properties": {
        "dataRecipientBrandId": {
          "description": "Unique id of the Data Recipient brand issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "brandName": {
          "description": "Data Recipient Brand name",
          "type": "string"
        },
        "logoUri": {
          "description": "Data Recipient Brand logo URI",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "softwareProducts": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/definitions/SoftwareProductMetaData"
          }
        },
        "status": {
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "REMOVED"
          ],
          "type": "string"
        }
      }
    },
    "SoftwareProductMetaData": {
      "description": "Data Recipient Brand Software Products",
      "required": [
        "softwareProductId",
        "softwareProductName",
        "logoUri",
        "status"
      ],
      "type": "object",
      "properties": {
        "softwareProductId": {
          "description": "Unique id of the Data Recipient software product issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "softwareProductName": {
          "description": "Name of the software product",
          "type": "string"
        },
        "softwareProductDescription": {
          "description": "Description of the software product",
          "type": "string"
        },
        "logoUri": {
          "description": "Software product logo URI",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "status": {
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "REMOVED"
          ],
          "type": "string"
        }
      }
    },
    "LegalEntityDetail": {
      "description": "The data that is common to all organisations, regardless of the type (e.g. company, trust, partnership, government)",
      "required": [
        "legalEntityId",
        "legalEntityName",
        "logoUri"
      ],
      "type": "object",
      "properties": {
        "legalEntityId": {
          "description": "Unique id of the organisation issued by the CDR Register.  Refer to [Identifiers](https://cdr-register.github.io/register/#identifiers) for details",
          "type": "string"
        },
        "legalEntityName": {
          "description": "Unique legal name of the organisation",
          "type": "string"
        },
        "logoUri": {
          "description": "Legal Entity logo URI",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "registrationNumber": {
          "description": "Unique registration number (if the company is registered outside Australia)",
          "type": "string"
        },
        "registrationDate": {
          "format": "date",
          "description": "Date of registration (if the company is registered outside Australia)",
          "type": "string",
          "x-cds-type": "DateString"
        },
        "registeredCountry": {
          "description": "Country of registeration (if the company is registered outside Australia)",
          "type": "string"
        },
        "abn": {
          "description": "Australian Business Number for the organisation",
          "type": "string"
        },
        "acn": {
          "description": "Australian Company Number for the organisation",
          "type": "string"
        },
        "arbn": {
          "description": "Australian Registered Body Number.  ARBNs are issued to registrable Australian bodies and foreign companies",
          "type": "string"
        },
        "industryCode": {
          "description": "Industry Code for the organisation. [ANZSIC (2006)](http://www.abs.gov.au/anzsic)",
          "type": "string"
        },
        "organisationType": {
          "description": "Legal organisation type",
          "enum": [
            "SOLE_TRADER",
            "COMPANY",
            "PARTNERSHIP",
            "TRUST",
            "GOVERNMENT_ENTITY",
            "OTHER"
          ],
          "type": "string"
        }
      }
    },
    "RegisterDataHolderBrandServiceEndpoint": {
      "description": "Endpoints related to Data Holder Brand services",
      "required": [
        "version",
        "publicBaseUri",
        "resourceBaseUri",
        "infosecBaseUri",
        "websiteUri"
      ],
      "type": "object",
      "properties": {
        "version": {
          "description": "The major version of the high level standards. This is not the version of the endpoint or the payload being requested but the version of the overall standards being applied. This version number will be \"v\" followed by the major version of the standards as a positive integer (e.g. v1, v12 or v76)",
          "type": "string"
        },
        "publicBaseUri": {
          "description": "Base URI for the Data Holder's Consumer Data Standard public endpoints",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "resourceBaseUri": {
          "description": "Base URI for the Data Holder's Consumer Data Standard resource endpoints",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "infosecBaseUri": {
          "description": "Base URI for the Data Holder's Consumer Data Standard information security endpoints",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "extensionBaseUri": {
          "description": "Base URI for the Data Holder extension endpoints to the Consumer Data Standard (optional)",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "websiteUri": {
          "description": "Publicly available website or web resource URI",
          "type": "string",
          "x-cds-type": "URIString"
        }
      }
    },
    "RegisterDataHolderAuth": {
      "description": "Provides details of authorisation endpoints for Data Holders",
      "type": "object",
      "required": [
        "registerUType",
        "jwksEndpoint"
      ],
      "properties": {
        "registerUType": {
          "type": "string",
          "description": "The type of authentication and authorisation mechanism in use",
          "enum": [
            "SIGNED-JWT"
          ]
        },
        "jwksEndpoint": {
          "description": "JWKS endpoint for private_key_jwt client authentication with Data Recipient",
          "type": "string",
          "x-cds-type": "URIString"
        }
      }
    },
    "LinksPaginated": {
      "required": [
        "self"
      ],
      "type": "object",
      "properties": {
        "first": {
          "description": "URI to the first page of this set. Mandatory if this response is not the first page",
          "type": "string"
        },
        "last": {
          "description": "URI to the last page of this set. Mandatory if this response is not the last page",
          "type": "string"
        },
        "next": {
          "description": "URI to the next page of this set. Mandatory if this response is not the last page",
          "type": "string"
        },
        "prev": {
          "description": "URI to the previous page of this set. Mandatory if this response is not the first page",
          "type": "string"
        },
        "self": {
          "description": "Fully qualified link to this API call",
          "type": "string"
        }
      }
    },
    "MetaPaginated": {
      "required": [
        "totalPages",
        "totalRecords"
      ],
      "type": "object",
      "properties": {
        "totalPages": {
          "format": "int32",
          "description": "The total number of pages in the full set",
          "type": "integer"
        },
        "totalRecords": {
          "format": "int32",
          "description": "The total number of records in the full set",
          "type": "integer"
        }
      }
    },
    "ResponseErrorList": {
      "required": [
        "errors"
      ],
      "type": "object",
      "properties": {
        "errors": {
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/Error"
          }
        }
      }
    },
    "Error": {
      "required": [
        "code",
        "title",
        "detail"
      ],
      "type": "object",
      "properties": {
        "code": {
          "description": "Error code",
          "type": "string"
        },
        "title": {
          "description": "Error title",
          "type": "string"
        },
        "detail": {
          "description": "Error detail",
          "type": "string"
        },
        "meta": {
          "description": "Optional additional data for specific error types",
          "type": "object"
        }
      }
    }
  },
  "tags": []
}