HydraCore
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.

GET
/internal/v1/instances/{instance_id}/onboarding/check-eligible

Path Parameters

instance_idInstance Id
Formatuuid

Query Parameters

person_idPerson Id
Formatuuid

Response 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

POST
/internal/v1/instances/{instance_id}/onboarding/initiate

Path Parameters

instance_idInstance Id
Formatuuid
customer_idCustomer Id
Formatuuid
flow_idFlow Id
Formatuuid
initiated_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.

POST
/internal/v1/instances/{instance_id}/onboarding/{onboarding_id}/advance

Path Parameters

instance_idInstance Id
Formatuuid
onboarding_idOnboarding Id
Formatuuid
completed_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"
    }
  ]
}