API by router
Onboarding internal
Check Eligible
Check if a worker is eligible for rostering based on onboarding status.
Called by the rostering cascade before contacting a worker. Returns eligible=true if no onboarding flow exists for the worker.
Path Parameters
instance_idInstance Id
Format
uuidQuery Parameters
person_idPerson Id
Format
uuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/onboarding/check-eligible?person_id=497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"eligible": true,
"reason": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Initiate Onboarding
Path Parameters
instance_idInstance Id
Format
uuidcustomer_idCustomer Id
Format
uuidflow_idFlow Id
Format
uuidinitiated_via?Initiated Via
Default
"agent"person_id?Person Id
Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/onboarding/initiate" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "flow_id": "0746f03b-16cc-49fb-9833-df3713d407d2" }'{
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"current_stage": "string",
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"flow_id": "0746f03b-16cc-49fb-9833-df3713d407d2",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"person_id": "087e858e-473c-4f50-b5b0-c1df6c021550",
"refresh_schedule_id": "549f35cd-d5a1-4cb0-8daf-3b87f4ccbf3b",
"stage_statuses": {},
"started_at": "2019-08-24T14:15:22Z",
"status": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Advance Onboarding Stage
Advance an onboarding instance to the next stage.
Idempotent: completing an already-completed stage returns current state. Serialised: FOR UPDATE lock prevents concurrent advances on same instance.
Path Parameters
instance_idInstance Id
Format
uuidonboarding_idOnboarding Id
Format
uuidcompleted_stage_slugCompleted Stage Slug
person_id?Person Id
submission_id?Submission Id
Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/onboarding/497f6eca-6276-4993-bfeb-53cbbbba6f08/advance" \ -H "Content-Type: application/json" \ -d '{ "completed_stage_slug": "string" }'{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}