POST Upload Product Image
Upload Product Image Seller Required scope: seller.product.basic Upload local images to TikTok Shop for use as product images, variant images, size charts, certification images and so on.
Note:
- All images used in TikTok Shop products must be uploaded through this API. You will not be able to use any image URLs that are not hosted by TikTok Shop.
- You must store the response body to retrieve the ID or URL required to associate the image with a product during product creation or editing. Version 202309
POST/product/202309/images/upload
Request
Header
| Properties | Type | Description |
|---|---|---|
| content-type Required | string | Allowed type: multipart/form-data |
| x-tts-access-token Required | string | The seller access_token value from Get Access Token, when user_type = 0. Follow this guide to get seller access_token. |
Query
| Properties | Type | Description |
|---|---|---|
| app_key Required | string | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign Required | string | Signature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders. |
| timestamp Required | int | Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time. |
Body
| Properties | Type | Description |
|---|---|---|
| data Required | file | The local image file to be uploaded.Note:- Supported formats: JPG, JPEG, PNG, WEBP, HEIC, BMP- Max size: 10MB- Dimensions: [100x100 px, 20000x20000 px]- For use_case=MAIN_IMAGE, the dimensions must be between 300x300 px and 4000x4000 px.- For use_case=SIZE_CHART_IMAGE, the dimension must be at least 1024 px on the shorter side. |
| use_case | string | The usage scenario of the image.Possible values:- MAIN_IMAGE: An image displayed in the product image gallery.- ATTRIBUTE_IMAGE: An image that represents a product variant (e.g. color).- DESCRIPTION_IMAGE: An image used within the product description.- CERTIFICATION_IMAGE: An image to provide supporting information to meet TikTok Shop requirements for listing restricted products (e.g., images of certifications, product packaging, labeling).- SIZE_CHART_IMAGE: An image that displays the product's measurement details.Note: Images for use cases MAIN_IMAGE and ATTRIBUTE_IMAGE that do not fit within the 3:4 to 4:3 aspect ratio range will be automatically converted to 1:1. |
Example
CurlGoNode.jsJavaEnable word wrap
Response Parameters
| Properties | Type | Description |
|---|---|---|
| code | int | The success or failure status code returned in API response. |
| message | string | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | Request log |
| data | object | Specific return information |
Example
JSONEnable word wrap
Error Code
View common error codes
| Code | Message | | --- | --- | | 11050001 | invalid param | | 12019116 | The image dimensions exceed the allowed limits. | | 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. | | 12038002 | Invalid upload file. Please ensure you are passing the correct file data. | | 12038004 | Failed to process the image. The format or content is not supported. | | 12038005 | The file size exceeds the maximum allowed size. | | 12038014 | The image dimensions exceed the allowed limits. Allowed dimensions (width x height in pixels): {{min_width}} x {{min_height}} to {{max_width}} x {{max_height}} | | 12038015 | Failed to process the image. The format or content is not supported. Supported formats: {{formats}} |
Is this content helpful?Helpful
Not Helpful
PreviousNext