Delete Product
This endpoint deletes a specific product from a declaration.
Endpoint
DELETE /api/v1/declarations/{declaration_id}/products/{product_id}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| declaration_id | string | The unique identifier of the declaration |
| product_id | string | The unique identifier of the product to delete |
Headers
| Header | Value | Description |
|---|---|---|
Authorization | Required. Bearer token for authentication | |
X-Target-Server | Required. Target server identifier |
Response
Success Response (204 No Content)
The endpoint returns no content on successful deletion.
Example Request
curl --request DELETE \
--url '{{HOST}}/api/v1/declarations/67db101b6f7e65dcdd379d6f/products/67db13bb35fcbe5344d72cd6' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'X-Target-Server: declaration'
Error Responses
404 Not Found
{
"error": "Product not found"
}
403 Forbidden
{
"error": "You do not have permission to delete this product"
}
401 Unauthorized
{
"error": "Unauthorized"
}