### API Request Example - GET /api/openapi/v1.1/docs/getApplyList Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/get-forms-details-byStaff.md This snippet demonstrates how to make a GET request to the API endpoint for retrieving a list of forms. It includes common parameters such as type, start, count, state, and accessToken. The example uses cURL for illustration. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1.1/docs/getApplyList?type=requisition&start=0&count=10&state=paid&uid=EZA3rQTD1y23vw:eTM3rQTD1y20vw&accessToken=ID_3z35Otu8qpg:EZA3rQTD1y23vw' ``` -------------------------------- ### CURL: Example Request to Get Matrix Details Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/matrix/get-matrix-byId.md This is a cURL command example for fetching matrix details. It shows how to construct the URL with the matrix ID and access token, set the Content-Type header, and provide the request body with pagination limits (`start` and `count`). ```bash curl --location 'https://app.ekuaibao.com/api/openapi/v2/matrix/search/ID01wg5CyS5pg3?accessToken=ID01w7kdimGV3N%3APCx3rwm3aA00qM' \ --header 'Content-Type: application/json' \ --data '{ \ "limit": { \ "start": 0, \ "count": 20 \ } \ }' ``` -------------------------------- ### CURL Request Example Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/dimensions/get-dimension-items.md An example of how to make a GET request to the custom archive items API using cURL. This demonstrates the full URL with all necessary query parameters for authentication, pagination, filtering, and sorting. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1/dimensions/items?accessToken=ID01iWYs8eUjHV:xgJ3wajigF25H0&start=0&count=100&dimensionId=xgJ3wajigF25H0:项目&orderBy=updateTime&orderByType=desc' ``` -------------------------------- ### Retrieve Business Object Instances using CURL Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink/get-entity-info.md This example shows how to use CURL to make a GET request to the API endpoint for retrieving business object instances. It includes common query parameters like accessToken, entityId, count, start, and active status. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2.1/datalink?accessToken=cxEbrzNJSA3A00&entityId=26d60b5d6dd47f435000&count=10&start=0&active=true' ``` -------------------------------- ### Fetch Self-Built Applications (JavaScript) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink/get-platform.md This snippet demonstrates how to call the API to get a list of self-built applications. It uses a React component to make the GET request to the specified URL. The component requires an access token and optionally accepts start and count parameters for pagination. ```javascript import Control from "@theme/Control"; ``` -------------------------------- ### Get Delivered Documents by Staff ID (CURL Example) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/get-delivered-byStaff.md This is a CURL command example for fetching delivered documents by staff ID. It shows how to construct the request URL with all necessary parameters, including the access token, pagination index, and count. ```shell curl --location 'https://app.ekuaibao.com/api/openapi/v1.1/docs/delivered/$xgJ3wajigF25H0:dbc3wajigF1UH0?accessToken=ID01w4CAZC7P6n%3AxgJ3wajigF25H0&index=0&count=10' ``` -------------------------------- ### Fetch Payment Accounts (cURL) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/pay/get-payerInfos-search.md This example shows how to use cURL to fetch payment account details. It includes all necessary query parameters such as accessToken, ids, names, cardNos, start, count, and active status. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v4/payerInfos/search?accessToken=ID01u8vU7V5leC%3ATdk3tgber501v0&ids=&names=&cardNos=&start=0&count=10&active=true' ``` -------------------------------- ### CURL Example for Department Retrieval Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/contacts/get-departments-idOrCode.md This is a command-line example using cURL to fetch department information. It specifies the GET request, the API endpoint with a placeholder for the department ID or code, and includes required query parameters like accessToken and departmentBy. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1/departments/$JOYbpjPP-E2Q00:pAwbwH_W7sec00?accessToken=z0wbwXPo6sf400&departmentBy=id' \ --header 'content-type: application/json' \ --header 'Accept: application/json' ``` -------------------------------- ### Shell: CURL Request to Get Document Templates Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/forms/get-template-list.md This example shows how to use cURL to make a GET request to the document template API. It includes the necessary endpoint URL, the accessToken for authentication, and sets the content type and Accept headers to application/json. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/specifications?accessToken=f8QbuH2hwQ5E00' \ --header 'content-type: application/json' \ --header 'Accept: application/json' ``` -------------------------------- ### Fetch Task Logs using CURL Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/get-flow-backlog-byId.md This example shows how to use `curl` to make a GET request to the API endpoint for fetching task logs. It includes the necessary `accessToken` and `flowId` as query parameters. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1.1/flowDetails/allLogs?accessToken=ID_3zYtLIa1$gM:bwa3wajigF0WH0&flowId=ID_3zJ05rt0DY0' ``` -------------------------------- ### Fetch Document Details by Code (CURL) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/get-forms-details-byCode.md This example shows how to use CURL to make a GET request to the API endpoint for fetching document details by its code. It includes necessary query parameters like 'code' and 'accessToken'. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1.1/flowDetails/byCode?code=S21000002&accessToken=ID_3uTOGXa04Vw:PCx3rwm3aA00qM' ``` -------------------------------- ### Fetch Settlement Methods List (CURL) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink-extend/get-settlement-list.md This example shows how to fetch the settlement methods list using a CURL command. It requires a valid accessToken to be appended as a query parameter. The output is a JSON object containing an 'items' array, where each item represents a settlement method. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/settlement?accessToken=gLQbAz0Rs44E00' ``` -------------------------------- ### Get Travel Data Example Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink/get-tripManager-order.md Example of retrieving travel data, including flight details and order information. ```APIDOC ## GET /api/travel/data ### Description Retrieves travel data, including flight details, order information, and passenger details. ### Method GET ### Endpoint /api/travel/data ### Query Parameters - **entityId** (string) - Required - The unique identifier for the travel management business object. - **count** (integer) - Optional - The number of records to retrieve. Defaults to 50. Maximum is 100. ### Request Example ```json { "entityId": "61570b9edcc64ec09c00", "count": 50 } ``` ### Response #### Success Response (200) - **dataLink** (object) - Contains detailed travel information. - **E_79180b9ed9cade87e000_code** (string) - Unique code for the travel record. - **E_79180b9ed9cade87e000_name** (string) - Name associated with the travel record. - **E_79180b9ed9cade87e000_票号** (string) - Ticket number. - **E_79180b9ed9cade87e000_出发地** (string) - Departure location (JSON string). - **E_79180b9ed9cade87e000_出行人** (array) - List of passengers. - **E_79180b9ed9cade87e000_到达地** (string) - Arrival location (JSON string). - **E_79180b9ed9cade87e000_航班号** (string) - Flight number. - **E_79180b9ed9cade87e000_订单号** (string) - Order number. - **E_79180b9ed9cade87e000_订票人** (string) - Booker's name. - **E_79180b9ed9cade87e000_关联行程** (string) - Associated itinerary. - **E_79180b9ed9cade87e000_出发时间** (integer) - Departure timestamp. - **E_79180b9ed9cade87e000_出发机场** (string) - Departure airport. - **E_79180b9ed9cade87e000_出行类型** (string) - Type of travel. - **E_79180b9ed9cade87e000_到达时间** (integer) - Arrival timestamp. - **E_79180b9ed9cade87e000_到达机场** (string) - Arrival airport. - **E_79180b9ed9cade87e000_支付方式** (string) - Payment method. - **E_79180b9ed9cade87e000_是否超标** (string) - Indicates if the travel exceeds limits. - **E_79180b9ed9cade87e000_航空公司** (string) - Airline name. - **E_79180b9ed9cade87e000_舱位类型** (string) - Cabin class. - **E_79180b9ed9cade87e000_订单备注** (string) - Order remarks. - **E_79180b9ed9cade87e000_订单日期** (integer) - Order timestamp. - **E_79180b9ed9cade87e000_订单状态** (string) - Order status. - **E_79180b9ed9cade87e000_订单类型** (string) - Order type. - **E_79180b9ed9cade87e000_订单金额** (object) - Order amount details. - **standard** (string) - The amount. - **standardUnit** (string) - The currency unit. - **standardScale** (integer) - The scale for the amount. - **standardSymbol** (string) - The currency symbol. - **standardNumCode** (string) - The numeric currency code. - **standardStrCode** (string) - The string currency code. - **E_79180b9ed9cade87e000_订票平台** (string) - Booking platform. - **E_79180b9ed9cade87e000_证件信息** (string) - Identification information. - **E_79180b9ed9cade87e000_证件类型** (string) - Type of identification. - **E_79180b9ed9cade87e000_超标原因** (string) - Reason for exceeding limits. - **E_79180b9ed9cade87e000_出行人类型** (string) - Type of traveler. - **E_79180b9ed9cade87e000_申请单编号** (string) - Application form number. - **active** (boolean) - Indicates if the record is active. - **updateTime** (integer) - Timestamp of the last update. - **createTime** (integer) - Timestamp of creation. - **entityId** (string) - The unique identifier for the travel management business object. #### Response Example ```json { "dataLink": [ { "id": "bqAc20Y4W88M00", "useCount": 0, "totalCount": 1, "ownerId": null, "visibility": { "fullVisible": false, "staff": [], "department": [], "role": [] }, "E_79180b9ed9cade87e000_code": "14131699836", "E_79180b9ed9cade87e000_name": "AECCHDE_463749_20201126", "E_79180b9ed9cade87e000_票号": "784-4860574401", "E_79180b9ed9cade87e000_出发地": "[{{\"key\":\"704\",\"label\":\"哈尔滨市\"}}]", "E_79180b9ed9cade87e000_出行人": [], "E_79180b9ed9cade87e000_到达地": "[{{\"key\":\"876\",\"label\":\"南京市\"}}]", "E_79180b9ed9cade87e000_航班号": "CZ3266", "E_79180b9ed9cade87e000_订单号": "14131699836", "E_79180b9ed9cade87e000_订票人": null, "E_79180b9ed9cade87e000_关联行程": null, "E_79180b9ed9cade87e000_出发时间": 1607931600000, "E_79180b9ed9cade87e000_出发机场": "太平机场", "E_79180b9ed9cade87e000_出行类型": "-", "E_79180b9ed9cade87e000_到达时间": 1607942700000, "E_79180b9ed9cade87e000_到达机场": "禄口机场", "E_79180b9ed9cade87e000_支付方式": "企业支付", "E_79180b9ed9cade87e000_是否超标": "", "E_79180b9ed9cade87e000_航空公司": "", "E_79180b9ed9cade87e000_舱位类型": "经济舱", "E_79180b9ed9cade87e000_订单备注": "", "E_79180b9ed9cade87e000_订单日期": 1607839276000, "E_79180b9ed9cade87e000_订单状态": "出票", "E_79180b9ed9cade87e000_订单类型": "出票", "E_79180b9ed9cade87e000_订单金额": { "standard": "1807.00", "standardUnit": "元", "standardScale": 2, "standardSymbol": "¥", "standardNumCode": "156", "standardStrCode": "CNY" }, "E_79180b9ed9cade87e000_订票平台": "携程商旅", "E_79180b9ed9cade87e000_证件信息": "232127**********17", "E_79180b9ed9cade87e000_证件类型": "身份证", "E_79180b9ed9cade87e000_超标原因": "", "E_79180b9ed9cade87e000_出行人类型": "", "E_79180b9ed9cade87e000_申请单编号": "S20001096", "active": true, "updateTime": 1677753063538, "createTime": 1677753063532, "entityId": "61570b9edcc64ec09c00" } ] } ``` ``` -------------------------------- ### CURL Command for Enterprise Product Authorizations Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/tools/get-charge-powers.md This is a CURL command example to fetch enterprise product authorization information. It shows how to include the `accessToken` in the URL for authentication. Replace the placeholder `accessToken` with a valid token. ```shell curl --location 'https://app.ekuaibao.com/api/openapi/v1/charge/powers/list?accessToken=ID01rThj8ursd8%3ATdk3tgber501v0' ``` -------------------------------- ### Getting Started API Endpoints Source: https://github.com/ekuaibao/open-platform-docs/blob/main/updateLog/update-log.md Endpoints related to authentication and authorization. ```APIDOC ## GET /api/getting-started/temp-auth ### Description Accesses temporary authorization. Supports different `pageType` values for various pages and `authType` for different authorization methods. ### Method GET ### Endpoint /api/getting-started/temp-auth ### Parameters #### Query Parameters - **pageType** (string) - Optional - The type of page to access (`edit`, `payment`). - **authType** (string) - Optional - The type of authorization (`payment`, `new`, `mall`, `backlogDetail`). ### Response #### Success Response (200) - **accessToken** (string) - The temporary access token. #### Response Example { "accessToken": "temp-token-xyz" } ``` ```APIDOC ## GET /api/getting-started/auth ### Description Obtains an authorization token. Includes a fix for HTTP403 errors by providing a delay before returning the `accessToken`. ### Method GET ### Endpoint /api/getting-started/auth ### Response #### Success Response (200) - **accessToken** (string) - The authorization access token. #### Response Example { "accessToken": "auth-token-abc" } ``` -------------------------------- ### GET /api/openapi/v1/departments/external/department Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/corporation/get-external-department.md Retrieves a list of external departments. Supports pagination with 'start' and 'count' parameters. ```APIDOC ## GET /api/openapi/v1/departments/external/department ### Description Retrieves a list of external departments. This endpoint is useful for managing and viewing external entities associated with your organization. ### Method GET ### Endpoint /api/openapi/v1/departments/external/department ### Parameters #### Query Parameters - **accessToken** (String) - Required - Authentication token. Obtain this via the [Get Authorization](/docs/open-api/getting-started/auth) endpoint. - **start** (Number) - Required - The starting index for pagination. Note that the sequence begins at 0. - **count** (Number) - Required - The number of records to retrieve. Maximum value is 100. ### Request Example ```json { "accessToken": "YOUR_ACCESS_TOKEN", "start": 0, "count": 10 } ``` ### Response #### Success Response (200) - **count** (Number) - The total number of items returned. - **items** (Array) - An array of department objects. - **id** (String) - Unique identifier for the department. - **name** (String) - Name of the department. - **parentId** (String) - ID of the parent department, if any. - **active** (Boolean) - Indicates if the department is active. - **code** (String) - Department code. - **updateTime** (String) - Timestamp of the last update. - **createTime** (String) - Timestamp of creation. - **form** (Object/null) - Form data associated with the department. - **order** (Number) - Order of the department. #### Response Example ```json { "count": 2, "items": [ { "id": "xgJ3wajigF25H0:ID_3wajigF2aH0:external", "name": "外部人员", "parentId": "", "active": true, "code": "", "updateTime": "2022-01-12 14:42:56", "createTime": "2022-01-12 14:42:56", "form": null, "order": 0 }, { "id": "xgJ3wajigF25H0:ID01w4CBfaWeTB:external", "name": "外部1", "parentId": "xgJ3wajigF25H0:ID_3wajigF2aH0:external", "active": true, "code": "002", "updateTime": "2023-08-23 18:03:21", "createTime": "2023-08-23 18:03:21", "form": null, "order": 0 } ] } ``` #### Error Response (403) - **HTTP Status Code**: 403 - **Error Code**: - - **Description**: Unauthorized. This could be due to an expired `accessToken` or an incorrect base URL. - **Troubleshooting**: Ensure your `accessToken` is valid and has not expired. Verify that the base URL matches your enterprise environment. ``` -------------------------------- ### CURL Example for App Authorization Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/getting-started/platform-auth.md This example shows how to use CURL to send a POST request to the authorization endpoint. It includes the necessary headers and the JSON payload containing `appKey` and `appSecret`. ```bash curl --location --request POST 'https://unity.ekuaibao.com/api/realms/auth' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "appKey":"xxxx-xxxx-xxx-xxxxx", \ "appSecret":"xxxx-xxxx-xxx-xxxxx" \ }' ``` -------------------------------- ### Fetch Self-Built Applications (cURL) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink/get-platform.md This cURL command shows how to make a GET request to the self-built application list API. It includes the necessary accessToken, start, and count query parameters. The command demonstrates a typical request that can be made from a command-line interface. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/datalink/getPlatform?accessToken=ID_3IKBuO50jT0:xgJ3wajigF25H0&start=0&count=10' \ --header 'content-type: application/json' ``` -------------------------------- ### Fetch City Group List using CURL Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/city/get-city-group.md This example shows how to fetch the city group list using a CURL command. It includes the necessary URL with placeholders for accessToken and keyword, demonstrating a typical request. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1/cityGroup/search?accessToken=ID_3wA7iWV0ac0:Urf3lsFgBp00gw&keyword=22' ``` -------------------------------- ### 获取自定义档案项 API 请求示例 Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/dimensions/get-dimension-items-visibility.md 展示了如何使用 cURL 发送 GET 请求以获取自定义档案项。请求需要提供 accessToken、分页起始位置 start 和查询条数 count 参数。 ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1/dimensions/items/withVisibility?accessToken=hQgbxfJnlElc00&start=0&count=100' --header 'content-type: application/json' --header 'Accept: application/json' ``` -------------------------------- ### 获取成本中心实例数据 CURL 请求示例 Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink-extend/get-costcenter-instance.md 通过 CURL 命令调用 GET 接口获取成本中心实例数据。该请求需要提供 accessToken、查询类型 type 以及分页参数 start 和 count。 ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v1/travel/costCenter/getInstanceData?accessToken=ZgQc4GFXqQb400&type=businessObject&start=0&count=10' ``` -------------------------------- ### CURL Command for Invoice Details Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink-extend/get-entity-invoic-details.md This is a command-line example using CURL to fetch invoice details. It shows the full URL including the invoice ID and the accessToken as query parameters, demonstrating how to interact with the API from a terminal or script. ```shell curl --location --request POST 'https://app.ekuaibao.com/api/openapi/v2/extension/INVOICE/object/invoice/0aM9AbvdhI0400:011001900111:07517347/detail?accessToken=w3UbyyG1Xsfc00' ``` -------------------------------- ### GET /api/openapi/v2/datalink/getPlatform Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/datalink/get-platform.md Retrieves a list of self-built applications. Only enabled applications are returned. Supports pagination with `start` and `count` parameters. ```APIDOC ## GET /api/openapi/v2/datalink/getPlatform ### Description Retrieves a list of self-built applications. Only enabled applications are returned. Supports pagination with `start` and `count` parameters. ### Method GET ### Endpoint /api/openapi/v2/datalink/getPlatform ### Parameters #### Query Parameters - **accessToken** (String) - Required - Authentication token. Obtain via [Get Authorization](/docs/open-api/getting-started/auth). - **start** (Number) - Optional - Data start index for pagination. Defaults to 0. - **count** (Number) - Optional - Number of items per page. Maximum is 100. Defaults to 20. ### Request Example ```json { "accessToken": "YOUR_ACCESS_TOKEN", "start": 0, "count": 10 } ``` ### Response #### Success Response (200) - **count** (Number) - The total number of applications returned. - **items** (Array) - An array of application objects. - **pipeline** (Number) - Pipeline identifier. - **grayver** (String) - Gray version string. - **version** (Number) - Application version. - **active** (Boolean) - Whether the application is enabled. - **createTime** (Number) - Timestamp of application creation. - **updateTime** (Number) - Timestamp of application update. - **name** (String) - Name of the application. - **nameSpell** (String) - Phonetic spelling of the application name. - **code** (String) - Application code. - **corporationId** (String) - Identifier of the corporation. - **sourceCorporationId** (Null) - Source corporation ID (currently null). - **dataCorporationId** (Null) - Data corporation ID (currently null). - **icon** (Null) - Application icon (currently null). - **id** (String) - Unique identifier of the application. - **importMethod** (Array) - Data import methods. - **adminIds** (Array) - List of administrator IDs. - **type** (String) - Type of the application (e.g., "DATA_LINK", "DETAILS"). - **groupType** (String) - Group type of the application (e.g., "NORMAL", "SPECIAL"). - **properties** (Null) - Application properties (currently null). - **desc** (String) - Description or remarks for the application. - **source** (String) - Source of the application (e.g., "CUSTOM_CREATE"). #### Response Example ```json { "count": 2, "items": [ { "pipeline": 1, "grayver": "9.20.0.0:A", "version": 3, "active": true, "createTime": 1649405531157, "updateTime": 1649748781020, "name": "测试", "nameSpell": "CESHI", "code": "", "corporationId": "xgJ3wajigF25H0", "sourceCorporationId": null, "dataCorporationId": null, "icon": null, "id": "ID_3D5AKtl07$g", "importMethod": [], "adminIds": [ "xgJ3wajigF25H0:dbc3wajigF1UH0", "xgJ3wajigF25H0:Xfi3D10oPJ6DqM" ], "type": "DATA_LINK", "groupType": "NORMAL", "properties": null, "desc": "", "source": "CUSTOM_CREATE" }, { "pipeline": 1, "grayver": "9.8.0.0:A", "version": 1, "active": true, "createTime": 1641969769414, "updateTime": 1641969769414, "name": "消费明细", "nameSpell": "XIAOFEIMINGXI", "code": "", "corporationId": "xgJ3wajigF25H0", "sourceCorporationId": null, "dataCorporationId": null, "icon": null, "id": "ID_3w9HsnE2jq0", "importMethod": [], "adminIds": [], "type": "DETAILS", "groupType": "SPECIAL", "properties": null, "desc": "", "source": "CUSTOM_CREATE" } ] } ``` ### Error Handling #### Failure Response - **400** - `count` parameter cannot be greater than 100. The `count` (items per page) value must not exceed 100. ``` -------------------------------- ### Fetch Company Currency Info (CURL) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/currency/get-currency.md This command-line example shows how to retrieve currency information using cURL. It sends a GET request to the specified API endpoint, including the necessary accessToken as a query parameter. The output is a JSON object detailing the active currencies. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2.1/currency?accessToken=XRcbwWBTassg00' ``` -------------------------------- ### 获取业务对象台账字段接口调用 Source: https://github.com/ekuaibao/open-platform-docs/blob/main/inside/get-entity-ledgerConfig.md 通过GET请求获取业务对象台账字段的详细配置。请求需要提供entityId作为路径参数,并携带有效的accessToken进行认证。 ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/datalink/ledger/ledgerEntityId/$d1102ef381c4fb15cbc0?accessToken=ID01uxhO1GK8Ps%3ATdk3tgber501v0' ``` -------------------------------- ### Department Field Example (JSON) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/creat-and-save-v2.0.md Shows how to specify a department using its ID. Department IDs can be retrieved from the 'Get Departments' API. ```json { "u_Z部门": "PCx3rwm3aA00qM" } ``` -------------------------------- ### 获取委托审批授权数据接口调用 Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/delegate/get-delegate-list.md 通过GET请求调用委托审批授权查询接口。该接口需要传入有效的accessToken作为查询参数,返回企业下所有委托审批授权的详细信息。 ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/organization/delegate/approve?accessToken=cCMbw_mKUs8c00' ``` -------------------------------- ### API Request Example - POST /api/openapi/v1.1/staffs/staffCustom Source: https://github.com/ekuaibao/open-platform-docs/blob/main/inside/get-staffs-staffCustom.md This snippet demonstrates how to make a POST request to the /api/openapi/v1.1/staffs/staffCustom endpoint to query staff information based on custom fields. It includes the necessary headers and a JSON body with example custom fields. ```javascript import Control from "@theme/Control"; ``` ```curl curl --location 'https://app.ekuaibao.com/api/openapi/v1.1/staffs/staffCustom?accessToken=ID01oHJO0qquuj%3ADgM3w5DRQ401Iw' \ --header 'Content-Type: application/json' \ --data '{ //多个参数一起查询是【AND】关系,建议使用一个参数查询 "u_test": "1221", "postType": "ID01kzYgKIe0AD", "u_测试1": "12211221", "base": "[{{\"key\":\"8\",\"label\":\"北京市/海淀区\"}}]" }' ``` -------------------------------- ### Date Range Field Example (JSON) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/creat-and-save-v2.0.md Defines a date range using Unix timestamps for both start and end dates. Timestamps should be in milliseconds. ```json { "u_日期范围": { "start": 1562036426574, "end": 1562036426574 } } ``` -------------------------------- ### Fetch Payer Info List - CURL Example Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/payerInfo/get-payerInfo-list.md This example shows how to call the API endpoint using CURL to get a list of payer information. The request includes the necessary accessToken as a query parameter. The response is a JSON object containing an array of payer details. ```shell curl --location --request GET 'https://app.ekuaibao.com/api/openapi/v2/payerinfo/list?accessToken=ID01mjXV51aneL:ZrZ3BRy2ms0g6g' ``` -------------------------------- ### API Request: Get Loan Package Info (JavaScript) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/get-flow-byLoanInfoId.md This snippet demonstrates how to make a GET request to the /api/openapi/v1/loan/loanInfo/{id} endpoint using a Control component. It requires a loan package ID as a path parameter and an accessToken as a query parameter. The response will contain detailed information about the specified loan package. ```javascript import Control from "@theme/Control"; ``` -------------------------------- ### City Field Type Example (JSON) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/versioned_docs/version-v2.2/open-api/flows/creat-and-save.md Provides an example for the city field type. The value is typically an array of objects, where each object contains a 'key' (city ID) and 'label' (city name). City data can be fetched using the 'get basedata city' API. ```json "u_测试城市": "[{"key":"3","label":"北京市/东城区"}]" ``` -------------------------------- ### Failed API Response Example (No Data Found) Source: https://github.com/ekuaibao/open-platform-docs/blob/main/inside/get-invoice-ZLBP-list.md This example illustrates a successful HTTP request that returns no data. The 'items' array is empty, indicating that the query parameters did not match any records. This is a common scenario when searching for specific data. ```json { "items": [] } ```