---
title: Retrieve profile type configuration
slug: andrei/retrieve-profile-type-configuration
createdAt: 2026-10-05T10:36:01.732Z
---

{
  "id": "0yWPwyV0250EfViZn44-z",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode}",
    "servers": [
      {
        "url": "https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode}",
        "description": "Production"
      }
    ],
    "name": "Retrieve profile type configuration",
    "description": "<p>Returns the fields that can be provided when creating a profile of the given entity type in the given country, and whether each field is required.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "type",
          "type": "string",
          "description": "<p>Entity type, for example <code>company</code> or <code>sole_trader</code>.</p>",
          "enum": [
            "company",
            "sole_trader",
            "partnership",
            "charity",
            "government_entity",
            "incorporated_syndicate",
            "company_syndicate",
            "syndicate",
            "association",
            "trust",
            "fund",
            "club",
            "individual",
            "joint_individual"
          ]
        },
        {
          "kind": "required",
          "name": "countryCode",
          "type": "string",
          "description": "<p>Two-letter country code in ISO 3166-1 alpha-2 format, for example <code>GB</code>.</p>"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "AccessToken",
          "name": "AccessToken",
          "kind": "optional",
          "type": "http",
          "description": "<p>The API uses OAuth 2.0. Request an access token from <code>POST /oauth/token</code> with the client ID and client secret of your integration client, and your account slug. Send the access token in the <code>Authorization</code> header of every request, in the format <code>Authorization: Bearer &#x3C;access_token></code>. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "X-RateLimit-Limit",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Remaining",
            "description": ""
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ProfilesTypeConfigResponse",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer",
                "description": "ID of the entity type."
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "description": "Entity type."
              },
              {
                "name": "label",
                "kind": "optional",
                "type": "string",
                "description": "Display name of the entity type."
              },
              {
                "name": "fields",
                "kind": "optional",
                "type": "array",
                "description": "Fields that can be provided when creating a profile of this type.",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Code of the field. It is the property name to use in the request."
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "Display name of the field."
                  },
                  {
                    "name": "is_required",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether the field is required."
                  },
                  {
                    "name": "position",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Position of the field in the form."
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ProfilesTypeConfigResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized. The access token is missing, invalid or has expired.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "<p>Not Found. The requested resource does not exist, or is not available to your account.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "429",
        "description": "<p>Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the <code>Retry-After</code> header before trying again.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.detected.app/api/v2/public/profiles/types/{type}/{countryCode}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"id\": 0,\n  \"type\": \"\",\n  \"label\": \"\",\n  \"fields\": [\n    {\n      \"code\": \"\",\n      \"label\": \"\",\n      \"is_required\": false,\n      \"position\": 0\n    }\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized. The access token is missing, invalid or has expired.\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Not Found. The requested resource does not exist, or is not available to your account.\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-3-429",
          "language": "429",
          "code": "// Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the Retry-After header before trying again.\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}