This is documentation for Parallel Developer Documentation **Legacy – v1.x**, which is no longer actively maintained.

For up-to-date documentation, see the **[latest version](https://developer.parallelmarkets.com/docs/server)** (Current – v2.x).

Version: Legacy – v1.x

On this page

Get basic profile information for an individual or business.

This API requires that you first receive `profile` [scope](https://developer.parallelmarkets.com/docs/1.x/server/scopes) permission 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.

The response includes information for both:

- The entity whose information is being shared (the **"subject"**). This can be either a business or an individual.
- The individual who is doing the sharing (the **"user"**). If a user is sharing information about themselves, then the user and the subject refer to the same individual entity.

## HTTP Request with OAuth Token

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

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

Response parameters that begin with `user_` refer to the individual user who is doing the sharing. The other fields refer to the subject — the individual or business whose information is being shared.

| Parameter           | Description                                                                                                                                      |
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                | A unique identifier for the subject.                                                                                                           |
| `type`              | The entity type of the subject, either `"individual"` or `"business"`.                                                                      |
| `profile`           | Profile information for the subject. This will be either an [Individual Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#individual-profile) or [Business Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#business-profile). |
| `user_id`           | A unique identifier for the individual who authenticated. If `user_providing_for` is `"self"`, this will be the same as `id` (otherwise, this will be an identifier for the user providing information) |
| `user_profile`      | The [Individual Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#individual-profile) of the user who has authenticated. If `user_providing_for` is `"self"`, this will be the same as the `profile` field. |
| `user_providing_for`| This will be one of: <br>- `"self"`: The user has authenticated as themselves and is sharing their own information.<br>- `"controlled-business"`: The user has authenticated as a business and is sharing that business' information.<br>- `"other-individual"`: The user has authenticated on behalf of another person and is sharing that person's information (this option is only possible with the [`identity` scope](https://developer.parallelmarkets.com/docs/1.x/server/scopes)). |
| `access_expires_at` | A timestamp which, if not `null`, indicates a future time after which this subject's data will no longer be accessible to you via the provided access token. Requests made to this endpoint with the same [OAuth Access Token](https://developer.parallelmarkets.com/docs/1.x/server/access-token) after `access_expires_at` will fail. When the value of this field is set, then the value of `access_revoked_by` is always set as well (see the [access revocation](https://developer.parallelmarkets.com/docs/1.x/server/access-revocation) section for more details). |
| `access_revoked_by` | This will be one of: <br>- `null`: Access revocation is not scheduled. The value of the `access_expires_at` in this case will be `null` as well.<br>- `"subject"`: The subject (or an associated individual) requested to revoke access to the subject's data. <br>- `"partner"`: You (or an associated individual) requested to revoke your own access to the subject's data.<br>- `"system"`: Access to this subject's data was revoked by our internal systems.<br>When the value of this field is set, then the value of `access_expires_at` is always set as well (see the [access revocation](https://developer.parallelmarkets.com/docs/1.x/server/access-revocation) section for more details). |
| `available_scopes`   | An array of [scopes](https://developer.parallelmarkets.com/docs/1.x/server/scopes) this subject has consented to share.                                                                                |

### Examples

Get the profile information for a user/business.

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

The above command returns JSON structured like this:

```json
{
  "id": "VXNlcjox",
  "type": "individual",
  "profile": {
    "email": "test@example.com",
    "first_name": "Wyman",
    "last_name": "Manderly"
  },
  "user_id": "VXNlcjox",
  "user_profile": {
    "email": "test@example.com",
    "first_name": "Wyman",
    "last_name": "Manderly"
  },
  "user_providing_for": "self",
  "access_expires_at": null,
  "access_revoked_by": null,
  "available_scopes": ["accreditation_status", "identity", "profile"]
}
```

In this example, the individual "[test@example.com](mailto:test@example.com)" is sharing their own information, so the `user_profile` will be the same as the `profile`, the `user_id` is the same as the `id`, and `user_providing_for` is `"self"`.

Here's an example of a person sharing information for a business. Notice the `profile` in this case is a [Business Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#business-profile):

```json
{
  "id": "Xxn203ty",
  "type": "business",
  "profile": {
    "name": "Acme Inc.",
    "business_type": "C Corporation",
    "primary_contact": {
      "email": "ceo@acme.com",
      "first_name": "Jean-Luc",
      "last_name": "Picard"
    }
  },
  "user_id": "VXNlcjox",
  "user_profile": {
    "email": "test@example.com",
    "first_name": "Wyman",
    "last_name": "Manderly"
  },
  "user_providing_for": "controlled-business",
  "access_expires_at": null,
  "access_revoked_by": null,
  "available_scopes": ["accreditation_status", "identity", "profile"]
}
```

And, finally, here's an example of a person sharing information for another individual, having also requested to stop sharing.

```js
{
  "id": "VXNlcjozMwo=",
  "type": "individual",
  "profile": {
    "email": "another-person@example.com",
    "first_name": "Sean",
    "last_name": "Blowers"
  },
  "user_id": "VXNlcjox",
  "user_profile": {
    "email": "test@example.com",
    "first_name": "Wyman",
    "last_name": "Manderly"
  },
  "user_providing_for": "other-individual",
  "access_expires_at": "2021-01-01T12:12:12Z",
  "access_revoked_by": "subject",
  "available_scopes": ["accreditation_status", "identity", "profile"]
}
```

## HTTP Request with API Key

`GET https://api.parallelmarkets.com/v1/profile/{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

The response fields refer to the subject — the individual or business whose information is being shared.

| Parameter     | Description                                                                                                                                      |
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`          | A unique identifier for the subject.                                                                                                           |
| `type`        | The entity type of the subject, either `"individual"` or `"business"`.                                                                      |
| `profile`     | Profile information for the subject. This will be either an [Individual Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#individual-profile) or [Business Profile](https://developer.parallelmarkets.com/docs/1.x/server/data-structures#business-profile). |
| `access_expires_at` | A timestamp which, if not `null`, indicates a future time after which this subject's data will no longer be accessible to you via the provided access token. Requests made to this endpoint with the same [OAuth Access Token](https://developer.parallelmarkets.com/docs/1.x/server/access-token) after `access_expires_at` will fail. When the value of this field is set, then the value of `access_revoked_by` is always set as well (see the [access revocation](https://developer.parallelmarkets.com/docs/1.x/server/access-revocation) section for more details). |
| `access_revoked_by` | This will be one of: <br>- `null`: Access revocation is not scheduled. The value of the `access_expires_at` in this case will be `null` as well.<br>- `"subject"`: The subject (or an associated individual) requested to revoke access to the subject's data. <br>- `"partner"`: You (or an associated individual) requested to revoke your own access to the subject's data.<br>- `"system"`: Access to this subject's data was revoked by our internal systems.<br>When the value of this field is set, then the value of `access_expires_at` is always set as well (see the [access revocation](https://developer.parallelmarkets.com/docs/1.x/server/access-revocation) section for more details). |
| `available_scopes`| An array of [scopes](https://developer.parallelmarkets.com/docs/1.x/server/scopes) this subject has consented to share.                                                                               |

### Examples

Get the profile information for a user/business.

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

The above command returns JSON structured like this (for an individual):

```json
{
  "id": "VXNlcjox",
  "type": "individual",
  "profile": {
    "email": "test@example.com",
    "first_name": "Wyman",
    "last_name": "Manderly"
  },
  "access_expires_at": null,
  "access_revoked_by": null,
  "available_scopes": ["accreditation_status", "identity", "profile"]
}
```

Here's an example of the details for a business:

```json
{
  "id": "Xxn203ty",
  "type": "business",
  "profile": {
    "name": "Acme Inc.",
    "business_type": "C Corporation",
    "primary_contact": {
      "email": "ceo@acme.com",
      "first_name": "Jean-Luc",
      "last_name": "Picard"
    }
  },
  "access_expires_at": null,
  "access_revoked_by": null,
  "available_scopes": ["accreditation_status", "identity", "profile"]
}
```
