Deals
Decide Discount
Approve or reject a pending discount. Owners and admins only, never the person who asked (422 `own_request`), within the approver's own limit (403 `above_your_limit`). Logged in the audit trail. People only (not Zero, not API keys).
API key access
Needs the
admin scope with an API key (ro_pat_...). A signed-in session uses the caller's role.POST
/api/v1/deals/{deal_id}/room/discount/decisionAuthorizationBearer <token>
Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Path Parameters
deal_idstring
Format
uuidHeader Parameters
X-Workspace-Id?string | null
Id of the workspace to act on (must be a member).
approveboolean
note?string | null
Length
length <= 500Response Body
curl -X POST "http://localhost:8000/api/v1/deals/497f6eca-6276-4993-bfeb-53cbbbba6f08/room/discount/decision" \ -H "X-Workspace-Id: string" \ -H "Content-Type: application/json" \ -d '{ "approve": true }'{
"deal_id": "2fa5b64f-5b72-4263-958e-07b76f41abe3",
"currency": "string",
"items": [
{
"name": "string",
"quantity": 0.1,
"unit_price": 0.1,
"total": 0.1
}
],
"subtotal": 0.1,
"discount_pct": 0.1,
"discount_applied_pct": 0.1,
"discount_amount": 0.1,
"total": 0.1,
"discount": {
"status": "string",
"requested_pct": 0.1,
"requested_by": "cda0f200-65cd-4343-aedd-9c936b908826",
"requested_by_name": "string",
"requested_at": "2019-08-24T14:15:22Z",
"decided_by": "4accc021-c0cc-4c2c-8a78-605a0ed6da31",
"decided_at": "2019-08-24T14:15:22Z",
"note": "string",
"can_approve": true
},
"my_discount_limit": 0.1,
"proposal": "string",
"proposal_prompt_id": "string",
"proposal_model": "string",
"proposal_updated_at": "2019-08-24T14:15:22Z",
"plan": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"position": 0,
"title": "string",
"owner": "string",
"due_date": "2019-08-24",
"done_at": "2019-08-24T14:15:22Z",
"done_by": "string"
}
],
"share": {
"active": true,
"created_at": "2019-08-24T14:15:22Z",
"view_count": 0,
"last_viewed_at": "2019-08-24T14:15:22Z"
},
"signature": {},
"locked": true,
"events": [
{
"kind": "string",
"actor": "string",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"user_name": "string",
"payload": null,
"occurred_at": "2019-08-24T14:15:22Z"
}
],
"updated_at": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}