Skip to content

Delete Deal

DELETE
/deals/{deal_id}

Delete a deal.

THE TOMBSTONE RULE (#16242): deal.deleted has to be self-contained, because by the time a consumer reads it the row is gone and deal_id resolves to nothing. The payload therefore comes from RETURNING on the DELETE itself — one round trip, and no window in which a concurrent write could change what a preceding SELECT had read. background_tasks is injected (not a body field, so the OpenAPI schema is unchanged) for the same reason as on PATCH.

Authorizations

Parameters

Path Parameters

deal_id
required

Deal ID (UUID)

string

Deal ID (UUID)

Header Parameters

X-Target-Org-Id
Any of:
string

Responses

200

Successful Response

object
data
required
object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string