Create the offboarding of a leaver from an HR system event
Start the offboarding of a leaver from what an HR system or an automation knows: an email address of the employee, the last day, and a free data object with everything else. Primo finds the employee holding that address and starts the offboarding as createOffboarding does: the ticket and its first steps, or the Offboarding Agent when it runs the offboardings of the company. data is written on the offboarding as its notes for the agent. Refused with 404 EMPLOYEE_NOT_FOUND when no employee holds the address (a hidden employee is not matched), 409 SEVERAL_EMPLOYEES_WITH_EMAIL when more than one does, and the refusals of createOffboarding (OFFBOARDING_ALREADY_EXISTS, TERMINATION_DATE_REQUIRED, …). With the employee id in hand, use createOffboarding instead.
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Body
An email address of the leaver, as Primo knows it
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$The leaver's last day (YYYY-MM-DD or ISO 8601). Defaults to the termination date already on the employee.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Everything else the caller knows about the departure, as a free JSON object (reason, manager, equipment, who takes over…), at most 5000 characters once serialized. Written on the offboarding as its notes for the Offboarding Agent. May hold personal data.
Response
Whether the offboarding runs on the steppers from before offboarding tickets
PENDING, SCHEDULED, IN_PROGRESS, CLOSED, CANCELED COCKPIT, MERGE, KOMBO, API ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$The offboarding ticket, whose tasks are its steps (getTicket)
The reference the cockpit shows for that ticket
How the offboarding holds its steps: ACTIONS (the steppers from before offboarding tickets) or INTENTS (typed tasks under its ticket, run through the intent tools such as executeOffboardingConfirmationIntent). Null while it has neither a ticket nor a step.
ACTIONS, INTENTS Who runs the offboarding, decided once at its creation: AGENT (the Offboarding Agent, on its own ticket) or CLASSIC (the ticket and steps of the offboarding settings). Null on one created before.
AGENT, CLASSIC When the Offboarding Agent asked its ticket to wake it next; null while it sleeps on nothing.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Free text the admin or the caller wrote for the Offboarding Agent at its creation. May hold personal data: returned on a single offboarding only, never on getOffboardings.