> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/d1-v1-api/d1-v1-api-references/consumer-operations/operations.md).

# Operations

Different operations that can be done on a consumer.

## Delete

> 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.

```json
{"openapi":"3.0.0","info":{"title":"Inbound Consumer API","version":"1.0"},"tags":[{"name":"Operations","description":"Different operations that can be done on a consumer."}],"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":[]}],"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"]}}},"reason":{"type":"string","title":"reason","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."},"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"]}}},"operationId":{"type":"string","description":"Unique identifier of the operation","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."}}},"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"]}}}},"responses":{"OperationsInternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/operationStatusFailed"},{"$ref":"#/components/schemas/errorGeneric"}]}}}}}},"paths":{"/issuers/{issuerId}/consumers/{consumerId}/operations:delete":{"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"}}}}
```

## Get all operations

> This request is used by the issuer backend to retrieve the operations details of an end user (consumer).\
> \
> If no operations are available for the given consumerId, an empty list is returned.\
> \
> Operations that are older than 3 months will be removed.

```json
{"openapi":"3.0.0","info":{"title":"Inbound Consumer API","version":"1.0"},"tags":[{"name":"Operations","description":"Different operations that can be done on a consumer."}],"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":[]}],"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"}},"parameters":{"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"}},"schemas":{"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_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"]},"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},"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},"reason":{"type":"string","title":"reason","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."},"appInstanceId":{"description":"Unique identifier of the issuer application instance.","type":"string"},"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."}}}},"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"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}}}},"paths":{"/issuers/{issuerId}/consumers/{consumerId}/operations":{"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"]}}}}
```

## Get operation

> This request is used by the issuer backend  to retrieve the information related to an operation on the given end user (consumer).<br>

```json
{"openapi":"3.0.0","info":{"title":"Inbound Consumer API","version":"1.0"},"tags":[{"name":"Operations","description":"Different operations that can be done on a consumer."}],"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":[]}],"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":{"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_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"]},"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},"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},"reason":{"type":"string","title":"reason","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."},"appInstanceId":{"description":"Unique identifier of the issuer application instance.","type":"string"},"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."}}}},"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"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}}}},"paths":{"/issuers/{issuerId}/consumers/{consumerId}/operations/{operationId}":{"get":{"summary":"Get operation","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/operationConsumer"}}}},"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"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/d1-v1-api/d1-v1-api-references/consumer-operations/operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
