Skip to navigation

Upload a colorway 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. Position 0 must be a static image. GIFs are allowed at later positions. Use the numeric variant id, not its uuid. Replacements refresh contentType before validating this rule.

Authentication

AuthorizationBearer

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

Request

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

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

Response

Image created.
idstringOptionalformat: "uuid"
variantIdlongOptional
Numeric colorway id, not its separate uuid field.
fileUrlstring or nullOptionalformat: "uri"
positionintegerOptional
createdAtdatetimeOptional
updatedAtdatetimeOptional
contentTypestring or nullOptional

Media type of the stored file; refreshed when the file is replaced.

seasonIdslist of stringsOptional

Errors

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