Images
Create a Category Image
POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/categories/{category_id}/imageRequest
Create a Category Image.
Required Fields
- image_file: Form posts are the only accepted upload option.
Only one image at a time can be created.
Supported file types are JPEG/JPG
, GIF
, PNG
and ICO
.
Limit image size to 8MB
.
To update a Category Image, use the Update categories endpoint and an image_url
.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- category_id in path - integerrequired
The ID of the
Category
to which the resource belongs.
Body
object | multipart/form-data
image_filestring
Response
Body
object | application/json
dataobject
example
{
"data": {
"image_url": "https://cdn11.bigcommerce.com/s-{store_hash}/product_images/k/group_1545334669__76009.png"
},
"meta": {}
}
Delete a Category Image
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/categories/{category_id}/imageRequest
Deletes a Category Image.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- category_id in path - integerrequired
The ID of the
Category
to which the resource belongs.
example
curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/categories/[category_id]/image' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
Did you find what you were looking for?