Approve a Draft plan (create an approval)
POST/slot-plans/:planId/approvals
Moves a Draft plan to Approved and publishes SlotPlanApproved with
the full assignment map and the moves. The site's previously Approved
plan, if any, becomes Superseded in the same transaction. Approving a
plan that is not a Draft is a 409 plan-not-draft (final: stored and
replayed under the same Idempotency-Key); losing a race to
another approval of the same site is a 409 approved-plan-conflict or a
409 concurrent-modification (retryable: not stored, the key is
released and a retry under the same key executes again).
Request
Responses
- 200
- 400
- 404
- 409
- 500
The plan is now Approved.
Response Headers
true when the response is the stored answer of an earlier request with the same Idempotency-Key; absent on the first execution.
Malformed JSON body (also a body over 64 KiB, which is cut off and fails to parse), an unknown or trailing JSON field, a NUL character (U+0000) in the body or the query (Postgres text cannot hold it), an invalid path or query parameter, an unknown query parameter on a list or lookup endpoint, or a missing or invalid Idempotency-Key on a POST.
No plan has this id (also a path containing a NUL, answered with the resource-not-found problem).
The plan is not a Draft, another request changed the plan or the site's approval first, or the Idempotency-Key was already used with a different request (idempotency-key-reused). plan-not-draft and idempotency-key-reused are final (stored and replayed under the same key); approved-plan-conflict and concurrent-modification are retryable (not stored, the key is released, the retry executes again).
Unexpected server error.