Repository navigation
Upload Products Category Image
Mehrdad Pajuhaan edited this page Oct 23, 2026
·
2 revisions
Upload or replace the image of a product category (a folder in the Products Manager). The file is sent as
multipart/form-data in the photo field. Your token needs the backoffice:category:write scope.
POST https://api.selldone.com/shops/{shop_id}/categories/{category_id}/edit/upload
SDK URL builder: window.API.POST_UPLOAD_CATEGORY_IMAGE(shop_id, category_id).
| Parameter | Type | Description |
|---|---|---|
shop_id |
string | Target shop ID. |
category_id |
string | Target category ID. |
| Field | Type | Description |
|---|---|---|
photo |
file | Required. The image to upload. |
| Constraint | Value |
|---|---|
| Max size |
2048 KB (about 2 MB) |
| MIME types |
jpg, jpeg, png, gif, webp, svg
|
Tip: when sending
multipart/form-data, do not set theContent-Typeheader manually; let your HTTP client set the boundary automatically.
A valid bearer token with write access to the shop's catalog/categories.
Header: Authorization: Bearer YOUR_ACCESS_TOKEN
TOKEN="YOUR_ACCESS_TOKEN"
SHOP_ID="12345"
CATEGORY_ID="999"
curl -X POST "https://api.selldone.com/shops/${SHOP_ID}/categories/${CATEGORY_ID}/edit/upload" \
-H "Authorization: Bearer ${TOKEN}" \
-F "photo=@/absolute/path/to/category-image.webp"import axios from "axios";
/**
* Upload or replace a category image.
* @param {Object} params
* @param {string} params.token - Bearer token
* @param {string} params.shopId - Shop ID
* @param {string} params.categoryId - Category ID
* @param {File|Blob} params.file - Image file
*/
async function uploadCategoryImage({ token, shopId, categoryId, file }) {
const url = `https://api.selldone.com/shops/${shopId}/categories/${categoryId}/edit/upload`;
const fd = new FormData();
fd.append("photo", file); // File | Blob
const res = await axios.post(url, fd, {
headers: { Authorization: `Bearer ${token}` },
});
return res.data;
}- Keep images optimized (for example WebP or compressed JPEG) to improve load speed.
- Use descriptive file names (for example
cat-home-decor.webp) for easier asset management. - If you receive 413 Payload Too Large, compress the image below 2 MB.
- If you receive 415 or 422, make sure you used
multipart/form-dataand an allowed MIME type.
Guides
Products
- Fetch Products List
- Edit Product
- Edit Product's Variant
- Add Images to Products/Variants
- Upload Products Category Image
Marketplace vendors
- Get Vendors List
- Vendor Products List
- Vendor Product Add
- Vendor Product Update
- Vendor Product Delete
Ecosystem
Links