Skip to content
scango.ch
Esc
↑↓navigate↵open⌘Jpreview

Upload product image

Upload a product image (multipart field file) and set imageUrl. Replaces any previous image. Requires a Write key. Max. 10 MiB (10,485,760 bytes). The type is taken from the part’s Content-Type header: jpeg, png, webp or gif.

POST/products/{productId}/image
Authorization
AuthorizationBearer token (API key) · headerrequired

Organization API key.

Path parameters
productIdstringrequired
Request body
requiredmultipart/form-data
fileanyrequired

Image file (jpeg, png, webp or gif), max. 10 MiB.

Responses
200

Uploaded

dataobjectrequired
Show properties
urlstringrequired
imageUrlstringrequired
400

Invalid parameters or body.

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

403

Missing, unknown or inactive API key, or a Read key on a write operation.

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

404

No item with this id.

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

413

File too large

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

Try it
Server
Authorization
Parameters
Bodymultipart/form-data
Request
curl -X POST 'https://dashboard.scango.ch/api/v1/products/string/image' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  --form-string 'file=null'
Response
{
  "data": {
    "url": "https://firebasestorage.googleapis.com/v0/b/example/o/instance%2Forg%2Fproducts%2Fprod%2Fphoto.jpg?alt=media&token=abc",
    "imageUrl": "https://firebasestorage.googleapis.com/v0/b/example/o/instance%2Forg%2Fproducts%2Fprod%2Fphoto.jpg?alt=media&token=abc"
  }
}

Was this page helpful?