### Order List Response Example Source: https://cdp-docs.linkflowtech.com/index Provides an example of the JSON response structure when successfully retrieving a list of orders. The response includes detailed information for each order, such as creation date, status, pricing, and line items. ```json [ { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180802, "props": {}, "tenantId": 1, "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderId": "433", "orderStatus": "SELLER_CONSIGNED_PART", "orderOuterStatus": "SELLER_CONSIGNED_PART", "orderSource": "other", "payType": "优惠兑换", "payDate": "2022-11-28 10:33:45", "orderDate": "2022-11-28 10:33:44", "totalPrice": 100.240, "paymentPrice": 123.456, "refundPrice": 0.000, "successDate": "2022-11-28 10:33:45", "cancelDate": "2022-11-28 10:33:45", "cancelType": "2", "storeName": "微商城", "storeId": "111111", "paymentId": "1", "receiverName": "1", "deliveryProvince": "吉林省", "deliveryCity": "四平市", "deliveryDistrict": "梨树县222", "deliveryAddress": "1", "receiverMobile": "12345678901", "totalQuantity": 1, "orderType": "普通订单", "isPresale": "是", "presaleStatus": "XXX", "isMemberOrder": "是", "storeCardUsed": 100, "deliveryDate": "2022-11-28 10:33:45", "guideCode": "1A2S3D", "lines": [ { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180803, "props": {}, "tenantId": 1, "orderId": "433", "lineId": "L202210ddzda28", "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderDate": "2022-11-28 10:33:44", "itemTotalPrice": 0.000, "itemPaymentPrice": 0.000, "quantity": 2, "refundQuantity": 0, "refundPrice": 92.000, "brandName": "1", "category": "1", "productName": "维生素C1", "productAlias": "111111", "itemId": "111111", "itemNo": "1", "outerItemNo": "1", "price": 50.12, "skuName": "数量:1瓶", "skuId": "1", "skuNo": "1", "isPresent": "false", "refundType": "退款-商家主动退款", "refundStatus": "退货退款", "lineStatus": "退货退款", "categoryId": "123", "itemMealId": "123", "itemMealName": "111111", "isEstimate": "是" } ] }, { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180804, "props": {}, "tenantId": 1, "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderId": "882", "orderStatus": "SELLER_CONSIGNED_PART", "orderOuterStatus": "SELLER_CONSIGNED_PART", "orderSource": "other", "payType": "优惠兑换", "payDate": "2022-11-28 10:33:45", "orderDate": "2022-11-28 10:33:44", "totalPrice": 100.240, "paymentPrice": 123.456, "refundPrice": 0.000, "successDate": "2022-11-28 10:33:45", "cancelDate": "2022-11-28 10:33:45", "cancelType": "2", "storeName": "微商城", "storeId": "111111", "paymentId": "1", "receiverName": "1", "deliveryProvince": "吉林省", "deliveryCity": "四平市", "deliveryDistrict": "梨树县222", "deliveryAddress": "1", "receiverMobile": "12345678901", "totalQuantity": 1, "orderType": "普通订单", "isPresale": "是", "presaleStatus": "XXX", "isMemberOrder": "是", "storeCardUsed": 100, "deliveryDate": "2022-11-28 10:33:45", "guideCode": "1A2S3D", "lines": [ { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180805, "props": {}, "tenantId": 1, "orderId": "882", "lineId": "L202210ddzda28", "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderDate": "2022-11-28 10:33:44", "itemTotalPrice": 0.000, "itemPaymentPrice": 0.000, } ] } ] ``` -------------------------------- ### Get Order List with Pagination and Date Filters Source: https://cdp-docs.linkflowtech.com/index Fetches a paginated list of orders, allowing filtering by start and end times. This endpoint supports `page` for pagination and requires `X-OpenApi-Token` for authentication. ```http GET /open/orders?page=2&startTime=2023-01-01%2015%3A44%3A20&endTime=2024-03-16%2015%3A44%3A20 HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### Query Contact by ID - Response Example (HTTP) Source: https://cdp-docs.linkflowtech.com/index Example of a successful response when querying for a contact. A successful request returns an HTTP 200 OK status code followed by the contact's ID. If the contact is not found, the response body will be null. ```http HTTP/1.1 200 OK 703941987164160 ``` -------------------------------- ### Report Response Example Source: https://cdp-docs.linkflowtech.com/index Example JSON response structure for a report API call, detailing status, chart information (including specific y-axis settings), measures, dimensions, and result data. ```JSON { "status": 1, "reportName": "test", //报表名称 "chartType": "TWO_YAXIS", //图标样式 "chart": { "type": "TWO_YAXIS", "display": "双轴图", "yaxisChartTypeSetting": {//只有双轴图有这个属性 "left": "BAR", "right": "LINE", "leftDisplay": "时间柱状图", "rightDisplay": "折线" } }, "measures": [ "任意事件的总次数", "创建订单的总次数" ], "dimensions": [ { "field": "#{contact.gender}", "fieldType": "text", "fieldLabel": "性别" } ], "result": [ { "dateList": [ "2024-05-20", "2024-05-21", "2024-05-22", "2024-05-23", "2024-05-24", "2024-05-25", "2024-05-26" ], "dimRsList": [ { "dim": [ "总体" ], "rs": [ [ "0" ], [ "0" ], [ "0" ], [ "0" ], [ "0" ], [ "0" ], [ "0" ] ], "summary": [ "0" ] } ] } ] } ``` -------------------------------- ### Query Channel Identities by Contact ID - Response Example (HTTP) Source: https://cdp-docs.linkflowtech.com/index Example of a successful response when querying for channel identities associated with a contact. A successful request returns an HTTP 200 OK status code followed by a JSON array of channel identity objects. ```json HTTP/1.1 200 OK [ { "dateCreated": "2022-05-23 11:27:08", "lastUpdated": "2022-05-23 11:27:08", "ver": 2, "id": 140992033742850, "contactId": 703941987164160, "channelId": 140926029029409, "isActive": true, "channel": { "dateCreated": "2022-07-19 09:53:24", "lastUpdated": "2022-10-21 16:06:52", "ver": 55, "id": 140926029029409, "channelId": "ww0b8772cfc1ed757c", "channelType": "WORKWECHAT_PRO", "name": "钢铁侠", "status": "ACTIVE", "propertyVersion": "0", "tenantId": 1, "orgId": "1" } }, { "dateCreated": "2022-05-23 11:27:08", "lastUpdated": "2022-05-23 11:27:08", "ver": 2, "id": 140992033873922, "contactId": 703941987164160, "channelId": 140879002099713, "isActive": true, "channel": { "dateCreated": "2022-05-13 11:54:24", "lastUpdated": "2022-08-30 11:56:10", "ver": 5, "id": 140879002099713, "channelId": "wx13b37f13976645ac", "channelType": "WECHAT", "name": "Linkflow体验账号", "status": "ACTIVE", "propertyVersion": "0", "tenantId": 1, "orgId": "1" } } ] ``` -------------------------------- ### Retrieve Orders via HTTP GET Source: https://cdp-docs.linkflowtech.com/index Fetches order data using the GET /open/orders endpoint. Requires an X-OpenApi-Token header. Supports cursor-based (lastMaxId) or time-range/pagination-based (startTime, endTime, page) retrieval. ```HTTP GET /open/orders ### Headers Parameter | Description ---|--- X-OpenApi-Token | 通过App Key和App Secret换取的Access Token ### Request Params Parameter | Required | Default | Type | Description ---|---|---|---|--- lastMaxId | false | | Long | 游标ID,取上一批返回列表数据的最后一条ID字段值,第一次调用可以传0 startTime | false | | datetime | yyyy-MM-dd HH:mm:ss格式,需要做urlEncode,时间开始闭区间,会与订单更新时间做匹配,大于等于关系 endTime | false | | datetime | yyyy-MM-dd HH:mm:ss格式,需要做urlEncode,时间结束开区间,会与订单更新时间做匹配,小于关系 page | false | | Integer | 页数,最小从1开始,不超过100页 传入lastMaxId为游标模式 传入startTime,endTime,page为分页模式 ### Error Code HTTP Status Code | Parameter | Description ---|---|--- 500 | B00093 | 超过最大页数 ``` -------------------------------- ### GET /open/orders Source: https://cdp-docs.linkflowtech.com/index Retrieves a list of orders. Supports filtering by `lastMaxId`, `page`, `startTime`, and `endTime`. ```APIDOC ## GET /open/orders ### Description Retrieves a list of orders with optional filtering parameters. ### Method GET ### Endpoint /open/orders ### Parameters #### Query Parameters - **lastMaxId** (integer) - Optional - Filters orders with IDs less than or equal to this value. - **page** (integer) - Optional - Specifies the page number for pagination. - **startTime** (string) - Optional - Filters orders created after this timestamp (YYYY-MM-DD HH:MM:SS). - **endTime** (string) - Optional - Filters orders created before this timestamp (YYYY-MM-DD HH:MM:SS). ### Request Example ``` GET /open/orders?lastMaxId=100 HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` ``` GET /open/orders?page=2&startTime=2023-01-01%2015%3A44%3A20&endTime=2024-03-16%2015%3A44%3A20 HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` ### Response #### Success Response (200) - **dateCreated** (string) - The date and time when the order was created. - **lastUpdated** (string) - The date and time when the order was last updated. - **ver** (integer) - The version of the order record. - **id** (integer) - The unique identifier for the order. - **props** (object) - Additional properties for the order. - **tenantId** (integer) - The identifier of the tenant. - **saleChannel** (string) - The sales channel of the order. - **channelId** (integer) - The ID of the sales channel. - **contactId** (integer) - The ID of the contact associated with the order. - **orderId** (string) - The order number. - **orderStatus** (string) - The current status of the order. - **orderOuterStatus** (string) - The external order status. - **orderSource** (string) - The source of the order. - **payType** (string) - The payment method used. - **payDate** (string) - The date and time of payment. - **orderDate** (string) - The date and time the order was placed. - **totalPrice** (number) - The total price of the order. - **paymentPrice** (number) - The amount paid for the order. - **refundPrice** (number) - The total refund amount for the order. - **successDate** (string) - The date and time the order was successfully processed. - **cancelDate** (string) - The date and time the order was cancelled. - **cancelType** (string) - The type of cancellation. - **storeName** (string) - The name of the store where the order was placed. - **storeId** (string) - The ID of the store. - **paymentId** (string) - The payment transaction ID. - **receiverName** (string) - The name of the receiver. - **deliveryProvince** (string) - The province of the delivery address. - **deliveryCity** (string) - The city of the delivery address. - **deliveryDistrict** (string) - The district of the delivery address. - **deliveryAddress** (string) - The detailed delivery address. - **receiverMobile** (string) - The mobile number of the receiver. - **totalQuantity** (integer) - The total quantity of items in the order. - **orderType** (string) - The type of the order. - **isPresale** (string) - Indicates if it's a presale order. - **presaleStatus** (string) - The status of the presale order. - **isMemberOrder** (string) - Indicates if it's a member order. - **storeCardUsed** (integer) - The amount used from store card. - **deliveryDate** (string) - The date and time of delivery. - **guideCode** (string) - The guide code associated with the order. - **lines** (array) - An array of order line items. - **dateCreated** (string) - The date and time when the order line item was created. - **lastUpdated** (string) - The date and time when the order line item was last updated. - **ver** (integer) - The version of the order line item record. - **id** (integer) - The unique identifier for the order line item. - **props** (object) - Additional properties for the order line item. - **tenantId** (integer) - The identifier of the tenant. - **orderId** (string) - The order ID this line item belongs to. - **lineId** (string) - The unique identifier for the order line item. - **saleChannel** (string) - The sales channel of the order line item. - **channelId** (integer) - The ID of the sales channel. - **contactId** (integer) - The ID of the contact associated with the order line item. - **orderDate** (string) - The date and time the order was placed. - **itemTotalPrice** (number) - The total price of the item. - **itemPaymentPrice** (number) - The amount paid for the item. - **quantity** (integer) - The quantity of the item. - **refundQuantity** (integer) - The quantity refunded for this item. - **refundPrice** (number) - The refund price for this item. - **brandName** (string) - The brand name of the product. - **category** (string) - The category of the product. - **productName** (string) - The name of the product. - **productAlias** (string) - The alias of the product. - **itemId** (string) - The ID of the item. - **itemNo** (string) - The item number. - **outerItemNo** (string) - The external item number. - **price** (number) - The price of the item. - **skuName** (string) - The name of the SKU. - **skuId** (string) - The ID of the SKU. - **skuNo** (string) - The SKU number. - **isPresent** (string) - Indicates if the item is present. - **refundType** (string) - The type of refund. - **refundStatus** (string) - The status of the refund. - **lineStatus** (string) - The status of the order line item. - **categoryId** (string) - The category ID of the item. - **itemMealId** (string) - The meal ID of the item. - **itemMealName** (string) - The name of the meal. - **isEstimate** (string) - Indicates if it's an estimate. #### Response Example ```json [ { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180802, "props": {}, "tenantId": 1, "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderId": "433", "orderStatus": "SELLER_CONSIGNED_PART", "orderOuterStatus": "SELLER_CONSIGNED_PART", "orderSource": "other", "payType": "优惠兑换", "payDate": "2022-11-28 10:33:45", "orderDate": "2022-11-28 10:33:44", "totalPrice": 100.240, "paymentPrice": 123.456, "refundPrice": 0.000, "successDate": "2022-11-28 10:33:45", "cancelDate": "2022-11-28 10:33:45", "cancelType": "2", "storeName": "微商城", "storeId": "111111", "paymentId": "1", "receiverName": "1", "deliveryProvince": "吉林省", "deliveryCity": "四平市", "deliveryDistrict": "梨树县222", "deliveryAddress": "1", "receiverMobile": "12345678901", "totalQuantity": 1, "orderType": "普通订单", "isPresale": "是", "presaleStatus": "XXX", "isMemberOrder": "是", "storeCardUsed": 100, "deliveryDate": "2022-11-28 10:33:45", "guideCode": "1A2S3D", "lines": [ { "dateCreated": "2023-03-16 15:48:41", "lastUpdated": "2023-03-16 15:48:41", "ver": 1, "id": 144357503180803, "props": {}, "tenantId": 1, "orderId": "433", "lineId": "L202210ddzda28", "saleChannel": "有赞", "channelId": 63, "contactId": 706402597617664, "orderDate": "2022-11-28 10:33:44", "itemTotalPrice": 0.000, "itemPaymentPrice": 0.000, "quantity": 2, "refundQuantity": 0, "refundPrice": 92.000, "brandName": "1", "category": "1", "productName": "维生素C1", "productAlias": "111111", "itemId": "111111", "itemNo": "1", "outerItemNo": "1", "price": 50.12, "skuName": "数量:1瓶", "skuId": "1", "skuNo": "1", "isPresent": "false", "refundType": "退款-商家主动退款", "refundStatus": "退货退款", "lineStatus": "退货退款", "categoryId": "123", "itemMealId": "123", "itemMealName": "111111", "isEstimate": "是" } ] } ] ``` -------------------------------- ### GET /open/orders Source: https://cdp-docs.linkflowtech.com/index Retrieves a list of orders. Supports both cursor-based pagination (using `lastMaxId`) and traditional pagination (using `startTime`, `endTime`, and `page`). ```APIDOC ## GET /open/orders ### Description Retrieves a list of orders. Supports both cursor-based pagination (using `lastMaxId`) and traditional pagination (using `startTime`, `endTime`, and `page`). ### Method GET ### Endpoint /open/orders ### Headers - **X-OpenApi-Token** (string) - Required - Access Token obtained through App Key and App Secret. ### Query Parameters - **lastMaxId** (Long) - Optional - Cursor ID for fetching the next batch of data. Use 0 for the first call. - **startTime** (datetime) - Optional - Start time in 'yyyy-MM-dd HH:mm:ss' format (URL encoded). Orders with update time greater than or equal to this time. - **endTime** (datetime) - Optional - End time in 'yyyy-MM-dd HH:mm:ss' format (URL encoded). Orders with update time less than this time. - **page** (Integer) - Optional - Page number, starting from 1. Maximum 100 pages. *Note: Use `lastMaxId` for cursor mode. Use `startTime`, `endTime`, and `page` for pagination mode.* ### Error Codes - **500 B00093**: Exceeded maximum page number. ``` -------------------------------- ### Get Folder List Source: https://cdp-docs.linkflowtech.com/index Retrieves a list of tag folders, which are used for organizing tags. ```APIDOC ## Get Folder List ### Description Retrieves a list of tag folders, which are used for organizing tags. ### Method GET ### Endpoint /open/folders ### Response Example (200 OK) ```json [ { "id": 175, "name": "测试目录名称", "domain": "TAG", "parentId": 174, //parentId为0或者该字段不存在表示为根目录 "dateCreated": "2024-11-08 15:03:10", "lastUpdated": "2024-11-08 15:03:10" } ] ``` ``` -------------------------------- ### Batch Get Contact Details API Request Source: https://cdp-docs.linkflowtech.com/index This code snippet demonstrates how to make a GET request to the /open/contacts_bulk endpoint to retrieve details for multiple contacts. It includes required headers such as User-Agent, Accept, and X-OpenApi-Token, and specifies a comma-separated list of contact IDs in the query parameters. The API supports fetching up to 100 contacts per request. ```http GET /open/contacts_bulk?ids=1,3,5,7,8&needOpenId=1 HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### Retrieve Dashboard Definition via HTTP GET Source: https://cdp-docs.linkflowtech.com/index Fetches the definition summary for a specific dashboard using the GET https://{{domain}}/open/dashboard/{dashboardId}/summary endpoint. This endpoint requires the dashboardId in the path and an X-OpenApi-Token in the header. ```HTTP GET https://{{domain}}/open/dashboard/{dashboardId}/summary ``` -------------------------------- ### GET /open/dashboard/{dashboardId}/summary Source: https://cdp-docs.linkflowtech.com/index Retrieves a summary definition for a dashboard. ```APIDOC ## GET /open/dashboard/{dashboardId}/summary ### Description Retrieves a summary definition for a dashboard. ### Method GET ### Endpoint /open/dashboard/{dashboardId}/summary ### Path Parameters - **dashboardId** (string) - Required - The ID of the dashboard. ``` -------------------------------- ### Get Tag Metadata List Source: https://cdp-docs.linkflowtech.com/index Retrieves a list of tag metadata. Supports pagination to fetch tags in manageable chunks. ```APIDOC ## Get Tag Metadata List ### Description Retrieves a list of tag metadata. Supports pagination to fetch tags in manageable chunks. ### Method GET ### Endpoint /v1/tags ### Parameters #### Query Parameters - **page** (integer) - Required - 第几页,从0开始 - **size** (integer) - Required - 每页条数,限制200条 ### Tag Type Definitions **tagType** | Description ---|--- RULE_LAYER | 自定义分层 EVENT_PROPERTY_PREFERENCES | 事件偏好 EVENT_INDICATOR | 事件指标 FIRST_LAST_TIME | 第N次特征 UPLOAD | 导入 SQL | SQL创建 EMOTION | 情感分析 ANNIVERSARY | 纪念日 TIME_INTERVAL | 间隔标签 WEIGHT | 权重标签 RFM | RFM标签 SALES_ORDER | 订单 CLV | CLV预测标签 ORDER_PROPERTY_PREFERENCES | 订单偏好 CUSTOMIZED_PREDICT | 自定义预测 LIFE_CYCLE | 生命周期 SELF_DEFINE_INDICATOR | 指标标签 ### Response Example (200 OK) ```json [ { "tagId": 2, "tagKey": "tag_878", "tagName": "用户活跃度", "dataType": "text", "tagType": "UPLOAD", "status": "ACTIVE", "folderId": 56, "dateCreated": "2017-11-30 19:37:12", "lastUpdated": "2017-11-30 19:37:12", "lastCalculateTime":"2017-11-30 20:37:12" } ] ``` ### Error Code HTTP Status Code | Parameter | Description ---|---|--- 500 | B00010 | 参数不合法 ``` -------------------------------- ### Initiate User Tag Value Calculation Task (API) Source: https://cdp-docs.linkflowtech.com/index Starts a task to calculate user tag values for a given tag key. Requires an Access Token in the header. Returns a 200 OK status upon successful initiation. ```HTTP POST /v1/tags/tagkeys/{tagKey}/calculate HTTP/1.1 Host: cdp-api.linkflowtech.com User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### GET: Query Groups Source: https://cdp-docs.linkflowtech.com/index Fetches group information based on provided query parameters such as ID, name, group type, and extended fields. This GET request requires an `X-OpenApi-Token` header. The API returns a JSON array of matching group objects, with a maximum limit of 2000 records. ```http GET /open/groups?id=126&name=wechat&groupType=static&ext1=wx134210231&ext2=wechattagid HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### GET /open/contacts Source: https://cdp-docs.linkflowtech.com/index Retrieves a list of contacts based on specified filters. Supports pagination and searching. ```APIDOC ## GET /open/contacts ### Description Retrieves a list of contacts. You can filter contacts by group and search using keywords. Pagination is supported via `page` and `size` parameters. ### Method GET ### Endpoint `https://cdp-api.linkflowtech.com/open/contacts` ### Parameters #### Query Parameters - **page** (Integer) - Optional - Default: 0 - The page number to retrieve, starting from 0. - **size** (Integer) - Optional - Default: 200 - The number of contacts to return per page. - **groupId** (Integer) - Optional - Retrieves contacts belonging to a specific group. If not provided, returns contacts from all groups. - **search** (String) - Optional - A search keyword to filter contacts by. #### Headers - **X-OpenApi-Token** (string) - Required - The access token obtained via App Key and App Secret. ### Request Example ``` GET /open/contacts?size=1&page=0&groupId=1&search=13774202819 HTTP/1.1 Host: cdp-api.linkflowtech.com X-OpenApi-Token: Access Token Accept: application/json ``` ### Response #### Success Response (200) - **Array of Contact Objects**: Returns a JSON array containing contact objects that match the query. #### Response Example ```json [ { "anonymousId": null, "name": "peter pan", "nickname": null, "gender": "unknown", "dateOfBirthday": null, "avatar": null, "mobilePhone": "13774202819", "homePhone": null, "email": null, "country": null, "state": null, "street": null, "city": null, "postalCode": null, "comments": null, "userName": null, "title": null, "website": null, "company": null, "industry": null, "department": null, "idCard": null, "utm": { "source": "source", "campaign": "campaign", "medium": "medium", "content": "content", "term": "term" }, "props": { "attr1": "单身", "attr2": 10000 }, "isAnonymous": false, "id": 2865, "dateCreated": "2017-08-22 13:50:51", "lastUpdated": "2017-08-22 13:50:51" } ] ``` ``` -------------------------------- ### Get Access Token Source: https://cdp-docs.linkflowtech.com/index Obtain an Access Token using your App Key and App Secret to authenticate API requests. ```APIDOC ## GET /token ### Description Retrieves an Access Token using the provided App Key and App Secret. ### Method GET ### Endpoint /token ### Headers Parameter | Description ---|--- **X-OpenApi-Key** (String) - Required - The App Key obtained from creating a private app. **X-OpenApi-Secret** (String) - Required - The App Secret obtained from creating a private app. ### Response #### Success Response (200) - **token** (String) - The obtained Access Token. - **expiration** (String) - The expiration time of the token. ### Response Example ```json { "token": "Mi03Y2IxNjNkMC05YWFjLTQ5NmYtOWE3OS01NjU3ZWRjMmQwNzk=", "expiration": "2017-09-04 09:30:23" } ``` ``` -------------------------------- ### GET /open/groups Source: https://cdp-docs.linkflowtech.com/index Queries for groups based on provided parameters. Returns a list of groups matching the criteria. Supports filtering by ID, name, group type, and external identifiers. ```APIDOC ## GET /open/groups ### Description Queries for groups based on provided parameters. Returns a list of groups matching the criteria. Supports filtering by ID, name, group type, and external identifiers. ### Method GET ### Endpoint https://cdp-api.linkflowtech.com/open/groups ### Parameters #### Query Parameters - **id** (Integer) - Optional - The ID of the group. - **name** (String) - Optional - The name of the group. - **groupType** (String) - Optional - The type of the group (e.g., 'static', 'dynamic'). - **ext1** (String) - Optional - An external identifier (e.g., 'wx134210231'). - **ext2** (String) - Optional - Another external identifier (e.g., 'wechattagid'). #### Headers - **X-OpenApi-Token** (String) - Required - Access Token obtained via App Key and App Secret. ### Response #### Success Response (200) - Returns a JSON array of group objects. - **lastUpdated** (String) - The last updated timestamp. - **groupType** (String) - The type of the group. - **dateCreated** (String) - The date and time the group was created. - **name** (String) - The name of the group. - **id** (Integer) - The ID of the group. #### Response Example ```json [ { "lastUpdated": "2017-12-07 16:59:38", "groupType": "static", "dateCreated": "2017-12-07 16:59:38", "name": "618潜在客户", "id": 47 }, { "lastUpdated": "2017-12-11 16:52:39", "groupType": "dynamic", "dateCreated": "2017-12-11 11:20:04", "name": "最近7天活跃客户", "id": 51 } ] ``` **Note**: The API returns a maximum of 2000 records. Adjust query conditions if the limit is exceeded. ``` -------------------------------- ### Get Dashboard Summary (HTTP) Source: https://cdp-docs.linkflowtech.com/index Retrieves a summary of a specific dashboard, including its name and a list of reports. Requires a dashboard ID and an API token. ```http GET /open/dashboard/{dashboardId}/summary HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### Get Bulk Contact IDs by Update Time Source: https://cdp-docs.linkflowtech.com/index Fetches a list of contact IDs based on their update times. Supports filtering by 'minUpdateTime' and 'maxUpdateTime', along with pagination. A constraint exists where 'page * size' must not exceed 10000. Requires an 'X-OpenApi-Token'. ```http GET /open/contacts_bulk/ids?page=0&size=5&minUpdateTime=2017-01-01&maxUpdateTime=2018-01-01 HTTP/1.1 User-Agent: MyClient/1.0.0 Accept: application/json X-OpenApi-Token: Access Token ``` -------------------------------- ### GET /open/groups/{groupId}/contacts - Get Group Contacts Source: https://cdp-docs.linkflowtech.com/index Retrieves contacts belonging to a specific group. ```APIDOC ## GET /open/groups/{groupId}/contacts ### Description Retrieves contacts belonging to a specific group. ### Method GET ### Endpoint /open/groups/{groupId}/contacts ### Parameters #### Path Parameters - **groupId** (Integer) - Required - 群组id #### Query Parameters - **memberId** (Integer) - Optional - Member ID for filtering. - **size** (Integer) - Optional - Number of contacts to return per page. ### Response #### Success Response (200) Returns an array of contact objects within the group, each containing: - **lastUpdated** (String) - The date and time the contact was last updated. - **dateCreated** (String) - The date and time the contact was created. - **contact** (Object) - Details of the contact. - **mobilePhone** (String) - The contact's mobile phone number. - **name** (String) - The contact's name. - **id** (Integer) - The unique identifier of the contact. - **email** (String) - The contact's email address. - **contactGroupId** (Integer) - The ID of the contact within the group. - **version** (String) - The version of the contact entry. - **memberId** (Integer) - The member ID of the contact. #### Response Example ```json [ { "lastUpdated": "2018-04-19 11:19:41", "dateCreated": "2018-04-19 11:19:41", "contact": { "mobilePhone": null, "name": "'非常满意'&*-^!@#$%{}[]\\|、\"\"「」【】", "id": 17771, "email": null }, "contactGroupId": 252, "version": null, "memberId": 1243167 }, { "lastUpdated": "2018-04-19 14:54:53", "dateCreated": "2018-04-19 14:54:53", "contact": { "mobilePhone": null, "name": "tiger", "id": 17760, "email": null }, "contactGroupId": 252, "version": null, "memberId": 1243184 } ] ``` ``` -------------------------------- ### POST /open/shorturl Source: https://cdp-docs.linkflowtech.com/index Creates a standard trackable short URL from a given long URL. ```APIDOC ## POST /open/shorturl ### Description Creates a standard trackable short URL from a given long URL, with optional UTM parameters. ### Method POST ### Endpoint /open/shorturl ### Parameters #### Header Parameters - **X-OpenApi-Token** (String) - Required - Token obtained by exchanging App Key and App Secret. #### Request Body - **url** (String) - Required - The original long URL. - **utm.source** (String) - Optional - UTM source parameter. - **utm.campaign** (String) - Optional - UTM campaign parameter. - **utm.medium** (String) - Optional - UTM medium parameter. - **utm.content** (String) - Optional - UTM content parameter. - **utm.term** (String) - Optional - UTM term parameter. ### Request Example ```json { "url": "http://www.baidu.com", "utm": { "source": "testSource", "campaign": "testCampgin", "medium": "testMedium", "content": "testContent", "term": "testTerm" } } ``` ### Response #### Success Response (200) - **shorturl** (String) - The generated short URL. #### Response Example ```json { "shorturl": "http://ln8w.cn/5T2SnX" } ``` ``` -------------------------------- ### GET /open/contacts/{contactId}/groups - Get Contact Groups Source: https://cdp-docs.linkflowtech.com/index Retrieves all groups associated with a specific contact. ```APIDOC ## GET /open/contacts/{contactId}/groups ### Description Retrieves all groups associated with a specific contact. ### Method GET ### Endpoint /open/contacts/{contactId}/groups ### Parameters #### Path Parameters - **contactId** (Integer) - Required - 联系人id #### Query Parameters - **groupType** (String) - Optional - 群组类型 ### Response #### Success Response (200) Returns an array of group objects, each containing: - **lastUpdated** (String) - The date and time the group was last updated. - **groupType** (String) - The type of the group (e.g., "static"). - **dateCreated** (String) - The date and time the group was created. - **name** (String) - The name of the group. - **id** (Integer) - The unique identifier of the group. #### Response Example ```json [ { "lastUpdated": "2017-12-07 16:59:38", "groupType": "static", "dateCreated": "2017-12-07 16:59:38", "name": "618潜在客户", "id": 47 }, { "lastUpdated": "2017-12-11 16:52:39", "groupType": "static", "dateCreated": "2017-12-11 11:20:04", "name": "关注用户", "id": 51 } ] ``` ### Error Handling - **404 B00008**: 联系人不存在 (Contact not found) ```