stable本次发布有变化全部展示
来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Path: /affiliate_creator/202504/affiliate_sharing_links/publisher/{publisher_id}/generate_batch
#§2 Method: [POST]
#§3 Function Description
You can use this API to generate material sharing links for a specific publisher. After that, you can share the link with the publisher. 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-type | header | string | Y | application/json | Allowed type: application/json |
§5 Request Path Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| publisher_id | string | Y | publisher_id_in_your_sys | The publisher id in partner's system |
§6 Request Query Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| app_key | string | Y | 38abcd | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign | string | Y | 5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c | Signature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders. |
| timestamp | int | Y | 1623812664 | Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time. |
§7 Request Body Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| material | object | Y | The entities for which the sharing links are generated. | |
| ^ids | []string | Y | ["7362840009596339971","7362840009596339923"] | The list of material IDs. The max length is 50. |
| ^type | string | Y | PRODUCT | Right now, the only possible value is PRODUCT or CAMPAIGN. |
When material_ids==PRODUCT, use pids for material IDs. | ||||
| ^promotion_campaign_schema | string | N | https://www.tiktok.com/t/ZSxRC4FEL/ | When type is set to CAMPAIGN, this field is required. This schema is associated with the Campaign page. |
| campaign_id | string | N | 7432840009596339923 | If 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_type | string | N | TOKO | Default value is empty. |
- For Tokopedia agencies, you may pass
TOKOto return the Tokopedia product URL. Otherwise, the TikTok Shop product URL will be returned. |
§8 Request Sample
Query
https://open-api.tiktokglobalshop.com/affiliate_creator/202504/affiliate_sharing_links/publisher/publisher_id_in_your_sys/generate_batch?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c×tamp=1625484268
Body
{"material":{"ids":["7362840009596339971","7362840009596339923"],"type":"PRODUCT","promotion_campaign_schema":"https://www.tiktok.com/t/ZSxRC4FEL/"},"campaign_id":"7432840009596339923","link_type":"TOKO "}
§9 Response Parameters
| Properties | Type | Sample | Properties description |
|---|---|---|---|
| code | int | 0 | The success or failure status code returned in API response. |
| message | string | Success | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | 202203070749000101890810281E8C70B7 | Request log |
| data | object | Specific return information | |
| ^sharing_links | []object | Generated affiliate links for each publisher | |
| ^^material_id | int | 7362840009596339971 | Material ID. |
| ^^sharing_link | string | https://www.tiktok.com/t/AIxvOHlaJoKO | This is the product promotion link that agencies can share with collaborated publishers. The publishers can post this link at their will. |
| ^^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¶ms_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). | |||
| 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). | |||
| 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 | 7362840009596339923 | Material ID. |
| ^^fail_reason | string | The product was sold out | Fail reason. |
§10 Response Sample
{"code":0,"data":{"sharing_links":[{"material_id":7362840009596339971,"sharing_link":"https://www.tiktok.com/t/AIxvOHlaJoKO","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":"7362840009596339923","fail_reason":"The product was sold out"}]},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
§11 Error Code
For common error codes, refer to How to call TikTok Shop APIs - Common Error Code
| Code | Message |
|---|
