Approve or reject a roster import
GET/roster/:rosterId/import
Records a decision on a roster job that has finished validation and, when approved, starts ingesting its rows.
When to use: call this once a roster has been reviewed and someone has decided whether its data should be written into the platform.
Preconditions: supply the tenant-id header, the job's rosterId, and the action query parameter, which is matched case-insensitively. The roster must be in VALIDATED, IN_PROGRESS, or VALIDATION_FAILED state; a job in any other state is rejected with 400. A roster still in PRE_PROCESSING is a special case - it can only be rejected, never approved, and only by a provider data administrator who does not also hold the roster analyst role.
Outcomes: approved moves the roster to APPROVED and queues ingestion, so its rows begin flowing into the platform; rejected moves it to CANCELLED and no further processing takes place.
Note on the HTTP method: this endpoint is exposed as a GET but changes state and triggers ingestion. Treat it as a write - never issue it speculatively, prefetch it, or allow it to be cached or retried automatically.
What you get back: the roster job reflecting the decision. Not idempotent - approving a roster twice can queue ingestion twice. The job's data object carries its status, file details, and record counters; see GET /roster/{id} for the full list of keys it can hold.
Request
Responses
- 200
- 400
- 401
- 403
The roster job after the decision was applied, at its new status.
Returned for every decision that cannot be applied: action is not approved or rejected, the roster is in a state that does not accept a decision (including an attempt to approve a roster still in PRE_PROCESSING), no roster job with the supplied rosterId exists, or a PRE_PROCESSING rejection was attempted by a caller whose role does not allow it. All of these currently surface as 400 - not 404 or 403 - so read the error message to distinguish the cause.
Returned when the request carries no valid authentication.
Returned when the caller lacks the UPDATE_ROSTER permission for this tenant.