# Profile Registry

This document outlines the endpoints available for managing profile registries within the system. Profile registries store information about users or organisations involved in the domain registration process.

**1. Get Single Profile Registry**

* **GET** `/api/v1/profile_registries/{profile_registry_uuid}`

Fetches a single profile registry by its UUID.

**Example Response:**

```json
{
    "timestamp": "2024-04-08T11:45:13.917384978",
    "data": {
        "uuid": "00023a69-7ac9-475f-bd85-360e9a05e2bc",
        "type": "REGISTRANT",
        "email": "0xd5324113327f083560a1e3f0f0d63dfa7229e674@ens.domains",
        "walletAddress": "0xd5324113327f083560a1e3f0f0d63dfa7229e674"
    }
}
```

**2. Get List of Profile Registries**

* **GET** `/api/v1/profile_registries`

Fetches a list of all profile registries.

**Example Response:**

```json
{
    "timestamp": "2024-04-08T11:48:47.989561444",
    "size": 28274,
    "data": [
        {
            "uuid": "ce8367d6-469e-456a-b936-96f1646b0b2b",
            "type": "REGISTRANT",
            "email": "0xb971823298ab509b93178322c3310902d052937c@ens.domains",
            "walletAddress": "0xb971823298ab509b93178322c3310902d052937c"
        },
        {
            "uuid": "97ed9223-51cc-4b30-9be3-c8f62d980c70",
            "type": "REGISTRANT",
            "email": "0x143e87b164b054e3dca70a06543836f153805e21@ens.domains",
            "walletAddress": "0x143e87b164b054e3dca70a06543836f153805e21"
        },
        {
            "uuid": "81a64953-dd98-423f-85ee-cec7f36f54dd",
            "type": "REGISTRAR",
            "name": "Unstoppable Domains",
            "organization": "Unstoppable Domains Inc.",
            "street": " 8465 W Sahara Ave Ste 111",
            "city": "Las Vegas",
            "postalCode": "NV 89117",
            "country": "United States",
            "phone": "",
            "fax": "",
            "email": "support@unstoppabledomains.com",
            "web": "https://unstoppabledomains.com",
            "walletAddress": "0xDA4f3b40Ad025DF3516C345919cff348F285e507"
        },
        ...
    ]
}
```

**3. Get List of Profile Registries by Type**

* **GET** `/api/v1/profile_registries/?type=owner&type=registrant`

Fetches a list of profile registries filtered by type.

**Example Response:**

```json
{
    "timestamp": "2024-04-08T11:52:48.380725633",
    "size": 28269,
    "data": [
        {
            "uuid": "ce8367d6-469e-456a-b936-96f1646b0b2b",
            "type": "REGISTRANT",
            "email": "0xb971823298ab509b93178322c3310902d052937c@ens.domains",
            "walletAddress": "0xb971823298ab509b93178322c3310902d052937c"
        },
        {
            "uuid": "97ed9223-51cc-4b30-9be3-c8f62d980c70",
            "type": "REGISTRANT",
            "email": "0x143e87b164b054e3dca70a06543836f153805e21@ens.domains",
            "walletAddress": "0x143e87b164b054e3dca70a06543836f153805e21"
        },
        ...
    ]
}
```

**4. Update Profile Registry**

* **PUT** `/api/v1/profile_registries/{profile_registry_uuid}`

Updates an existing profile registry.

**Example Request Body:**

```json
{
  "dnsSec": "YESDNS"
}
```

**Response**:

```json
{
    "timestamp": "2024-04-08T12:11:23.240828955",
    "data": {
        "uuid": "00023a69-7ac9-475f-bd85-360e9a05e2bc",
        "type": "REGISTRANT",
        "email": "0xd5324113327f083560a1e3f0f0d63dfa7229e674@ens.domains",
        "dnsSec": "YESDNS",
        "walletAddress": "0xd5324113327f083560a1e3f0f0d63dfa7229e674"
    }
}
```
