# Get TOEs by their Domain or Hostname source: https://developer.mastercard.com/riskrecon-api/documentation/testing/toe-samples/retrve-toes-dom-smpl/index.md Allows you to retrieve all the TOEs in your portfolio by their domain or hostname. ## Pre-requisites {#pre-requisites} Refer to the [Retrieve TOEs by their Domain or Hostname](https://developer.mastercard.com/riskrecon-api/documentation/use-cases/portfolio-management/portfolio/retrieve-toe-by-domain/index.md) use case. ## Request URL for the Sandbox environment {#request-url-for-the-sandbox-environment} GET https://api.sandbox.riskrecon.com/v1/toes/by_domains?domain= ## Request URL for the Production environment {#request-url-for-the-production-environment} GET https://api.riskrecon.com/v1/toes/by_domains?domain= ## Test Cases {#test-cases} ### Test Case: Success - Retrieve TOEs by their domain or hostname {#test-case-success---retrieve-toes-by-their-domain-or-hostname} **Request** Here is an example of a request made using the `curl` command. ```bash curl -X 'GET' \ 'https://api.sandbox.riskrecon.com/v1/toes/by_domains?domain=riskrecon.com' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ``` **Response** get: ```json [ { "assessment_frequency": null, "duns_numbers": [ "158896060" ], "hq_location": "example street", "seed_hostnames": [ "damore.info" ], "subscribed": false, "subscription_level": null, "toe_id": "8fff85ad-9c05-4148-a81b-4194185badf0", "toe_name": "Riskrecon, Co.", "toe_size": "xl", "toe_type": "parent" } ] ``` ### Test Case: Fail - Non-existent Domain {#test-case-fail---non-existent-domain} **Request** Here is an example of a request made using a `curl` command with a domain name that does not exist. ```bash curl -X 'GET' \ 'https://api.riskrecon.com/v1/toes/by_domains?domain=pp' \ -H 'accept: application/json' \ -H 'Authorization: valid_JWT' ``` **Response** HTTP Error Response 400 ```json { "Errors": { "Error": [ { "Description": "Bad Request", "Details": "Not a valid domain", "ReasonCode": "BAD_REQUEST", "Recoverable": false, "Source": "RISKRECON_API" } ] } } ```