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_numPagination Page NumberPagination page number, 0 represents the first pageIntegerOptional0
page_sizeNumber of Items Per PageNumber of items per page, maximum 1000 items per pageIntegerOptional20
sort_typeSort 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

IntegerOptional

1

Default: Sort in ascending order by creation time

campaign_filtersCampaign name filterFilter by campaign nameArray<String>OptionalNone
device_type_filtersDevice Type FiltersFilter by device type, supported enumerations [General, iOS, Android]Array<String>OptionalNone
channel_type_filtersChannel 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_filtersGlobal FilterGlobal Filter, filtered by channel link name, channel promotion link, and channel link IDArray<String>OptionalNone
channel_application_name_filtersFilter by the application name of the deeplink applicationFilter by application name to filter out the corresponding APP common channels (including deeplink capability) channel linksArray<String>OptionalNone

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": [         "测试应用"     ] }
CODE


Interface response parameter description

Parameter Name

Meaning

Rule Description

Data TypeRequired
code

Indicator

Successful query: SUCCESS; Other cases indicate query failure

StringYes
request_idTrace ID of the current queryFor the convenience of subsequent issue trackingStringYes
dataSpecific data of the current query
JSONNo
---->total_rowsTotal number of rowsTotal number of channel link data returned

long

Yes
---->total_pageTotal pagesReturns the total number of pages for channel link dataIntegerYes
---->page_numCurrent page numberCurrent page number, 0 represents the first pageIntegerYes
---->page_sizeNumber of items per pageNumber of items per pageIntegerYes
---->detail_resultsChannel link list detail resultsReturn channel link detail result listJsonNo
---->---->idChannel link primary key idChannel link primary key idIntegerYes
---->---->nameChannel link nameChannel link nameStringYes
---->---->channel_typeChannel TypeChannel TypeStringYes
---->---->device_typeDevice TypeDevice Type, enumerated values (General, iOS, Android)StringYes
---->---->short_urlShort URLShort URLStringYes
---->---->app_addressAPP Link AddressAPP Link AddressStringNo
---->---->parametersCustom Channel InformationCustom Channel InformationMap<String,String>Yes
---->---->
project_id
Project IdProject Id, corresponding to project IdIntegeris
---->---->
create_time
Channel Link Creation TimeChannel Link Creation TimeStringyes
---->---->
update_time
Channel Link Update TimeChannel Link Update TimeStringyes
---->---->short_url_idShort URL IDShort URL IDIntegerYes
---->---->channel_track_keyChannel Unique Identifier KeyChannel Unique Identifier KeyStringYes
---->---->is_show_whole_urlWhether to display whole_urlWhether to display whole_urlIntegeryes
---->---->whole_urlComplete URL LinkComplete URL link addressStringYes
---->---->web_landing_pageWeb Landing PageThe web page to go to if the wake-up application fails, it needs to start with http:// or https://StringNo
---->---->application_nameChannel Application NameChannel Application NameStringNo
---->---->application_info_idChannel Application Information IDChannel Application Information IDStringNo

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     } }
CODE

Channel Link - Create New Channel Link

API service URL and request method

  • /api/v3/analytics/v1/channel/links/create
  • POST

Request parameter description

Parameter NameMeaningRule DescriptionData TypeRequiredDefault Value
channel_urls
List of batch-created channel linksThe channel type of the same batch must be the same, and a maximum of 800 links can be created in batchesArray<Json>YesNone
---->
channel_type
Channel typeapp_normal:APP 通用渠道;app_deeplink:APP 通用渠道(包含 Deeplink 能力);web_normal:网页通用渠道;mina_normal:微信小程序通用渠道;alipay_mini_track:支付宝小程序通用渠道StringYesNo
---->
device_type
device typeEnumeration value type, support [General, iOS, Android]StringNogeneral
---->
target_url
Target AddressThe URL must start with http:// or https://StringYesNone
----&gt;
app_address
Promotion page addressFor 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://StringYesNone
----&gt;
parameters
Custom channel attributes
Map&lt;String,String&gt;NoNone
----&gt;
app_inner_info
Application inner parameterThe 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.StringNoNone
----&gt;
web_landing_page
Web landing pageWeb landing page, needs to start with http:// or https://StringNoNone
----&gt;
application_name
Deeplink application nameAPP general channel (including Deeplink capability), need to create Deeplink application on the page firstStringAPP general channel (including Deeplink capability) must be providedNo
---->
custom_properties
Custom ParameterAfter enabling strict validation, custom property fields need to be createdArray&lt;Json&gt;No, it is required when strict validation is enabledNo
---->---->nameCustom Property NameCustom Property name, required when strict validation is enabledStringYesNo
---->---->cnameCustom Property Chinese NameCustom Property Chinese name, required when strict validation is enabledStingYesNo
----&gt;
app_id
Mini Program App IDWeChat mini program permanent valid link (LINK_LONG), regular code (GENERAL), super long code (EFFICIENCY), required field for Alipay mini programStringNoNone
----&gt;
app_secret
Mini Program SecretWeChat mini program permanent valid link (LINK_LONG), regular code (GENERAL), super long code (EFFICIENCY), required fieldStringNoNone
----&gt;
mina_type
Delivery Material TypeWeChat 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)]StringNoNone

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":"通用"         }     ] }
CODE

Interface response parameter explanation:

Parameter nameMeaningRule descriptionData typeRequired
status
Creation statusChannel link creation statusStringYes
created
Total numberContains: Success + Failure + DuplicateIntegerYes
duplicated
Number of duplicates
Number of duplicatesIntegerYes
failed
Number of failuresNumber of creation failuresIntegerYes
image_base64
Image in base64 encodingCreate common channels for WeChat mini programs in batches, and return the base64 encoding of the first imageStringNo
error
Error messageError message for single record creationJsonNo
----&gt;
error_code
Error codeError code returned by WeChat in the creation of a WeChat mini program channelStringNo
----&gt;
error_msg
Error descriptionError description returned by WeChat in the creation of a WeChat mini program channelStringNo
channel_urls
Channel link creation result list
Arrays&lt;Json&gt;No
----&gt;
id
Channel Link Primary Key IdData Increment Primary Key IdIntegerNo
----&gt;
name
Channel Link NameChannel Link Generated NameStringNo
----&gt;
app_address
Promotion Page AddressPromotion Page AddressStringNo
----&gt;
short_url
Shortlink URLShortlink URLStringNo
----&gt;
whole_url
Complete Link AddressComplete Link AddressStringNo
----&gt;
is_duplicate
Whether it is a duplicate creationDetermine if it is the same shortlink based on target_url, channel parameter information, and project name

Boolean

No
----&gt;
error_msg
Error MessageError message when creation failsStringNo
---->
resource_base64
base 64 image encodingWechat small program regular code and ultra long code to generate the base 64 code of the pictureStringNo
---->
application_name
Application nameDeeplink Application Indicates the created applicationStringNo
---->
web_landing_page
Web landing pageThe value must start with http:// or https://StringNo

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" }
CODE

Channel Link - Update Channel Link

API service address and request method

  • /api/v3/analytics/v1/channel/links/update
  • POST

Request parameter description:


Parameter NameMeaningRule DescriptionData TypeRequired or NotDefault Value
channel_urlsBulk modify the content of the link listBulk modify the channel link list, maximum of 800 links can be createdArray&lt;Json&gt;YesNo
----&gt;idModify the primary key ID of the channelYou can obtain the primary key ID of the corresponding channel by obtaining the channel link listIntegerYesNo
----&gt;nameModify the channel nameThe modified channel nameIntegerYesNo


Complete request parameter example:

Request parameters

{     "channel_urls":[         {             "name":"支付宝小程序通用渠道_测试的活批量",             "id":26         }     ] }
CODE

Interface response parameter description:

Parameter nameMeaningRule DescriptionData TypeRequired
update_data_results
Modify channel link information return resultsModify channel link information return resultsArray&lt;Json&gt;Yes
----&gt;idPrimary Key IdPrimary Key for modifying channel informationIntegerYes
----&gt;nameModified channel nameModified channel nameStringYes
---->before_nameThe channel name before the changeThe channel name before the changeStringYes
---->fail_infoModify channel error informationModify the error message of channel informationStringYes

Complete response message example;

Response message

{     "code":"SUCCESS",     "request_id":"762953fb704740e7a431883cde8b7b03",     "data":{         "update_data_results":[             {                 "id":1,                 "name":"支付宝小程序通用渠道_测试1",                 "before_name":"支付宝小程序通用渠道_测试2",                 "fail_info":""             }         ]     } }
CODE

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 IDsList of channel link IDs to be deletedArrays&lt;Integer&gt;YesNo

Complete example of request parameters:

Request parameters

{     "channel_link_ids":[         1,         2,         3     ] }
CODE

Explanation of interface response parameters:

parameter name

meaning

rule description

data type

required

success_channel_link_ids
List of successfully deleted channel link IDsReturns a list of successfully deleted channel link IDsArrays&lt;Integer&gt;No

Complete response message example:

Response message

{     "code":"SUCCESS",     "request_id":"8da3351a85664dadb686bbaad8b8b2f9",     "data":{         "success_channel_link_ids":[             1,             3         ]     } }
CODE

Activity Management - Get Activity List

API service address and request method

  • /api/v3/analytics/v1/channel/campaigns/list
  • POST

Request parameter description:

Parameter nameMeaningRule descriptionData typeRequiredDefault value
page_num
Pagination page numberPagination page number, 0 represents the first pageIntegerNo0
page_size
Number of records per pageNumber of records per page, with a maximum of 1000 records per pageIntegerNo20
sort_info
Sorting informationSorting informationJsonNo
----&gt;
sort_field
Sorting fieldSort field, support sorting by the number of links (branch_num) and the last creation time (latest_use_time) fieldStringNoSort by default with the last creation time (latest_use_time) field, in descending order
----&gt;
sort_strategy
Sort strategySort strategy, DESC for descending order, ASC for ascending orderStringNoNo

Complete request parameter example:

Request parameters

{     "page_num":0,     "page_size":20,     "sort_info":{         "sort_field":"latest_use_time",         "sort_strategy":"DESC"     } }
CODE

Interface response parameter description:

Parameter nameMeaningRule explanationData typeRequired
total_rows
Total countTotal count of activities returnedLongYes
total_page
Total page countTotal number of pages for activities returnedIntegerYes
page_num
Pagination page numberPagination page number, 0 represents the first pageIntegerYes
page_sizeNumber of items per pageNumber of items per page, with a maximum of 1000 items per pageIntegerYes
campaign_details
Activity Detail ListReturn to Activity Detail ListArray&lt;Json&gt;No
----&gt;
campaign_name
Campaign NameCampaign NameStringYes
----&gt;
branch_num
Number of LinksCounts the number of links created under the campaignIntegerYes
----&gt;
latest_use_time
Last Creation TimeAggregation of the campaign, creation time of the last channelStringYes

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     } }
CODE