Quick start
- Create a key
The company administrator opens Quotas → Settings → Connections, names the connection (after your app) and confirms with their password. The key starts with qk_ and is shown only once.
- Test it
A simple call to /me returns the company and the connection name.
curl https://quotas.app/api/integration/v1/me \ -H "X-Api-Key: $QUOTAS_API_KEY" - Send a slot
One PUT per slot, with your own ID. Send it again on every change: Quotas updates it without creating duplicates.
curl -X PUT https://quotas.app/api/integration/v1/shifts/INT-2027-0042 \ -H "X-Api-Key: $QUOTAS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"startsAt":"2027-01-04T07:30:00","endsAt":"2027-01-04T16:00:00","breakMinutes":30,"workers":["lucas@example.be"],"title":"Site Dupont"}'
Authentication and security
Every request carries the key in the X-Api-Key header. It is never accepted in the address (URL parameter), where it would end up in logs.
Each app has its own key, limited to a single company and to the slots it sent. It sees no clock-ins, no leave and no data from other connections.
Quotas only keeps a SHA-256 fingerprint of the key: even we cannot read it back. Lost the key? Renew it, the old one stops working immediately.
Only the account owner creates a key, with their password. All administrators get an email, and every creation, renewal or deletion is recorded in the audit log.
Rate limited per connection, IP addresses blocked after several invalid keys, HTTPS required: a plain-HTTP request is refused, not redirected.
Principles
- Your ID
- Each slot carries an externalId you choose (your job's reference or id): 1 to 100 characters among letters, digits and . _ : / -. It is what makes requests idempotent.
- People
- Team members are matched by their email address in Quotas (see /members). An unknown address is reported, never created: only the company invites its team. A slot with several people becomes one shift per person.
- Times
- ISO 8601 format. With an offset (+01:00 or Z) the time is converted; without one, it is read as Brussels time. Responses are always in Europe/Brussels, with an offset.
- Locked shifts
- A received shift can only be changed from your app: in Quotas it shows the connection name and any edit is refused. Clock-ins, leave, reminders and reports work as usual. If the connection is deleted, the shifts stay and become editable again.
Reference
JSON in and out (Content-Type: application/json header when sending).
/meChecks the key. Returns the connection, the company and the time zone.
{
"connection": {
"id": 3,
"name": "SiteManager"
},
"company": {
"id": 12,
"name": "Dupont & Fils"
},
"timezone": "Europe/Brussels"
}
/membersThe company's active team members, to match your people by email address.
{
"members": [
{
"id": 20,
"email": "lucas@example.be",
"firstName": "Lucas",
"lastName": "Dupont",
"role": "employee",
"status": "active"
}
]
}
/shifts?from=2027-01-04&to=2027-01-10Shifts sent by this connection over a period (YYYY-MM-DD dates, “to” included, 400 days at most).
{
"shifts": [
{
"id": 349,
"externalId": "INT-2027-0042",
"email": "lucas@example.be",
"memberId": 20,
"startsAt": "2027-01-04T07:30:00+01:00",
"endsAt": "2027-01-04T16:00:00+01:00",
"breakMinutes": 30,
"note": "Site Dupont",
"site": null,
"published": true
}
]
}
/shifts/{externalId}Creates or updates a slot. Sending the same content changes nothing; a person removed from the list loses their shift. Responds 200 as soon as at least one person is scheduled (any refusals are in errors), 422 if none is.
| Field | Type | Description |
|---|---|---|
startsAt required | datetime | Start of the slot. |
endsAt required | datetime | End of the slot, after the start (16 hours at most). |
workers required | string[] | Email addresses of the people (1 to 50). For a single person, email (string) is also accepted. |
breakMinutes | int | Break in minutes (0 by default). |
title, note | string | Shown on the shift, separated by a middle dot. |
site | string | Name of an existing work site in Quotas (ignored if it does not exist). |
published | bool | Visible to the team member (true by default). |
{
"externalId": "INT-2027-0042",
"shifts": [ … ],
"errors": [
{
"email": "julie@example.be",
"code": "member_not_found",
"message": "No active team member with this address in Quotas."
}
]
}
/shifts/{externalId}Removes the slot (cancelled or deleted on your side).
{
"externalId": "INT-2027-0042",
"removed": 2
}
/syncSends the full schedule for a period. Each item is handled like a PUT, then this connection's shifts starting in the period but missing from items are removed. Ideal for a nightly catch-up. 1,000 slots at most per request.
{
"from": "2027-01-01",
"to": "2027-02-28",
"items": [
{
"externalId": "INT-2027-0042",
"startsAt": "2027-01-04T07:30:00",
"endsAt": "2027-01-04T16:00:00",
"workers": [
"lucas@example.be"
]
}
]
}
{
"items": [
{
"externalId": "INT-2027-0042",
"shifts": [ … ],
"errors": []
}
],
"removed": 1,
"errorCount": 0
}
Errors
General errors always have the same shape; the message is in the company's language.
{
"error": {
"code": "invalid_api_key",
"message": "Invalid or deleted API key."
}
}
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Key missing, invalid, renewed or deleted. |
| 402 | license_expired | The company's subscription has expired. |
| 403 | — | Plain-HTTP request: use HTTPS. |
| 404 | — | Unknown route or invalid externalId in the address. |
| 422 | validation_failed | Invalid data (period, dates, addresses, limits); details are in fields. |
| 429 | too_many_requests | Too many requests: wait a minute before retrying. |
Refusals per person or per slot, in errors:
member_not_found | No active team member with this address in the company. |
invalid_shift | Refused by the schedule: overlaps another shift of that person or exceeds 16 hours. |
invalid_item | Unreadable slot in /sync (index gives its position). |
Limits
- 300 requests per minute per connection.
- 20 invalid keys per 10 minutes per IP address, then a temporary block.
- 1,000 slots per /sync request, 50 people per slot, 400 days per period.
- 10 active connections per company.
Code examples
The same request in four languages. The key is read from an environment variable.
curl -X PUT https://quotas.app/api/integration/v1/shifts/INT-2027-0042 \
-H "X-Api-Key: $QUOTAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"startsAt":"2027-01-04T07:30:00","endsAt":"2027-01-04T16:00:00","workers":["lucas@example.be"],"title":"Site Dupont"}'$ch = curl_init('https://quotas.app/api/integration/v1/shifts/INT-2027-0042');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => ['X-Api-Key: ' . getenv('QUOTAS_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'startsAt' => '2027-01-04T07:30:00',
'endsAt' => '2027-01-04T16:00:00',
'workers' => ['lucas@example.be'],
'title' => 'Site Dupont',
]),
]);
$result = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);// Node.js 18+ (server side only: never ship the key to a browser)
const res = await fetch('https://quotas.app/api/integration/v1/shifts/INT-2027-0042', {
method: 'PUT',
headers: { 'X-Api-Key': process.env.QUOTAS_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
startsAt: '2027-01-04T07:30:00',
endsAt: '2027-01-04T16:00:00',
workers: ['lucas@example.be'],
title: 'Site Dupont',
}),
});
const data = await res.json();import os, requests
res = requests.put(
"https://quotas.app/api/integration/v1/shifts/INT-2027-0042",
headers={"X-Api-Key": os.environ["QUOTAS_API_KEY"]},
json={
"startsAt": "2027-01-04T07:30:00",
"endsAt": "2027-01-04T16:00:00",
"workers": ["lucas@example.be"],
"title": "Site Dupont",
},
timeout=10,
)
data = res.json()Recommended integration
- On every slot creation or change on your side:
PUT /shifts/{externalId} - On cancellation or deletion:
DELETE /shifts/{externalId} - Every night, over a rolling window (for example 7 days back → 60 days ahead), to catch up on a missed request:
POST /sync - Never block your app if Quotas does not respond: log the error, the nightly catch-up will take care of it.
- Show refusals (errors) to the user, most often an email address that does not match.
Write to us: we reply in French, Dutch, German and English.