Skip to main content
POST
/
product
/
bulk
/
delete
Delete Bulk Products
curl --request POST \
  --url https://api.royalti.io/product/bulk/delete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ids": [
    "<string>"
  ]
}
'
{
  "message": "Products deleted successfully",
  "deletedCount": 5
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/product/bulk/delete Description:
The /product/bulk/delete endpoint allows deletion of multiple products simultaneously.
Method:
POST
Request Payload:
ParameterTypeDescription
idsarrayAn array of product IDs to delete.

Code Examples

const response = await fetch('https://api.royalti.io/product/bulk/delete', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ids": [
      {}
    ]
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

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

Body

application/json
ids
string[]
required

An array of product IDs to delete

Response

Success

message
string
deletedCount
integer