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].
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The entities for which the sharing links are generated.
object
The list of material IDs. For PRODUCT requests, provide 1 to 50 product IDs.
Right now, the only possible value is PRODUCT.
When type is PRODUCT, use product IDs for ids.
When type is set to CAMPAIGN, this field is required. This schema is associated with the Campaign page.
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.
Optional. For Tokopedia agencies, set this field to TOKO. The response returns the Tokopedia product URL in sharing_link and omits deep_link and one_link.
If this field is omitted or set to another value, the response returns the TikTok Shop product URL in sharing_link. For PRODUCT requests, deep_link and one_link are also returned.
Example
{ "material": { "ids": [ "7362840009596339971", "7362840009596339923" ], "type": "PRODUCT", "promotion_campaign_schema": "https://www.tiktok.com/t/ZSxRC4FEL/" }, "campaign_id": "7332840009596339923", "link_type": "TOKO"}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
The successfully generated sharing links.
object
Material ID.
This 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.
A product promotion app deep link that opens the corresponding TikTok Shop product detail page. It is returned for PRODUCT requests that use the TikTok Shop link type and is omitted when link_type is TOKO. Agencies can share this link with collaborated creators, and creators can share it with users. Use one_link for the HTTPS link that can be opened in a web browser.
To enable attribution, replace the o_event_id placeholder in the returned deep_link URL with a developer-generated unique ID for each click. Do not URL-encode or URL-decode the returned link. If a user places an order through this link, the resulting e-commerce order carries the event ID for tracking.
A product promotion one-link that opens the corresponding TikTok Shop product detail page. It is returned for PRODUCT requests that use the TikTok Shop link type and is omitted when link_type is TOKO. Agencies can share this link with collaborated creators, and creators can copy and paste it into a web browser or share it with users.
To enable attribution, replace the o_event_id placeholder in the returned one_link URL with a developer-generated unique ID for each click. Do not URL-encode or URL-decode the returned link. If a user places an order through this link, the resulting e-commerce order carries the event ID for tracking. If the user does not have TikTok installed, the link redirects the user to the app store to install TikTok.
The list of materials which failed to generate sharing links for.
object
Material ID.
Fail reason.
Example
{ "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&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=1233", "deep_link": "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\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"}