{
  "openapi": "3.0.0",
  "info": {
    "title": "D1 Inbound Consumer API",
    "version": "2.0",
    "description": "API set dedicated to end user (consumer) management.<br> The bank backend can register, update or delete an end user.\n"
  },
  "servers": [
    {
      "url": "https://api.d1.thalescloud.io/banking/v2",
      "description": "Production server"
    },
    {
      "url": "https://api.d1-stg.thalescloud.io/banking/v2",
      "description": "Staging server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Consumer",
      "description": "Different operations for end user (consumer) management."
    },
    {
      "name": "Consumer Operations",
      "description": "Different operations that can be done on a end user."
    }
  ],
  "paths": {
    "/issuers/{issuerId}/consumers/{consumerId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        },
        {
          "$ref": "#/components/parameters/x-user-id"
        }
      ],
      "put": {
        "description": "This request is used by the bank backend to request the registration of the end user with personal information.\n> #### Note\n> It is strongly recommended to provide the end user personal information such as first and last name, email, phone number, postal address.\n>Personal information is used in `D1 Tokenization` by the Decision Engine or in `D1 Push` when building the card information to push to OEM Wallet. \n\n> #### Note\n> Some end user personal information are mandatory for issuers using `D1 Click to Pay` service. These mandatory personal information\n> such as mobilePhoneNumber or language are tagged bellow with *\"This field is mandatory for Click to Pay\"*. \n",
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "The following object represent the end user (consumer).",
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "personalInformation": {
                    "$ref": "#/components/schemas/consumerInfo"
                  },
                  "preferences": {
                    "$ref": "#/components/schemas/preferences"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful consumer registration."
          },
          "400": {
            "description": "Bad Request, Invalid request URI, header, paramters. The below table defines the possible 'Bad request' error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| FIELD_INVALID_FORMAT |  Contains the field in error (first found) | no | JSON not well formatted or<br>One field is not expected format as defined in this documentation |\n| FIELD_INVALID_VALUE  | - | no | One field value is not allowed for the given field |        \n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized request, the provided Authorization header is missing or invalid. In the table below only the field \"error\" is provided.\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| AUTHORIZER_UNAUTHORIZED  | Unauthorized message | no | Access token not valid       |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden action, check the state of the linked consumer or card. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| AUTHORIZER_FORBIDDEN  | not\\_authorized error message | no | User\\_is\\_not\\_authorized\\_to\\_access\\_this\\_resource |\n| CONSUMER_INVALID_STATE  | contains the state of the resource  | no | Consumer already exists and is deleted |\n| MISSING_C2P_MANDATORY_INFORMATION  | contains the missing field  | no | All required fields for Click to Pay are not present (firstName, lastName, language, mobilePhoneNumber, countryCode, email) or residencyAddress.state length > 3 |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "404": {
            "description": "Ressource not found, Unknown issuerId or consumerId or card id'. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | yes | No error details available         |\n| INTERNAL_ERROR | Error details if any | no | The server has encountered an error when executing the request. |\n"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        },
        "summary": "Register consumer",
        "operationId": "registerConsumer"
      },
      "get": {
        "description": "This request is used to request consumer information.",
        "tags": [
          "Consumer"
        ],
        "responses": {
          "200": {
            "description": "Successful get consumer information",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "state": {
                      "$ref": "#/components/schemas/consumerState"
                    },
                    "preferences": {
                      "$ref": "#/components/schemas/preferences"
                    },
                    "creationTime": {
                      "$ref": "#/components/schemas/creationDate"
                    },
                    "lastUpdateTime": {
                      "$ref": "#/components/schemas/lastUpdate"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Invalid request URI, header, paramters. The below table defines the possible 'Bad request' error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| FIELD_INVALID_FORMAT |  Contains the field in error (first found) | no | JSON not well formatted or<br>One field is not expected format as defined in this documentation |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized request, the provided Authorization header is missing or invalid. In the table below only the field \"error\" is provided.\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| AUTHORIZER_UNAUTHORIZED  | Unauthorized message | no | Access token not valid       |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden action detected by WAF or the application.<br>\nThe below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| AUTHORIZER_FORBIDDEN  | not authorized error message | no | User is not authorized to access this resource |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "404": {
            "description": "Ressource not found, Unknown issuerId or consumerId or card id'. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| UNKNOWN_CONSUMER  | -        | no | Consumer does not exist |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. The below table defines the possible error:\n|errorCode       | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| INTERNAL_ERROR | error details if any | no | The server has encountered an error when executing the request.  |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        },
        "summary": "Get Consumer Information",
        "operationId": "getConsumerInformation"
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/cards": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        },
        {
          "$ref": "#/components/parameters/x-user-id"
        }
      ],
      "get": {
        "description": "This request is used to request the end user card list.\nIt will return the cards & digital cards and associated accounts.",
        "tags": [
          "Consumer"
        ],
        "responses": {
          "200": {
            "description": "Successful get end user card list",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "cards": {
                      "type": "array",
                      "description": "list of cards that are associated to the end user",
                      "items": {
                        "additionalProperties": false,
                        "type": "object",
                        "required": [
                          "cardId",
                          "cardProductId",
                          "scheme",
                          "panSuffix",
                          "exp",
                          "state",
                          "ongoingOperation",
                          "creationTime"
                        ],
                        "properties": {
                          "cardId": {
                            "$ref": "#/components/schemas/cardId"
                          },
                          "newCardId": {
                            "$ref": "#/components/schemas/newCardId"
                          },
                          "cardProductId": {
                            "$ref": "#/components/schemas/cardProductId"
                          },
                          "threeDSsupport": {
                            "$ref": "#/components/schemas/threeDSsupport"
                          },
                          "scheme": {
                            "$ref": "#/components/schemas/scheme"
                          },
                          "auxiliaryScheme": {
                            "$ref": "#/components/schemas/auxiliaryScheme"
                          },
                          "panSuffix": {
                            "$ref": "#/components/schemas/cardLast4"
                          },
                          "exp": {
                            "$ref": "#/components/schemas/cardExpiryDate"
                          },
                          "newExp": {
                            "$ref": "#/components/schemas/newCardExpiryDate"
                          },
                          "state": {
                            "$ref": "#/components/schemas/cardState"
                          },
                          "stateReason": {
                            "description": "reason associated to the state",
                            "type": "string",
                            "enum": [
                              "CLOSED_ACCOUNT",
                              "CLOSED_CARD",
                              "CARD_LOST",
                              "CARD_FOUND",
                              "CARD_STOLEN",
                              "CARD_BROKEN",
                              "CARD_NOT_RECEIVED",
                              "FRAUD",
                              "USER_DECISION",
                              "ISSUER_DECISION",
                              "CVV2_LOCKED",
                              "EXPIRY_DATE_LOCKED",
                              "PIN_LOCKED"
                            ]
                          },
                          "ongoingOperation": {
                            "type": "string",
                            "enum": [
                              "NONE",
                              "RENEWAL"
                            ]
                          },
                          "creationTime": {
                            "$ref": "#/components/schemas/creationDate"
                          },
                          "lastUpdateTime": {
                            "$ref": "#/components/schemas/lastUpdate"
                          },
                          "accountList": {
                            "type": "array",
                            "description": "This represent the list of account the card will be attached to.<br/>This list is used for the posting",
                            "items": {
                              "$ref": "#/components/schemas/AccountInformation"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {}
              }
            }
          },
          "400": {
            "description": "Bad Request, Invalid request URI, header, paramters. The below table defines the possible 'Bad request' error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| FIELD_INVALID_FORMAT |  Contains the field in error (first found) | no | JSON not well formatted or<br>One field is not expected format as defined in this documentation |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized request, the provided Authorization header is missing or invalid. In the table below only the field \"error\" is provided.\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| AUTHORIZER_UNAUTHORIZED  | Unauthorized message | no | Access token not valid       |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden action detected by WAF or the application.<br>\nThe below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| AUTHORIZER_FORBIDDEN  | not authorized error message | no | User is not authorized to access this resource |\n| CONSUMER_INVALID_STATE | Deleted consumer message | no | Consumer is in DELETED state |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "404": {
            "description": "Ressource not found, Unknown issuerId or consumerId or card id'. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| UNKNOWN_CONSUMER  | -        | no | Consumer does not exist |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. The below table defines the possible error:\n|errorCode       | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| INTERNAL_ERROR | error details if any | no | The server has encountered an error when executing the request.  |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        },
        "summary": "Get Card List",
        "operationId": "getConsumer"
      }
    },
    "/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"
        },
        {
          "$ref": "#/components/parameters/x-user-id"
        }
      ],
      "post": {
        "description": "This request is used by the bank backend to request the deletion of an end user.<br/>It will also in cascade delete all the accounts, cards and digital cards owned by the end user.<br/><b>Note:</b> The deletion of the end user cannot be reverted. 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": {
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "reason": {
                    "$ref": "#/components/schemas/reason"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "End user was deleted Successfully",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "operationId": {
                      "$ref": "#/components/schemas/operationId"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Invalid request URI, header, paramters. The below table defines the possible 'Bad request' error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| FIELD_INVALID_FORMAT |  Contains the field in error (first found) | no | JSON not well formatted or<br>One field is not expected format as defined in this documentation |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized request, the provided Authorization header is missing or invalid. In the table below only the field \"error\" is provided.\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| AUTHORIZER_UNAUTHORIZED  | Unauthorized message | no | Access token not valid       |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden action detected by WAF or the application.<br>\nThe below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| AUTHORIZER_FORBIDDEN  | not authorized error message | no | User is not authorized to access this resource |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "404": {
            "description": "Ressource not found, Unknown issuerId or consumerId or card id'. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| UNKNOWN_CONSUMER  | -        | no | Consumer does not exist |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. The below table defines the possible error:\n|errorCode       | error       | Retryable | Comments                           |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| INTERNAL_ERROR | error details if any | no | The server has encountered an error when executing the request.  |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        },
        "summary": "Delete",
        "tags": [
          "Consumer Operations"
        ],
        "operationId": "deleteConsumer-v2"
      }
    },
    "/issuers/{issuerId}/consumers/{consumerId}/operations:update": {
      "parameters": [
        {
          "$ref": "#/components/parameters/issuer-id-path"
        },
        {
          "$ref": "#/components/parameters/consumer-id-path"
        },
        {
          "$ref": "#/components/parameters/x-correlation-id"
        },
        {
          "$ref": "#/components/parameters/x-user-id"
        }
      ],
      "post": {
        "description": "This request is used by the bank backend to request the update of the consumer information.\n> #### Note\n> Some end user personal information are mandatory for issuers using `D1 Click to Pay` service. These mandatory personal information\n> such as mobilePhoneNumber or language are tagged bellow with *\"This field is mandatory for Click to Pay\"*. \n",
        "tags": [
          "Consumer Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "The following object represent the information of the consumer or cardholder.",
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "personalInformation": {
                    "$ref": "#/components/schemas/consumerInfoForUpdate"
                  },
                  "preferences": {
                    "$ref": "#/components/schemas/preferences"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Consumer successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "operationId": {
                      "$ref": "#/components/schemas/operationId"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, Invalid request URI, header, paramters. The below table defines the possible 'Bad request' error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no        | No error details available         |\n| FIELD_INVALID_FORMAT |  Contains the field in error (first found) | no | JSON not well formatted or<br>One field is not expected format as defined in this documentation |   \n| FIELD_INVALID_VALUE   | - | no | One field value is not allowed for the given field |     \n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized request, the provided Authorization header is missing or invalid. In the table below only the field \"error\" is provided.\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| AUTHORIZER_UNAUTHORIZED  | Unauthorized message | no | Access token not valid       |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden action, check the state of the linked consumer or card. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| AUTHORIZER_FORBIDDEN  | not\\_authorized error message | no | User\\_is\\_not\\_authorized\\_to\\_access\\_this\\_resource |\n| CONSUMER_INVALID_STATE  | contains the state of the resource  | no | Consumer already exists and is deleted |\n| MISSING_C2P_MANDATORY_INFORMATION  | contains the missing field  | no | All required fields for Click to Pay are not present (firstName, lastName, language, mobilePhoneNumber, countryCode, email) or residencyAddress.state length > 3 |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "404": {
            "description": "Ressource not found, Unknown issuerId or consumerId or card id'. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| UNKNOWN_CONSUMER  | -        | no | Consumer does not exist |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorGeneric"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. The below table defines the possible error:\n| errorCode      | error       | Retryable | Comments                             |\n| -------------- | ------------| ----------| -----------------------------------|\n| -              | -           | no | No error details available         |\n| INTERNAL_ERROR | Error details if any | no | The server has encountered an error when executing the request. |\n"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailableError"
          }
        },
        "summary": "Update consumer information",
        "operationId": "editConsumer"
      }
    },
    "/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": "List of operations associated to the consumerId.",
            "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": [
          "Consumer 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",
        "description": "This request is used by the issuer backend  to retrieve the information related to an operation on the given end user (consumer).\n",
        "responses": {
          "200": {
            "description": "The consumer operation.",
            "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": [
          "Consumer Operations"
        ],
        "operationId": "get-consumer-operation-operationId"
      }
    }
  },
  "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": {
      "preferences": {
        "additionalProperties": false,
        "type": "object",
        "title": "Preferences",
        "description": "the following object represents the preferences of the end user",
        "properties": {
          "notificationChannel": {
            "type": "array",
            "description": "list by order of preference the communication channel D1 must use to send notification to user<br/>This do no superseded the restricted list of channel defined at message configuration level</br>if not provided, D1 manage to send the message with the following preference order:<br/>- IN_APP_NOTIFICATION<br/>- SMS<br/>- EMAIL",
            "maxItems": 3,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "SMS",
                "EMAIL",
                "IN_APP_NOTIFICATION"
              ]
            }
          }
        }
      },
      "consumerInfo": {
        "additionalProperties": false,
        "type": "object",
        "title": "ConsumerInfo",
        "description": "the following object represents the personal information of the end user.",
        "properties": {
          "gender": {
            "type": "string",
            "enum": [
              "MALE",
              "FEMALE",
              "OTHER"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language as defined by ISO 639-2 standard.\n<br/>**Note**: This field is mandatory for Click to Pay.\n<br/>List of languages accepted : abk, aar, afr, alb, amh, ara, arm, aze, bel, ben, bis, bos, bul, bur, cat, nya, chi, hrv, cze, dan, div, dut, dzo, eng, est, fij, fin, fre, geo, ger, gre, grn, hat, hau, heb, hin, hun, ice, ind, gle, ita, jpn, kaz, khm, kin, kor, kur, kir, lao, lat, lav, lit, ltz, mac, mlg, may, mlt, mao, mah, mon, nau, nep, nor, orm, oss, pus, per, pol, por, rum, roh, rus, smo, sag, srp, sin, slo, slv, som, spa, swa, swe, tgk, tam, tha, ton, tur, tuk, ukr, urd, uzb, vie,\n",
            "minLength": 3,
            "maxLength": 3,
            "pattern": "^[a-z]{3}$",
            "example": "eng"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the end user (Unicode characters allowed).<br/>**Note**: This field is mandatory for Click to Pay.",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "John"
          },
          "middleName": {
            "type": "string",
            "description": "Middle name of the end user (Unicode characters allowed).",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the end user (Unicode characters allowed).<br/>**Note**: This field is mandatory for Click to Pay.",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Doe"
          },
          "secondLastName": {
            "type": "string",
            "description": "Second Last name of the end user (Unicode characters allowed).",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Doe"
          },
          "dateOfBirth": {
            "type": "string",
            "description": "Date of Birth.",
            "pattern": "^\\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[0-1])$",
            "example": "1990-01-01"
          },
          "title": {
            "type": "string",
            "description": "Title of the end user.<br/>By default D1 support the following title value<br/>- Mr.<br/>- Mrs.<br/>- Miss<br/>Please contact Thales integration team for the support of other value<br/>To not fill in if not applicable.",
            "minLength": 2,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Mr."
          },
          "nationality": {
            "type": "string",
            "description": "Main nationality of the end user in ISO 3166-1 Alpha-2 Code",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Z]{2}$",
            "example": "FR"
          },
          "email": {
            "type": "string",
            "description": "Email of the end user.<br/>**Note**: This field is mandatory for Click to Pay with Mastercard.",
            "minLength": 5,
            "maxLength": 256,
            "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,15}$",
            "example": "john.doe@dummymail.com"
          },
          "mobilePhoneNumber": {
            "additionalProperties": false,
            "description": "Phonenumber of the end user (consumer).  Shall respect the E-164 format.<br/>**Note**: This field is mandatory for Click to Pay.",
            "type": "object",
            "required": [
              "countryCode",
              "phoneNumber"
            ],
            "properties": {
              "countryCode": {
                "type": "string",
                "description": "Internantional country code of the end user's phonenumber. Shall start with the '+' sign.",
                "minLength": 1,
                "maxLength": 10,
                "pattern": "^\\+[0-9]{1,10}$",
                "example": "+420"
              },
              "phoneNumber": {
                "type": "string",
                "description": "National phonenumber of the end user. Shall not contain the first '0' of the national phonenumber. If present as input parameter, D1 will ignore it.",
                "minLength": 1,
                "maxLength": 14,
                "pattern": "^[0-9]{1,14}$",
                "example": "777222333"
              }
            }
          },
          "residencyAddress": {
            "additionalProperties": false,
            "type": "object",
            "description": "Residency address of the end user (consumer).<br/>In the context of Click to Pay it will be used as \"billing address\" associated to each cards.<br/>**Note**: This field is mandatory for Click to Pay with Visa. When set for Click to Pay Mastercard, all fields inside the residencyAddress must be provided, in accordance with Mastercard specification.",
            "required": [
              "line1",
              "city",
              "state",
              "zipCode",
              "countryCode"
            ],
            "properties": {
              "recipientName": {
                "type": "string",
                "description": "Free text field containing the name of the recipient of post mail in case the name is different from first/last name (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Mr The Concierge"
              },
              "line1": {
                "type": "string",
                "description": "First line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line2": {
                "type": "string",
                "description": "Second line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line3": {
                "type": "string",
                "description": "First line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line4": {
                "type": "string",
                "description": "Fourth line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "city": {
                "type": "string",
                "description": "City.",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,32}$",
                "example": "Prague"
              },
              "state": {
                "type": "string",
                "description": "State.<br/><b>Note</b>: For Click to Pay, this field shall be the second part of ISO_3166-2 format in upper case, representing the state (country subdivision) based on the country.",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
                "example": "21"
              },
              "zipCode": {
                "type": "string",
                "description": "Zip Code.",
                "minLength": 1,
                "maxLength": 10,
                "pattern": "^[0-9a-zA-Z -]{1,10}$",
                "example": "140 00"
              },
              "countryCode": {
                "type": "string",
                "description": "Country code in ISO 3166-1 alpha-2.<br/>**Note**: This field is mandatory for Click to Pay.",
                "minLength": 2,
                "maxLength": 2,
                "pattern": "^[A-Z]{2}$",
                "example": "CZ"
              }
            }
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "consumerInfoForUpdate": {
        "additionalProperties": false,
        "type": "object",
        "title": "ConsumerInfo",
        "description": "the following object represents the personal information of the end user.",
        "properties": {
          "gender": {
            "type": "string",
            "enum": [
              "MALE",
              "FEMALE",
              "OTHER"
            ]
          },
          "language": {
            "type": "string",
            "description": "Language as defined by ISO 639-2 standard.\n<br/>**Note**: This field is mandatory for Click to Pay.\n<br/>List of languages accepted : abk, aar, afr, alb, amh, ara, arm, aze, bel, ben, bis, bos, bul, bur, cat, nya, chi, hrv, cze, dan, div, dut, dzo, eng, est, fij, fin, fre, geo, ger, gre, grn, hat, hau, heb, hin, hun, ice, ind, gle, ita, jpn, kaz, khm, kin, kor, kur, kir, lao, lat, lav, lit, ltz, mac, mlg, may, mlt, mao, mah, mon, nau, nep, nor, orm, oss, pus, per, pol, por, rum, roh, rus, smo, sag, srp, sin, slo, slv, som, spa, swa, swe, tgk, tam, tha, ton, tur, tuk, ukr, urd, uzb, vie,\n",
            "minLength": 3,
            "maxLength": 3,
            "pattern": "^[a-z]{3}$",
            "example": "eng"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the end user (Unicode characters allowed).<br/>**Note**: This field is mandatory for Click to Pay.",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "John"
          },
          "middleName": {
            "type": "string",
            "description": "Middle name of the end user (Unicode characters allowed).",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the end user (Unicode characters allowed).<br/>**Note**: This field is mandatory for Click to Pay.",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Doe"
          },
          "secondLastName": {
            "type": "string",
            "description": "Second Last name of the end user (Unicode characters allowed).",
            "minLength": 1,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Doe"
          },
          "dateOfBirth": {
            "type": "string",
            "description": "Date of Birth.",
            "pattern": "^\\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[0-1])$",
            "example": "1990-01-01"
          },
          "title": {
            "type": "string",
            "description": "Title of the end user.<br/>By default D1 support the following title value<br/>- Mr.<br/>- Mrs.<br/>- Miss<br/>Please contact Thales integration team for the support of other value<br/>To not fill in if not applicable.",
            "minLength": 2,
            "maxLength": 40,
            "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
            "example": "Mr."
          },
          "nationality": {
            "type": "string",
            "description": "Main nationality of the end user in ISO 3166-1 Alpha-2 Code",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Z]{2}$",
            "example": "FR"
          },
          "email": {
            "type": "string",
            "description": "Email of the end user.<br/>**Note**: This field is mandatory for Click to Pay with Mastercard.",
            "minLength": 5,
            "maxLength": 256,
            "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,15}$",
            "example": "john.doe@dummymail.com"
          },
          "mobilePhoneNumber": {
            "additionalProperties": false,
            "description": "Phonenumber of the end user (consumer). Shall respect the E-164 format.<br/>**Note**: This field is mandatory for Click to Pay.",
            "type": "object",
            "required": [
              "countryCode",
              "phoneNumber"
            ],
            "properties": {
              "countryCode": {
                "type": "string",
                "description": "Internantional country code of the end user's phonenumber. Shall start with the '+' sign.",
                "minLength": 1,
                "maxLength": 10,
                "pattern": "^\\+[0-9]{1,10}$",
                "example": "+420"
              },
              "phoneNumber": {
                "type": "string",
                "description": "National phonenumber of the end user. Shall not contain the first '0' of the national phonenumber. If present as input parameter, D1 will ignore it.",
                "minLength": 1,
                "maxLength": 14,
                "pattern": "^[0-9]{1,14}$",
                "example": "777222333"
              }
            }
          },
          "residencyAddress": {
            "additionalProperties": false,
            "type": "object",
            "description": "Residency address of the end user (consumer).<br/>In the context of Click to Pay it will be used as \"billing address\" associated to each cards.<br/>**Note**: When set for Click to Pay Mastercard, all fields inside the residencyAddress must be provided, in accordance with Mastercard specification.",
            "required": [
              "line1",
              "city",
              "state",
              "zipCode",
              "countryCode"
            ],
            "properties": {
              "recipientName": {
                "type": "string",
                "description": "Free text field containing the name of the recipient of post mail in case the name is different from first/last name (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Mr The Concierge"
              },
              "line1": {
                "type": "string",
                "description": "First line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line2": {
                "type": "string",
                "description": "Second line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line3": {
                "type": "string",
                "description": "First line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "line4": {
                "type": "string",
                "description": "Fourth line of the address (Unicode characters allowed).",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$",
                "example": "Address line"
              },
              "city": {
                "type": "string",
                "description": "City.",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,32}$",
                "example": "Prague"
              },
              "state": {
                "type": "string",
                "description": "State.<br/><b>Note</b>: For Click to Pay, this field shall be the second part of ISO_3166-2 format in upper case, representing the state (country subdivision) based on the country.",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$",
                "example": 21
              },
              "zipCode": {
                "type": "string",
                "description": "Zip Code.",
                "minLength": 1,
                "maxLength": 10,
                "pattern": "^[0-9a-zA-Z -]{1,10}$",
                "example": "140 00"
              },
              "countryCode": {
                "type": "string",
                "description": "Country code in ISO 3166-1 alpha-2.<br/>**Note**: This field is mandatory for Click to Pay.",
                "minLength": 2,
                "maxLength": 2,
                "pattern": "^[A-Z]{2}$",
                "example": "CZ"
              }
            }
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "operationConsumer": {
        "title": "Consumer Operation",
        "type": "object",
        "description": "Operation details related to a specific operationId",
        "properties": {
          "operationId": {
            "$ref": "#/components/schemas/operationId"
          },
          "operation": {
            "type": "string",
            "description": "The operation type.",
            "enum": [
              "CLICK_TO_PAY_OPTOUT",
              "CLICK_TO_PAY_UPDATE",
              "DELETE",
              "DELETE_AUTHN",
              "ENROLL_AUTHN",
              "REGISTER"
            ]
          },
          "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": "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 consumer. ",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[A-Za-z0-9_-]{1,64}$"
      },
      "consumerState": {
        "type": "string",
        "description": "the state of the consumer",
        "enum": [
          "ACTIVE",
          "DELETED"
        ],
        "example": "ACTIVE"
      },
      "creationDate": {
        "type": "string",
        "title": "Creation date",
        "description": "The time the resource has been created.\nFormat ISO 8601 YYYY-MM-DDThh:mm:ssTZD",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|02-(0[1-9]|[12][0-9]))T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]{3}Z|\\.[0-9]{2}([\\+\\-](0[1-9]|1[0-2])):00)$",
        "example": "2022-02-16T06:28:02.492Z"
      },
      "lastUpdate": {
        "type": "string",
        "title": "Last update date",
        "description": "The time the resource has been last updated.\nFormat ISO 8601 YYYY-MM-DDThh:mm:ssTZD",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|02-(0[1-9]|[12][0-9]))T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]{3}Z|\\.[0-9]{2}([\\+\\-](0[1-9]|1[0-2])):00)$",
        "example": "2022-07-16T06:28:02.492Z"
      },
      "errorGeneric": {
        "additionalProperties": false,
        "type": "object",
        "description": "Generic error returned by the APIs.",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The type of the error",
            "example": "FIELD_INVALID_FORMAT"
          },
          "error": {
            "type": "string",
            "description": "Provide more error details if possible.<br/>For example name of the field with invalid format.<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": "consumerId"
          }
        }
      },
      "cardId": {
        "type": "string",
        "description": "Unique identifier of the card.",
        "minLength": 1,
        "maxLength": 48,
        "pattern": "^[A-Za-z0-9_-]{1,48}$"
      },
      "newCardId": {
        "type": "string",
        "description": "Unique identifier of the new card. Provided in case the card is in REPLACED state.",
        "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}$"
      },
      "threeDSsupport": {
        "type": "boolean",
        "description": "Determines if the card supports EMV 3-D Secure (3DS) flows."
      },
      "scheme": {
        "description": "The card scheme",
        "enum": [
          "MASTERCARD",
          "VISA",
          "AMEX"
        ],
        "type": "string"
      },
      "auxiliaryScheme": {
        "description": "The card auxiliary scheme",
        "enum": [
          "DANKORT"
        ]
      },
      "cardLast4": {
        "type": "string",
        "pattern": "^\\d{4}$",
        "description": "Last 4 digits of the PAN",
        "example": "1234"
      },
      "cardExpiryDate": {
        "type": "string",
        "description": "Expiry date of the card in MMYY format",
        "pattern": "^(0[1-9]|1[0-2])\\d{2}$",
        "example": "1024"
      },
      "newCardExpiryDate": {
        "type": "string",
        "description": "New Expiry date of the card in MMYY format. Provided in case of ongoing RENEWAL operation.",
        "pattern": "^(0[1-9]|1[0-2])\\d{2}$",
        "example": "0928"
      },
      "cardState": {
        "type": "string",
        "description": "the state of the card",
        "enum": [
          "INACTIVE",
          "ACTIVE",
          "SUSPENDED",
          "DELETED",
          "REPLACED"
        ],
        "example": "ACTIVE"
      },
      "currencyCode": {
        "type": "string",
        "pattern": "^[A-Z]{3}$",
        "description": "Currency Code in ISO 4217 alpha code format",
        "example": "EUR"
      },
      "AccountInformation": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "default",
          "number",
          "currencyCode"
        ],
        "properties": {
          "default": {
            "type": "boolean",
            "description": "true if the account is the default consumer account"
          },
          "type": {
            "type": "string",
            "description": "Type of the Account. By default if not provided, it is a 'CHECKING' account.",
            "enum": [
              "CHECKING",
              "SAVINGS"
            ],
            "example": "CHECKING"
          },
          "number": {
            "type": "string",
            "minLength": 2,
            "maxLength": 24,
            "pattern": "^[a-zA-Z0-9_]{2,24}$",
            "description": "Account number used for posting to Core Banking System"
          },
          "currencyCode": {
            "$ref": "#/components/schemas/currencyCode"
          }
        }
      },
      "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 bank 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}$"
      },
      "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"
      }
    },
    "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 consumer",
        "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 other purpose than logging and troubleshooting.",
        "in": "header",
        "name": "x-correlation-id",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,64}$"
        }
      },
      "x-user-id": {
        "description": "Identifier of the user that requests the operation on D1 API. This value is provided for information purpose, D1 doesn't do any verification based on this identifier.<br/>D1 manages to propagate the information to a subsequent internal system for tracking purpose.<br/>This identifier is not mandatory.",
        "in": "header",
        "name": "x-user-id",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,15}$"
        }
      },
      "offset-query-no-max": {
        "name": "offset",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "description": "Index from which the query starts returning operations (default value: 0)"
      },
      "limit-query": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "default": 10
        },
        "description": "Upper limit of the query"
      },
      "operation-id-path": {
        "description": "The id of the operation",
        "in": "path",
        "name": "operationId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/operationId"
        }
      }
    },
    "responses": {
      "ServiceUnavailableError": {
        "description": "The service is temporarily unavailable. You may retry your request later."
      },
      "BadRequest": {
        "description": "Malformed request",
        "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"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found, Unknown issuerId or consumerId or accountId or digital card id",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorGeneric"
            }
          }
        }
      }
    }
  }
}