### Sync Access Control Data Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index This is an example response for access control data synchronization. It provides a `next_id` for continued querying and a list of access records (`data`). Each record includes information like door ID, user ID, check-in time, check result, and an optional captured image. ```json { "code": 0, "msg": "错误描述", "data": { "next_id": 1000, "data": [ { "id": 123, "door_id": "门ID", "user_id": "用户ID", "ext_id": "12345", "check_type": "fp", "check_time": 1503025335, "check_data": "通行数据", "check_result": 0, "capture_img": "/9j/4AAQSkZJRgABAQAAAQABAAD/2....... " } ] } } ``` -------------------------------- ### Sync Attendance Data Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index This is an example of the response received when synchronizing attendance data. It includes a `next_id` for pagination, and a list of attendance records (`data`). Each record contains details such as user ID, check-in time, and check-in type. ```json { "code": 0, "msg": "", "data": { "next_id": 1000, "data": [ { "id": 123, "user_id": "用户ID", "ext_id": "12345", "terminal_id": "DL-D7_0000001", "check_type": "fp", "check_time": 1503025335, "check_data": "打卡数据" } ] } } ``` -------------------------------- ### Check-in Application API - Initialization Source: https://doc.delicloud.com/v3/integration/oa.html#/index Initializes attendance data for the Comprehensive Check-in application. This API only needs to be called once. ```APIDOC ## Comprehensive Check-in Application API - Initialization ### Description Initializes attendance data for the Comprehensive Check-in application. After a successful call to this API, attendance data can be synchronized using the attendance data synchronization API. This API only needs to be called once. ### Method POST ### Endpoint /v2.0/cloudappapi ### Headers - **Api-Module**: CHECKIN - **Api-Cmd**: checkin_query_init ### Request Example Empty request body. ### Response #### Success Response (200) - **code** (integer) - Response code. - **msg** (string) - Error description. #### Response Example ```json { "code": 0, "msg": "错误描述" } ``` ``` -------------------------------- ### POST /v2.0/org/device/query Source: https://doc.delicloud.com/v3/integration/oa.html#/index Retrieves a paginated list of device information from the Delicloud e+ system. ```APIDOC ## POST /v2.0/org/device/query ### Description Retrieves a paginated list of device information from the Delicloud e+ system. ### Method POST ### Endpoint /v2.0/org/device/query ### Parameters #### Query Parameters - **limit** (integer) - Required - Pagination size, must be between 1 and 100. - **offset** (integer) - Required - Offset, defaults to 0. ### Request Example ```json { "limit":20, "offset":0 } ``` ### Response #### Success Response (200) - **total** (integer) - The total number of devices. - **rows** (array) - A list of device information for the current paginated query. - **sn** (string) - Device Serial Number (SN). - **name** (string) - Device name. - **online** (boolean) - Indicates if the device is online. #### Response Example ```json { "code": 0, "msg": "", "data": { "total": "9", "rows": [ { "sn": "ACS701_26159033", "name": "人脸门禁机701", "online": false }, { "sn": "DL-D7_03325418", "name": "人脸考勤机D7", "online": true } ] } } ``` ``` -------------------------------- ### Attendance Data Initialization - POST Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index Initializes attendance data for the comprehensive check-in application. This API must be called once before attendance data can be synchronized using the attendance data sync API. Returns initialization status with code and error description. ```json { "code": 0, "msg": "错误描述" } ``` -------------------------------- ### POST /v2.0/employee/query Source: https://doc.delicloud.com/v3/integration/oa.html#/index Retrieves a paginated list of employee information from the Delicloud e+ system. ```APIDOC ## POST /v2.0/employee/query ### Description Retrieves a paginated list of employee information from the Delicloud e+ system. ### Method POST ### Endpoint /v2.0/employee/query ### Parameters #### Query Parameters - **limit** (integer) - Required - Pagination size, must be between 1 and 100. - **offset** (integer) - Required - Offset, defaults to 0. ### Request Example ```json { "limit":20, "offset":0 } ``` ### Response #### Success Response (200) - **total** (integer) - The total number of employees in the organization. - **rows** (array) - A list of employee information for the current paginated query. - **id** (string) - Employee ID in Delicloud E+. - **ext_id** (string) - Employee ID in the external system. - **name** (string) - Employee name. - **mobile** (string) - Employee mobile number in the external system. - **employee_num** (string) - Employee number in the external system. - **department_infos** (array) - Array of department information for the employee, currently supports only one department. - **id** (string) - Department ID in Delicloud E+. #### Response Example ```json { "code":0, "msg":"", "data":{ "total":"1", "rows":[ { "id":"123", "ext_id":"2", "name":"张三", "mobile":"18600000000", "employee_num":"001", "department_infos":[ { "id":"321" } ] } ] } } ``` ``` -------------------------------- ### Query Departments API Source: https://doc.delicloud.com/v3/integration/oa.html#/index Retrieves a paginated list of all departments in the E+ system. This endpoint returns all department information, including those without an `ext_id`. ```APIDOC ## POST /v2.0/department/query ### Description This endpoint allows you to fetch all department information from the E+ system in a paginated manner. It is important to note that departments without an `ext_id` will also be included in the results. ### Method POST ### Endpoint /v2.0/department/query ### Parameters #### Request Body - **limit** (integer) - Required - The number of departments to return per page. Must be between 1 and 100. - **offset** (integer) - Required - The number of records to skip before starting to collect the result set. Defaults to 0. ### Request Example ```json { "limit": 20, "offset": 0 } ``` ### Response #### Success Response (200) - **code** (integer) - The response code. 0 indicates success. - **msg** (string) - The message associated with the response. - **data** (object) - Contains the department data. - **total** (integer) - The total number of departments available. - **rows** (array) - An array of department objects. - **id** (string) - The unique identifier for the department. - **pid** (string) - The parent department's ID. - **name** (string) - The name of the department. - **department_ext_id** (string) - The external ID of the department. #### Response Example ```json { "code": 0, "msg": "", "data": { "total": "1", "rows": [ { "id": "123", "pid": "321", "name": "设计部", "department_ext_id": "2" } ] } } ``` ``` -------------------------------- ### Query Departments (POST /v2.0/department/query) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API retrieves all department information from the platform in a paginated manner. It returns all department details, including those without an external ID. Input requires 'limit' and 'offset' for pagination. ```json { "limit":20, "offset":0 } ``` -------------------------------- ### MD5加密签名计算示例 Source: https://doc.delicloud.com/v3/integration/oa.html#/index 演示了如何根据请求路径、时间戳、App-Key和App-Secret生成MD5加密签名(App-Sig)。该签名用于验证请求的合法性。 ```text {App-Sig} = md5({Path}{App-Timestamp}{App-Key}{App-Secret}),即: md5(/v2.0/employee15323159063643c5ee48d0b7d48c565ded5353c5ee48d0b7d48c591b8f430)=d380db98703c351c83600aa853786055 ``` -------------------------------- ### Batch Query Device Information - POST Request and Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index Retrieves paginated device information from the Delicloud E+ system including device serial number, name, and online status. Supports pagination with limit (1-100) and offset parameters. ```json { "limit":20, "offset":0 } ``` ```json { "code": 0, "msg": "", "data": { "total": "9", "rows": [ { "sn": "ACS701_26159033", "name": "人脸门禁机701", "online": false }, { "sn": "DL-D7_03325418", "name": "人脸考勤机D7", "online": true } ] } } ``` -------------------------------- ### HTTP POST请求示例 (JSON Body) Source: https://doc.delicloud.com/v3/integration/oa.html#/index 展示了HTTP POST请求的请求体格式,其中包含键值对形式的JSON数据。此格式适用于与得力e+系统进行API交互。 ```json { "k1": "v1", "k2": "v2" } ``` -------------------------------- ### POST /v2.0/department/init Source: https://doc.delicloud.com/v3/integration/oa.html#/index Initializes the external ID for the root department of an organization. This is used to set the root department's ID from the external system within Delicloud. ```APIDOC ## POST /v2.0/department/init ### Description Initializes the external ID for the root department of an organization. The root department's ID in the external system becomes the external ID in the Delicloud e+ system. The default external ID for the root department of a newly created organization in Delicloud is 0; this interface can be used to update it. ### Method POST ### Endpoint /v2.0/department/init ### Parameters #### Request Body - **department_ext_id** (string) - Required - The ID of the organization's root department in the external system. Cannot exceed 32 characters. ### Request Example ```json { "department_ext_id": "1" } ``` ### Response #### Success Response (200) - **ext_id** (string) - The ID of this department in the external system. - **name** (string) - The name of this department. #### Response Example ```json { "code": 0, "msg": "", "data": { "ext_id": "1", "name": "得力集团" } } ``` ``` -------------------------------- ### Add or Modify Department Information API Source: https://doc.delicloud.com/v3/integration/oa.html#/index Creates a new department or updates an existing one using the `department_ext_id` as the unique identifier. If the `department_ext_id` does not exist, a new department is created; otherwise, the existing department is updated. ```APIDOC ## POST /v2.0/department ### Description This endpoint allows for the creation of new departments or the modification of existing ones. The `department_ext_id` serves as the unique identifier. If the `department_ext_id` is not found in the E+ system, a new department record will be created. If it exists, the department's data will be updated according to the provided parameters. ### Method POST ### Endpoint /v2.0/department ### Parameters #### Request Body - **department_ext_id** (string) - Required - The external ID of this department, cannot exceed 32 characters. - **name** (string) - Required - The name of this department, cannot exceed 30 characters. - **p_ext_id** (string) - Optional - The external ID of the parent department for this department. If omitted, it indicates that this department has no parent. ### Request Example ```json { "department_ext_id": "2", "name": "设计部", "p_ext_id": "1" } ``` ### Response #### Success Response (200) - **code** (integer) - The response code. 0 indicates success. - **msg** (string) - The message associated with the response. - **data** (object) - Contains the created or updated department information. - **ext_id** (string) - The external ID of the department. - **name** (string) - The name of the department. #### Response Example ```json { "code": 0, "msg": "", "data": { "ext_id": "2", "name": "设计部" } } ``` ``` -------------------------------- ### Batch Query Employee Information - POST Request and Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index Retrieves paginated employee information from the Delicloud E+ system. Accepts limit (1-100) and offset parameters for pagination. Returns employee details including ID, name, mobile, employee number, and department information. ```json { "limit":20, "offset":0 } ``` ```json { "code":0, "msg":"", "data":{ "total":"1", "rows":[ { "id":"123", "ext_id":"2", "name":"张三", "mobile":"18600000000", "employee_num":"001", "department_infos":[ { "id":"321" } ] } ] } } ``` -------------------------------- ### Query User Feature (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API enables the retrieval of a specified user's feature values, such as facial data. It requires the user's external ID, feature type, and the feature algorithm used. The response includes a list of feature values and their abnormality status. ```json { "user_ext_id": "12345", "feature_type": "fa", "feature_alg": "base64" } ``` -------------------------------- ### POST /v2.0/employee/ext Source: https://doc.delicloud.com/v3/integration/oa.html#/index Sets the external ID ('ext_id') for an existing employee in the Delicloud e+ system. ```APIDOC ## POST /v2.0/employee/ext ### Description Sets the external ID ('ext_id') for an existing employee in the Delicloud e+ system. The caller must ensure the uniqueness of the external ID; otherwise, the interface will throw an error. ### Method POST ### Endpoint /v2.0/employee/ext ### Parameters #### Request Body - **id** (string) - Required - Employee ID in Delicloud E+. - **ext_id** (string) - Required - External ID for the employee. ### Request Example ```json { "id":"3244", "ext_id":"2" } ``` ### Response #### Success Response (200) - **code** (integer) - Response code. - **msg** (string) - Error description. #### Response Example ```json { "code":0, "msg":"" } ``` ``` -------------------------------- ### Query Personnel Features Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API allows you to query the feature values for a specified person. It's useful for retrieving stored recognition data. ```APIDOC ## POST /websites/doc_delicloud_v3_integration_oa/personnel/feature_query ### Description Queries the feature values for a specified person, useful for retrieving recognition data. ### Method POST ### Endpoint `/websites/doc_delicloud_v3_integration_oa/personnel/feature_query` ### Headers - **Api-Cmd** (string): `checkin_feature_query` ### Request Body - **user_ext_id** (string) - Required - User's external system ID (max 32 characters). - **feature_type** (string) - Required - Type of personnel feature (e.g., `fa` for face, `fp` for fingerprint, `pass` for password, `card` for employee card, `identity` for ID card). - **feature_alg** (string) - Required - Feature algorithm identifier for parsing feature values. ### Request Example ```json { "user_ext_id": "12345", "feature_type": "fa", "feature_alg": "base64" } ``` ### Response #### Success Response (200) - **code** (integer) - Status code, 0 indicates success. - **data** (object) - Response data. - **features** (array) - List of feature values. - **value** (string) - The feature value content. - **is_abnormal** (boolean) - Indicates if the feature value is abnormal (e.g., unrecognized by a device). #### Response Example ```json { "code": 0, "data": { "features": [ { "value": "MTIzNDU2Nzg5MA==", "is_abnormal": false }, { "value": "OTg3NjU0MzIxMA==", "is_abnormal": true } ] } } ``` ``` -------------------------------- ### Access Control Data Synchronization API Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API synchronizes records of personnel passing through cloud access control machines. Data is sorted by device upload time, not necessarily by the exact time of passage. ```APIDOC ## POST /api/access/sync ### Description Synchronizes access control passage records from Delicloud devices. ### Method POST ### Endpoint /api/access/sync ### Parameters #### Custom Headers - **Api-Cmd** (string) - Required - Value: `checkin_acs_query` #### Request Body - **next_id** (integer) - Required - The starting record ID for the current query. Use 0 for the initial request. - **page_size** (integer) - Optional - The maximum number of records to retrieve per request. Maximum value is 500. Consider lower values (e.g., 50) if response data is large or includes photos. - **pass_only** (boolean) - Optional - If true, only returns successful passage records. Defaults to true. ### Request Example ```json { "next_id": 0, "page_size": 50, "pass_only": true } ``` ### Response #### Success Response (200) - **code** (integer) - Status code, 0 indicates success. - **msg** (string) - Status message. - **data** (object) - Contains the synchronized data. - **next_id** (integer) - The offset value for the next incremental query. - **data** (array) - A list of access control records. - **id** (integer) - Record ID. - **door_id** (string) - Door ID. - **user_id** (string) - Passage personnel ID (may differ from e+ app user ID; use `ext_id` for association). - **ext_id** (string) - External system ID of the passage personnel. - **check_type** (string) - Type of passage method (e.g., 'fa', 'fp', 'pass', 'card'). - **check_time** (integer) - Passage timestamp in seconds. - **check_data** (string) - Additional data for the passage, varies by `check_type`. - **check_result** (integer) - Passage result code (e.g., 0 for success, 1 for denied). - **capture_img** (string) - Optional, Base64 encoded captured image string. #### Response Example ```json { "code": 0, "msg": "错误描述", "data": { "next_id": 1000, "data": [ { "id": 123, "door_id": "门ID", "user_id": "用户ID", "ext_id": "12345", "check_type": "fp", "check_time": 1503025335, "check_data": "通行数据", "check_result": 0, "capture_img": "/9j/4AAQSkZJRgABAQAAAQABAAD/2......." } ] } } ``` ### Notes 1. Initialize `next_id` to 0 for the first request. Subsequent requests should use the `next_id` returned in the previous response. 2. Save the latest `next_id` after synchronization to avoid data duplication or omission. 3. If the device returns capture images, limit `page_size` to prevent request failures due to large response sizes. ``` -------------------------------- ### Attendance Data Synchronization API Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API synchronizes attendance records from cloud attendance machines, access control devices (like cloud access gates), and integrated sign-in applications. It includes data from various check-in methods such as Wi-Fi, GPS, and field check-ins. ```APIDOC ## POST /api/attendance/sync ### Description Synchronizes attendance data from Delicloud devices and applications. ### Method POST ### Endpoint /api/attendance/sync ### Parameters #### Custom Headers - **Api-Cmd** (string) - Required - Value: `checkin_query` #### Request Body - **next_id** (integer) - Required - The starting record ID for the current query. Use 0 for the initial request. - **page_size** (integer) - Optional - The maximum number of records to retrieve per request. Maximum value is 500. ### Request Example ```json { "next_id": 0, "page_size": 50 } ``` ### Response #### Success Response (200) - **code** (integer) - Status code, 0 indicates success. - **msg** (string) - Status message. - **data** (object) - Contains the synchronized data. - **next_id** (integer) - The offset value for the next incremental query. - **data** (array) - A list of attendance records. - **id** (string) - Attendance record ID. - **user_id** (string) - Attendance personnel ID (may differ from e+ app user ID; use `ext_id` for association). - **ext_id** (string) - External system ID of the attendance personnel. - **terminal_id** (string) - Terminal ID of the attendance data. - **check_type** (string) - Type of check-in method (e.g., 'fp', 'gps', 'wifi', 'out_work'). - **check_time** (integer) - Attendance timestamp in seconds. - **check_data** (string) - Additional data for the check-in, varies by `check_type`. #### Response Example ```json { "code": 0, "msg": "", "data": { "next_id": 1000, "data": [ { "id": "123", "user_id": "用户ID", "ext_id": "12345", "terminal_id": "DL-D7_0000001", "check_type": "fp", "check_time": 1503025335, "check_data": "{\"device_name\":\"人脸考勤机D7\",\"employee_num\":\"\",\"dept_name\":\"\",\"cmd\":\"checkin\",\"member_name\":\"唐学武\",\"dept_id\":\"\"}" } ] } } ``` ### Notes 1. Initialize `next_id` to 0 for the first request. Subsequent requests should use the `next_id` returned in the previous response. 2. Save the latest `next_id` after synchronization to avoid data duplication or omission. 3. This API only returns new attendance data after an **initial attendance data setup**. 4. This API does not retrieve historical data; it only provides data generated after initialization. ``` -------------------------------- ### User Feature Query Response (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This JSON object represents the response from the user feature query API. It contains a list of features associated with the queried user, including the feature value and a flag indicating if the feature is considered abnormal. ```json { "code": 0, "data": { "features": [ { "value": "MTIzNDU2Nzg5MA==", "is_abnormal": false }, { "value": "OTg3NjU0MzIxMA==", "is_abnormal": true } ] } } ``` -------------------------------- ### Add or Modify Department Information (POST /v2.0/department) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API can be used to create new departments or update existing ones. The 'department_ext_id' serves as the unique identifier. If the ID does not exist, a new department is created; otherwise, the existing department's data is updated. ```json { "department_ext_id":"2", "name":"设计部", "p_ext_id":"1" } ``` -------------------------------- ### Update Personnel Features Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API allows you to upload personnel images to be used as a basis for facial recognition in attendance applications. Data updated through this interface can only be sent to devices that support visible light facial recognition. ```APIDOC ## POST /websites/doc_delicloud_v3_integration_oa/personnel/feature_update ### Description Allows uploading personnel images for facial recognition-based attendance, improving data collection efficiency. ### Method POST ### Endpoint `/websites/doc_delicloud_v3_integration_oa/personnel/feature_update` ### Headers - **Api-Cmd** (string): `feature_update` ### Request Body - **users** (array) - Required - List of users to update. - **ext_id** (string) - Required - User's external system ID (max 32 characters). - **feature_type** (string) - Required - Type of personnel feature (e.g., `fa` for face, `fp` for fingerprint, `pass` for password, `card` for employee card, `identity` for ID card). - **feature_alg** (string) - Required - Feature algorithm identifier for parsing feature values. - **feature_value** (array of strings) - Required - A list of personnel feature values to update. For base64 algorithms, do not include data identifiers or line breaks. ### Request Example ```json { "users": [ { "ext_id": "12345", "feature_type": "fa", "feature_alg": "base64", "feature_value": [ "v1", "v2" ] } ] } ``` ### Response #### Success Response (200) - **code** (integer) - Status code, 0 indicates success. - **msg** (string) - Status message. - **data** (object) - Response data. - **error_ext_ids** (array of strings) - List of user IDs that failed to update. #### Response Example ```json { "code": 0, "msg": "", "data": { "error_ext_ids": [ "12345" ] } } ``` ``` -------------------------------- ### Update User Features (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API allows for updating user features, such as face data for attendance recognition. It supports features like 'fa' (face) and requires specific header parameters. Data must be clear and adhere to facial recognition standards. Note: This feature is only compatible with visible light facial recognition devices. ```json { "users": [ { "ext_id": "12345", "feature_type": "fa", "feature_alg": "base64", "feature_value": [ "v1", "v2" ] } ] } ``` -------------------------------- ### Sync Attendance Data Request Source: https://doc.delicloud.com/v3/integration/oa.html#/index This section describes how to synchronize attendance data from Delicloud devices. It involves setting a custom header `Api-Cmd` to `checkin_query` and sending a JSON payload with `next_id` and `page_size`. The endpoint returns attendance records, including various check-in methods like Wi-Fi, GPS, and outdoor check-ins. ```json { "next_id": 0, "page_size": 50 } ``` -------------------------------- ### Add or Modify Employee Information (POST /v2.0/employee) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API allows for the creation or modification of employee information. The 'employee_ext_id' is the unique identifier for employees in external systems. It is essential for integrating attendance data. The API accepts employee details including name, mobile number, employee number, and department information. ```json { "employee_ext_id":"2", "name":"张三", "mobile":"18600000000", "employee_num":"001", "department_infos":[ { "ext_id":"2", "title":"经理" } ] } ``` -------------------------------- ### POST /v2.0/employee/delete Source: https://doc.delicloud.com/v3/integration/oa.html#/index Deletes an employee from the Delicloud e+ system using their external ID. ```APIDOC ## POST /v2.0/employee/delete ### Description Deletes an employee from the Delicloud e+ system using their external ID ('employee_ext_id') as the unique identifier. ### Method POST ### Endpoint /v2.0/employee/delete ### Parameters #### Request Body - **employee_ext_id** (string) - Required - The employee's external ID in the Delicloud e+ system. ### Request Example ```json { "employee_ext_id":"2" } ``` ### Response #### Success Response (200) - **code** (integer) - Response code. - **msg** (string) - Error description. #### Response Example ```json { "code":0, "msg":"" } ``` ``` -------------------------------- ### Sync Access Control Data Request Source: https://doc.delicloud.com/v3/integration/oa.html#/index This section details the synchronization of access control data from Delicloud devices. A custom header `Api-Cmd` set to `checkin_acs_query` is required. The request payload includes `next_id`, `page_size`, and an optional `pass_only` boolean to filter for successful passes. ```json { "next_id": 0, "page_size": 50, "pass_only": true } ``` -------------------------------- ### User Feature Update Response (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This JSON structure represents the response from the user feature update API. It indicates the success or failure of the update operation, listing any user IDs that failed to update. ```json { "code": 0, "msg": "", "data": { "error_ext_ids": [ "12345" ] } } ``` -------------------------------- ### Add or Modify Employee Information API Source: https://doc.delicloud.com/v3/integration/oa.html#/index Creates new employee records or updates existing ones. The `employee_ext_id` is used as the unique identifier for employees. This endpoint is crucial for integrating attendance data and allows for the creation of placeholder mobile numbers if not available in the external system. ```APIDOC ## POST /v2.0/employee ### Description This endpoint enables the creation of new employee records or the modification of existing ones within the E+ system. The `employee_ext_id` serves as the unique identifier for each employee. It is highly recommended to set an `employee_ext_id` for all employees if you plan to integrate attendance data. If an employee's `employee_ext_id` does not exist in the E+ system, a new record will be created. If it exists, the employee's data will be updated. If the external system does not provide a mobile number, a placeholder can be created; however, a real mobile number is required for employees who need to register E+ accounts to view their attendance records. ### Method POST ### Endpoint /v2.0/employee ### Parameters #### Request Body - **employee_ext_id** (string) - Required - The external ID of this employee, cannot exceed 32 characters. - **name** (string) - Required - The name of this employee, cannot exceed 30 characters. - **mobile** (string) - Optional - The mobile phone number of this employee, cannot exceed 20 characters. If not available, a valid-length placeholder can be used. - **employee_num** (string) - Optional - The employee number of this employee, cannot exceed 20 characters. - **department_infos** (array) - Required - An array of objects representing the employee's department information. An employee can only belong to one department at a time. - **ext_id** (string) - Required - The external ID of the employee's department, cannot exceed 32 characters. - **title** (string) - Required - The job title of the employee within their department, cannot exceed 16 characters. ### Request Example ```json { "employee_ext_id": "2", "name": "张三", "mobile": "18600000000", "employee_num": "001", "department_infos": [ { "ext_id": "2", "title": "经理" } ] } ``` ### Response #### Success Response (200) - **code** (integer) - The response code. 0 indicates success. - **msg** (string) - The message associated with the response. - **data** (object) - Contains the created or updated employee information. - **ext_id** (string) - The external ID of the employee. - **name** (string) - The name of the employee. - **mobile** (string) - The mobile phone number of the employee. - **employee_num** (string) - The employee number of the employee. #### Response Example ```json { "code": 0, "msg": "", "data": { "ext_id": "2", "name": "张三", "mobile": "18600000000", "employee_num": "001" } } ``` ``` -------------------------------- ### Set External ID for Employee - POST Request and Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index Sets the external ID (ext_id) for an existing employee in the Delicloud E+ system. The external ID must be unique within the external system. Returns success status with code and message fields. ```json { "id":"3244", "ext_id":"2" } ``` ```json { "code":0, "msg":"" } ``` -------------------------------- ### 初始化根部门外部ID响应示例 (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index 这是调用“初始化组织内根部门外部id”接口后返回的JSON响应示例。它包含了操作结果代码、消息以及成功初始化后部门的外部ID和名称。 ```json { "code":0, "msg":"", "data":{ "ext_id":"1", "name":"得力集团" } } ``` -------------------------------- ### Delete Employee - POST Request and Response Source: https://doc.delicloud.com/v3/integration/oa.html#/index Deletes an employee from the Delicloud E+ system organization using the employee's external ID (ext_id) as the unique identifier. Returns confirmation with status code and message. ```json { "employee_ext_id":"2" } ``` ```json { "code":0, "msg":"" } ``` -------------------------------- ### Set Department External ID (POST /v2.0/department/ext) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API allows modification of a department's external ID. It is crucial to ensure the uniqueness of the provided external ID to avoid errors. The API requires the department's 'id' and the 'ext_id' to be set. ```json { "id": "3244", "ext_id": "需要设置的id" } ``` -------------------------------- ### 初始化根部门外部ID请求示例 (JSON) Source: https://doc.delicloud.com/v3/integration/oa.html#/index 该代码片段展示了调用“初始化组织内根部门外部id”接口时,请求体中应包含的JSON数据。它指定了组织根部门在外部接入系统中的ID。 ```json { "department_ext_id":"1" } ``` -------------------------------- ### Delete Department (POST /v2.0/department/delete) Source: https://doc.delicloud.com/v3/integration/oa.html#/index This API facilitates the deletion of departments using their external ID ('department_ext_id'). A department cannot be deleted if it or its sub-departments contain employees. Employees must be deleted first using the employee deletion API. ```json { "department_ext_id":"2" } ``` -------------------------------- ### Delete Department API Source: https://doc.delicloud.com/v3/integration/oa.html#/index Deletes a department using its `department_ext_id`. Note that a department cannot be deleted if it or its subordinate departments contain employees. In such cases, employees must be deleted first. ```APIDOC ## POST /v2.0/department/delete ### Description This endpoint allows for the deletion of a department, identified by its `department_ext_id`. It's important to note that a department cannot be deleted if it or any of its sub-departments contain employees. Employees must be removed using the appropriate employee deletion endpoint before a department can be deleted. ### Method POST ### Endpoint /v2.0/department/delete ### Parameters #### Request Body - **department_ext_id** (string) - Required - The external ID of the department to be deleted. ### Request Example ```json { "department_ext_id": "2" } ``` ### Response #### Success Response (200) - **code** (integer) - The response code. 0 indicates success. - **msg** (string) - The message associated with the response. #### Response Example ```json { "code": 0, "msg": "" } ``` ``` -------------------------------- ### Set Department External ID API Source: https://doc.delicloud.com/v3/integration/oa.html#/index Modifies the `ext_id` field for a specified department. It is crucial to ensure the uniqueness of the external ID when using this endpoint. ```APIDOC ## POST /v2.0/department/ext ### Description This endpoint is used to set or update the external ID (`ext_id`) for a department. Callers must ensure that the provided `ext_id` is unique, as duplicate IDs will result in an error. ### Method POST ### Endpoint /v2.0/department/ext ### Parameters #### Request Body - **id** (string) - Required - The internal ID of the department. - **ext_id** (string) - Required - The external ID to be set for the department. ### Request Example ```json { "id": "3244", "ext_id": "需要设置的id" } ``` ### Response #### Success Response (200) - **code** (integer) - The response code. 0 indicates success. - **msg** (string) - The message associated with the response. #### Response Example ```json { "code": 0, "msg": "" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.