Deals

Remove the main image

DELETE/deals/{dealId}/image
deals:writeremove_deal_imageDestructiveIdempotentDeprecatedSunset 2027-06-30

Clears the deal's main (hero) image and returns 204; clearing an empty one also returns 204. A published deal returns 409 invalid_state; unpublish it first. dry_run shows the result without saving it. Emits deal.updated with image_id in changed_fields and sends no email. The file stays in the assets folder, so PATCH /deals/{id} with image_id undoes it. Deprecated: it will be withdrawn on 2027-06-30. PATCH /deals/{id} with image_id: null replaces it; the Link header names the replacement.

Path parameters

  • dealIdstring (uuid)Required#

    The deal's public uuid.

Query parameters

  • dry_runboolean#

    Validate and run the call without committing it, returning what the real call would return with meta.dry_run set.

Responses

204

Removed (no content).

401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
409

The request conflicts with existing state (error.code = conflict), e.g. a compliance flow with the requested name already exists.

Error
422

Request validation failed (HTTP 422). The body is either the Laravel validation envelope (message + field-keyed errors) or the API error envelope for domain rejections (e.g. form_type_not_supported, folder_locked, parent_not_found, folder_not_empty).

429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X DELETE https://your-org-domain/kong/core/api/v2/deals/{dealId}/image\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"