Channel Management API
|
Collect
Get Channel Link Query List
API Service Address and Request Address
/api/v3/analytics/v1/channel/links/list
- POST
Request Parameter Description
Parameter Name | Meaning | Rule Description | Data Type | Required | Default Value |
---|---|---|---|---|---|
page_num | Pagination Page Number | Pagination page number, 0 represents the first page | Integer | Optional | 0 |
page_size | Number of Items Per Page | Number of items per page, maximum 1000 items per page | Integer | Optional | 20 |
sort_type | Sort type | Support ascending or descending sorting by creation time or update time 1: Sort in ascending order by creation time -1: Sort in descending order by creation time 2: Sort in ascending order by update time -2: Sort in descending order by update time | Integer | Optional | 1 Default: Sort in ascending order by creation time |
campaign_filters | Campaign name filter | Filter by campaign name | Array<String> | Optional | None |
device_type_filters | Device Type Filters | Filter by device type, supported enumerations [General, iOS, Android] | Array<String> | Optional | None |
channel_type_filters | Channel Type Filters | Filter by channel type, supported enumerations [app_normal, app_deeplink, web_normal, mina_normal, alipay_mini_track] Enumeration value correspondence: app_normal: APP General Channel app_deeplink: APP General Channel (including Deeplink capability) web_normal: Web General Channel mina_normal: WeChat Mini Program General Channel alipay_mini_track: Alipay Mini Program General Channel | |||
global_filters | Global Filter | Global Filter, filtered by channel link name, channel promotion link, and channel link ID | Array<String> | Optional | None |
channel_application_name_filters | Filter by the application name of the deeplink application | Filter by application name to filter out the corresponding APP common channels (including deeplink capability) channel links | Array<String> | Optional | None |
Complete request parameter sample
Request parameters
{ "page_num": 0, "page_size": 50, "sort_type": "-1", "campaign_filters": [ "test%%+++活动" ], "device_type_filters": [ "通用", "iOS", "Android" ], "channel_type_filters": [ "app_normal", "app_deeplink", "web_normal", "mina_normal", "alipay_mini_track" ], "global_filters": [ "全局筛选" ], "channel_application_name_filters": [ "测试应用" ] }
Interface response parameter description
Parameter Name | Meaning | Rule Description | Data Type | Required | ||
---|---|---|---|---|---|---|
code | Indicator | Successful query: SUCCESS; Other cases indicate query failure | String | Yes | ||
request_id | Trace ID of the current query | For the convenience of subsequent issue tracking | String | Yes | ||
data | Specific data of the current query | JSON | No | |||
----> | total_rows | Total number of rows | Total number of channel link data returned | long | Yes | |
----> | total_page | Total pages | Returns the total number of pages for channel link data | Integer | Yes | |
----> | page_num | Current page number | Current page number, 0 represents the first page | Integer | Yes | |
----> | page_size | Number of items per page | Number of items per page | Integer | Yes | |
----> | detail_results | Channel link list detail results | Return channel link detail result list | Json | No | |
----> | ----> | id | Channel link primary key id | Channel link primary key id | Integer | Yes |
----> | ----> | name | Channel link name | Channel link name | String | Yes |
----> | ----> | channel_type | Channel Type | Channel Type | String | Yes |
----> | ----> | device_type | Device Type | Device Type, enumerated values (General, iOS, Android) | String | Yes |
----> | ----> | short_url | Short URL | Short URL | String | Yes |
----> | ----> | app_address | APP Link Address | APP Link Address | String | No |
----> | ----> | parameters | Custom Channel Information | Custom Channel Information | Map<String,String> | Yes |
----> | ----> | project_id | Project Id | Project Id, corresponding to project Id | Integer | is |
----> | ----> | create_time | Channel Link Creation Time | Channel Link Creation Time | String | yes |
----> | ----> | update_time | Channel Link Update Time | Channel Link Update Time | String | yes |
----> | ----> | short_url_id | Short URL ID | Short URL ID | Integer | Yes |
----> | ----> | channel_track_key | Channel Unique Identifier Key | Channel Unique Identifier Key | String | Yes |
----> | ----> | is_show_whole_url | Whether to display whole_url | Whether to display whole_url | Integer | yes |
----> | ----> | whole_url | Complete URL Link | Complete URL link address | String | Yes |
----> | ----> | web_landing_page | Web Landing Page | The web page to go to if the wake-up application fails, it needs to start with http:// or https:// | String | No |
----> | ----> | application_name | Channel Application Name | Channel Application Name | String | No |
----> | ----> | application_info_id | Channel Application Information ID | Channel Application Information ID | String | No |
Complete response message example
Response message
{ "code":"SUCCESS", "request_id":"09511615f0f14802af19fada2c95ba37", "data":{ "total_rows":"5", "total_page":5, "page_num":0, "detail_results":[ { "id":1, "name":"APP 通用渠道_测试活动_20230203_4996", "channel_type":"app_normal", "device_type":"通用", "short_url":"http://{hostname}:{port}/r/U", "app_address":"http://{hostname}:{post}/sa/channel_sa/link_manage?project=default&utm_source=%E6%B5%8B%E8%AF%95%E6%9D%A5%E6%BA%90&utm_campaign=%E6%B5%8B%E8%AF%95%E7%9A%84%E6%B4%BB%E5%8A%A8%25%25&test=%E8%87%AA%E5%AE%9A%E4%B9%89%E5%B1%9E%E6%80%A7&_channel_track_key=U9itljXH", "parameters":{ "utm_campaign":"测试活动" }, "project_id":1, "create_time":"2023-02-03 16:19:57", "update_time":"2023-02-03 16:19:57", "short_url_id":0, "channel_track_key":"U9itljXH", "is_show_whole_url":1 }, { "id":2, "name":"App Deeplink 通用渠道_测试应用_20230112_5511", "channel_type":"app_deeplink", "device_type":"通用", "short_url":"https://{hostname}:{port}/sd/xfA/A/W1uy30", "app_address":"", "parameters":{ "utm_campaign":"测试活动" }, "project_id":1, "create_time":"2023-01-12 18:11:40", "update_time":"2023-01-12 18:11:40", "short_url_id":0, "channel_track_key":"9jTlm9Gh", "is_show_whole_url":1, "web_landing_page":"http://www.test.com", "application_name":"测试应用" }, { "id":3, "name":"网页通用渠道_测试的活动%%_20230203_4983", "channel_type":"web_normal", "device_type":"通用", "short_url":"http://{hostname}:{port}/t/E", "app_address":"", "parameters":{ "utm_campaign":"测试活动" }, "project_id":1, "create_time":"2023-02-03 17:04:09", "update_time":"2023-02-03 17:04:09", "short_url_id":0, "channel_track_key":"BlCeGScT", "is_show_whole_url":1, "whole_url":"http://www.test.com?utm_campaign=%E6%B5%8B%E8%AF%95%E7%9A%84%E6%B4%BB%E5%8A%A8%25%25&_channel_track_key=BlCeGScT" }, { "id":4, "name":"微信小程序通用渠道_测试活动_20230209_2179", "channel_type":"mina_normal", "device_type":"通用", "parameters":{ "utm_campaign":"测试活动" }, "project_id":1, "create_time":"2023-02-09 15:44:08", "update_time":"2023-02-09 15:44:08", "short_url_id":0, "channel_track_key":"FlnXUZQe", "is_show_whole_url":1, "whole_url":"pages/details/index?id=2323323&sa_utm=j" }, { "id":5, "name":"支付宝小程序通用渠道_测试活动_20230203_3007", "channel_type":"alipay_mini_track", "device_type":"通用", "app_address":"", "parameters":{ "utm_campaign":"测试活动" }, "project_id":1, "create_time":"2023-02-03 17:05:09", "update_time":"2023-02-03 17:05:09", "short_url_id":0, "channel_track_key":"l7dkBwWi", "is_show_whole_url":1, "whole_url":"https://ds.alipay.com/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FappId%3D907%26page%3Dpage%2Fcommon%2Fsrch%2Fsech%26qry%3Dsa_utm%253Ds" } ], "page_size":1 } }
Channel Link - Create New Channel Link
API service URL and request method
/api/v3/analytics/v1/channel/links/create
- POST
Request parameter description
Parameter Name | Meaning | Rule Description | Data Type | Required | Default Value | ||
---|---|---|---|---|---|---|---|
channel_urls | List of batch-created channel links | The channel type of the same batch must be the same, and a maximum of 800 links can be created in batches | Array<Json> | Yes | None | ||
----> | channel_type | Channel type | app_normal:APP 通用渠道;app_deeplink:APP 通用渠道(包含 Deeplink 能力);web_normal:网页通用渠道;mina_normal:微信小程序通用渠道;alipay_mini_track:支付宝小程序通用渠道 | String | Yes | No | |
----> | device_type | device type | Enumeration value type, support [General, iOS, Android] | String | No | general | |
----> | target_url | Target Address | The URL must start with http:// or https:// | String | Yes | None | |
----> | app_address | Promotion page address | For example, the download address of Android or iOS, the WeChat download address, or the intermediate redirect URL. The URL must start with http:// or https:// | String | Yes | None | |
----> | parameters | Custom channel attributes | Map<String,String> | No | None | ||
----> | app_inner_info | Application inner parameter | The APP general channel can use this parameter to jump to the specified page or display a corresponding dialog box, which needs to be agreed with your client's development department. | String | No | None | |
----> | web_landing_page | Web landing page | Web landing page, needs to start with http:// or https:// | String | No | None | |
----> | application_name | Deeplink application name | APP general channel (including Deeplink capability), need to create Deeplink application on the page first | String | APP general channel (including Deeplink capability) must be provided | No | |
----> | custom_properties | Custom Parameter | After enabling strict validation, custom property fields need to be created | Array<Json> | No, it is required when strict validation is enabled | No | |
----> | ----> | name | Custom Property Name | Custom Property name, required when strict validation is enabled | String | Yes | No |
----> | ----> | cname | Custom Property Chinese Name | Custom Property Chinese name, required when strict validation is enabled | Sting | Yes | No |
----> | app_id | Mini Program App ID | WeChat mini program permanent valid link (LINK_LONG), regular code (GENERAL), super long code (EFFICIENCY), required field for Alipay mini program | String | No | None | |
----> | app_secret | Mini Program Secret | WeChat mini program permanent valid link (LINK_LONG), regular code (GENERAL), super long code (EFFICIENCY), required field | String | No | None | |
----> | mina_type | Delivery Material Type | WeChat Mini Program Universal Channels [Page Path (NONE), Permanent Valid Link (LINK_LONG), Regular Code (GENERAL), Super Long Code (EFFICIENCY)]; Alipay Mini Program Universal Channels [Global Parameter (ALIPAY_SCHEME), Page Parameter (ALIPAY_PAGE)] | String | No | None |
Complete request parameter example:
Request parameter
{ "channel_urls":[ { "channel_type":"app_normal", "app_address":"http://{hostname}:{post}/sa/channel_sa/link_manage?project=default", "parameters":{ "utm_source":"广告来源", "utm_medium":"广告媒介", "utm_term":"关键词", "utm_content":"广告内容", "utm_campaign":"活动" }, "custom_properties":[ ], "device_type":"通用" }, { "channel_type":"app_deeplink", "parameters":{ "utm_source":"广告来源", "utm_medium":"广告媒介", "utm_term":"关键词", "utm_content":"广告内容", "utm_campaign":"活动" }, "custom_properties":[ ], "application_name":"测试应用", "web_landing_page":"http://www.test.com", "app_inner_info":"t=test", "device_type":"通用" }, { "channel_type":"web_normal", "target_url":"http://www.test.com", "parameters":{ "utm_source":"广告来源", "utm_medium":"广告媒介", "utm_term":"关键词", "utm_content":"广告内容", "utm_campaign":"活动" }, "custom_properties":[ ], "device_type":"通用" }, { "channel_type":"mina_normal", "target_url":"pages/index?id=asdfas", "mina_type":"EFFICIENCY", "app_id":"wx123423423", "app_secret":"123asdfasdfq12342314", "parameters":{ "utm_source":"广告来源", "utm_medium":"广告媒介", "utm_term":"关键词", "utm_content":"广告内容", "utm_campaign":"活动" }, "custom_properties":[ ], "device_type":"通用" }, { "channel_type":"alipay_mini_track", "mina_type":"ALIPAY_PAGE", "target_url":"page/common/search/search", "app_id":"23234211234", "parameters":{ "utm_source":"广告来源", "utm_medium":"广告媒介", "utm_term":"关键词", "utm_content":"广告内容", "utm_campaign":"活动" }, "custom_properties":[ ], "device_type":"通用" } ] }
Interface response parameter explanation:
Parameter name | Meaning | Rule description | Data type | Required | |
---|---|---|---|---|---|
status | Creation status | Channel link creation status | String | Yes | |
created | Total number | Contains: Success + Failure + Duplicate | Integer | Yes | |
duplicated | Number of duplicates | Number of duplicates | Integer | Yes | |
failed | Number of failures | Number of creation failures | Integer | Yes | |
image_base64 | Image in base64 encoding | Create common channels for WeChat mini programs in batches, and return the base64 encoding of the first image | String | No | |
error | Error message | Error message for single record creation | Json | No | |
----> | error_code | Error code | Error code returned by WeChat in the creation of a WeChat mini program channel | String | No |
----> | error_msg | Error description | Error description returned by WeChat in the creation of a WeChat mini program channel | String | No |
channel_urls | Channel link creation result list | Arrays<Json> | No | ||
----> | id | Channel Link Primary Key Id | Data Increment Primary Key Id | Integer | No |
----> | name | Channel Link Name | Channel Link Generated Name | String | No |
----> | app_address | Promotion Page Address | Promotion Page Address | String | No |
----> | short_url | Shortlink URL | Shortlink URL | String | No |
----> | whole_url | Complete Link Address | Complete Link Address | String | No |
----> | is_duplicate | Whether it is a duplicate creation | Determine if it is the same shortlink based on target_url, channel parameter information, and project name | Boolean | No |
----> | error_msg | Error Message | Error message when creation fails | String | No |
----> | resource_base64 | base 64 image encoding | Wechat small program regular code and ultra long code to generate the base 64 code of the picture | String | No |
----> | application_name | Application name | Deeplink Application Indicates the created application | String | No |
----> | web_landing_page | Web landing page | The value must start with http:// or https:// | String | No |
Complete response message example:
Response message
{ "duplicated":0, "image_base64":"", "created":1, "channel_urls":[ { "id":872, "name":"APP 通用渠道_活动_20230213_6758", "app_address":"推广页面地址", "short_url":"短链地址", "whole_url":"", "is_duplicate":false, "error_msg":"", "resource_base64":"", "application_name":"", "web_landing_page":"" } ], "failed":0, "status":"success" }
Channel Link - Update Channel Link
API service address and request method
/api/v3/analytics/v1/channel/links/update
- POST
Request parameter description:
Parameter Name | Meaning | Rule Description | Data Type | Required or Not | Default Value | |
---|---|---|---|---|---|---|
channel_urls | Bulk modify the content of the link list | Bulk modify the channel link list, maximum of 800 links can be created | Array<Json> | Yes | No | |
----> | id | Modify the primary key ID of the channel | You can obtain the primary key ID of the corresponding channel by obtaining the channel link list | Integer | Yes | No |
----> | name | Modify the channel name | The modified channel name | Integer | Yes | No |
Complete request parameter example:
Request parameters
{ "channel_urls":[ { "name":"支付宝小程序通用渠道_测试的活批量", "id":26 } ] }
Interface response parameter description:
Parameter name | Meaning | Rule Description | Data Type | Required | |
---|---|---|---|---|---|
update_data_results | Modify channel link information return results | Modify channel link information return results | Array<Json> | Yes | |
----> | id | Primary Key Id | Primary Key for modifying channel information | Integer | Yes |
----> | name | Modified channel name | Modified channel name | String | Yes |
----> | before_name | The channel name before the change | The channel name before the change | String | Yes |
----> | fail_info | Modify channel error information | Modify the error message of channel information | String | Yes |
Complete response message example;
Response message
{ "code":"SUCCESS", "request_id":"762953fb704740e7a431883cde8b7b03", "data":{ "update_data_results":[ { "id":1, "name":"支付宝小程序通用渠道_测试1", "before_name":"支付宝小程序通用渠道_测试2", "fail_info":"" } ] } }
Channel Channel link - Delete channel link
API service address and request method
/api/v3/analytics/v1/channel/links/delete
- POST
Request parameter description
parameter name | meaning | rule description | data type | required | default value |
---|---|---|---|---|---|
channel_link_ids | List of channel link IDs | List of channel link IDs to be deleted | Arrays<Integer> | Yes | No |
Complete example of request parameters:
Request parameters
{ "channel_link_ids":[ 1, 2, 3 ] }
Explanation of interface response parameters:
parameter name | meaning | rule description | data type | required |
---|---|---|---|---|
success_channel_link_ids | List of successfully deleted channel link IDs | Returns a list of successfully deleted channel link IDs | Arrays<Integer> | No |
Complete response message example:
Response message
{ "code":"SUCCESS", "request_id":"8da3351a85664dadb686bbaad8b8b2f9", "data":{ "success_channel_link_ids":[ 1, 3 ] } }
Activity Management - Get Activity List
API service address and request method
/api/v3/analytics/v1/channel/campaigns/list
- POST
Request parameter description:
Parameter name | Meaning | Rule description | Data type | Required | Default value | |
---|---|---|---|---|---|---|
page_num | Pagination page number | Pagination page number, 0 represents the first page | Integer | No | 0 | |
page_size | Number of records per page | Number of records per page, with a maximum of 1000 records per page | Integer | No | 20 | |
sort_info | Sorting information | Sorting information | Json | No | ||
----> | sort_field | Sorting field | Sort field, support sorting by the number of links (branch_num) and the last creation time (latest_use_time) field | String | No | Sort by default with the last creation time (latest_use_time) field, in descending order |
----> | sort_strategy | Sort strategy | Sort strategy, DESC for descending order, ASC for ascending order | String | No | No |
Complete request parameter example:
Request parameters
{ "page_num":0, "page_size":20, "sort_info":{ "sort_field":"latest_use_time", "sort_strategy":"DESC" } }
Interface response parameter description:
Parameter name | Meaning | Rule explanation | Data type | Required | |
---|---|---|---|---|---|
total_rows | Total count | Total count of activities returned | Long | Yes | |
total_page | Total page count | Total number of pages for activities returned | Integer | Yes | |
page_num | Pagination page number | Pagination page number, 0 represents the first page | Integer | Yes | |
page_size | Number of items per page | Number of items per page, with a maximum of 1000 items per page | Integer | Yes | |
campaign_details | Activity Detail List | Return to Activity Detail List | Array<Json> | No | |
----> | campaign_name | Campaign Name | Campaign Name | String | Yes |
----> | branch_num | Number of Links | Counts the number of links created under the campaign | Integer | Yes |
----> | latest_use_time | Last Creation Time | Aggregation of the campaign, creation time of the last channel | String | Yes |
Complete response message example:
Response message
{ "code":"SUCCESS", "request_id":"270fcef9da8f4e0ea9cc87fdf3ac9849", "data":{ "campaign_details":[ { "campaign_name":"测试的活动", "branch_num":1, "latest_use_time":"2023-02-09 19:19:50" } ], "total_rows":"6", "total_page":1, "page_num":0, "page_size":10 } }
Note: The content of this document is a technical document that provides details on how to use the Sensors product and does not include sales terms; the specific content of enterprise procurement products and technical services shall be subject to the commercial procurement contract.