curl --request DELETE \
--url https://api.royalti.io/product/{id} \
--header 'Authorization: Bearer <token>'{
"message": "Product was deleted successfully."
}/product/
curl --request DELETE \
--url https://api.royalti.io/product/{id} \
--header 'Authorization: Bearer <token>'{
"message": "Product was deleted successfully."
}/product/{id} endpoint allows deleting a specific product identified by its unique ID.
Method:DELETE
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the product. |
const response = await fetch('https://api.royalti.io/product/example-id', {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);