v2.media.upload_image
POST /api/v2/media/upload_image
Use this API to upload images and support different business scenarios through business and scene parameters.
Endpoint URL
URL: https://partner.shopeemobile.com/api/v2/media/upload_image
Common Request Parameters
| Name | Type | Sample | Description |
|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. |
| 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 |
Request Parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| business | int32 | True | 2 | Defines the business type of the uploaded image. Supported values: 2 = Returns |
| scene | int32 | True | 1 | Defines the purpose of the uploaded image under the specified business type. Supported values: - If business = 2 (Returns): 1 = Return Seller Self Arrange Pickup Proof Image |
| images | file | True | The image files to be uploaded. Rules and restrictions by business and scene: - If business = 2 (Returns) and scene = 1 (Return Seller Self Arrange Pickup Proof Image): Up to 3 images can be uploaded. Each image must not exceed 10MB. Supported formats: JPG, JPEG, PNG. |
Response Parameters
| Name | Type | Sample | Description |
|---|---|---|---|
| error | string | Indicate error type if hit error. Empty if no error happened. | |
| message | string | Indicate error details if hit error. Empty if no error happened. | |
| warning | string | Indicate warning message you should take care. | |
| request_id | string | The identifier for an API request for error tracking. | |
| response | object | ||
| image_list | object[] | List of uploaded images. | |
| image_id | string | Unique ID of the uploaded image. | |
| image_url | string | URL of the uploaded image. |