Create a Category Image
POST /stores/{store_hash}/v3/catalog/categories/{category_id}/image
Request
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.
Limit image size to 1MB.
To update a Category Image, use the Update categories endpoint and an image_url
.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
- category_id in path - integer - required
The ID of the
Category
to which the resource belongs.
Response
Body
object | application/json
dataobject
metaobject
Response metadata.
example
{ "data": { "image_url": "https://cdn11.bigcommerce.com/s-{store_hash}/product_images/k/group_1545334669__76009.png" }, "meta": {} }
Delete a Category Image
DELETE /stores/{store_hash}/v3/catalog/categories/{category_id}/image
Request
Deletes a Cateogory Image.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- category_id in path - integer - required
The ID of the
Category
to which the resource belongs. - category_id in path - integer - required
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: xxxxxxxxxxxxxxxxx'