Upload a shop picture
POST
/storefront/assets
const url = 'https://example.com/storefront/assets';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"dataUrl":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
dataUrl
required
string
Examplegenerated
{ "dataUrl": "example"}Responses
Section titled “Responses”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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}