Fully replace an existing plan by ID
PUT/plans/:id
Replaces the entire plan record identified by {id} with the supplied payload. This is a full replacement — fields omitted from data are not preserved from the prior version, so submit the complete desired plan data on every call, not a partial diff. Submitting the same payload twice for the same {id} is idempotent. The caller must hold the UPDATE_PLAN permission. As with plan creation, data.payer is extracted and stored as payerId, and the referenced payer is not validated for existence. data's full shape is defined by the external Plan JSON schema and may include required fields beyond payer.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
- 502
- 503
The plan as it exists after the replacement.
Returned when tenant-id is missing or data fails validation against the Plan JSON schema. DAL-side validation errors are passed through with their original body.
Unauthorized - Authentication required
Forbidden - Caller lacks the UPDATE_PLAN permission
Returned when no plan exists with the given {id} for the tenant. Passed through unchanged from the downstream data service (DAL).
Returned for an unexpected internal error.
Returned when the downstream data service (DAL) responds with a server error.
Returned when the downstream data service (DAL) cannot be reached.