v2

latestOpenAPI 3.1.02026-07-26102336742.6 KB
Media Library

Request a pre-signed upload URL

Rate limit: 20 requests / minute per shop. See Rate limiting.

Returns a pre-signed upload URL for uploading a new image. After receiving the response, PUT the image bytes directly to the uploadUrl.

post/open-api/v1.0/media/upload-url

Request body

fileNamestring required

Name of the file

contentTypestring required

MIME type of the file

sizeinteger required

Size of the file in bytes. Must match the x-goog-content-length-range header sent when uploading the bytes to uploadUrl.

Example request

{
  "fileName": "artwork.png",
  "contentType": "image/png",
  "size": 1048576
}

Response

Created

uploadUrlstring required
fileUrlstring required
expiresAtstring date-time