# Delete a TOE from your Portfolio source: https://developer.mastercard.com/riskrecon-api/documentation/testing/toe-samples/delete-a-toe-smpl/index.md Allows you to delete a TOE from your portfolio using its TOE ID. ## Pre-requisites {#pre-requisites} Refer to the [Delete a TOE from your Portfolio](https://developer.mastercard.com/riskrecon-api/documentation/use-cases/portfolio-management/portfolio/delete-a-toe/index.md) use case. ## Request URL for the Sandbox environment {#request-url-for-the-sandbox-environment} DELETE https://api.sandbox.riskrecon.com/v1/toe/ ## Request URL for the Production environment {#request-url-for-the-production-environment} DELETE https://api.riskrecon.com/v1/toe/ ## Test Cases {#test-cases} ### Test Case: Success - Delete a TOE from your portfolio {#test-case-success---delete-a-toe-from-your-portfolio} **Request** Here is an example of a request made to delete a TOE from your portfolio using a `curl` command. ```bash curl -X 'DELETE' \ 'https://api.sandbox.riskrecon.com/v1/toe/5976423a-ee35-11e3-8569-14109ff1a304' \ -H 'accept: application/json' \ -H 'Authorization: valid_JWT' ``` **Response** delete: HTTP response 200 Ok ### Test Case: Fail - Invalid TOE ID {#test-case-fail---invalid-toe-id} **Request** Here is an example of a request with an incorrect `toe_id` using the `curl` command. ```bash curl -X 'DELETE' \ 'https://api.sandbox.riskrecon.com/v1/toe/5976423a-ee35-11e3-8569-14109ff1a304' \ -H 'accept: application/json' \ -H 'Authorization: invalid_JWT' ``` **Response** HTTP Error response 400 ```json { "Errors": { "Error": [ { "Description": "Resource Not found.", "Details": null, "ReasonCode": "NOT_FOUND", "Recoverable": false, "Source": "RISKRECON_API" } ] } } ``` ### Test Case: Fail - TOE deletion limit exceeded {#test-case-fail---toe-deletion-limit-exceeded} **Request** The user has exceeded the allowed TOE deletion limit within 24 hours. **Response** HTTP Error response 429 ```json { "Errors": { "Error": [ { "Description": "Too many requests sent in a 24 hour period.", "Details": "You've hit the rate limit to remove TOE's from your portfolio. You may only delete up to 10 TOE's per day.", "ReasonCode": "TOO_MANY_REQUESTS", "Recoverable": false, "Source": "RISKRECON_API" } ] } } ``` ### Test Case: Fail - User unauthorized to delete TOEs {#test-case-fail---user-unauthorized-to-delete-toes} **Request** A user who does not have the **AddCompany** scope tries to delete a TOE from the portfolio. **Response** HTTP Error response 401 ```json { "Errors": { "Error": [ { "Description": "Unauthorized request", "Details": "User must have AddCompany scope", "ReasonCode": "UNAUTHORIZED", "Recoverable": false, "Source": "RISKRECON_API" } ] } } ```