/files

Uploads a new file

Request body attributes

You have to send data with multipart/form-data type

TitleTypeDescriptionRequired?
filesarray of filesFiles itselfYes
typestringType of files, possible values:
thumbnails, product_images,
variant_images,
abandoned_email_logo,
review_email_logo,
review_image,
collection_images,
checkout_settings_logo,
security_badge_images
No

Response attributes

Attributes that you will receive in response from the endpoint in JSON format, for example:
{"id": 1,"title": "Campaign"}

TitleTypeDescriptionRequired?
idintegerFile idYes
mimeboolWhether this campaign is published or notYes
is_imagestringTitle of the campaignYes
image_max_size_availableintegerMaximum available size constant, possible values:
0 - original
1 - tiny
2 - icon
3 - thumbnail
4 - mini
5 - small
6 - medium
7 - large
8 - jumbo
9 - full
10 - master
Yes
namestringName of the fileYes
urlstringRelative pathYes
sizeintegerFile size in bytesYes
image_widthintegerImage widthYes
image_heightintegerImage heightYes
theme_idintegerID of theme file was uploaded forNo
typestringType of file, possible values:
thumbnails, product_images,
variant_images,
abandoned_email_logo,
review_email_logo,
review_image,
collection_images,
checkout_settings_logo,
security_badge_images
Yes
full_urlstringFull url to this fileYes
[
  {
    "id": 453,
    "mime": "image\/jpeg",
    "is_image": 1,
    "image_max_size_available": 8,
    "name": "perfectly-timed-cat-photos-funny-cover.jpg",
    "url": "uploads\/1497530431_03c309ebc4af299f4ab3572b2fc1005481571327.jpg",
    "size": 65206,
    "image_width": 750,
    "image_height": 420,
    "theme_id": null,
    "type": "files",
    "full_url": "https:\/\/s3-us-west-2.amazonaws.com\/commercehq-userfiles-dev\/commercehq-test\/uploads\/1497530431_03c309ebc4af299f4ab3572b2fc1005481571327.jpg"
  }
]