Update a product image
curl --request PUT \
--url https://api.maalbar.dk/v1/products/{productPublicId}/image \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form 'image=@example-file;type=application/octet-stream'import fs from 'fs';
const formData = new FormData();
formData.append('image', new Blob([fs.readFileSync('example-file')], { type: 'application/octet-stream' }), 'example-file');
const url = 'https://api.maalbar.dk/v1/products/{productPublicId}/image';
const options = {method: 'PUT', headers: {'X-Api-Key': '<api-key>'}, body: formData};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"imagePath": "<string>"
}{
"error": "Invalid request parameters"
}{
"error": "Authentication required"
}{
"error": "Resource not found"
}{
"error": "An unexpected error occurred"
}Products
Update a product image
PUT
/
products
/
{productPublicId}
/
image
Update a product image
curl --request PUT \
--url https://api.maalbar.dk/v1/products/{productPublicId}/image \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form 'image=@example-file;type=application/octet-stream'import fs from 'fs';
const formData = new FormData();
formData.append('image', new Blob([fs.readFileSync('example-file')], { type: 'application/octet-stream' }), 'example-file');
const url = 'https://api.maalbar.dk/v1/products/{productPublicId}/image';
const options = {method: 'PUT', headers: {'X-Api-Key': '<api-key>'}, body: formData};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"imagePath": "<string>"
}{
"error": "Invalid request parameters"
}{
"error": "Authentication required"
}{
"error": "Resource not found"
}{
"error": "An unexpected error occurred"
}