# Relationships

## Related Persons (PF39)

Returns the name and relationship of people possibly related to this person.

**Section:** `pfPersonalRelationships`

**Required parameter:** `cpf`

{% tabs %}
{% tab title="Schema" %}
| Attribute                         | Type   | Description                                                |
| --------------------------------- | ------ | ---------------------------------------------------------- |
| statusCode                        | String | Query status ([details](../../data-structure#status-code)) |
| data                              | Array  | Return data                                                |
| data\[x].relatedEntityTaxIdNumber | String | ID document number                                         |
| data\[x].relatedEntityTaxIdType   | String | Type of identification document                            |
| data\[x].relatedEntityName        | String | Name of related person                                     |
| data\[x].relationshipType         | String | Relationship Type                                          |
| data\[x].relationshipLevel        | String | Relationship Level                                         |
{% endtab %}

{% tab title="Example" %}
```json
{
  "statusCode": "01",
  "data": {
    "items": [
      {
        "relatedEntityTaxIdNumber": "",
        "relatedEntityTaxIdType": "CPF",
        "relatedEntityName": "MARIA DOE",
        "relationshipType": "MOTHER",
        "relationshipLevel": "DIRECT"
      },
      {
        "relatedEntityTaxIdNumber": "01XXXXXXX16",
        "relatedEntityTaxIdType": "CPF",
        "relatedEntityName": "GABRIEL DOE",
        "relationshipType": "BROTHER",
        "relationshipLevel": "DIRECT"
      }
    ]
  }
}
```
{% endtab %}
{% endtabs %}

## Related Persons' Phone Numbers (PF38)

Returns the phone number and relationship of people possibly related to this person.

**Section:** `pfRelatedPeoplePhones`

**Required parameter:** `cpf`

{% tabs %}
{% tab title="Schema" %}
| Attribute                   | Type    | Description                                                |
| --------------------------- | ------- | ---------------------------------------------------------- |
| statusCode                  | String  | Query status ([details](../../data-structure#status-code)) |
| data                        | Array   | Return data                                                |
| data\[x].number             | String  | Phone number                                               |
| data\[x].areaCode           | String  | Area code                                                  |
| data\[x].countryCode        | String  | Country Code                                               |
| data\[x].type               | String  | Type                                                       |
| data\[x].lastPassageDate    | String  | Date of last validation                                    |
| data\[x].portabilityHistory | Array   | Porting History                                            |
| data\[x].hasOptIn           | Boolean | Accepts marketing calls                                    |
{% endtab %}

{% tab title="Example" %}
```json
{
  "statusCode": "01",
  "data": [
    {
      "number": "22112200",
      "areaCode": "54",
      "countryCode": "55",
      "type": "RELATED - 01XXXXXXX16 - BROTHER - WORK",
      "lastPassageDate": "2016-02-01T00:00:00Z",
      "portabilityHistory": [],
      "hasOptIn": false
    }
  ]
}
```
{% endtab %}
{% endtabs %}
