Skip to main content
DELETE
/
product
/
{id}
/
media
/
{mediaName}
Delete Product Media
curl --request DELETE \
  --url https://api.royalti.io/product/{id}/media/{mediaName} \
  --header 'Authorization: Bearer <token>'
"<string>"
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/product//media/ Description:
The /product/{id}/media/{mediaName} endpoint deletes a specific media file associated with a product.
Method:
DELETE
Path Parameters:
ParameterTypeDescription
idstringThe unique identifier of the product.
mediaNamestringThe name of the media file to delete.

Code Examples

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);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

Product ID

mediaName
string
required

Media file name

Response

Success

The response is of type file.