Chuyển tới nội dung chính

v2.video.edit_video_info

POST /api/v2/video/edit_video_info

You need to call v2.media.init_video_upload, v2.media.upload_video_part, and v2.media.complete_video_upload to upload the video, and call the v2.media.get_video_upload_result to get the video_upload_id of uploaded video first, then call this API to set video post information. After submit, the video is still draft status, you need to call v2.video.post_video to post the video to Shopee Video. You can only set and update post information before the video is post.

Đường dẫn Endpoint

URL: https://partner.shopeemobile.com/api/v2/video/edit_video_info

Tham số chung

TênKiểuMẫuMô tả
partner_idint1Partner ID được gán khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu.
timestamptimestamp1610000000Dùng để chỉ định thời gian của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token truy cập API, dùng để xác định quyền của bạn đối với API. Có thể sử dụng nhiều lần và hết hạn sau 4 giờ.
user_idint1Shopee's mã định danh duy nhất for a user.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by(depends on different APIs) partner_id, api path, timestamp, access_token, user_id and partner_key via HMAC-SHA256 hashing algorithm.

Tham số Request

TênKiểuBắt buộcMẫuMô tả
video_upload_listobject[]TrueVideo information collection, no more than 5.
video_upload_idstringTruesg-11110199-6v99e-mgezdwct5eyya0ID of uploaded video. Obtain from v2.media.get_video_upload_result.
captionstringFalsethis is a test videoMô tả về the Shopee Video.
cover_image_urlstringTruehttps://down-sg.img.susercontent.com/sg-11110199-6v99e-mgezdwct5eyya0\_pack\_v1\_1000001\_1Selected ảnh bìa url of the Shopee Video. Obtain from v2.video.get_cover_list.
item_infoobject[]FalseDanh sách products to be linked with the Shopee Video, no more than 6.
item_idint64True2Shopee's mã định danh duy nhất for an item.
custom_item_namestringFalseitem display nameProduct display name in Shopee Video.
allow_infoobjectTrueWhether allow stitch and duet.
allow_duetbooleanTruetrueWhether allow duet.
allow_stitchbooleanTruetrueWhether allow stitch.
scheduled_infoobjectTrueWhen scheduled_post is true, scheduled_post_time must not empty. When scheduled_post is false, scheduled_post_time must empty.
scheduled_postbooleanTruetrueWhether post it to Shopee Video at scheduled time.
scheduled_post_timetimestampFalse1761734929450Scheduled thời gian đăng, millisecond timestamp. When scheduled_post is true, scheduled_post_time must not empty.

Tham số Response

TênKiểuMẫuMô tả
errorstringLoại lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
messagestringChi tiết lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
request_idstring07af0e73-f806-4b09-af22-d28a72eae63aMã định danh của yêu cầu API dùng để theo dõi lỗi.
responseobjectDetail informations you are querying.
success_liststring[][ "sg-11110199-6v99e-mgezdwct5eyya0"]The danh sách video_upload_id edit successfully.
failure_listobject[]The danh sách video_upload_id edit failed.
fail_video_upload_idstringsg-11110199-6v99e-mgezdwct5eyya0Failed video_upload_id.
failed_reasonstringcan not edit video info,please retryFailed reason of the corresponding video_upload_id.

Dữ liệu gửi

], "allow_info": { "allow_duet": true, "allow_stitch": true }, "scheduled_info": { "scheduled_post": true, "scheduled_post_time": 1761734929450 } } ] }Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://partner.shopeemobile.com/api/v2/video/edit\_video\_info?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id") .header("Content-Type","application/json") .body("{ "video_upload_list": [ { "allow_info": { "allow_duet": true, "allow_stitch": true }, "caption": "this is a test video", "cover_image_url": "https://down-sg.img.susercontent.com/sg-11110199-6v99e-mgezdwct5eyya0_pack_v1_1000001_1", "item_info": [ { "custom_item_name": "item display name", "item_id": 2 } ], "scheduled_info": { "scheduled_post": true, "scheduled_post_time": 1761734929450 }, "video_upload_id": "sg-11110199-6v99e-mgezdwct5eyya0" } ] }") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/video/edit\_video\_info?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => '{ "video_upload_list": [ { "allow_info": { "allow_duet": true, "allow_stitch": true }, "caption": "this is a test video", "cover_image_url": "https://down-sg.img.susercontent.com/sg-11110199-6v99e-mgezdwct5eyya0_pack_v1_1000001_1", "item_info": [ { "custom_item_name": "item display name", "item_id": 2 } ], "scheduled_info": { "scheduled_post": true, "scheduled_post_time": 1761734929450 }, "video_upload_id": "sg-11110199-6v99e-mgezdwct5eyya0" } ] }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request POST 'https://partner.shopeemobile.com/api/v2/video/edit\_video\_info?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id'
--header 'Content-Type: application/json'
--data-raw '{ "video_upload_list": [ { "allow_info": { "allow_duet": true, "allow_stitch": true }, "caption": "this is a test video", "cover_image_url": "https://down-sg.img.susercontent.com/sg-11110199-6v99e-mgezdwct5eyya0_pack_v1_1000001_1", "item_info": [ { "custom_item_name": "item display name", "item_id": 2 } ], "scheduled_info": { "scheduled_post": true, "scheduled_post_time": 1761734929450 }, "video_upload_id": "sg-11110199-6v99e-mgezdwct5eyya0" } ] }' import requests import json url = "https://partner.shopeemobile.com/api/v2/video/edit\_video\_info?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id" payload=json.dumps({ "video_upload_list": [ { "allow_info": { "allow_duet": True, "allow_stitch": True }, "caption": "this is a test video", "cover_image_url": "https://down-sg.img.susercontent.com/sg-11110199-6v99e-mgezdwct5eyya0_pack_v1_1000001_1", "item_info": [ { "custom_item_name": "item display name", "item_id": 2 } ], "scheduled_info": { "scheduled_post": True, "scheduled_post_time": 1761734929450 }, "video_upload_id": "sg-11110199-6v99e-mgezdwct5eyya0" } ] }) headers = { 'Content-Type': 'application/json' } response = requests.RPCRequest("POST",url,headers=headers, data=payload, allow_redirects=False) print(response.text)

}