Skip to content

Add an image to a vendor's store gallery

POST
/users/{id}/store_media
curl --request POST \
--url https://acme.mykreezalid.com/api/v1/users/1/store_media \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com/gallery-1.jpg", "position": 0 }'

Downloads the image at url and adds it to the gallery of the user’s store, creating the store if the user has none. Available when the store gallery is enabled on your marketplace. Check success in the response.

id
required
integer

User’s unique identifier

Media typeapplication/json
object
url
required

Public URL of the image. It must answer with the HTTP status 200.

string format: uri

Example

https://example.com/gallery-1.jpg
position

Position of the image in the gallery

integer
0

Whether the image has been added

Media typeapplication/json
object
success
boolean
message

Store media has been added., or why it was not: Invalid URL. The URL does not return a valid response., Error saving store media., Error. No creation. when url is missing

string

Example

{
"success": true,
"message": "Store media has been added."
}

The store gallery is not enabled, no user has this identifier, or the user’s store could not be created.