Skip to navigation

Upload a product photo

Requires products:update. Creates a new image and appends it by default. Provide exactly one image file or image URL when uploading. Binary files use multipart/form-data; HTTP(S) URLs or base64 image data URIs use application/json. Single uploads complete processing before returning. Maximum 25 MB per image. Image writes update the parent product updatedAt.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

Use the productPhoto JSON wrapper, or bracketed fields such as productPhoto[file] for multipart uploads.

productPhotoobjectRequired
Provide exactly one base64 image data URI or image URL.

Response

Image created.
idstringOptionalformat: "uuid"
productIdstringOptionalformat: "uuid"
ID of the product that owns the image.
fileUrlstring or nullOptionalformat: "uri"
positionintegerOptional
createdAtdatetimeOptional
updatedAtdatetimeOptional
descriptionstring or nullOptional

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error