Images

Create a Category Image

POST /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.

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 - 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.

Body

object | multipart/form-data
  • image_file
    string

Response

Body

object | application/json
  • data
    object

  • meta
    object

    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 /catalog/categories/{category_id}/image

Request

Deletes a Category Image.

Authentication

  • X-Auth-Token in header

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.

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?