v2.media.get_video_upload_result
GET /api/v2/media/get_video_upload_result
Dùng API này để lấy trạng thái hiện tại và kết quả của tác vụ tải video. Bạn cũng có thể dùng video_upload_result_push để nhận thông báo ngay khi tác vụ tải video đạt trạng thái cuối (SUCCEEDED, FAILED hoặc CANCELLED).
Đường dẫn Endpoint
URL: https://partner.shopeemobile.com/api/v2/media/get_video_upload_result
Tham số chung
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| partner_id | int | 1 | ID đối tác được cấp sau khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu. |
| timestamp | timestamp | 1610000000 | Dùng để xác định thời điểm 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. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by partner_id, api path, timestamp and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
Tham số Request
| Tên | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|
| video_upload_id | string | True | sg-11110201-6kh48-mepm7a0ttcw3c3 | ID duy nhất của tác vụ tải lên, được trả về bởi v2.media.init_video_upload. |
Tham số Response
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| error | string | Cho biết loại lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi. | |
| message | string | Cho biết chi tiết lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi. | |
| warning | string | Thông báo cảnh báo bạn cần lưu ý. | |
| request_id | string | e3e3e7f33ee88a7454c64e7a0b546e01 | Mã định danh cho yêu cầu API, dùng để theo dõi lỗi. |
| response | object | ||
| status | string | SUCCEEDED | Current status of the upload task. Possible values: - INITIATED: Upload task has been created (via init_video_upload) but no parts have been uploaded yet. - UPLOADING: Video file parts are being uploaded. The upload has started but is not yet completed. - UPLOADED: All video parts have been uploaded successfully, waiting for complete_video_upload to trigger processing. - PROCESSING: Video is being transcoded/validated by the system (duration, format, resolution checks). - SUCCEEDED: Video upload and transcoding completed successfully. Video URL and cover URL are available for use. - FAILED: Upload or processing failed (e.g., invalid format, duration not within allowed range, transcoding error). - CANCELLED: Upload task was explicitly canceled by the client (cancel_video_upload), and the video is discarded. |
| reason | string | Lý do thất bại hoặc hủy chi tiết, sẽ được trả về nếu status là FAILED hoặc CANCELLED. | |
| update_time | timestamp | 1758018336 | Thời gian cập nhật trạng thái video. |
| video_info | object | Thông tin video đã chuyển mã, được trả về nếu status là SUCCEEDED. | |
| video_url | string | http://play-src.vod.shopee.com/api/v4/11110201/mms/sg-11110201-6kh48-mepm7a0ttcw3c3. | URL phát lại video. |
| video_thumbnail_url | string | http://img.sp.mms.shopee.sg/sg-11110201-6kh48-mepm7a0ttcw3c3\_cover | URL ảnh thumbnail của video. |
| thumbnail_width | int32 | 1920 | Chiều rộng ảnh thumbnail video. |
| thumbnail_height | int32 | 1080 | Chiều rộng ảnh thumbnail video. |
| duration | int32 | 105 | Thời lượng video tính bằng giây. |
| resolution | string | 960x540 | Độ phân giải video, ví dụ: "1280x1280". |