Skip to content

Create or update contracts

Request

Requires scope: external_employees.

Security
apiKey(Required scopes: external_employees)
Path
employeeReferencestringrequired

Unique reference to the employee

Bodyapplication/json
Array [
contractReferencestring

Unique reference to the contract per employee. This could be a serial number or a unique id provided by an external system.

officeinteger

Identifier of the Dyflexis office.

Example:1
typeinteger

Identifier of the Dyflexis contract type

Example:1
startstring

Startdate of contract in YYYY-MM-DD format

Example:"2026-01-01"
endstring

Enddate of contract in YYYY-MM-DD format

Example:"2026-12-31"
hoursnumber

Contractual hours the employee works in a workweek.

Example:40
daysnumber

Average days the employee works in a workweek.

Example:5
salarynumber

Remuneration for employment per hour.

Example:12.95
maxHoursPerWeeknumber or null

Max hours the employee works in a workweek (only synchronised when the "upper limit" setting is enabled for the contract type).

Example:50
]
curl -i -X POST \
  'https://developer.dyflexis.com/_mock/openapi/api2/external-employees/{employeeReference}/contracts' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "contractReference": "string",
      "office": 1,
      "type": 1,
      "start": "2026-01-01",
      "end": "2026-12-31",
      "hours": 40,
      "days": 5,
      "salary": 12.95,
      "maxHoursPerWeek": 50
    }
  ]'

Responses

Success. On a successful upsert the body is an empty JSON array. Data warnings and errors are reported via the 400 response instead.

Bodyapplication/json
Array of any
Response
[]