# List of cc information

The interface queries the qualified review cc list in the review system through different conditions.

## Usage restrictions

- The query results of this interface may be delayed and real-time accuracy cannot be guaranteed.

- When querying:

- `user_id`, `approval_code`, `instance_code`, `instance_external_id`, and `group_external_id` cannot all be empty simultaneously.

- Query results for `approval_code` and `group_external_id` are obtained through union; query results for `instance_code` and `instance_external_id` are obtained through union; other query conditions are obtained through intersection.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/approval/v4/instances/search_cc
HTTP Method | POST
Rate Limit | [1000 per minute & 50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Search Approval list(approval:approval.list:readonly)
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)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | No | Page size<br>**Example value**: 10<br>**Default value**: `10`<br>**Data validation rules**:<br>- Value range: `5` ～ `200`
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**: nF1ZXJ5VGhlbkZldGNoCgAAAAAA6PZwFmUzSldvTC1yU
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>**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)

### Request body

Parameter | Type | Required | Description
---|---|---|---
user_id | string | No | Fill in the user id according to the x_user_type<br>**Example value**: "lwiu098wj"
approval_code | string | No | Approval Definition Code. The retrieval methods are as follows:<br>- Call the [Create Approval Definition](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/create) interface and obtain the `approval_code` from the response parameters.<br>- Log in to the approval management backend and get it from the URL of the specified approval definition. For detailed operations, please refer to [What is Approval Code](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/overview-of-approval-resources#8151e0ae).<br>**Note**:<br>- `user_id`, `approval_code`, `instance_code`, `instance_external_id`, and `group_external_id` cannot all be empty simultaneously.<br>- Query results for `approval_code` and `group_external_id` are obtained through union.<br>**Example value**: "EB828003-9FFE-4B3F-AA50-2E199E2ED942"
instance_code | string | No | Approval Instance Code. The retrieval methods are as follows:<br>- Call the [Create Approval Instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) interface and obtain the `instance_code` from the response parameters.<br>- Call the [Batch Get Approval Instance ID](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list) interface to get the required approval instance code.<br>**Note**:<br>- `user_id`, `approval_code`, `instance_code`, `instance_external_id`, and `group_external_id` cannot all be empty simultaneously.<br>- Query results for `instance_code` and `instance_external_id` are obtained through union.<br>**Example value**: "EB828003-9FFE-4B3F-AA50-2E199E2ED943"
instance_external_id | string | No | Third-party ID of Approval Instance.<br>**Note**:<br>- `user_id`, `approval_code`, `instance_code`, `instance_external_id`, and `group_external_id` cannot all be empty simultaneously.<br>- Query results for `instance_code` and `instance_external_id` are obtained through union.<br>**Example value**: "EB828003-9FFE-4B3F-AA50-2E199E2ED976"
group_external_id | string | No | Third-party ID of Approval Definition Group.<br>**Note**:<br>- `user_id`, `approval_code`, `instance_code`, `instance_external_id`, and `group_external_id` cannot all be empty simultaneously.<br>- Query results for `approval_code` and `group_external_id` are obtained through union.<br>**Example value**: "1234567"
cc_title | string | No | Approval CC title (only for third-party reviews)<br>**Example value**: "test"
read_status | string | No | Approval CC status <br>Note:  if not in the collection, report an error<br>**Example value**: "read"<br>**Optional values are**:<br>- READ：Read<br>- UNREAD：Unread<br>- ALL：All states
cc_create_time_from | string | No | CC Query Start Time, Unix millisecond timestamp. Forms a time period query condition with the `cc_create_time_from` parameter, and will only return approval copies within that time period.<br>**Note**: The query time span cannot exceed 30 days. Start and end times must both be set or both be unset.<br>**Example value**: "1547654251506"
cc_create_time_to | string | No | CC Query End Time, Unix millisecond timestamp. Forms a time period query condition with the `cc_create_time_from` parameter, and will only return approval copies within that time period.<br>**Note**: The query time span cannot exceed 30 days. Start and end times must both be set or both be unset.<br>**Example value**: "1547654251506"
locale | string | No | Language<br>**Example value**: "zh-CN"<br>**Optional values are**:<br>- zh-CN：Chinese<br>- en-US：English<br>- ja-JP：Japanese

### Request body example
```json
{
    "user_id": "lwiu098wj",
    "approval_code": "EB828003-9FFE-4B3F-AA50-2E199E2ED942",
    "instance_code": "EB828003-9FFE-4B3F-AA50-2E199E2ED943",
    "instance_external_id": "EB828003-9FFE-4B3F-AA50-2E199E2ED976",
    "group_external_id": "1234567",
    "cc_title": "test",
    "read_status": "read",
    "cc_create_time_from": "1547654251506",
    "cc_create_time_to": "1547654251506",
    "locale": "zh-CN"
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
count | int | Query return number
cc_list | cc_search_item\[\] | List of review examples
approval | instance_search_approval | Review Definition
code | string | Review the code
name | string | Review Definition Name
is_external | boolean | Whether it is a third-party review
external | instance_search_approval_external | Third party review information
batch_cc_read | boolean | Whether to support batch reading
approval_id | string | Approval Definition Id
icon | string | Approval definition icon information
group | instance_search_group | Review definition grouping
external_id | string | Review definition group external id
name | string | Review definition group name
instance | instance_search_node | Review example information
code | string | Review example code
external_id | string | Review instance external id
user_id | string | Review instance originator id
start_time | string | Review instance start time
end_time | string | Review instance end time
status | string | Review instance status<br>**Optional values are**:<br>- rejected：Reject<br>- pending：Under review<br>- canceled：Withdraw<br>- deleted：Deleted<br>- approved：Pass
title | string | Review instance name (only third-party reviews have it)
extra | string | Review instance extension field, string type json
serial_id | string | Review serial number
link | instance_search_link | Review example link (only third-party reviews have)
pc_link | string | Review example pc link
mobile_link | string | Review example mobile end link
cc | cc_search_node | Approval CC
user_id | string | Approval copy to initiator id
create_time | string | Approval CC start time
read_status | string | Approval CC status<br>**Optional values are**:<br>- read：Read<br>- unread：Unread
title | string | Approval CC name (only third-party reviews have it)
extra | string | Approval CC extension field, string type json
link | instance_search_link | Review example link (only third-party reviews have)
pc_link | string | Review example pc link
mobile_link | string | Review example mobile end link
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": {
        "count": 10,
        "cc_list": [
            {
                "approval": {
                    "code": "EB828003-9FFE-4B3F-AA50-2E199E2ED943",
                    "name": "approval",
                    "is_external": true,
                    "external": {
                        "batch_cc_read": false
                    },
                    "approval_id": "7090754740375519252",
                    "icon": "https://lf3-ea.bytetos.com/obj/goofy/ee/approval/approval-admin/image/iconLib/v3/person.png"
                },
                "group": {
                    "external_id": "0004",
                    "name": "groupA"
                },
                "instance": {
                    "code": "EB828003-9FFE-4B3F-AA50-2E199E2ED943",
                    "external_id": "0004_3ED52DC1-AA6C",
                    "user_id": "lwiu098wj",
                    "start_time": "1547654251506",
                    "end_time": "1547654251506",
                    "status": "pending",
                    "title": "test",
                    "extra": "{}",
                    "serial_id": "201902020001",
                    "link": {
                        "pc_link": "https://www.baidu.com/",
                        "mobile_link": "https://www.baidu.com/"
                    }
                },
                "cc": {
                    "user_id": "lwiu098wj",
                    "create_time": "1547654251506",
                    "read_status": "read",
                    "title": "test",
                    "extra": "{}",
                    "link": {
                        "pc_link": "https://www.baidu.com/",
                        "mobile_link": "https://www.baidu.com/"
                    }
                }
            }
        ],
        "page_token": "nF1ZXJ5VGhlbkZldGNoCgAAAAAA6PZwFmUzSldvTC1yU",
        "has_more": false
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1390001 | param is invalid | Parameter error. Troubleshooting steps:<br>- Check the parameters passed during the request according to the parameter descriptions in the API documentation.<br>- If form parameters are passed, verify whether the form control data within the parameters is correct. If the error message includes a control ID (e.g., `Control= widget17261088448220001`), you can call the [View specific approval definition](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/get) or [Get single approval instance details](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get) API to retrieve the response parameter form value, search for the problematic control ID, and check whether the configuration of the control is correct.
400 | 1390002 | approval code not found | Cannot find approval definition code. Check whether the passed approval definition code is correct.<br>Methods to obtain the approval definition code:<br>- After calling the [Create approval definition](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/create) API, get it from the response parameter approval_code.<br>- Log into the approval management backend and obtain it from the URL of the specified approval definition. For detailed operations, refer to [What is approval code](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/overview-of-approval-resources#8151e0ae).
400 | 1390003 | instance code not found | Cannot find approval instance code. Check whether the passed approval instance code is correct.<br>Methods to obtain the approval instance code:<br>- After calling the [Create approval instance](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create) API, get it from the response parameter instance_code.<br>- Call the [Batch Get approval instance ID](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list) API to obtain the required approval instance codes.<br>- Call the [Query instance list](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query) API, set the filter conditions to query the specified approval instance codes.
400 | 1395001 | There have been some errors. Please try again later | Service error encountered. Troubleshooting steps:<br>1. Refer to the parameter descriptions in the API documentation and check whether the parameters passed in the request are correct. If form parameters are passed (form), ensure the form control data is correct.<br>2. Lower the request frequency and retry. If the error persists after retrying, please contact [Technical Support](https://applink.feishu.cn/TLJpeNdW).

For more error code information, see [General error codes](https://open.feishu.cn/document/ukTMukTMukTM/ugjM14COyUjL4ITN).

