Skip to content

Staff API

The people who work here: records, leave, roster, attendance, advances, payroll and deposits.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/staff

Staff

The people who work here. Needs miniself:read.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
statequerystringNoOnly people in this state.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff

Add a person

Adds a person with pay and a start day. Probation is limited to the country's longest when it states one. Needs the right to change settings.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff/{id}

One person

The record. Needs miniself:read.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff/{id}/notes

What to know about a person

Things in the record the owner should know, in plain words. Needs miniself:read.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff/{id}/letter

Appointment letter

The letter as it reads now. Needs miniself:read.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff/{id}/contract/send

Send the letter

Fixes the letter's fingerprint and returns the text to send. Needs the right to change settings.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff/{id}/contract/accept

Record acceptance

Records that the person accepted the letter that was sent. Refused when the terms changed since it was sent. Needs miniself:write.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff/{id}/probation

Probation

Sets the end, extends it or confirms the person. Needs the right to change settings.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff/{id}/exit

Set the last day

The person stays on the payroll through that day. Needs the right to change settings.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff/{id}/archive

File as left

Files the record as left. Needs the right to change settings.

Scope staff:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff/{id}/settlement

What is owed on leaving

A preview. A line that depends on a rule the country leaves blank has no amount and says what is missing. Needs the right to change settings.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff/{id}/leave-balance

Leave balance

Earned and taken, in tenths of a day. Blank where no entitlement is known. Needs miniself:read.

Scope staff:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
kindquerystringYesThe kind of leave.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff-settings

Staff settings

Leave rules, rest day, holidays and the rest. Needs miniself:read.

Scope staff-settings:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

PUT/v1/staff-settings

Save staff settings

Replaces the settings. Needs the right to change settings.

Scope staff-settings:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/leave

Leave

Leave requests. Needs miniself:read.

Scope leave:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
staffquerystringNoOnly this person.
statequerystringNoOnly in this state.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/leave

Ask for leave

Counts working days without the rest day and holidays. Anything the owner should look at is named. Needs miniself:write.

Scope leave:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/leave/{id}/decide

Decide leave

Approves or declines a request. Needs the right to change settings.

Scope leave:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/leave/{id}/cancel

Cancel leave

Cancels a request or approved leave. Needs miniself:write.

Scope leave:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/shifts

Shifts

The roster. Needs miniself:read.

Scope shifts:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
staffquerystringNoOnly this person.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/shifts

Add a shift

Refused when it breaks the country's limits on hours or rest, unless a reason is given, which is kept. Needs miniself:write.

Scope shifts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/shifts/swap

Swap shifts

Two people swap two shifts, each staying inside the limits. Needs miniself:write.

Scope shifts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/shifts/{id}/confirm

Confirm a shift

Needs miniself:write.

Scope shifts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/shifts/{id}/cancel

Cancel a shift

Needs miniself:write.

Scope shifts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/attendance

The day's sheet

Each person on the payroll against their shifts. Needs miniself:read.

Scope attendance:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
dayquerystringYesThe day.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/attendance/arrive

I am in

Records an arrival from a tap, a missed call, the business's own activity or the manager. The first one stands. Needs miniself:write.

Scope attendance:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/attendance/depart

I am out

Needs miniself:write.

Scope attendance:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/attendance/dispute

Say a day is wrong

Within three days of the day. Needs miniself:write.

Scope attendance:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/attendance/correct

Correct a day

The old time is kept with the reason. Needs the right to change settings.

Scope attendance:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/attendance/sign-off

Sign off the day

Closes the day for everyone on the payroll. Needs the right to change settings.

Scope attendance:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/staff-advances

Advances

Money advanced against pay. Needs the right to change settings.

Scope staff-advances:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
staffquerystringNoOnly this person.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/staff-advances

Give an advance

The instalment is taken from each month's pay, never more than the owner's cap on the pay left. Needs the right to change settings.

Scope staff-advances:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/payroll

Payroll

Recent months. Needs the right to change settings.

Scope payroll:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll

Draft a month

Works out every line from the roster, leave, advances and the country's rows. A month already approved is not redrafted. Needs the right to change settings.

Scope payroll:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/payroll/{id}

One month

Needs the right to change settings.

Scope payroll:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll/{id}/acknowledge

Mark lines seen

Lines that need a human must be seen before approval. Needs the right to change settings.

Scope payroll:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll/{id}/approve

Approve the payroll

Moves no money. Lists the deposits it owes. Needs the right to change settings.

Scope payroll:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll/{id}/paid

Mark the payroll paid

The owner paid the batch and types its reference. Advances are taken for the month, once. Needs the right to change settings.

Scope payroll:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/payroll/{id}/payslips

Payslips

Each person's slip in their language. Needs the right to change settings.

Scope payroll:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/payroll-deposits

Deposits

What payroll owes an authority. Needs the right to change settings.

Scope payroll-deposits:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
statequerystringNoOnly in this state.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll-deposits/{id}/paid

Mark a deposit paid

Needs the right to change settings.

Scope payroll-deposits:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/payroll-deposits/{id}/date

Give a deposit its date

For a deposit whose date the country's rules do not give. Needs the right to change settings.

Scope payroll-deposits:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.