Skip to content

Upload image ​

Last updated View as Markdown

Warning

This endpoint is deprecated. Use Upload store images instead. Uploads to this endpoint go to the store image library. The source parameter has no effect. Responses carry a Deprecation: true header and a Link header to the new endpoint.

Endpoint: https://api.youcan.shop/media/{source}/upload-image

Param NameParam TypeDescription
sourcestringwhere you want to upload the image to [product,category,variantOptions,reviews,editor,page]

Method: POST

Required Scopes ​

  • upload-media

Parameters ​

Param NameParam TypeDescriptionRequired
imagesarray of filesArray of file images to upload, supported types are (jpeg,jpg,png,gif,webp)yes

Response ​

[201] Created

json
[
    {
        "name": "https://assets.youcan.shop/stores/5134310c6ac80c36d49d53b1dcb88b443d496d8c/hero-FDuX1LREaDDD96UcPeGhL6ndVBd.jpg",
        "link": "https://assets.youcan.shop/stores/5134310c6ac80c36d49d53b1dcb88b443d496d8c/hero-FDuX1LREaDDD96UcPeGhL6ndVBd.jpg",
        "src": "https://assets.youcan.shop/stores/5134310c6ac80c36d49d53b1dcb88b443d496d8c/hero-FDuX1LREaDDD96UcPeGhL6ndVBd.jpg"
    }
]

name and link are the same absolute URL. Each item also has the fields of Upload store images.