Create a new plan for a tenant
POST/plans
Creates a new plan and associates it with the specified tenant. This operation is not idempotent — submitting the same payload twice creates two separate plan records. The caller must hold the CREATE_PLAN permission. The request body's data.payer field is extracted and stored as the plan's payerId; the referenced payer is not validated for existence before the plan is created. data's full shape is defined by the external Plan JSON schema and may include required fields beyond payer.
Request
Responses
- 201
- 400
- 401
- 403
- 500
- 502
- 503
The created plan, including the server-assigned id. Store this id to reference the plan in subsequent calls (e.g. PUT /plans/{id}).
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 CREATE_PLAN permission
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.