curl --request DELETE \
--url https://api.royalti.io/product/{id}/media/{mediaName} \
--header 'Authorization: Bearer <token>'"<string>"/product//media/
curl --request DELETE \
--url https://api.royalti.io/product/{id}/media/{mediaName} \
--header 'Authorization: Bearer <token>'"<string>"/product/{id}/media/{mediaName} endpoint deletes a specific media file associated with a product.
Method:DELETE
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the product. |
| mediaName | string | The name of the media file to delete. |
const response = await fetch('https://api.royalti.io/product/example-id/media/example-id', {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);