快工助手跨境电商知识与商机助手

Creator Generate General Link

TikTok Shop 官方资料 · TikTok Shop Partner Center 开发者文档 · 适合开发者

stable本次发布有变化全部展示

来自 TikTok Shop 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
TikTok Shop / profile.tiktok.docs_api
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/tiktok_shopaudience/developercategory/api_doctopic/compliancetopic/developer

资料正文

§1 Path: /affiliate_creator/202505/affiliate_sharing_links/general_publishers/generate_batch

#

§2 Method: [POST]

#

§3 Function Description

You can use this API to generate material sharing links for your publishers. After that, you can encapsulate the sharing link with additional information like publisher ID. Right now, the material type must be PRODUCT. Please ensure that the material is included in the campaign by using [Generate Multi Affiliate Partner Campaign Product Links].


#

§4 Common Parameters

For common parameters, refer to How to call TikTok Shop APIs - Common Parameters

Properties Location Type Require Sample Properties description
content-typeheaderstringYapplication/jsonAllowed type: application/json
#

§5 Request Query Parameters

Properties Type Require Sample Properties description
app_keystringY38abcdEvery single app will have a unique key. Please use the specific key assigned to your app.
signstringY5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8cSignature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders.
timestampintY1623812664Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time.
#

§6 Request Body Parameters

Properties Type Require Sample Properties description
materialobjectYThe entities for which the sharing links are generated.
^ids[]stringY["7362840009596339971","7362840009596339923"]The list of material IDs. The max length is 50.
^typestringYPRODUCTRight now, the only possible value is PRODUCT.
When material_ids==PRODUCT, use pids for material IDs.
^promotion_campaign_schemastringNhttps://www.tiktok.com/t/ZSxRC4FEL/When type is set to CAMPAIGN, this field is required. This schema is associated with the Campaign page.
campaign_idstringN7332840009596339923If a creator adds products from a campaign, please include the campaign ID. The campaign ID can be found in the Affiliate Center or retrieved using the Get Affiliate Partner Campaign List API.
link_typestringNTOKODefault value is empty.
  • For Tokopedia agencies, you may pass TOKO to return the Tokopedia product URL. Otherwise, the TikTok Shop product URL will be returned. |
#

§7 Request Sample

Query

https://open-api.tiktokglobalshop.com/affiliate_creator/202505/affiliate_sharing_links/general_publishers/generate_batch?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1625484268

Body

{"material":{"ids":["7362840009596339971","7362840009596339923"],"type":"PRODUCT","promotion_campaign_schema":"https://www.tiktok.com/t/ZSxRC4FEL/"},"campaign_id":"7332840009596339923","link_type":"TOKO"}
#

§8 Response Parameters

Properties Type Sample Properties description
codeint0The success or failure status code returned in API response.
messagestringSuccessThe success or failure messages returned in API response. Reasons of failure will be described in the message.
request_idstring202203070749000101890810281E8C70B7Request log
dataobjectSpecific return information
^sharing_links[]objectThe successfully generated sharing links.
^^material_idstring7362840009596339971Material ID.
^^sharing_linkstringhttps://www.tiktok.com/view/product/1730958349688804006?chain_key=%7B%22t%22%3A1%2C%22k%22%3A%22000000000000000007518161308526446350%22%2C%22sc%22%3A%22OPEN_API%22%7D&scene=pdp&utm_source=open_api&trackParams=%7B%22enter_from_info%22%3A%22product_share_outside%22%2C%22source_page_type%22%3A%22product_share%22%2C%22enable_shop_tab_popup%22%3A1%7D&share_app_id=1233This is the product promotion link that agencies can share with collaborated creators. Creators can copy/paste this link into the web browser.
After you have the links, add the following request parameters and their corresponding values to the end of the link URL. When a user places an order using this link, the resulting e-commerce order will carry these parameters as part of its information:
  • event_id: Unique event id for each click
  • publisher_id: The unique publish_id assigned by CJ Nice to have
  • publisher_name: From CJ publisher profile.
  • device_type: 1-mobile, 2-desktop.
  • device_id: The clicks from the same device id can be aggregated as UV.
  • referrer_src: The URL of the webpage that a user came from before landing on the current share link. | ^^deep_link |string |snssdk1180://ec/pdp?biz_type=0&enter_method=web&gd_label=click_wap_p_product_detail_t_launch_pop_up_s__e__f__fp__fps_affiliate_links_rf_&h5_start_ts=1768977752558&is_commerce=1&jump_time=1768977752558&need_mall=1&needlaunchlog=1&o_app_code=abcsadaadada&page_name=reflow_pdp&page_name=product_detail&params_url=https%3A%2F%2Fshop-id.tokopedia.com%2Fview%2Fproduct%2F1730831248044885504%3Fchain_key%3D%257B%2522event_id%2522%253A%2522o_event_id%2522%252C%2522k%2522%253A%2522000000000000000007596668298679682828%2522%252C%2522sc%2522%253A%2522OPEN_API%2522%252C%2522t%2522%253A1%257D%26div_media_source%3Daffiliate%26event_id%3Do_event_id%26landing_page_name%3Dproduct_detail%26landpage_form%3Dhalf%26page_name%3Dproduct_detail%26scene%3Dpdp%26share_app_id%3D1180%26sticky_diversion_config%3D%257B%2522merge_action%2522%253A%2522 |A product promotion deep link that opens the corresponding TikTok Shop product detail page. Agencies can share this link with collaborated creators, and creators can copy/paste it into a web browser (or share it to users). To enable attribution, append the following query parameteReplace the o_event_id value in the deeplink URL with a developer-generated unique ID (one per click). Do not perform any URL encoding or decoding on the link. If a user places an order via this link, the resulting e-commerce order will carry these parameter values for tracking. | ^^one_link |string |https://snssdk1180.onelink.me/BAuo?params_url=https%3A%2F%2Fshop-id.tokopedia.com%2Fview%2Fproduct%2F1730831248044885504%3Fchain_key%3D%257B%2522event_id%2522%253A%2522o_event_id%2522%252C%2522k%2522%253A%2522000000000000000007596668298679682828%2522%252C%2522sc%2522%253A%2522OPEN_API%2522%252C%2522t%2522%253A1%257D%26div_media_source%3Daffiliate%26event_id%3Do_event_id%26landing_page_name%3Dproduct_detail%26landpage_form%3Dhalf%26page_name%3Dproduct_detail%26scene%3Dpdp%26share_app_id%3D1180%26sticky_diversion_config%3D%257B%2522merge_action%2522%253A%2522merge%2522%252C%2522data%2522%253A%257B%2522channel%2522%253A%255B%2522benefit_hub%2522%255D%257D%252C%2522is_sticky%2522%253A1%257D%26touch_point_product_id%3D1730831248044885504%26trackParams%3D%257B%2522enter_from_info%2522%253A%2522product_share_outside%2522%252C%2522source_page_type%2522%253A%2522product_share%2522%252C%2522enable_shop_tab_popup%2522%253A1%257D%26utm_source%3Dopen_api |A product promotion one-link that opens the corresponding TikTok Shop product detail page. Agencies can share this link with collaborated creators, and creators can copy/paste it into a web browser (or share it to users). To enable attribution, append the following query parameteReplace the o_event_id value in the deeplink URL with a developer-generated unique ID (one per click). Do not perform any URL encoding or decoding on the link. If a user places an order via this link, the resulting e-commerce order will carry these parameter values for tracking. If the user does not have TikTok installed on their phone, they will be redirected to the app store to install TikTok. | ^failed_materials |[]object | |The list of materials which failed to generate sharing links for. | ^^material_id |string |7362840009596339972 |Material ID. | ^^fail_reason |string |Product was sold out |Fail reason. |
#

§9 Response Sample

{"code":0,"data":{"sharing_links":[{"material_id":"7362840009596339971","sharing_link":"https://www.tiktok.com/view/product/1730958349688804006?chain_key=%7B%22t%22%3A1%2C%22k%22%3A%22000000000000000007518161308526446350%22%2C%22sc%22%3A%22OPEN_API%22%7D\u0026scene=pdp\u0026utm_source=open_api\u0026trackParams=%7B%22enter_from_info%22%3A%22product_share_outside%22%2C%22source_page_type%22%3A%22product_share%22%2C%22enable_shop_tab_popup%22%3A1%7D\u0026share_app_id=1233","deep_link":"snssdk1180://ec/pdp?biz_type=0\u0026enter_method=web\u0026gd_label=click_wap_p_product_detail_t_launch_pop_up_s__e__f__fp__fps_affiliate_links_rf_\u0026h5_start_ts=1768977752558\u0026is_commerce=1\u0026jump_time=1768977752558\u0026need_mall=1\u0026needlaunchlog=1\u0026o_app_code=abcsadaadada\u0026page_name=reflow_pdp\u0026page_name=product_detail\u0026params_url=https%3A%2F%2Fshop-id.tokopedia.com%2Fview%2Fproduct%2F1730831248044885504%3Fchain_key%3D%257B%2522event_id%2522%253A%2522o_event_id%2522%252C%2522k%2522%253A%2522000000000000000007596668298679682828%2522%252C%2522sc%2522%253A%2522OPEN_API%2522%252C%2522t%2522%253A1%257D%26div_media_source%3Daffiliate%26event_id%3Do_event_id%26landing_page_name%3Dproduct_detail%26landpage_form%3Dhalf%26page_name%3Dproduct_detail%26scene%3Dpdp%26share_app_id%3D1180%26sticky_diversion_config%3D%257B%2522merge_action%2522%253A%2522\n","one_link":"https://snssdk1180.onelink.me/BAuo?params_url=https%3A%2F%2Fshop-id.tokopedia.com%2Fview%2Fproduct%2F1730831248044885504%3Fchain_key%3D%257B%2522event_id%2522%253A%2522o_event_id%2522%252C%2522k%2522%253A%2522000000000000000007596668298679682828%2522%252C%2522sc%2522%253A%2522OPEN_API%2522%252C%2522t%2522%253A1%257D%26div_media_source%3Daffiliate%26event_id%3Do_event_id%26landing_page_name%3Dproduct_detail%26landpage_form%3Dhalf%26page_name%3Dproduct_detail%26scene%3Dpdp%26share_app_id%3D1180%26sticky_diversion_config%3D%257B%2522merge_action%2522%253A%2522merge%2522%252C%2522data%2522%253A%257B%2522channel%2522%253A%255B%2522benefit_hub%2522%255D%257D%252C%2522is_sticky%2522%253A1%257D%26touch_point_product_id%3D1730831248044885504%26trackParams%3D%257B%2522enter_from_info%2522%253A%2522product_share_outside%2522%252C%2522source_page_type%2522%253A%2522product_share%2522%252C%2522enable_shop_tab_popup%2522%253A1%257D%26utm_source%3Dopen_api\n"}],"failed_materials":[{"material_id":"7362840009596339972","fail_reason":"Product was sold out"}]},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
#

§10 Error Code

For common error codes, refer to How to call TikTok Shop APIs - Common Error Code

Code Message
#