# Get a List of HRBPs

Get a list of HRBPs. The list contains HRBP ID and department ID information.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/corehr/v2/bps
HTTP Method | GET
Rate Limit | [100 per minute](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | View BP list(corehr:bp.list:read)
Required field scopes | **Notice**：The response body of the API contains the following sensitive fields, and they will be returned only after corresponding scopes are added. If you do not need the fields, it is not recommended that you request the scopes.<br>Obtain user ID(contact:user.employee_id:readonly)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | Yes | Page size, up to 500<br>**Example value**: 500<br>**Data validation rules**:<br>- Value range: `1` ～ `500`
page_token | string | No | Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups<br>**Example value**: 6891251722631890445
user_id_type | string | No | User ID categories<br>**Example value**: open_id<br>**Optional values are**:<br>- open_id：Identifies a user to an app. The same user has different Open IDs in different apps. [How to get Open ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-openid)<br>- union_id：Identifies a user to a tenant that acts as a developer. A user has the same Union ID in apps developed by the same developer, and has different Union IDs in apps developed by different developers. A developer can use Union ID to link the same user's identities in multiple apps.[How to get Union ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-union-id)<br>- user_id：Identifies a user to a tenant. The same user has different User IDs in different tenants. In one single tenant, a user has the same User ID in all apps （including store apps）. User ID is usually used to communicate user data between different apps. [How to get User ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-user-id)<br><md-enum-item key="people_corehr_id" ><br>**Default value**: `open_id`<br>**When the value is `user_id`, the following field scopes are required**:<br>Obtain user ID(contact:user.employee_id:readonly)
department_id_type | string | No | The department ID type used in this call<br>**Example value**: open_department_id<br>**Optional values are**:<br>- open_department_id：Identify departments by open_department_id<br>- department_id：Identify departments by department_id<br>- people_corehr_department_id：Identify departments by people_corehr_department_id<br>**Default value**: `open_department_id`

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
items | bp\[\] | HRBP information
department_id | string | Department ID
hrbp_id | string | Employment ID of department HRBP, excluding higher department HRBP
page_token | string | Page identifier, when has_more is true, a new page_token will also be returned. Otherwise, page_token will not be returned
has_more | boolean | Whether the response body has more parameters

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "department_id": "4719456877659520852",
                "hrbp_id": "4719456877659520852"
            }
        ],
        "page_token": "eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0=",
        "has_more": true
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1161401 | Incorrect parameter type | Please check the parameter types, such as string and number
400 | 1161402 | Incorrect parameter range | Please check if the numeric parameters are within the specified range
400 | 1161403 | Incorrect parameter length | Please check parameters of the container type, such as List and Map
400 | 1161404 | Missing or invalid parameter | Please check if the parameters are valid
400 | 1161405 | Parameter parsing error | Please check the JSON format of the request body
400 | 1161406 | Parameter exceeds the optional range | Please check the available options for parameters of the enumeration type
500 | 1161501 | System internal error | Please contact [technical support](https://applink.feishu.cn/TLJpeNdW)

