# SD Worx (Web service) — HRIS API: connection

> Canonical URL: https://developers.apideck.com/apis/hris/sdworx-webservice-oidc/connection

# How to connect to SD Worx (Web service)

This guide walks you through connecting SD Worx HR Selfservice so the integration can read your employees and their absences (time off).

> **Note:** SD Worx HR Selfservice does not use a login screen. Access is granted by SD Worx to a certificate that your HR Selfservice administrator registers with SD Worx support, and you enter the resulting Client ID and the certificate's private key in the connection form below.

---

## What you need

- An active **SD Worx HR Selfservice** entity with the Absences module.
- A person who is set as **administrator in HR Selfservice**. SD Worx only accepts the certificate request from that person's known email address; a software partner or accountant cannot request it on your behalf.
- Your **SD Worx customer number** (for example `1AB1234`).

---

## 1. Generate a certificate

SD Worx requires a **self-signed certificate**; their documentation uses an RSA 4096-bit key. On a machine with OpenSSL:

```
openssl req -new -newkey rsa:4096 -nodes -keyout sdworx.key -out sdworx.csr
openssl x509 -req -sha256 -days 365 -in sdworx.csr -signkey sdworx.key -out sdworx.pem
```

`sdworx.key` is the private key. Keep it in a secure place and never send it to anyone, including SD Worx. If you added a passphrase, export an unencrypted copy for Apideck, because Apideck signs the login request with the key directly:

```
openssl pkey -in sdworx.key -out sdworx-unencrypted.pem
```

---

## 2. Register the certificate with SD Worx

Your HR Selfservice administrator emails **support@sdworx.com**, quoting your SD Worx customer number, asking to activate the HR Selfservice Absences webservice (OIDC) and attaching **only the certificate section** of `sdworx.pem`: the text between `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. SD Worx registers one certificate per request and replies with a **Client ID**, a long alphanumeric string. The Client ID only gives access to your own HR Selfservice entity. Ask SD Worx for a timeline; there is no self-service portal for this step.

---

## 3. Fill in the connection form

When you open the connection, enter:

| Field | Description |
|-------|-------------|
| **Client ID** | The Client ID SD Worx support issued for your registered certificate. |
| **Private key** | The certificate's private key as unencrypted PEM text, including the `-----BEGIN PRIVATE KEY-----` (or `-----BEGIN RSA PRIVATE KEY-----`) and matching `END` lines, without a passphrase. |

> **Check the first line before you paste.** A key that starts with `-----BEGIN ENCRYPTED PRIVATE KEY-----` is passphrase protected and is the most common reason the connection fails to authorize. Convert it with the `openssl pkey` command from step 1 and paste the copy that starts with `-----BEGIN PRIVATE KEY-----`. Do not paste the certificate (`-----BEGIN CERTIFICATE-----`) either: SD Worx has that, Apideck needs the key.

Click **Save**. Apideck signs in to SD Worx with these details and the connection shows as connected.

---

## FAQ and troubleshooting

### Do I need to log in to SD Worx?

No. There is no SD Worx login screen. The certificate registered with SD Worx is what grants access; you only enter the Client ID and private key once.

### I already use the SD Worx (Web service) Legacy connection with a username and password

That connection keeps working for as long as SD Worx supports username/password access, but SD Worx no longer activates it for new customers and has announced that everyone will have to move to the certificate-based method. Register a certificate as described above and set up this connection; the data it returns is the same.

### The connection shows an error after saving

Look at the first line of what you pasted: `-----BEGIN ENCRYPTED PRIVATE KEY-----` means the key is still passphrase protected, and `-----BEGIN CERTIFICATE-----` means you pasted the certificate instead of the key. An unencrypted key starts with `-----BEGIN PRIVATE KEY-----` or `-----BEGIN RSA PRIVATE KEY-----`; both work, so only convert the key if it is encrypted. Also check that it belongs to the certificate SD Worx registered and that the Client ID is the one SD Worx issued for the HR Selfservice webservice: a Client ID issued for another SD Worx API (for example the payroll API) does not work here.

### Time off requests come back empty or the request fails

The webservice requires `start_date`, `end_date`, `company_id` and `employee_id` filters: one employee over one date range per request. List Employees returns both values (`company_id` is the employer number, `id` the employee number). Each page of the list re-reads the report, so use `limit=200` to keep the number of pages low. SD Worx also limits each Client ID to 1,000 requested employee-months per day (for example, absences for 100 employees over one month count as 100). Narrow the date range or sync fewer employees per day if you hit the limit; the quota resets daily.

### My certificate is about to expire

Generate a new certificate and have your HR Selfservice administrator send the public part to SD Worx support well before expiry, then paste the new private key into the connection. There is no in-product reminder, so track the expiry date yourself.

---

If the connection is connected but the data still looks wrong, contact [Apideck Support](https://help.apideck.com/en/articles/7774658).


[API reference](https://developers.apideck.com/apis/hris/reference.md) · [Coverage matrix](https://developers.apideck.com/apis/hris/coverage)
