Skip to content

Upload a shop picture

POST
/storefront/assets
curl --request POST \
--url https://example.com/storefront/assets \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "dataUrl": "example" }'

A logo, an icon, a hero or banner picture, a category tile or the picture a shared link shows, as a data URL. Comes back as the key to put in the settings, and the picture at the sizes the shop shows, on the office’s own address.

Media typeapplication/json
object
dataUrl
required
string
<= 12000000 characters
Examplegenerated
{
"dataUrl": "example"
}

Stored

Media typeapplication/json
object
key
required
string
image
required
object
alt
required
string | null
width
required
integer
height
required
integer
thumb
required
string
card
required
string
large
required
string
Examplegenerated
{
"key": "example",
"image": {
"alt": "example",
"width": 1,
"height": 1,
"thumb": "example",
"card": "example",
"large": "example"
}
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

The plan does not include a shop

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}