Get an image

get

/ccstore/v1/images

Retrieves an image from a given source URL. Optionally, it can resize and convert the image to a different image format, .jpeg, .png, or gif.

To resize an image, both the width and the height parameters must be specified.

The maximum height and width allowed is 5000 pixels.

If either of these parameters, width or height, is excluded from the endpoint call, the source image is returned without transformation.

Note: Resizing and conversion are not supported for source GIF images.

The endpoint responds with a content type of 'application/json' in error conditions or one of 'image/jpeg', 'image/png', or 'image/gif' depending on the source image and specified parameters.

Request

Supported Media Types
Query Parameters
  • The hex color code used to replace the transparency layer when converting images to JPEG. Default is FFFFFF.
  • The maximum height of the resized image. Required along with the 'width' parameter for the image to be resized.
  • Output format of the converted image. JPEG is the only supported output format. When specified, the source image is converted to a JPEG except for GIF images which are not converted.
  • Quality of the image transformation: 0.0 (worst/fast) - 1.0 (best/slow). Default is 1.0.
  • The source location of the original image.
  • The maximum width of the resized image. Required along with the 'height' parameter for the image to be resized.
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : getImages_200_response
Show Source

401 Response

Returned when running in preview mode and the user is not authenticated.
Body ()
Root Schema : getImages_401_response
Type: object
Show Source

404 Response

Source image is not found
Body ()
Root Schema : getImages_404_response
Type: object
Show Source

429 Response

There is currently not enough processing capacity when trying to resize an image. Try again later or reduce the size of the image
Body ()
Root Schema : getImages_429_response
Type: object
Show Source

Default Response

The following internal error codes are thrown by this API when the request fails in Commerce:
Error CodeDescriptionPossible Fix
26200Failure resizing image.See error messages for more information.

The error response:
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top