---
title: "OrgPerson"
url: "https://dev.4hse.com/api/orgperson"
---

# OrgPerson

An **OrgPerson** represents the assignment of a person to an organization unit, optionally with a role in the organization chart.

Use this API to:

-   Assign a person to an organization unit with an optional role
-   Find all people in an organization unit (filter by `org_unit_id`)
-   Find all organization units a person belongs to (filter by `person_id`)
-   Find all people with a specific organizational role (filter by `org_role_id`)

Supports historicization.

Version

2.0.0

OpenAPI version

3.0.0

## Authentication

[Section titled “ Authentication ”](#authentication)

### OAuth2

[Section titled “OAuth2 ”](#oauth2)

**Security scheme type:** oauth2

**Flow type:** password

**Token URL:** [https://auth.4hse.com/realms/4hse/protocol/openid-connect/token](https://auth.4hse.com/realms/4hse/protocol/openid-connect/token)

### AccessToken

[Section titled “AccessToken ”](#accesstoken)

**Security scheme type:** apiKey

**Query parameter name:** access-token

## Operations

[Section titled “Operations”](#operations)

### index

[Section titled “index”](#operation-indexOrgPerson-post)

POST

/v2/org-person/index

-   

Returns a paginated list of person-unit assignments.

Most useful filters:

-   `org_unit_id`: all people in a specific organization unit
-   `person_id`: all units a person belongs to
-   `org_role_id`: all people with a specific organizational role

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/orgperson/#oauth2)**
-   **[AccessToken](/api/orgperson/#accesstoken)**

#### Request Body

[Section titled “Request Body ”](#request-body)

Parameters for searching

Select media typeapplication/json

object

**filter**

object

**org\_person\_id**

string format: uuid

**org\_unit\_id**

string format: uuid

**person\_id**

string format: uuid

**org\_role\_id**

string format: uuid

nullable

**org\_unit\_code**

Code of the organization unit.

string

**org\_unit\_name**

Name of the organization unit.

string

**org\_role\_code**

Code of the organizational role.

string

nullable

**org\_role\_name**

Name of the organizational role.

string

nullable

**person\_first\_name**

string

**person\_last\_name**

string

**person\_code**

string

**person\_is\_employee**

boolean

**project\_name**

Name of the project.

string

**owned\_active**

Whether this assignment is currently active.

boolean

nullable

**parent\_active**

Whether the parent entities are currently active.

boolean

nullable

**per-page**

integer

default: 100 \>= 1

**page**

integer

default: 1 \>= 1

**sort**

string

Allowed values: person\_first\_name person\_last\_name person\_code org\_unit\_name org\_role\_name

**history**

If true, includes historicized entries.

boolean

##### Example

```
{  "filter": {    "org_unit_id": "6d7e8f90-1234-5678-abcd-ef6789012345"  },  "per-page": 20,  "page": 1,  "sort": "person_last_name"}
```

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

List of person-unit assignments

Select media typeapplication/json

Array<object>

object

**org\_person\_id**

string format: uuid

**org\_unit\_id**

string format: uuid

**person\_id**

string format: uuid

**org\_role\_id**

string format: uuid

nullable

**org\_unit\_code**

Code of the organization unit.

string

**org\_unit\_name**

Name of the organization unit.

string

**org\_role\_code**

Code of the organizational role.

string

nullable

**org\_role\_name**

Name of the organizational role.

string

nullable

**person\_first\_name**

string

**person\_last\_name**

string

**person\_code**

string

**person\_is\_employee**

boolean

**project\_name**

Name of the project.

string

**owned\_active**

Whether this assignment is currently active.

boolean

nullable

**parent\_active**

Whether the parent entities are currently active.

boolean

nullable

#### Headers

[Section titled “Headers ”](#headers)

**X-Pagination-Current-Page**

integer

Current page

**X-Pagination-Page-Count**

integer

Total number of pages

**X-Pagination-Per-Page**

integer

Number of items per page

**X-Pagination-Total-Count**

integer

Total number of items

### create

[Section titled “create”](#operation-createOrgPerson-post)

POST

/v2/org-person/create

-   

Assigns a person to an organization unit.

Requires `person_id` and `org_unit_id`. The `org_person_id` is auto-generated if not provided.

Optionally pass `org_role_id` to assign a specific organizational role. If omitted, the person is assigned to the unit without a specific role.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/orgperson/#oauth2)**
-   **[AccessToken](/api/orgperson/#accesstoken)**

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Assignment to create

Select media typeapplication/json

object

**org\_person\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**org\_unit\_id**

required

The organization unit. Pass the `org_unit_id` from the OrgUnit API.

string format: uuid

**person\_id**

required

The person. Pass the `person_id` from the Person API.

string format: uuid

**org\_role\_id**

The organizational role (optional). Pass the `org_role_id` from the OrgRole API. If omitted, the person is assigned without a specific role.

string format: uuid

nullable

#### Responses

[Section titled “ Responses ”](#responses)

##### 201

[Section titled “201 ”](#201)

Person assigned successfully

Select media typeapplication/json

object

**org\_person\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**org\_unit\_id**

required

The organization unit. Pass the `org_unit_id` from the OrgUnit API.

string format: uuid

**person\_id**

required

The person. Pass the `person_id` from the Person API.

string format: uuid

**org\_role\_id**

The organizational role (optional). Pass the `org_role_id` from the OrgRole API. If omitted, the person is assigned without a specific role.

string format: uuid

nullable

### view

[Section titled “view”](#operation-viewOrgPerson-get)

GET

/v2/org-person/view/{id}

-   

Retrieves a single assignment by its ID.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/orgperson/#oauth2)**
-   **[AccessToken](/api/orgperson/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The org\_person\_id to retrieve.

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Assignment found

Select media typeapplication/json

object

**org\_person\_id**

string format: uuid

**org\_unit\_id**

string format: uuid

**person\_id**

string format: uuid

**org\_role\_id**

string format: uuid

nullable

**org\_unit\_code**

Code of the organization unit.

string

**org\_unit\_name**

Name of the organization unit.

string

**org\_role\_code**

Code of the organizational role.

string

nullable

**org\_role\_name**

Name of the organizational role.

string

nullable

**person\_first\_name**

string

**person\_last\_name**

string

**person\_code**

string

**person\_is\_employee**

boolean

**project\_name**

Name of the project.

string

**owned\_active**

Whether this assignment is currently active.

boolean

nullable

**parent\_active**

Whether the parent entities are currently active.

boolean

nullable

##### 404

[Section titled “404 ”](#404)

Not found

### update

[Section titled “update”](#operation-updateOrgPerson-put)

PUT

/v2/org-person/update/{id}

-   

Updates an existing assignment.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/orgperson/#oauth2)**
-   **[AccessToken](/api/orgperson/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The org\_person\_id to update.

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Fields to update

Select media typeapplication/json

object

**org\_person\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**org\_unit\_id**

required

The organization unit. Pass the `org_unit_id` from the OrgUnit API.

string format: uuid

**person\_id**

required

The person. Pass the `person_id` from the Person API.

string format: uuid

**org\_role\_id**

The organizational role (optional). Pass the `org_role_id` from the OrgRole API. If omitted, the person is assigned without a specific role.

string format: uuid

nullable

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Updated successfully

Select media typeapplication/json

object

**org\_person\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**org\_unit\_id**

required

The organization unit. Pass the `org_unit_id` from the OrgUnit API.

string format: uuid

**person\_id**

required

The person. Pass the `person_id` from the Person API.

string format: uuid

**org\_role\_id**

The organizational role (optional). Pass the `org_role_id` from the OrgRole API. If omitted, the person is assigned without a specific role.

string format: uuid

nullable

##### 404

[Section titled “404 ”](#404)

Not found

### delete

[Section titled “delete”](#operation-deleteOrgPerson-delete)

DELETE

/v2/org-person/delete/{id}

-   

Deletes a person-unit assignment.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/orgperson/#oauth2)**
-   **[AccessToken](/api/orgperson/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The org\_person\_id to delete.

#### Query Parameters

[Section titled “Query Parameters ”](#query-parameters)

**force**

boolean

If true, deletes the assignment.

#### Responses

[Section titled “ Responses ”](#responses)

##### 204

[Section titled “204 ”](#204)

Deleted successfully

##### 400

[Section titled “400 ”](#400)

Preview of affected entities (returned when force=false)

This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.