Skip to main content

Delete Product

This endpoint deletes a specific product from a declaration.

Endpoint

DELETE /api/v1/declarations/{declaration_id}/products/{product_id}

Path Parameters

ParameterTypeDescription
declaration_idstringThe unique identifier of the declaration
product_idstringThe unique identifier of the product to delete

Headers

HeaderValueDescription
AuthorizationRequired. Bearer token for authentication
X-Target-ServerRequired. 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"
}