The DELETE method allows you to permanently remove objects from the system. This operation cannot be undone, so use it with caution.
To delete an object, send a DELETE
HTTP request to the URL that refers to the specific object you want to remove.
This example demonstrates how to delete a product with ID 12:
curl --user admin@example.com:APIkey -X DELETE 'https://www.venddor.com.br/api/products/12'
When an object is successfully deleted, the server will respond with:
Status Code | Description |
---|---|
204 No Content |
The object has been deleted successfully. No body is returned. |
Status Code | Description |
---|---|
400 Bad Request |
The object could not be deleted due to validation errors or dependencies. |
401 Unauthorized |
Authentication credentials were missing or invalid. |
403 Forbidden |
The authenticated user does not have permission to delete the object. |
404 Not Found |
The specified object does not exist. |