{ "openapi" : "3.1.0", "info" : { "title" : "Adyen Data Protection API", "description" : "Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR.\n\nUse our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email).## Authentication\nEach request to the Data Protection API must be signed with an API key. Get your API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example:\n\n```\ncurl\n-H \"Content-Type: application/json\" \\\n-H \"X-API-Key: Your_API_key\" \\\n...\n```\nNote that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).\n\n## Versioning\nData Protection Service API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://ca-test.adyen.com/ca/services/DataProtectionService/v1/requestSubjectErasure\n```", "termsOfService" : "https://www.adyen.com/legal/terms-and-conditions", "contact" : { "name" : "Adyen Developer Experience team", "url" : "https://github.com/Adyen/adyen-openapi" }, "version" : "1", "x-publicVersion" : true }, "servers" : [ { "url" : "https://ca-test.adyen.com/ca/services/DataProtectionService/v1" } ], "tags" : [ { "name" : "General" } ], "paths" : { "/requestSubjectErasure" : { "post" : { "tags" : [ "General" ], "summary" : "Submit a Subject Erasure Request.", "description" : "Sends the PSP reference containing the shopper data that should be deleted.", "operationId" : "post-requestSubjectErasure", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubjectErasureByPspReferenceRequest" } } } }, "responses" : { "200" : { "description" : "OK - the request has succeeded.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SubjectErasureResponse" } } } }, "400" : { "description" : "Bad Request - a problem reading or understanding the request.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ServiceError" } } } }, "401" : { "description" : "Unauthorized - authentication required.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ServiceError" } } } }, "403" : { "description" : "Forbidden - insufficient permissions to process the request.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ServiceError" } } } }, "422" : { "description" : "Unprocessable Entity - a request validation error.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ServiceError" } } } }, "500" : { "description" : "Internal Server Error - the server could not process the request.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ServiceError" } } } } }, "security" : [ { "BasicAuth" : [ ] }, { "ApiKeyAuth" : [ ] } ], "x-sortIndex" : 0, "x-methodName" : "requestSubjectErasure" } } }, "components" : { "schemas" : { "ServiceError" : { "type" : "object", "additionalProperties" : false, "properties" : { "errorCode" : { "type" : "string", "description" : "The error code mapped to the error message." }, "errorType" : { "type" : "string", "description" : "The category of the error." }, "message" : { "type" : "string", "description" : "A short explanation of the issue." }, "pspReference" : { "type" : "string", "description" : "The PSP reference of the payment." }, "status" : { "type" : "integer", "format" : "int32", "description" : "The HTTP response status." } } }, "SubjectErasureByPspReferenceRequest" : { "type" : "object", "additionalProperties" : false, "properties" : { "forceErasure" : { "type" : "boolean", "description" : "Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction." }, "merchantAccount" : { "type" : "string", "description" : "Your merchant account" }, "pspReference" : { "type" : "string", "description" : "The PSP reference of the payment. We will delete all shopper-related data for this payment." } } }, "SubjectErasureResponse" : { "type" : "object", "additionalProperties" : false, "properties" : { "result" : { "type" : "string", "description" : "The result of this operation.", "enum" : [ "ACTIVE_RECURRING_TOKEN_EXISTS", "ALREADY_PROCESSED", "PAYMENT_NOT_FOUND", "SUCCESS" ] } } } }, "examples" : { }, "securitySchemes" : { "ApiKeyAuth" : { "type" : "apiKey", "name" : "X-API-Key", "in" : "header" }, "BasicAuth" : { "type" : "http", "scheme" : "basic" } } } }