Upload product image
Upload a product image (multipart field file) and set imageUrl. Replaces any previous image. Requires a Write key. Max 10MB. Allowed types: jpeg, png, webp, gif.
POST
/products/{productId}/imageAutorisierung
AutorisierungBearer-Token (API key) · headererforderlichOrganisations-API-Key.
Pfadparameter
productIdstringerforderlichRequest-Body
erforderlichmultipart/form-datafilestringerforderlichImage file (jpeg, png, webp, gif). Max 10MB.
Antworten
200Uploaded
dataobjecterforderlichEigenschaften anzeigenEigenschaften ausblenden
urlstringerforderlichimageUrlstringerforderlich400Bad request
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
403Unauthorized
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
404Not found
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
413File too large
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
Anfrage
curl -X POST "https://dashboard.scango.ch/api/v1/products/string/image" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: multipart/form-data" \
-d '{
"file": "string"
}'const response = await fetch("https://dashboard.scango.ch/api/v1/products/string/image", {
method: "POST",
headers: {
"Autorisierung": "Bearer YOUR_TOKEN",
"Content-Type": "multipart/form-data"
},
body: JSON.stringify({
"file": "string"
})
});Antwort
{
"data": {
"url": "string",
"imageUrl": "string"
}
}{
"statusCode": 0,
"message": "string",
"timestamp": "2019-08-24T14:15:22Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2019-08-24T14:15:22Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2019-08-24T14:15:22Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2019-08-24T14:15:22Z",
"path": "string"
}