Image
abstract swish line in gradient colouring from pink to blue on a dark blue background

Event stream documentation

OccupancyCreated, OccupancyEnded, OccupancyReinstated and OccupancyDeleted events

The payload for these events contains an array of job titles, showing the changes to job title over time. The array for the jobTitleChanged event will only contain the jobTitles after and including the one that was changed. The reason for this is that changing a job title can have an effect on a subsequent job title revisions, but it cannot affect previous ones.

An OccupancyCreated event will be raised when:

  • a person starts a new job (this effectively creates a new occupancy resource)

An OccupancyEnded event will be raised when:

  • a person finishes in a job (this effectively occurs when an end date is applied to an existing occupancy)

An OccupancyReinstated event will be raised when:

  • the ending of a person in a job is reverted (this effectively occurs when an end date is removed from an existing occupancy)

An OccupancyDeleted event will be raised when:

  • a person's association with a job is deleted (this is not the same as ending an occupancy)

Field definitions for this event;

Field NameData TypeAdditional information
occupancyIdguidn/a
personalReferencestringmax-length: 20
jobReferencestringmax-length: 20
startDatedatethe start date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
namestringmax-length: 80. The job title of the assigned job on the given revision dates
startDatedatethe start date of the job title revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the job title revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)


Example of this event

{
  "occupancyId": "",
  "personalReference": "",
  "jobReference": "",
  "startDate": "",
  "endDate": "",
  "jobTitleRevisions": [{
    "name": "",
    "startDate": ""
    "endDate": ""
    }
  ]
}
          

OccupancyStartDateChanged event

The payload for this event contains the Person id and reference number of the person whose occupancy start date has been changed along with the Occupancy id and the revised start date.

An OccupancyStartDateChanged event will be raised when:

  • The Occupancy start date of an employee has been modified

Field definitions for this event;

Field NameData TypeAdditional information
personIdguidn/a
personalReferenceNumberstringmax-length: 20
occupancyIdguidthe identify of the occupancy
occupancyStartDatedatethe revised start date of the person's Occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)


Example of this event

{
"personId": "",
"personalReferenceNumber": "",
"occupancyId": ""
"occupancyStartDate": ""
}

OccupancyHoursAndBasisCreated and OccupancyHoursAndBasisChanged events

The payload for these events contains an array of hours and basis revisions, showing the changes to the hours and basis over time. The array will only contain the hours and bases after and including the one that was changed. The reason for this is that changing hours and bases can have an effect on a subsequent hours and basis revisions, but it cannot affect previous ones.

An OccupancyHoursAndBasisCreated event will be raised when:

  • a person is assigned to a job

An OccupancyHoursAndBasisChanged event will be raised when:

  • the hours and basis for a person is changed (hours and basis can be inherited attributes and therefore changes to the source/inherited values will raise this event)

Field definitions for this event;

Field NameData TypeAdditional information
occupancyIdguidn/a
personalReferencestringmax-length: 20
personIdguidn/a
jobReferencestringmax-length: 20
startDatedatethe start date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
startDatedatethe start date of the hours and basis revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the hours and basis revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
contractualHoursdecimal 
fteHoursdecimal 
fteValuedecimal 
annualWeeksWorkeddecimal 
categoryCodestringmax-length: 40; reference-data
basisCodestringmax-length: 40; reference-data
typeCodestringmax-length: 40; reference-data
employmentIsTermTimeOnlybooleann/a


Example of this event

{
  "occupancyId": "",
  "personalReference": "",
  "jobReference": "",
  "startDate": "",
  "endDate": "",
  "hoursAndBasisRevisions": [{
      "startDate": "",
      "endDate": "",
      "contractualHours": "",
      "fteHours": "",
      "fteValue": "",
      "annualWeeksWorked": "",
      "categoryCode": "",
      "basisCode": "",
      "typeCode": "",
      "employmentIsTermTimeOnly": ""
    }
  ]
}

OccupancySalaryTimelineCreated and OccupancySalaryTimelineChanged events

The payload for these events contains an array of salary revisions, showing the changes to the salary over time. The array will only contain the salaries after and including the one that was changed. The reason for this is that changing salary can have an effect on a subsequent salary revisions, but it cannot affect previous ones.

An OccupancySalaryTimelineCreated event will be raised when:

  • a person is added to their first job

An OccupancySalaryTimelineChanged event will be raised when:

  • the salary for a person is changed (salary can have inherited attributes and therefore changes to the source/inherited values will raise this event)

Field definitions for this event;

Field NameData TypeAdditional information
occupancyIdguidn/a
personalReferencestringmax-length: 20
jobReferencestringmax-length: 20
startDatedatethe start date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the occupancy. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
startDatedatethe start date of the salary revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the salary revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
rateOfPaydecimal 
frequencyCodestringreference-data


Example of this event

{
  "occupancyId": "",
  "personalReference": "",
  "jobReference": "",
  "startDate": "",
  "endDate": "",
  "salaryRevisions": [{
      "startDate": "",
      "endDate": "",
      "rateOfPay": "",
      "frequencyCode": ""
    }
  ]
}

OccupancySalaryAndHoursTimelineChanged event

The payload for this event contains an array of calculated values based on the 'salary' and the 'hours and basis' revisions, showing the changes over time. The array will only contain the changes after and including the one that was changed. The reason for this is that changes can have an effect on a subsequent revisions, but it cannot affect previous ones.

An OccupancySalaryAndHoursTimelineChanged event will be raised when:

  • the salary for a person is changed (salary can have inherited attributes and therefore changes to the source/inherited values will raise this event)
  • and/or the hours and basis for a person is changed (again this can have inherited attributes and therefore changes to the source/inherited values will raise this event)

Field definitions for this event;

Field NameData TypeAdditional information
occupancyIdguidn/a
personIdguidn/a
personalReferenceNumberstringmax-length: 20
startDatedatethe start date of the salary and/or hours and basis revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
endDatedatethe end date of the salary and/or hours and basis revision. The dateTime is in ISO format and should be in coordinated universal time (UTC) (e.g. 2019-05-02T15:17:00Z)
proRatedSalarydecimal 
annualHoursWorkeddecimal 
fteValuedecimal 
hourlyRatedecimal 
hourlyRateDailydecimal 
frequencyCodestringreference-data
currencyCodestringreference-data


Example of this event

{
  "occupancyId": "",
  "personId": "",
  "personalReferenceNumber": "",
  "salaryRevisions": [{
      "startDate": "",
      "endDate": "",
      "proRatedSalary": "",
      "annualHoursWorked": "",
      "fteValue": "",
      "hourlyRate": "",
      "hourlyRateDaily": "",
      "frequencyCode": ""
      "currencyCode": ""
    }
  ]
}

Looking for something specific?