{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "name": "stephane.chretien@thalesgroup.com"
    },
    "title": "Inbound Consumer API",
    "version": "1.0",
    "description": "API set dedicated to core banking management.\n\nThis API is used by the issuer to:\n- Register an end user\n- Register an end user with cards\n- Delete an end user\n\nThe APIs use the term \"consumer\" to refer to end user."
  },
  "servers": [
    {
      "url": "https://api.d1.thalescloud.io/banking/v1",
      "description": "Production server"
    },
    {
      "url": "https://api.d1-stg.thalescloud.io/banking/v1",
      "description": "Staging server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Register",
      "description": "Register APIs."
    },
    {
      "name": "Operations",
      "description": "Different operations that can be done on a consumer."
    },
    {
      "name": "Deprecated",
      "description": "Deprecated APIs."
    }
  ],
  "paths": {
    "/issuers/{issuerId}/consumers/{consumerId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        }
      ],
      "put": {
        "description": "This request is used by the issuer backend to request the registration of the end user (consumer).<br/>As an input only the consumerId and the state are needed.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "The following object represent the consumer",
                "type": "object",
                "properties": {
                  "state": {
                    "description": "The state of the end user (consumer)<br/>**Note**: Consumer state is deprecated, Thales will no more check the consumer's state. You can still pass it but it will be ignored.",
                    "deprecated": true,
                    "type": "string",
                    "enum": [
                      "INACTIVE",
                      "ACTIVE"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful end user registration"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Resource not found, Unknown issuerId.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "summary": "Register consumer",
        "operationId": "registerConsumer",
        "tags": [
          "Register"
        ]
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/operations:delete": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        }
      ],
      "post": {
        "description": "This request is used by the issuer backend to delete an end user (consumer).<br/>The action cascades to delete all the accounts, cards and digital cards associated with the end user.<br/><b>Note:</b> The deletion of the end user cannot be reversed. If the same end user is willing to reuse the solution, we will require a new end user registration with a new consumerId.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reasonBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "End user was deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operationStatusSuccessful"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Invalid request URI or header, or unsupported nonstandard parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "The provided Authorization header is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/OperationsInternalServerError"
          }
        },
        "summary": "Delete",
        "tags": [
          "Operations"
        ],
        "operationId": "deleteConsumer-v2"
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/operations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        }
      ],
      "get": {
        "description": "This request is used by the issuer backend to retrieve the operations details of an end user (consumer).\n\nIf no operations are available for the given consumerId, an empty list is returned.\n\nOperations that are older than 3 months will be removed.",
        "summary": "Get all operations",
        "operationId": "getConsumerOperations",
        "parameters": [
          {
            "$ref": "#/components/parameters/offset-query-no-max"
          },
          {
            "$ref": "#/components/parameters/limit-query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "operations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/operationConsumer"
                      }
                    },
                    "remainingOperations": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Operations"
        ]
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/operations/{operationId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/operation-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        }
      ],
      "get": {
        "summary": "Get operation",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operationConsumer"
                },
                "examples": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Operations"
        ],
        "operationId": "get-consumer-operation-operationId",
        "description": "This request is used by the issuer backend  to retrieve the information related to an operation on the given end user (consumer).\n"
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/cards": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        }
      ],
      "put": {
        "description": "This request is used by the issuer backend to register an end user (consumer) with his associated set of cards.<br/>\nThe cards must be already created on the Issuer CMS side. This allows D1 to make this end user (consumer) and his or her cards eligible to other D1 services like tokenisation, secure card display, push porvisioning...<br/>If not provided in this API (in the **encryptedData** parameter), D1 manages to retrieve useful card information from the issuer backend based on the cardId provided by calling **[get card credentials API](https://thales-dis-dbp.stoplight.io/docs/d1-api-public/8518eb9d80bc7-get-card-credentials)**.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cards": {
                    "description": "List of cards that are associated with the end user (consumer).                     \nIf you call the API twice with different card lists, it will complete the existing list with the new cards, \nbut it will not update the card if a card has the same cardId.\nA maximum of 20 cards can be associated with an end user via this API.\nIf the array is empty or missing, only the end user is registered.",
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "object",
                      "properties": {
                        "cardId": {
                          "$ref": "#/components/schemas/cardId"
                        },
                        "accountId": {
                          "description": "Unique identifier of the account. **Note**: This parameter is deprecated. You can still pass it but it will be ignored.",
                          "type": "string",
                          "deprecated": true,
                          "minLength": 1,
                          "maxLength": 24,
                          "pattern": "^[A-Za-z0-9_-]{1,64}$"
                        },
                        "cardProductId": {
                          "$ref": "#/components/schemas/cardProductId"
                        },
                        "state": {
                          "description": "The state of the card. If not present the card will be registered in ACTIVE state.",
                          "type": "string",
                          "enum": [
                            "INACTIVE",
                            "ACTIVE"
                          ]
                        },
                        "encryptedData": {
                          "type": "string",
                          "title": "encryptedData",
                          "maxLength": 8192,
                          "pattern": "^(?:[\\x20-\\x2D\\x2F-\\x7F]*\\.){4}(?:[\\x20-\\x2D\\x2F-\\x7F]*)$",
                          "description": "The encryptedData is the encrypted json (cf http://www.json.org/ ) representation of the Card information.<br/>This is an optional information, if not provided Thales will call **[get card credentials API](https://thales-dis-dbp.stoplight.io/docs/d1-api-public/8518eb9d80bc7-get-card-credentials)** to retreive the data.<br/> This value is encrypted using the JWE encryption (please refer to the **[Encrypt sensitive data](../../../integrate-the-d1-api/encrypt-sensitive-data)** for more details)<br/><br/><b>Content</b><br/><br/>Once deciphered, the plaintext contains a json structure with:\n\t\n|JSON field parameter name|description|MOC|Format|\n|-------|-------|-------|-------|\n|pan|The funding pan value.|M|string - from 10 to 19 digits|\n|exp|The expiry date of the card.|M|string - 4 digits, following the format MMYY|\n|auxiliaryPan|The auxiliary funding pan value. It shall be provided when cobadge is supported and if the card has an auxiliary pan.|C|string - up to 19 digits|\n|auxiliaryExp|The auxiliary expiry date of the card. It shall be provided when cobadge is supported and if the card has an auxiliary pan.|C|string - 4 digits, following the format MMYY|\n|customSuffix|last 4 digits of the display pan which is different than the actual funding pan|O|string - 4 digits|",
                          "example": "encryptedData with card pan and card exp"
                        }
                      },
                      "required": [
                        "cardId",
                        "cardProductId"
                      ]
                    }
                  },
                  "consumerInfo": {
                    "$ref": "#/components/schemas/clickToPayConsumerInfo"
                  }
                }
              }
            }
          },
          "description": ""
        },
        "responses": {
          "204": {
            "description": "Successful end user (consumer) & cards registration"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden action. At least one of the registration could not be done. <li>Check the state of the linked end user (consumer).</li><li>Check that the cardId does not belong to an existing end user (consumer).</li><li>Check that the pair \"PAN and EXP\" was not already registered with another cardId.</li><li>Check that the cardId was not already registered with different data.</li>",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Description of the error.<br/>This field is for troubleshooting purposes only, it can change at any time so MUST NOT be parsed, and is not supposed to be human readable so CANNOT be displayed to end users.",
                      "example": "Bad request"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardId": {
                            "$ref": "#/components/schemas/cardId"
                          },
                          "error": {
                            "type": "string",
                            "description": "Description of the error.<br/>This field is for troubleshooting purposes only, it can change at any time so MUST NOT be parsed, and is not supposed to be human readable so CANNOT be displayed to end users.",
                            "example": "Bad request"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "summary": "Register consumer with cards",
        "operationId": "registerConsumerAndCard",
        "tags": [
          "Register"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "A JWT generated by the [Get Authorization Token API](oauth2-api).<br/>The server checks the validity of the provided token to control access to this protected resource. Please refer to [Get OAuth 2.0 access token](../../../integrate-the-d1-api/get-oauth-2.0-access-token) for more details on the flow and on how to get this JWT.",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "reasonBody": {
        "type": "object",
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/reason"
          },
          "reasonCode": {
            "type": "string",
            "description": "The reason why the action has been performed. If not provided, default reason code is ISSUER_DECISION.",
            "enum": [
              "USER_DECISION",
              "ISSUER_DECISION"
            ]
          }
        }
      },
      "operationConsumer": {
        "title": "Consumer Operation",
        "type": "object",
        "description": "Operation details related to a specific operationId",
        "x-examples": {
          "example-1": {
            "operationId": "string",
            "operation": "CREATE",
            "status": "SUCCESSFUL",
            "startTime": "string",
            "endTime": "string",
            "requestorId": "string",
            "requestorType": "ISSUER",
            "reason": "string",
            "reasonCode": "USER_DECISION",
            "details": {
              "oldState": "string"
            },
            "newState": "string"
          }
        },
        "properties": {
          "operationId": {
            "$ref": "#/components/schemas/operationId"
          },
          "operation": {
            "type": "string",
            "description": "The operation type.",
            "enum": [
              "CLICK_TO_PAY_UPDATE",
              "DELETE",
              "DELETE_AUTHN",
              "ENROLL_AUTHN",
              "REGISTER",
              "RESUME",
              "SUSPEND"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCESSFUL",
              "PENDING",
              "FAILED"
            ],
            "description": "Status of the operation"
          },
          "startTime": {
            "$ref": "#/components/schemas/operationStartTime"
          },
          "endTime": {
            "$ref": "#/components/schemas/operationEndTime"
          },
          "requestorType": {
            "type": "string",
            "enum": [
              "ISSUER",
              "USER",
              "CCI"
            ]
          },
          "requestorId": {
            "type": "string",
            "description": "Identifier of the principal who initiates the operation\n  - consumerId if requestorType is USER\n  - issuerId if requestorType is ISSUER\n  - cci user id if requestorType is CCI"
          },
          "reason": {
            "$ref": "#/components/schemas/reason"
          },
          "reasonCode": {
            "type": "string",
            "enum": [
              "USER_DECISION",
              "ISSUER_DECISION"
            ]
          },
          "details": {
            "type": "object",
            "oneOf": [
              {
                "title": "REGISTER, SUSPEND, RESUME, DELETE operations",
                "properties": {
                  "oldState": {
                    "type": "string",
                    "deprecated": true,
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "description": "Old state of the end user (consumer)<br/>**Note**: Consumer state is deprecated, this optional parameter will soon be removed from the response."
                  },
                  "newState": {
                    "type": "string",
                    "deprecated": true,
                    "enum": [
                      "ACTIVE",
                      "INACTIVE",
                      "DELETED"
                    ],
                    "description": "New state of the end user (consumer)<br/>**Note**: Consumer state is deprecated, this optional parameter will soon be removed from the response."
                  }
                }
              },
              {
                "title": "ENROLL_AUTHN, DELETE_AUTHN operation",
                "properties": {
                  "appInstanceId": {
                    "$ref": "#/components/schemas/appInstanceId"
                  }
                }
              }
            ]
          },
          "errorCode": {
            "type": "string",
            "description": "External error code"
          },
          "error": {
            "type": "string",
            "description": "Human readable string representing the error, only present in case of operation failure",
            "maxLength": 256,
            "pattern": "/^[a-zA-Z0-9_ \\/\\\\\\[\\],.'#;:{}()?!*-]*$/"
          }
        },
        "required": [
          "operationId",
          "operation",
          "status",
          "startTime",
          "requestorId",
          "requestorType"
        ]
      },
      "issuerId": {
        "maxLength": 10,
        "minLength": 10,
        "type": "string"
      },
      "consumerId": {
        "type": "string",
        "description": "Unique identifier of the end user. ",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[A-Za-z0-9_-]{1,64}"
      },
      "errorGeneric": {
        "type": "object",
        "description": "Generic error returned by the APIs.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Description of the error.<br/>This field is for troubleshooting purposes only, it can change at any time so MUST NOT be parsed, and is not supposed to be human readable so CANNOT be displayed to end users.",
            "example": "Card does not exist"
          }
        }
      },
      "reason": {
        "type": "string",
        "title": "reason",
        "example": "customer was contacted on June 28",
        "pattern": "^[a-zA-Z0-9 ]{1,64}$",
        "description": "The reason why the action is performed.\n\nThis a free text field in case the Issuer wants to send details, that will be returned in the operations list."
      },
      "operationId": {
        "type": "string",
        "description": "Unique identifier of the operation",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[A-Za-z0-9_-]{1,64}"
      },
      "operationStatusSuccessful": {
        "title": "operation",
        "type": "object",
        "description": "Operation result information.",
        "properties": {
          "operationId": {
            "$ref": "#/components/schemas/operationId"
          },
          "status": {
            "type": "string",
            "description": "Status of the operation",
            "enum": [
              "SUCCESSFUL"
            ]
          }
        }
      },
      "operationStatusFailed": {
        "title": "operation",
        "type": "object",
        "description": "Operation result information.",
        "properties": {
          "operationId": {
            "$ref": "#/components/schemas/operationId"
          },
          "status": {
            "type": "string",
            "description": "Status of the operation",
            "enum": [
              "FAILED"
            ]
          }
        }
      },
      "operationStartTime": {
        "type": "string",
        "title": "Operation Start Time",
        "description": "The time the request has been processed.\nFormat ISO 8601 YYYY-MM-DDThh:mm:ssTZD",
        "minLength": 1,
        "maxLength": 64,
        "example": "2022-06-16T06:28:02.492Z"
      },
      "operationEndTime": {
        "type": "string",
        "title": "Operation End Time",
        "description": "The time the operation has been completed.\nFormat ISO 8601 YYYY-MM-DDThh:mm:ssTZD\nnote: This is an optional field and might not be returned for synchronous operations.",
        "minLength": 1,
        "maxLength": 64,
        "example": "2022-06-16T06:28:32.492Z"
      },
      "appInstanceId": {
        "description": "Unique identifier of the issuer application instance.",
        "type": "string"
      },
      "cardId": {
        "type": "string",
        "description": "Unique identifier of the card.",
        "minLength": 1,
        "maxLength": 48,
        "pattern": "[A-Za-z0-9_-]{1,48}"
      },
      "cardProductId": {
        "type": "string",
        "description": "Unique identifier of the type of card (defined during the onboarding of D1)",
        "minLength": 1,
        "maxLength": 48,
        "pattern": "[A-Za-z0-9_-]{1,48}"
      },
      "clickToPayConsumerInfo": {
        "title": "Click to Pay ConsumerInfo",
        "type": "object",
        "description": "The consumer details that have to be pushed into the Click to Pay directory.<br/>\nThis optional parameter is only applicable if the issuer wants to use Click to Pay auto-enrolment, and if the card product is elligible to Click to Pay auto-enrolment.",
        "required": [
          "firstName",
          "lastName",
          "language",
          "mobilePhoneNumber"
        ],
        "properties": {
          "firstName": {
            "description": "First name of the end user (consumer).",
            "type": "string",
            "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,35}$",
            "minLength": 1,
            "maxLength": 35,
            "example": "Alexandre"
          },
          "middleName": {
            "description": "Middle name of the end user (consumer). It is applicable only to Visa.",
            "type": "string",
            "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,35}$",
            "minLength": 1,
            "maxLength": 35,
            "example": "Andrew"
          },
          "lastName": {
            "description": "Last name of the end user (consumer).",
            "type": "string",
            "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,35}$",
            "minLength": 1,
            "maxLength": 35,
            "example": "Doe"
          },
          "language": {
            "description": "Language of the end user (consumer). Based on ISO format for language (ISO 639–1) and an alpha-2 country code (ISO 3166–1 alpha-2). The language must be lowercase, and the country must be uppercase ideally. The language and country should be separated using a minus character \"-\"",
            "type": "string",
            "pattern": "^[a-z]{2}-[a-zA-Z]{2}$",
            "minLength": 5,
            "maxLength": 5,
            "example": "en-US"
          },
          "mobilePhoneNumber": {
            "description": "Phonenumber of the end user (consumer). Shall respect the E-164 format.",
            "type": "object",
            "required": [
              "countryCode",
              "phoneNumber"
            ],
            "properties": {
              "countryCode": {
                "description": "Internantional country code of the end user's phonenumber. Shall start with the '+' sign.",
                "type": "string",
                "pattern": "^\\+[0-9]{1,10}$",
                "minLength": 2,
                "maxLength": 10,
                "example": "+33"
              },
              "phoneNumber": {
                "description": "National phonenumber of the end user. Shall not contain the first '0' of the national phonenumber.",
                "type": "string",
                "pattern": "^[0-9]{1,14}$",
                "minLength": 1,
                "maxLength": 14,
                "example": "624302941"
              }
            }
          },
          "email": {
            "description": "Email of the end user (consumer). Mandatory for Mastercard.",
            "type": "string",
            "minLength": 6,
            "maxLength": 255,
            "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,15}$",
            "example": "john.smith@myhostmaill.com"
          },
          "residencyAddress": {
            "description": "Residency address of the end user (consumer). In the context of Click to Pay it will be used as 'billing address' associated to each cards.\n<br/>**Mandatory for Visa**.\n<br/>**Note**: For Mastercard this field is optional, but when set all fields inside must be provided, in accordance with Mastercard specifications. ",
            "type": "object",
            "required": [
              "countryCode"
            ],
            "properties": {
              "line1": {
                "description": "First line of the address.",
                "type": "string",
                "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,64}$",
                "minLength": 1,
                "maxLength": 64,
                "example": "1230 Rue de Rivoli"
              },
              "line2": {
                "description": "Second line of the address.",
                "type": "string",
                "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,64}$",
                "minLength": 1,
                "maxLength": 64
              },
              "line3": {
                "description": "Third line of the address.",
                "type": "string",
                "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,64}$",
                "minLength": 1,
                "maxLength": 64
              },
              "city": {
                "description": "City.",
                "type": "string",
                "pattern": "^[\\p{L}\\p{N}\\u0600-\\u06FF ,.'_#;:\\/-]{1,32}$",
                "minLength": 1,
                "maxLength": 32,
                "example": "Paris"
              },
              "state": {
                "type": "string",
                "pattern": "^[A-Z0-9]{1,3}$",
                "minLength": 1,
                "maxLength": 3,
                "description": "State. Second part of ISO_3166-2 format, representing the state (country subdivision) based on the country.",
                "example": "75"
              },
              "zipCode": {
                "description": "Country zip Code.",
                "type": "string",
                "pattern": "^[0-9a-zA-Z ]{1,10}$",
                "minLength": 1,
                "maxLength": 10,
                "example": "75000"
              },
              "countryCode": {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "minLength": 2,
                "maxLength": 2,
                "example": "FR",
                "description": "Country code. Based on ISO 3166-1 alpha-2 format."
              }
            }
          }
        }
      }
    },
    "parameters": {
      "issuer-id-path": {
        "description": "The id of the issuer",
        "in": "path",
        "name": "issuerId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/issuerId"
        }
      },
      "consumer-id-path": {
        "description": "The id of the end user",
        "in": "path",
        "name": "consumerId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/consumerId"
        }
      },
      "x-correlation-id": {
        "description": "Random identifier which can be used to correlate the different API calls done as part of a single use-case. This identifier will be the one primarily used for troubleshooting.\n\n**Warning:** This identifier should not be derived from sensitive personal data, as its value will be logged in clear.\n\nThere is no strong guarantee of the uniqueness of this identifier, so please refrain from using it for purposes other than logging and troubleshooting.",
        "in": "header",
        "name": "x-correlation-id",
        "schema": {
          "type": "string",
          "minimum": 1,
          "maximum": 64,
          "pattern": "[a-zA-Z0-9_\\-\\. ]{1,64}"
        }
      },
      "offset-query-no-max": {
        "name": "offset",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "description": "Index from which the query starts returning operations – Offset 0 (the default) corresponds to the most recent operation."
      },
      "limit-query": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "default": 10
        },
        "description": "Number of operations to be returned"
      },
      "operation-id-path": {
        "description": "The id of the operation",
        "in": "path",
        "name": "operationId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/operationId"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request, Invalid request URI or header, or unsupported non-standard parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The provided Authorization header is missing or invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      },
      "OperationsInternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/operationStatusFailed"
                },
                {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              ]
            },
            "examples": {}
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      }
    }
  }
}