# Get a person

`GET /v4/records/people/{id}`

Fetches one person by ID. `current_company` and `current_position` are always returned as nullable attributes derived from the current work-history entry. `birthdate` is always returned as a nullable YYYY-MM-DD attribute. `workflow_phase_status`, `workflow_stage_status`, and `workflow_phase_status_changed_at` are always returned as nullable attributes derived from the record's workflow flow. `linkedin_url`, `github_url`, `twitter_url`, `facebook_url` and `instagram_url` are always returned as nullable attributes derived from the record's bookmarks. `alias` is always returned as an array of the record's stored alias strings (empty when none). Requires `people:read`.

Authentication (security requirement alternatives):

```json
[
  {
    "bearer_auth": [
      "people:read"
    ]
  },
  {
    "oauth2_auth": [
      "people:read"
    ]
  },
  {
    "apikey_auth": [
      "people:read"
    ]
  }
]
```

- bearer_auth: http (bearer). API key or OAuth access token in Authorization header; scopes: people:read
- oauth2_auth: oauth2. OAuth authorization code flow with mandatory S256 PKCE.; scopes: people:read
- apikey_auth: apiKey, query api_key. API key in query string; scopes: people:read

Parameters:

- `id` (path, string, required) - Person ID
  Type: string

- `include` (query, string, optional) - Optional includes: primary_email, primary_phone, primary_location, source, notes, flow
  Type: string

- `values` (query, string, optional) - Set to true to add a per-item values object keyed by attributes fields. Values hydrate reference tokens and fixed reference ids. Separate from include/objects behavior. File summaries (`file:<sqid>`) carry a `url`: a download URL that works without authentication until it expires, between 12 and 13 hours after the response. Request the record again for a fresh one.
  Type: string

Responses:

- 200: Person found

Content type: application/json

Type: object

Schema: [PersonResponse](https://docs.searchsoftware.nl/api/models/personresponse.md)

- `status` (required)
  Type: string
  
  enum: ["ok"]
  
  Example:
  
  ```json
  "ok"
  ```

- `data` (required)
  Reference: [PersonData](https://docs.searchsoftware.nl/api/models/persondata.md); Type: object

- 400: Invalid id

Content type: application/json

Type: unknown

Example:

```json
{
  "status": "error",
  "error": {
    "code": "INVALID_ID",
    "status_code": 400,
    "message": "Invalid id"
  }
}
```

allOf:
  Reference: [ErrorResponse](https://docs.searchsoftware.nl/api/models/errorresponse.md); Type: object

```json
{
  "status": "error",
  "error": {
    "code": "INVALID_ID",
    "status_code": 400,
    "message": "Invalid id"
  }
}
```

- 401: Invalid API key

Content type: application/json

Type: unknown

Example:

```json
{
  "status": "error",
  "error": {
    "code": "INVALID_API_KEY",
    "status_code": 401,
    "message": "Invalid API key"
  }
}
```

allOf:
  Reference: [ErrorResponse](https://docs.searchsoftware.nl/api/models/errorresponse.md); Type: object

```json
{
  "status": "error",
  "error": {
    "code": "INVALID_API_KEY",
    "status_code": 401,
    "message": "Invalid API key"
  }
}
```

- 403: Insufficient scope

Content type: application/json

Type: unknown

Example:

```json
{
  "status": "error",
  "error": {
    "code": "FORBIDDEN",
    "status_code": 403,
    "message": "Insufficient scope"
  }
}
```

allOf:
  Reference: [ErrorResponse](https://docs.searchsoftware.nl/api/models/errorresponse.md); Type: object

```json
{
  "status": "error",
  "error": {
    "code": "FORBIDDEN",
    "status_code": 403,
    "message": "Insufficient scope"
  }
}
```

- 404: Person not found

Content type: application/json

Type: unknown

Example:

```json
{
  "status": "error",
  "error": {
    "code": "NOT_FOUND",
    "status_code": 404,
    "message": "Record not found"
  }
}
```

allOf:
  Reference: [ErrorResponse](https://docs.searchsoftware.nl/api/models/errorresponse.md); Type: object

```json
{
  "status": "error",
  "error": {
    "code": "NOT_FOUND",
    "status_code": 404,
    "message": "Record not found"
  }
}
```

- 500: Internal server error

Content type: application/json

Type: unknown

Example:

```json
{
  "status": "error",
  "error": {
    "code": "INTERNAL_ERROR",
    "status_code": 500,
    "message": "Internal server error"
  }
}
```

allOf:
  Reference: [ErrorResponse](https://docs.searchsoftware.nl/api/models/errorresponse.md); Type: object

```json
{
  "status": "error",
  "error": {
    "code": "INTERNAL_ERROR",
    "status_code": 500,
    "message": "Internal server error"
  }
}
```

## Examples

### cURL

```bash
curl -X GET 'https://api.searchsoftware.nl/v4/records/people/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### TypeScript

```typescript
const response = await fetch('https://api.searchsoftware.nl/v4/records/people/string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.searchsoftware.nl/v4/records/people/string',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```

### Ruby

```ruby
require 'net/http'
require 'json'

uri = URI('https://api.searchsoftware.nl/v4/records/people/string')
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer YOUR_TOKEN'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') { |http| http.request(request) }
data = JSON.parse(response.body)
```

### Go

```go
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://api.searchsoftware.nl/v4/records/people/string", nil)
  req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
```

### PHP

```php
<?php
$ch = curl_init('https://api.searchsoftware.nl/v4/records/people/string');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_TOKEN']);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

### Rust

```rust
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://api.searchsoftware.nl/v4/records/people/string")
        .header("Authorization", "Bearer YOUR_TOKEN")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
```
