Skip to main content
POST
/
hr-integrations
/
{id}
/
sync
curl --request POST \
  --url "https://v1-api.ticket-plus.app/hr-integrations/7/sync" \
  --header "Authorization: Basic <base64(clientId:clientSecret)>" \
  --header "Content-Type: application/json" \
  --data '{
    "syncId": "sync-2024-05-14-001",
    "employees": [
      {
        "firstName": "Anna",
        "lastName": "Müller",
        "email": "[email protected]",
        "profileImage": null,
        "dateOfBirth": "1990-04-15",
        "hrId": "emp_HR_001",
        "startDate": "2022-03-01",
        "terminationDate": null,
        "autoSyncEmployee": null,
        "absences": []
      }
    ]
  }'
import requests, base64

credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

res = requests.post(
    "https://v1-api.ticket-plus.app/hr-integrations/7/sync",
    headers={
        "Authorization": f"Basic {credentials}",
        "Content-Type": "application/json",
    },
    json={
        "syncId": "sync-2024-05-14-001",
        "employees": [
            {
                "firstName": "Anna",
                "lastName": "Müller",
                "email": "[email protected]",
                "profileImage": None,
                "dateOfBirth": "1990-04-15",
                "hrId": "emp_HR_001",
                "startDate": "2022-03-01",
                "terminationDate": None,
                "autoSyncEmployee": None,
                "absences": [],
            }
        ],
    },
)
print(res.status_code)  # 204
const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

const res = await fetch(
  "https://v1-api.ticket-plus.app/hr-integrations/7/sync",
  {
    method: "POST",
    headers: {
      Authorization: `Basic ${credentials}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      syncId: "sync-2024-05-14-001",
      employees: [
        {
          firstName: "Anna",
          lastName: "Müller",
          email: "[email protected]",
          profileImage: null,
          dateOfBirth: "1990-04-15",
          hrId: "emp_HR_001",
          startDate: "2022-03-01",
          terminationDate: null,
          autoSyncEmployee: null,
          absences: [],
        },
      ],
    }),
  },
);
console.log(res.status); // 204
(empty body)
Submits your complete current employee roster to JobTicket. The API performs a full reconciliation — adding new employees, updating changed records, and offboarding employees no longer in the list.
This endpoint is only available for HR integrations of type API Integration. Attempting to trigger a sync on an integration of any other type will return a 422 Unprocessable Entity error.
curl --request POST \
  --url "https://v1-api.ticket-plus.app/hr-integrations/7/sync" \
  --header "Authorization: Basic <base64(clientId:clientSecret)>" \
  --header "Content-Type: application/json" \
  --data '{
    "syncId": "sync-2024-05-14-001",
    "employees": [
      {
        "firstName": "Anna",
        "lastName": "Müller",
        "email": "[email protected]",
        "profileImage": null,
        "dateOfBirth": "1990-04-15",
        "hrId": "emp_HR_001",
        "startDate": "2022-03-01",
        "terminationDate": null,
        "autoSyncEmployee": null,
        "absences": []
      }
    ]
  }'
import requests, base64

credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

res = requests.post(
    "https://v1-api.ticket-plus.app/hr-integrations/7/sync",
    headers={
        "Authorization": f"Basic {credentials}",
        "Content-Type": "application/json",
    },
    json={
        "syncId": "sync-2024-05-14-001",
        "employees": [
            {
                "firstName": "Anna",
                "lastName": "Müller",
                "email": "[email protected]",
                "profileImage": None,
                "dateOfBirth": "1990-04-15",
                "hrId": "emp_HR_001",
                "startDate": "2022-03-01",
                "terminationDate": None,
                "autoSyncEmployee": None,
                "absences": [],
            }
        ],
    },
)
print(res.status_code)  # 204
const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

const res = await fetch(
  "https://v1-api.ticket-plus.app/hr-integrations/7/sync",
  {
    method: "POST",
    headers: {
      Authorization: `Basic ${credentials}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      syncId: "sync-2024-05-14-001",
      employees: [
        {
          firstName: "Anna",
          lastName: "Müller",
          email: "[email protected]",
          profileImage: null,
          dateOfBirth: "1990-04-15",
          hrId: "emp_HR_001",
          startDate: "2022-03-01",
          terminationDate: null,
          autoSyncEmployee: null,
          absences: [],
        },
      ],
    }),
  },
);
console.log(res.status); // 204
(empty body)
This is a full-roster replace operation. Any employee omitted from the employees array will be offboarded in JobTicket. Always include every currently active employee in the payload.

Path Parameters

id
number
required
The unique numeric ID of the HR integration to sync against. Must refer to an integration of type API Integration. Obtain this from List HR Integrations.

Body

syncId
string
required
A unique identifier for this sync operation. Used for idempotency and audit logging. Use a UUID or timestamp-based string. Re-submitting with the same syncId is safe — duplicate submissions will be deduplicated.
employees
object[]
required
The complete current employee roster from your HR system. Must contain at least one employee. Employees absent from this list will be offboarded in JobTicket.

Response

(empty body)
null
204 No Content — The sync has been accepted and will process in the background. The response body is empty.

Authorizations

Authorization
string
header
required

HTTP Basic Auth using your API key credentials. Use the username and password issued from the Developer Portal. Encode them as Base64(username:password) and pass in the Authorization: Basic <token> header.

Path Parameters

id
number
required

The unique numeric ID of the HR integration to sync against.

Body

application/json
syncId
string
required

A unique identifier for this sync operation. Used for idempotency and audit logging. Use a UUID or timestamp-based string.

employees
object[]
required

The complete current employee roster from your HR system. Must contain at least one employee. Employees absent from this list will be offboarded in JobTicket.

Minimum array length: 1

Response

204 - application/json

Sync accepted and will process in the background. The response body is empty.

Empty body on success.