# Parallel Developer Documentation **Legacy – v1.x**

This API can be used to get accreditation information for an individual or business.

This API requires that you first receive `accreditation_status` and `profile` [scope](https://developer.parallelmarkets.com/docs/1.x/server/scopes) permissions via a valid [OAuth Access Token](https://developer.parallelmarkets.com/docs/1.x/server/access-token) for an individual or business. You will then use that token for authentication for all requests.

## HTTP Request with OAuth Token

`GET https://api.parallelmarkets.com/v1/accreditations`

You must send an `Authorization` header with a value of `Bearer {token}`, where `{token}` is a valid [OAuth Access Token](https://developer.parallelmarkets.com/docs/1.x/server/access-token).

### Query Parameters

None

### Response Parameters

| Parameter                     | Description                                                                                                                                       |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                          | A unique identifier for the entity (individual or business)                                                                                       |
| `user_id`                     | A unique identifier for the person who authenticated. If `type` is individual, this will be the same as `id` (otherwise, this will be an identifier for the user acting as the business) |
| `type`                        | Either `individual` or `business`                                                                                                               |
| `indicated_unaccredited`     | If the user has indicated they are not accredited, this will be the Unix timestamp of when they made that indication. This will become null if the user subsequently submits an accreditation application. |
| `accreditations`             | A list of [Individual Accreditations](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#individual-accreditation) or [Business Accreditations](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#business-accreditation) depending on the `type`. |

### Example

Get the accreditation information for a user/business.

```shell
curl https://api.parallelmarkets.com/v1/accreditations \
  -H 'Authorization: Bearer {token}'
```

The above command returns JSON structured like this:

```json
{
  "id": "VXNlcjox",
  "user_id": "VXNlcjox",
  "type": "individual",
  "indicated_unaccredited": null,
  "accreditations": [
    {
      "assertion_type": "income",
      "certified_at": 1568474142,
      "created_at": 1568560542,
      "expires_at": 1571152542,
      "rejection_reason": null,
      "id": "VXNlckFjY3JlZGl0YXRpb246MQ==",
      "status": "current",
      "first_name": "Snake",
      "last_name": "Plissken",
      "documents": [
        {
          "download_url": "https://api.parallelmarkets.com/files/123?token=abc123",
          "download_url_expires": 30,
          "type": "certification-letter"
        }
      ]
    }
  ]
}
```

## HTTP Request with API Key

`GET https://api.parallelmarkets.com/v1/accreditations/{id}`

You must send an `Authorization` header with a value of `Bearer {apiKey}`, where `{apiKey}` is a valid [API Key](https://developer.parallelmarkets.com/docs/1.x/server/api-keys). The `{id}` value should be the unique ID of an individual or business (for instance, `VXNlcjoxCg==`).

### Query Parameters

None

### Response Parameters

| Parameter                     | Description                                                                                                                                       |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                          | A unique identifier for the entity (individual or business)                                                                                       |
| `type`                        | Either `individual` or `business`                                                                                                               |
| `indicated_unaccredited`     | If the user has indicated they are not accredited, this will be the Unix timestamp of when they made that indication. This will become null if the user subsequently submits an accreditation application. |
| `accreditations`             | A list of [Individual Accreditations](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#individual-accreditation) or [Business Accreditations](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#business-accreditation) depending on the `type`. |

### Example

Get the accreditation information for an individual/business.

```shell
curl https://api.parallelmarkets.com/v1/accreditations/VXNlcjoxCg== \
  -H 'Authorization: Bearer {apiKey}'
```

The above command returns JSON structured like this:

```json
{
  "id": "VXNlcjox",
  "type": "individual",
  "indicated_unaccredited": null,
  "accreditations": [
    {
      "assertion_type": "income",
      "certified_at": 1568474142,
      "created_at": 1568560542,
      "expires_at": 1571152542,
      "rejection_reason": null,
      "id": "VXNlckFjY3JlZGl0YXRpb246MQ==",
      "status": "current",
      "first_name": "Snake",
      "last_name": "Plissken",
      "documents": [
        {
          "download_url": "https://api.parallelmarkets.com/files/123?token=abc123",
          "download_url_expires": 30,
          "type": "certification-letter"
        }
      ]
    }
  ]
}
```
