SETU Purchase to Pay v2.0 — Technical Documentation
API Version: v2.0 · Environment: Test
The Staffyou Agency Integration API enables external staffing agencies to integrate with the Staffyou platform for end-to-end assignment management and worker onboarding.
The API implements the SETU Purchase to Pay v2.0 standard — the Dutch industry standard for electronic data exchange between staffing organizations and their clients. Following SETU makes the integration interoperable with other Dutch staffing systems and aligns the field names with conventions that staffing professionals already know.
The integration is bidirectional. Two parties exchange messages, and each party hosts (implements) some endpoints and calls others. Throughout this document the SETU roles are used consistently:
| Direction | Who calls | Who implements | Endpoints | Purpose |
|---|---|---|---|---|
| A — Agency → Staffyou | Your agency | Staffyou | Assignment + Employee endpoints | Confirm worker placements and register agency workers. Documented in Section 4 and Section 5. |
| B — Staffyou → Agency | Staffyou | Your agency | Staffing order endpoints + assignment placement and cancellation | Push new/updated/cancelled orders to your agency when a shift changes in Staffyou, place one of your workers when the employer assigns them directly in Staffyou, and cancel an individual worker placement when the employer cancels one of your workers. Documented in Section 6. |
In short:
Employer creates a shift in Staffyou and allocates it to your agency
│
▼
(B) Staffyou ── POST /purchase-to-pay/staffing-order/order/{id} ──► Agency API
(you implement)
│
▼
Agency selects a worker for the order
│
▼
(A) Agency ── POST /purchase-to-pay/assignment/{id} ──► Staffyou Integration API
(Staffyou implements)
│
▼
Worker is planned on the Staffyou shift
│
▼
Employer cancels that worker, shift still needs staff
│
▼
(B) Staffyou ── DELETE /purchase-to-pay/assignment/{id} ──► Agency API
(you implement)
The employer may also fill a position with one of your workers directly in Staffyou, without your agency placing anyone:
Employer assigns one of your workers to the shift in Staffyou
│
▼
(B) Staffyou ── POST /purchase-to-pay/assignment/{id} ──► Agency API
(you implement)
Subsequent changes follow the same split: shift changes in Staffyou are pushed to your agency via the staffing order endpoints (direction B), and worker (re)placements made by your agency are pushed to Staffyou via the assignment endpoints (direction A). The two exceptions are per-worker messages that travel from Staffyou to your agency, because an order message has no field that can identify one placement out of several: cancelling a single placement (Section 6.7), and a placement the employer made itself (Section 6.8).
The SETU Purchase to Pay v2.0 specification is the authoritative source for field semantics, value codes (channel codes, rate types, currency codes) and data structures used by this API.
Field names are written exactly as they appear in JSON payloads. Required fields are marked in the request body schemas. HTTP status codes follow standard REST semantics.
There are two base URLs, one per direction:
| Direction | Base URL | Owned by |
|---|---|---|
| A — Agency → Staffyou (assignment + employee endpoints) | https://staffyou-integration-agency-test.azurewebsites.net |
Staffyou (test environment) |
| B — Staffyou → Agency (staffing order endpoints) | Your agency's API base URL (the ApiUrl you register with Staffyou) |
Your agency |
A separate production base URL for the Staffyou side will be provided once integration testing is complete and a go-live is scheduled. For direction B you provide Staffyou with your test and production base URLs.
An interactive Swagger UI is available for browsing the Staffyou-hosted endpoints (direction A), inspecting schemas, and sending live test requests against the test environment:
Both directions authenticate with an API key carried in the x-api-key HTTP header. The key is issued by the party that hosts the endpoint and kept secret by the party that calls it. Keys are issued per integration partner and per environment (test and production keys are separate).
x-api-key: <your-api-key>
| Direction | Header sent by | Key issued by |
|---|---|---|
| A — Agency → Staffyou | Your agency | Staffyou issues the key to your agency |
| B — Staffyou → Agency | Staffyou | Your agency issues the key to Staffyou (you register it together with your ApiUrl) |
Requests without a valid API key must receive a 401 Unauthorized response. API keys must be kept secret and must never be embedded in client-side code or version control.
Every staffing order request (direction B) and every assignment request (direction A) carries a SETU version header:
setuVersionId: 2.0
Endpoints that you implement (direction B) should accept and may validate this header.
All requests with a body must be sent as application/json (UTF-8) and all responses returned as application/json. JSON property names use camelCase.
Operational errors (validation, not found, conflict) return the operation-specific response object with a populated status and message field. Authentication and unhandled errors return an RFC 7807 ProblemDetails object containing type, title, status, detail, and instance fields.
| Method | Path | Purpose |
|---|---|---|
POST |
/purchase-to-pay/assignment/{id} |
Place a new assignment |
PUT |
/purchase-to-pay/assignment/{id} |
Update an assignment (e.g. worker replacement) |
DELETE |
/purchase-to-pay/assignment/{id} |
Delete an assignment |
POST |
/employees |
Create a new agency employee |
GET |
/employees/by-email |
Look up an employee by email |
GET |
/employees/{id} |
Get one of your workers' profile by id |
| Method | Path | Purpose |
|---|---|---|
POST |
/purchase-to-pay/staffing-order/order/{id} |
Submit (place) a new order |
PUT |
/purchase-to-pay/staffing-order/order/{id} |
Update an existing order |
DELETE |
/purchase-to-pay/staffing-order/order/{id} |
Cancel an existing order |
DELETE |
/purchase-to-pay/assignment/{id} |
Cancel a single worker placement |
POST |
/purchase-to-pay/assignment/{id} |
Placement the employer made in Staffyou |
The last two rows are the mirror image of the assignment endpoints Staffyou hosts. Note that
DELETEandPOST /purchase-to-pay/assignment/{id}appear in both tables: your agency calls Staffyou's when it withdraws or places a worker, and Staffyou calls your agency's when the employer cancels or places one. ADELETEfrom Staffyou carries whichever assignment id the placement has — yours if your agency placed the worker, Staffyou's if the employer did.
Direction A — your agency calls these endpoints on the Staffyou Integration API.
Assignment endpoints follow SETU Purchase to Pay v2.0. The path parameter {id} is the unique identifier of the assignment, assigned by the supplier (the agency) and used consistently for all subsequent updates and deletions of that assignment.
POST /purchase-to-pay/assignment/{id}
Creates a new worker assignment. The supplier generates the assignment identifier and passes it as the {id} path parameter. The same identifier is then expected by the customer for any future operations on the assignment.
Identifiers. Put the shift id Staffyou sent you (the staffing order's
documentId.value) into this request'sdocumentId.valueto indicate which shift the worker is planned on. The route{id}is your own assignment identifier; Staffyou creates a WorkTicket and stores this{id}as itsExternalReferencefor any laterPUT/DELETE. These two values are different — see Section 11.3.
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The unique identifier of the assignment, generated by the supplier. |
Content-Type: application/json · Schema: CreateAssignmentRequest
Required top-level fields:
| Field | Type | Description |
|---|---|---|
assignedWorker |
AssignedWorker |
Identifies the worker assigned to the position (1 to 2 worker identifiers). |
positionProfile |
PositionProfile |
Position definition: title, period, working periods, location, job categories, CAO. |
payRates |
PayRate[] |
At least one pay rate. Each rate has type, amount, period, and billing indicators. |
| Status | Meaning | Body |
|---|---|---|
201 Created |
Assignment successfully created. | CreateAssignmentResponse |
400 Bad Request |
Validation error (missing or invalid fields). | CreateAssignmentResponse |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
403 Forbidden |
Your agency may not place this worker on this shift; message says why (see below). |
CreateAssignmentResponse |
404 Not Found |
Referenced staffing order or worker not found. | CreateAssignmentResponse |
409 Conflict |
An assignment with this id already exists. |
CreateAssignmentResponse |
Who may be placed. Your agency places workers as the agency employer, under the same rules as a planner of your agency in the Staffyou web app:
404 Not Found);Placements that break one of these answer 403 Forbidden with the reason in message. The worker and shift checks that apply to every placement (double booking, working hours, contract end, bans) still apply and answer 400 or 409 as before.
PUT /purchase-to-pay/assignment/{id}
Updates an existing assignment. The most common use case is worker replacement — replacing the assigned worker while keeping the same assignment identifier — but the endpoint also accepts changes to the position profile, pay rates, resource classification, and other fields. The reasonOfChange field should describe the business reason for the update.
The route {id} identifies the placement to update (matched against the WorkTicket's ExternalReference), and documentId.value remains the shift id the worker is planned on. See Section 11.3.
To cancel or end an assignment, set positionProfile.positionPeriod.actualEnd to the effective end date.
Worker replacement — two supported strategies
Replacement can be performed either via:
PUT /purchase-to-pay/assignment/{id}— keep the same assignment identifier and replace the worker in-place. Recommended when the assignment is functionally unchanged and only the worker is swapped. Use thereasonOfChangefield to record the reason.DELETE /purchase-to-pay/assignment/{id}followed by a newPOST /purchase-to-pay/assignment/{newId}— close the original assignment and create a new one with a fresh identifier. Useful when the original assignment is treated as terminated for administrative or audit purposes.Both flows are supported. Choose based on your downstream accounting and audit requirements.
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The unique identifier of the assignment to update. |
Content-Type: application/json · Schema: UpdateAssignmentRequest
The structure mirrors CreateAssignmentRequest with the addition of an optional reasonOfChange field.
| Status | Meaning | Body |
|---|---|---|
200 OK |
Assignment successfully updated. | UpdateAssignmentResponse |
400 Bad Request |
Validation error. | UpdateAssignmentResponse |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
403 Forbidden |
Your agency may not place the new worker on this shift (same rules as Section 4.1). The current worker stays planned. | UpdateAssignmentResponse |
404 Not Found |
Assignment or worker not found. | UpdateAssignmentResponse |
409 Conflict |
The replacement was refused by a placement check (for example a double booking). The current worker stays planned. | UpdateAssignmentResponse |
DELETE /purchase-to-pay/assignment/{id}
Deletes an existing assignment. The endpoint has no request body.
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The unique identifier of the assignment to delete. |
| Status | Meaning | Body |
|---|---|---|
200 OK |
Assignment successfully deleted. | DeleteAssignmentResponse |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
404 Not Found |
Assignment not found. | DeleteAssignmentResponse |
Direction A — your agency calls these endpoints on the Staffyou Integration API.
Employee endpoints are used to register agency workers in Staffyou before they can be referenced by an assignment, and to verify whether a worker is already known by email address. These endpoints are Staffyou-specific extensions to the SETU model and operate synchronously.
POST /employees
Creates a new agency employee in Staffyou. Processing is synchronous: a successful call returns the newly created employee identifier, which can then be used as the worker identifier in subsequent assignment calls.
Content-Type: application/json · Schema: CreateOwnEmployeeRequest
Required fields:
| Field | Type | Description |
|---|---|---|
firstName |
string | First name of the employee. |
lastName |
string | Last name of the employee. |
email |
string | Email address. Must be unique across Staffyou. |
gender |
string | One of Man, Vrouw, Other, Undisclosed. |
mobile |
string | Mobile phone number. |
dateOfBirth |
string | Date of birth in yyyyMMdd format (e.g. 19900115). |
streetName |
string | Street name. |
streetNumber |
string | House/building number. |
postalCode |
string | Dutch postal code: 4 digits (first digit 1–9), an optional space, then 2 letters. E.g. 1234AB or 1234 AB. |
city |
string | City of residence. |
Optional fields: streetNumberAddition.
| Status | Meaning | Body |
|---|---|---|
200 OK |
Employee created successfully. | CreateOwnEmployeeResponse |
400 Bad Request |
Validation error or email already exists. | CreateOwnEmployeeResponse |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
GET /employees/by-email?email={email}
Checks whether an employee with the given email address already exists in Staffyou. Use this endpoint before calling POST /employees to avoid duplicate registrations and to retrieve the existing employee identifier.
| Name | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | The email address to look up. |
| Status | Meaning | Body |
|---|---|---|
200 OK |
Lookup completed. The found flag indicates whether an employee was matched. |
GetEmployeeByEmailResponse |
400 Bad Request |
Invalid email format. | ProblemDetails |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
404 Not Found |
No employee found for this email address. | ProblemDetails |
GET /employees/{id}
Returns the profile of one of your agency's own workers. Use it when Staffyou sends you a placement made by the employer (Section 6.8) for a worker you do not yet know in your own system: the assignment identifies the worker by employeeId only, and this gives you the email address and profile to find or create the matching candidate. The fields use the names and formats of POST /employees (Section 5.1).
Only workers of your agency are returned. Any other id — a worker of another agency, the employer's own staff, or an id that does not exist — answers 404 Not Found and discloses nothing.
| Name | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | Yes | The employee id — assignedWorker.workerId[0].value on a Staffyou assignment, or the employeeId from POST /employees. |
| Status | Meaning | Body |
|---|---|---|
200 OK |
The worker's profile. | GetEmployeeByIdResponse |
401 Unauthorized |
Invalid or missing API key. | ProblemDetails |
404 Not Found |
No worker of your agency with this id. | GetEmployeeByIdResponse (found: false) |
Example: GET /employees/9f1c1a44-1a3b-4c4f-9a7b-2c5d6e7f8901 → 200 OK
{
"found": true,
"employeeId": "9f1c1a44-1a3b-4c4f-9a7b-2c5d6e7f8901",
"message": "Employee found.",
"firstName": "Jan",
"lastName": "Jansen",
"email": "jan.jansen@example.com",
"mobile": "+31612345678",
"gender": "Man",
"dateOfBirth": "19900115",
"streetName": "Coolsingel",
"streetNumber": "1",
"streetNumberAddition": null,
"postalCode": "3011AD",
"city": "Rotterdam"
}
Any profile field can be null when Staffyou does not hold it (for example a worker registered without an address).
Direction B — your agency implements these endpoints; Staffyou calls them.
When a shift occurs in Staffyou for a SETU-compliant employer that has allocated the shift to your agency, Staffyou submits the shift to your API as a SETU Staffing Order. The same channel is used to push later changes and cancellations. To receive these orders your agency must implement the five endpoints below under the base URL (ApiUrl) you register with Staffyou — the three order endpoints, plus the assignment cancellation in Section 6.7 and the assignment placement in Section 6.8.
In this direction Staffyou is the customer (schemeAgencyId: "Customer") and your agency is the supplier (schemeAgencyId: "Supplier").
Staffyou only sends staffing orders when all three of the following hold for the shift; otherwise the call is skipped silently:
ApiUrl and x-api-key registered).Every call from Staffyou carries:
| Header | Value | Notes |
|---|---|---|
x-api-key |
The key your agency issued to Staffyou | Authenticate every request; reject unknown keys with 401. |
setuVersionId |
2.0 |
The SETU message version. |
Content-Type |
application/json |
Sent on POST and PUT (requests with a body). |
{id} is the order identifier generated by Staffyou. It is stable across submit, update, and cancel for the same shift, and is equal to documentId.value in the body (the Staffyou shift/TimeSlot GUID). Use it as the idempotency/correlation key on your side: an update or cancel targets the order previously created with the same {id}. Your agency echoes this same shift id back in documentId.value when it later confirms a placement via the assignment endpoints (direction A) — see Section 11.3.
Staffyou treats any 2xx status code as success and any non-2xx as a failure (it records the status code, reason phrase, and response body for troubleshooting). Response bodies are stored by Staffyou but are not parsed, so their shape is up to you — return a short JSON object describing the result. The recommended status codes below mirror the rest of this API for consistency.
POST /purchase-to-pay/staffing-order/order/{id}
Sent when a new shift is created in Staffyou and allocated to your agency. The body is a full StaffingOrder. positionProfile.positionOpenQuantity carries the number of workers requested for the shift.
| Status | Meaning |
|---|---|
201 Created |
Order accepted and created on the agency side. |
400 Bad Request |
Order failed SETU validation on the agency side. |
401 Unauthorized |
Invalid or missing API key. |
409 Conflict |
An order with this {id} already exists (treat as idempotent — see Section 11.4). |
Staffyou does not treat a 409 as "you already hold this order". Section 11.4 lets you answer it either after updating in place or after keeping the copy you had, and a retried submit can carry a newer payload than the one that reached you, so Staffyou cannot tell which order you now hold. It therefore follows a 409 with a PUT of the current order to bring your copy into line — see Section 6.5. That PUT may well carry the payload you already hold; applying it is a full-state replace and leaves your copy unchanged, so it is safe either way.
PUT /purchase-to-pay/staffing-order/order/{id}
Sent when the shift changes in Staffyou. The body is a full StaffingOrder, carrying the complete current state of the order rather than a delta, plus a reasonOfChange field.
Staffyou sends this request when the content of the order changes. Before sending, Staffyou rebuilds the order from the edited shift and compares it against the version it last recorded as delivered to you; if the two are identical, no request is made. This means:
PUT you receive normally represents a real change to at least one field in the payload. Occasionally you may receive one carrying a payload you already hold. There are two ways that happens: after a 409 Conflict on submit (see Section 6.4), where Staffyou does not know which payload you kept and sends the current order regardless; and when the shift is edited while a send to you is still in flight, where Staffyou compares against the version recorded before that send finished and so can conclude a change is still outstanding when it is not.PUT is always safe to apply, including one you have already applied. The body carries the complete current state of the order rather than a delta, so applying it is a full replace and therefore idempotent: a PUT whose payload matches what you hold leaves your copy exactly as it was. Compare the received payload against the order you hold rather than assuming every PUT differs from the last one.PUT is the in-flight window described above, and that PUT carries the unchanged payload.The fields whose change triggers an update are exactly those present in the payload:
| Change on the shift | Field(s) affected |
|---|---|
| Start / end time, date | positionPeriod.start / end, workingPeriods[].workDuration |
| Break time | workingPeriods[].breakDuration |
| Function | positionProfile.positionId, positionTitle |
| Description / notes | positionProfile.positionTask.description |
| Location or sub-location | positionProfile.positionLocation |
| Shift or event name | positionProfile.shiftDescription |
| Minimum age | positionProfile.positionQualifications.minimumAge |
| Footwear, clothing | comments |
| Number of staffers allocated to your agency | positionProfile.positionOpenQuantity |
reasonOfChangeis not a discriminator. Staffyou currently sends the fixed string"Order updated"on every update, regardless of which field changed. Do not branch on its value — compare the received payload against the order you already hold to determine what changed.
| Status | Meaning |
|---|---|
200 OK |
Order successfully updated. |
400 Bad Request |
Order failed SETU validation on the agency side. |
401 Unauthorized |
Invalid or missing API key. |
404 Not Found |
No order exists for this {id}. |
DELETE /purchase-to-pay/staffing-order/order/{id}
Sent when the shift is cancelled in Staffyou. The endpoint has no request body.
Every placement on the order is void. The request cancels the whole shift, so treat all assignments you hold against this {id} as cancelled — however many workers you had placed on it. You receive one DELETE for the order, not one per placement, and no separate assignment cancellation for the workers on it. The staffers are already cancelled on the Staffyou side by the time this request reaches you.
If instead you receive DELETE /purchase-to-pay/assignment/{id}, only that one placement is cancelled and the order stays open — see Section 6.7.
| Status | Meaning |
|---|---|
200 OK |
Order successfully cancelled. |
401 Unauthorized |
Invalid or missing API key. |
404 Not Found |
No order exists for this {id}. Staffyou treats this as a successful cancellation — it is the state the request was trying to reach, and a retried cancel meets it whenever the first attempt's response was lost. |
DELETE /purchase-to-pay/assignment/{id}
Sent when the employer cancels one worker your agency placed, while the shift itself stays open and still needs staff. This is the mirror image of the assignment endpoint Staffyou hosts (Section 4.3) — the same resource, the same id, the opposite direction.
Why this is not an order update. A staffing order carries a headcount (positionOpenQuantity), not a list of placements. If your agency has four workers on one order and the employer cancels one of them, an order PUT could only move a number — it could not say which of the four lost the shift, and per Section 6.5 a reduced headcount means the employer shrank its allocation, which is a different event. So the placement is cancelled by its own id instead.
| Parameter | In | Description |
|---|---|---|
id |
path | The assignment identifier your agency issued when it placed the worker — the same {id} you used on POST /purchase-to-pay/assignment/{id}. It is URL-encoded, so ids containing spaces or / arrive escaped. |
The shift id is deliberately not sent. You already hold it — you supplied it as documentId.value when you created the assignment — and the assignment id alone identifies the placement on your side.
The same headers as every other call from Staffyou: x-api-key and setuVersionId: 2.0. See Section 6.1.
None — and no query string either. As with the other DELETE endpoints on both sides of this integration, everything needed is in the path.
| Status | Meaning |
|---|---|
200 OK |
Placement cancelled on your side. |
401 Unauthorized |
Invalid or missing API key. |
404 Not Found |
No assignment exists for this {id}. |
Treat a repeat call for an already-cancelled assignment as success rather than an error — Staffyou does not retry automatically today, but a manual replay during troubleshooting should not fail.
The worker is no longer expected on that shift. The order stays open and the position is free again, so your agency may place a replacement worker through POST /purchase-to-pay/assignment/{id} as usual — with a new assignment id, since the cancelled one is spent.
Sent when all of the following hold:
Not sent when:
DELETE/PUT /purchase-to-pay/assignment/{id} cancels the underlying placement in Staffyou, but nothing is echoed back to you.DELETE (Section 6.6) instead of one message per placement.POST /purchase-to-pay/assignment/{id}
Sent when the employer assigns one of your agency's workers to a shift directly in Staffyou, on a shift it ordered from your agency. Without it your agency would still see the position as open, because the worker never passed through your own POST /purchase-to-pay/assignment/{id}. This is the mirror image of the assignment endpoint Staffyou hosts (Section 4.1) — the same resource and payload shape, the opposite direction.
Why this is not an order update. For the same reason as Section 6.7: an order carries a headcount, not a list of placements, so it cannot say which of your workers now fills a position.
| Parameter | In | Description |
|---|---|---|
id |
path | The assignment identifier, issued by Staffyou (a GUID) because your agency did not create this placement. Store it: it identifies this placement from now on, in both directions. |
Using the assignment id afterwards. Staffyou stores this id as the placement's ExternalReference, exactly as if your agency had issued it. So:
DELETE /purchase-to-pay/assignment/{id} (Section 6.7) with this same id.PUT/DELETE /purchase-to-pay/assignment/{id} (Sections 4.2 and 4.3) using this same id.The same headers as every other call from Staffyou: x-api-key, setuVersionId: 2.0 and Content-Type: application/json. See Section 6.1.
A SETU assignment carrying only what identifies the placement:
| Field | Description |
|---|---|
documentId.value |
The shift id — the {id} of the staffing order Staffyou already sent you (Section 6.2). schemeAgencyId is "Customer". |
customer.id[0].value |
The Staffyou employer id. customer.personContacts[0].name.formattedName is the employer's company name. |
supplier.id[0].value |
Your agency's id in Staffyou. |
assignedWorker.workerId[0].value |
The worker id — the employeeId your agency received from POST /employees (or GET /employees/by-email). schemeAgencyId is "Supplier", the same shape your agency sends on its own assignments. When the id is new to your system, fetch the worker's profile with GET /employees/{id} (Section 5.3). |
assignedWorker.person.name.formattedName |
The worker's full name, for readability. May be null. |
positionProfile.positionTitle |
The shift's function (or event name when it has no function). |
positionProfile.positionPeriod.start / .end |
Start and end of the shift, yyyy-MM-ddTHH:mm:ss local time. |
{
"documentId": { "value": "0d3b3f7e-8a51-4f7a-9d0e-2b6f0b1c9a11", "schemeAgencyId": "Customer" },
"customer": {
"id": [{ "value": "b3d41a4c-5d73-4658-8b9e-6f66b3a4971f", "schemeAgencyId": "Customer" }],
"personContacts": [{ "name": { "formattedName": "Hotel De Kroon" } }]
},
"supplier": {
"id": [{ "value": "7c1e2f4a-3b5d-4e6f-8a9b-0c1d2e3f4a5b", "schemeAgencyId": "Customer" }]
},
"assignedWorker": {
"workerId": [{ "value": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d", "schemeAgencyId": "Supplier" }],
"person": { "name": { "formattedName": "Jan Jansen" } }
},
"positionProfile": {
"positionTitle": "Bediening",
"positionPeriod": { "start": "2026-10-01T17:00:00", "end": "2026-10-01T23:30:00" }
}
}
| Status | Meaning |
|---|---|
201 Created / 200 OK |
Placement recorded on your side. |
400 Bad Request |
The body could not be processed (e.g. unknown worker or order). |
401 Unauthorized |
Invalid or missing API key. |
Treat a repeat call for an assignment id you already hold as success rather than returning 409 Conflict — Staffyou does not retry automatically today, but a manual replay during troubleshooting should not fail.
Staffyou links the assignment id to the placement before calling you, so you may call PUT/DELETE /purchase-to-pay/assignment/{id} on the Staffyou API as soon as you receive it. If your endpoint rejects the call (any non-2xx), Staffyou releases the id again: the placement stays in Staffyou without an assignment id, you will not receive a DELETE for it later, and it cannot be updated or deleted through the assignment endpoints.
Because the link exists before your response arrives, an employer cancellation can in rare cases reach you as DELETE /purchase-to-pay/assignment/{id} (Section 6.7) very shortly after — or, over a slow connection, even while you are still processing — the POST for the same {id}. Treat a DELETE for an id you do not (yet) hold as success.
Count the worker against the order's open positions, as if your agency had placed them. Do not also confirm the placement back to Staffyou through POST /purchase-to-pay/assignment/{id} — the worker is already planned on the shift.
Sent when all of the following hold:
Always after the order. Staffyou never sends a placement before the staffing order it fills. When the employer assigns your worker to a shift whose order has not reached you yet — typically a shift created or copied a moment earlier — the placement waits and is sent right after the order's POST is delivered, usually within a minute.
Not sent when:
POST/PUT /purchase-to-pay/assignment/{id} — nothing is echoed back to you.Staffyou validates every staffing order against the SETU v2.0 schema before sending it, so a well-behaved agency endpoint will only receive structurally valid orders. The same rules are the recommended minimum for your own server-side validation. The key constraints are:
| Field | Constraint |
|---|---|
documentId.value |
Required, non-empty. |
documentId.schemeAgencyId |
Required; "Customer" or "Supplier" (Staffyou sends "Customer"). |
customer |
Required. |
customer.personContacts |
Required; at least one contact, each with name.formattedName. |
customer.id[] |
Optional; maximum 2 items; each needs value and a schemeAgencyId of "Customer"/"Supplier". |
customer.legalId.schemeAgencyId |
When present: one of "KvK", "OIN", "RSIN". |
customer.taxId.schemeAgencyId |
When present: "BTW". |
orderType |
Required; "Order" or "RFQ" (Staffyou sends "Order"). |
positionProfile |
Required. |
positionProfile.positionLocation |
Required. |
positionProfile.positionPeriod.start |
Required, non-empty. |
positionProfile.workingPeriods |
Required; at least one item. |
positionProfile.workingPeriods[].breakDuration |
Required (Staffyou extension — see Section 9). |
*.unitCode.value (durations) |
One of "Days", "Hours", "Minutes". |
*.value (durations) |
Non-negative number. |
email.useCode (when present) |
"Business" or "Private". |
Staffyou records every exchange in this direction (request URL, request body, response status code, response body, and success flag) in its internal SetuMessageLog, keyed by the shift and your agency, under the operation SubmitOrder, UpdateOrder, CancelOrder, CancelAssignment or SubmitAssignment. Assignment messages are keyed by the shift too, since the assignment id is not the shift id; the assignment id itself is visible in the logged request URL. Returning a clear non-2xx status with a human-readable JSON body on failure makes troubleshooting from the Staffyou side considerably easier.
This section documents the data models used by the assignment and employee endpoints (Section 4 and Section 5). The staffing order schemas are documented separately in Section 8. Field types follow OpenAPI 3.0 conventions; nested types refer to schemas defined later in this section. Unless explicitly stated as required, fields are optional.
SETU-compliant payload for creating a new worker assignment. Sent in the body of POST /purchase-to-pay/assignment/{id}.
Required fields: assignedWorker, positionProfile
| Field | Type | Description |
|---|---|---|
id |
string | Assignment identifier (mirrors the URL path parameter). |
documentId |
DocumentId |
Document identifier following SETU v2.0 standards. |
customer |
Organization |
The customer (the company hiring the worker). |
supplier |
Organization |
The supplier (the staffing agency). |
assignedWorker |
AssignedWorker |
The worker assigned to this position (required). |
positionProfile |
PositionProfile |
Position definition and working periods (required). |
payRates |
PayRate[] |
Pay rates for the assignment. Minimum 1 item. |
resourceClassificationInclusion |
ResourceClassification |
Cost allocation: department, cost center, project, PO number. |
staffingIds |
StaffingIds |
Staffing-related reference identifiers. |
customerSpecificRequirements |
string (URI) | URI reference to customer-specific requirements. |
Response from POST /purchase-to-pay/assignment/{id}.
| Field | Type | Description |
|---|---|---|
assignmentId |
string | The unique identifier of the created assignment. |
status |
string | Status of the operation (e.g. "created"). |
message |
string | Human-readable details about the result. |
Payload for PUT /purchase-to-pay/assignment/{id}. Same shape as CreateAssignmentRequest plus a reasonOfChange field.
| Field | Type | Description |
|---|---|---|
id |
string | Assignment identifier (mirrors the URL path parameter). |
documentId |
DocumentId |
Document identifier. |
customer |
Organization |
Customer organization. |
supplier |
Organization |
Supplier (agency) organization. |
assignedWorker |
AssignedWorker |
Updated assigned worker (for worker replacement). |
positionProfile |
PositionProfile |
Updated position profile. |
payRates |
PayRate[] |
Updated pay rates. |
resourceClassificationInclusion |
ResourceClassification |
Updated cost allocation. |
staffingIds |
StaffingIds |
Reference identifiers. |
reasonOfChange |
string | Free-text reason for this update. |
customerSpecificRequirements |
string (URI) | URI reference to customer-specific requirements. |
Response from PUT /purchase-to-pay/assignment/{id}.
| Field | Type | Description |
|---|---|---|
assignmentId |
string | Identifier of the updated assignment. |
status |
string | Status of the operation. |
message |
string | Human-readable details. |
Response from DELETE /purchase-to-pay/assignment/{id}.
| Field | Type | Description |
|---|---|---|
assignmentId |
string | Identifier of the deleted assignment. |
status |
string | Status of the operation. |
message |
string | Human-readable details. |
An organization (customer or supplier), following SETU v2.0 standards.
| Field | Type | Description |
|---|---|---|
id |
OrganizationId[] |
Organization identifiers. Maximum 2 items. |
legalId |
SchemeId |
Legal identifier (e.g. KvK, OIN, RSIN). |
taxId |
SchemeId |
Tax identifier (e.g. BTW). |
establishment |
Establishment |
Establishment details. |
personContacts |
PersonContact[] |
Contact persons at the organization. |
Organization identifier with value and scheme.
| Field | Type | Description |
|---|---|---|
value |
string | Identifier value. |
schemeAgencyId |
string | Scheme agency, e.g. "Supplier" or "Customer". |
Scheme-based identifier used for legal and tax IDs.
| Field | Type | Description |
|---|---|---|
value |
string | Identifier value. |
schemeAgencyId |
string | Scheme agency, e.g. "KvK", "OIN", "RSIN", "BTW". |
Establishment details for an organization.
| Field | Type | Description |
|---|---|---|
responsibilityCode |
string | Responsibility code. |
id |
OrganizationId[] |
Establishment identifiers. |
legalId |
SchemeId |
Legal identifier of the establishment. |
Contact person at an organization.
| Field | Type | Description |
|---|---|---|
name |
string | Contact person's name. |
communication |
Communication[] |
Communication channels (phone, email). |
roleCode |
string | Role code for the contact person. |
Communication channel (phone or email).
| Field | Type | Description |
|---|---|---|
channelCode |
string | Channel type: "phone" or "email". |
dialNumber |
string | Phone number or email address. |
address |
string | Email address (when channelCode is "email"). |
Assigned worker details.
| Field | Type | Description |
|---|---|---|
workerId |
OrganizationId[] |
Worker identifiers. Required, 1 to 2 items. |
Position profile for the assignment.
Staffyou extensions: the
commentsandshiftDescriptionfields are custom Staffyou additions to the SETUPositionProfilemodel. See Section 9.
| Field | Type | Description |
|---|---|---|
positionTitle |
string | Position title. |
positionTaskDescription |
string | Position/task description. |
positionPeriod |
PositionPeriod |
Start, expected end, and actual end of the position. |
workingPeriods |
WorkingPeriod[] |
Working periods defining hours/duration. Required, minimum 1 item. |
positionLocation |
PositionLocation |
Position location/address. |
jobCategories |
JobCategory[] |
Job categories/classifications. |
collectiveLabourAgreement |
CollectiveLabourAgreement |
Applicable CAO. |
travelDistance |
number (double) | Travel distance in kilometres. |
comments |
string | Custom Staffyou extension. Free-text notes — used to communicate dress code, footwear, and other on-site regulations. Convention: pipe-separated Key: value pairs (e.g. "Shoe: Black sneakers \| Clothing: Dark blue jeans"). |
shiftDescription |
string | Custom Staffyou extension. Human-readable name of the shift / event (e.g. "Avonddienst zaal 1", "Feyenoord – Ajax 22-09"). |
Position period defining start and end dates.
| Field | Type | Description |
|---|---|---|
start |
string (date-time) | Start date of the position (required). |
expectedEnd |
string (date-time) | Expected end date of the position. |
actualEnd |
string (date-time) | Actual end date. Set this to cancel/end an assignment. |
Working period defining hours and duration.
Staffyou extension: the
breakDurationfield is a custom Staffyou addition to the SETUWorkingPeriodmodel. See Section 9.
| Field | Type | Description |
|---|---|---|
baseDuration |
number (double) | Base duration. (SETU legacy scalar form.) |
workDuration |
Duration |
Worked duration as an object (value + unit), e.g. { "value": 8.5, "unitCode": { "value": "Hours" } }. |
breakDuration |
Duration |
Custom Staffyou extension. Unpaid break time during the shift. |
unitCode |
string | Duration unit (e.g. "Hour", "Day", "Week") — used with the scalar form. |
minDuration |
number (double) | Minimum duration. |
maxDuration |
number (double) | Maximum duration. |
Quantitative duration value with measurement unit.
| Field | Type | Description |
|---|---|---|
value |
number (double) | Numeric duration value. |
unitCode |
UnitCode |
Unit of measurement for the value. |
Unit of measurement wrapper.
| Field | Type | Description |
|---|---|---|
value |
string | Unit name. Examples: "Hours", "Minutes", "Days". |
Position location/address.
| Field | Type | Description |
|---|---|---|
address |
Address |
Street, building number, postal code, and city. |
countryCode |
string | Country code (ISO 3166-1 alpha-2). |
primaryLocation |
boolean | Whether this is the primary location. |
Physical address.
| Field | Type | Description |
|---|---|---|
streetName |
string | Street name. |
buildingNumber |
string | Building / house number. |
postalCode |
string | Postal code. |
city |
string | City. |
Job category / classification.
| Field | Type | Description |
|---|---|---|
code |
string | Category code. |
description |
string | Category description. |
Collective labour agreement (CAO).
| Field | Type | Description |
|---|---|---|
id |
string | CAO identifier / code. |
name |
string | CAO name. |
Pay rate for the assignment.
| Field | Type | Description |
|---|---|---|
rateType |
string | Rate type: "TimeInterval" or "Allowance". |
intervalCode |
string | Rate code (e.g. "HT100" for 100% hourly rate). |
amount |
Amount |
Monetary amount with currency. |
multiplier |
number (double) | Multiplier percentage (e.g. 100 for 100%). |
period |
RatePeriod |
Period during which the rate applies. |
toBeBilledIndicator |
boolean | Whether this rate is billed to the customer. |
toBePaidIndicator |
boolean | Whether this rate is paid to the worker. |
Monetary amount with currency.
| Field | Type | Description |
|---|---|---|
value |
number (double) | Numeric value. |
currency |
string | Currency code (ISO 4217, e.g. "EUR"). |
Period for a pay rate.
| Field | Type | Description |
|---|---|---|
start |
string (date-time) | Start date of the rate period (required). |
end |
string (date-time) | End date of the rate period. |
Resource classification for cost allocation.
| Field | Type | Description |
|---|---|---|
department |
ClassificationCode |
Department code and description. |
costCenter |
ClassificationCode |
Cost centre code and description. |
project |
ClassificationCode |
Project code and description. |
purchaseOrderNumber |
string | Purchase order number. |
Classification code with optional description.
| Field | Type | Description |
|---|---|---|
code |
string | Code value. |
description |
string | Code description. |
Staffing-related identifiers.
| Field | Type | Description |
|---|---|---|
requestForQuotationId |
string | Reference to a request for quotation. |
Document identifier on an assignment, following SETU v2.0 standards.
| Field | Type | Description |
|---|---|---|
value |
string | Required. The shift (TimeSlot) GUID the worker is assigned to — the same value Staffyou sent as the staffing order's documentId.value. Must be a valid GUID; it identifies which shift the placement is for and is the only part of documentId Staffyou reads. |
schemeAgencyId |
string | Not interpreted by Staffyou for assignments (the model default is "Supplier"). Send whichever value reflects your document; only value is used. |
Payload for POST /employees.
Required fields: firstName, lastName, email, gender, mobile, dateOfBirth, streetName, streetNumber, postalCode, city
| Field | Type | Description |
|---|---|---|
firstName |
string | First name (required). |
lastName |
string | Last name (required). |
email |
string | Email address. Must be unique (required). |
gender |
Gender |
One of: Man, Vrouw, Other, Undisclosed (required). |
mobile |
string | Mobile phone number (required). |
dateOfBirth |
string | Date of birth in yyyyMMdd format, e.g. 19900115 (required). |
streetName |
string | Street name (required). |
streetNumber |
string | House/building number (required). |
streetNumberAddition |
string | Optional addition to the house number (e.g. "A", "bis"). |
postalCode |
string | Dutch postal code — 4 digits (first digit 1–9), optional space, 2 letters, e.g. 1234AB (required). |
city |
string | City (required). |
Response from POST /employees.
| Field | Type | Description |
|---|---|---|
success |
boolean | Whether the operation succeeded. |
employeeId |
string (uuid) | Identifier of the newly created employee. |
message |
string | Human-readable details. |
Response from GET /employees/by-email.
| Field | Type | Description |
|---|---|---|
found |
boolean | Whether an employee was found. |
employeeId |
string (uuid) | Identifier of the matched employee, if found. |
message |
string | Human-readable details. |
Response from GET /employees/{id}. Only found, employeeId and message are set when no worker is found; every other field can also be null when Staffyou does not hold it.
| Field | Type | Description |
|---|---|---|
found |
boolean | Whether a worker of your agency was found. |
employeeId |
string (uuid) | Identifier of the worker, if found. |
message |
string | Human-readable details. |
firstName |
string | First name. |
lastName |
string | Last name. |
email |
string | Email address. |
mobile |
string | Mobile phone number. |
gender |
Gender |
One of Man, Vrouw, Other, Undisclosed. |
dateOfBirth |
string | Date of birth, yyyyMMdd (e.g. 19900115). |
streetName |
string | Street name. |
streetNumber |
string | House number. |
streetNumberAddition |
string | House number addition. |
postalCode |
string | Postal code. |
city |
string | City. |
Enumeration. One of: Man, Vrouw, Other, Undisclosed.
RFC 7807 problem details. Used by 401 responses and other unhandled errors.
| Field | Type | Description |
|---|---|---|
type |
string | URI reference identifying the problem type. |
title |
string | Short, human-readable summary. |
status |
integer | HTTP status code. |
detail |
string | Human-readable explanation specific to this occurrence. |
instance |
string | URI reference identifying the specific occurrence. |
This section documents the data models used by the staffing order endpoints (Section 6) — the messages your agency receives from Staffyou. They follow the SETU Staffing Order Message v2.0. Field types follow OpenAPI 3.0 conventions; nested types refer to schemas defined later in this section. Unless explicitly stated as required, fields are optional.
The staffing order uses its own set of nested types (
OrderCustomer,OrderPositionProfile,DurationValue,ValueWrapper, …). These are similar in spirit to the assignment-side types in Section 7 but not identical — in particular, person communication and durations have a different shape. Implement against the schemas in this section for the order endpoints.
Root payload for POST and PUT /purchase-to-pay/staffing-order/order/{id}.
Required fields: documentId, customer, orderType, positionProfile
| Field | Type | Required | Description |
|---|---|---|---|
documentId |
OrderDocumentId |
Yes | Document identifier. value is the order id (= the {id} path parameter / Staffyou shift GUID). |
customer |
OrderCustomer |
Yes | The customer placing the order — the Staffyou employer. Must include at least one contact. |
supplier |
OrderOrganization |
No | The supplier — your agency. |
orderType |
string | Yes | "Order" or "RFQ". Staffyou always sends "Order". |
positionProfile |
OrderPositionProfile |
Yes | The position being requested (period, location, hours, quantity). |
staffingIds |
OrderStaffingIds |
No | Request-for-quotation / quote reference ids. |
reasonOfChange |
string | No | Free-text reason for an update (sent on PUT). |
comments |
string | No | Free-text notes (dress code, footwear, on-site regulations). See Section 9. |
customerSpecificRequirements |
string (URI) | No | URI reference to a customer-specific requirements document. |
Document identifier for the order.
| Field | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | The order identifier (equal to the {id} path parameter). |
schemeAgencyId |
string | Yes | "Customer" or "Supplier". Staffyou sends "Customer". |
The customer (Staffyou employer) placing the order.
| Field | Type | Required | Description |
|---|---|---|---|
id |
OrderOrganizationId[] |
No | Customer identifiers. Maximum 2 items. |
legalId |
OrderSchemeId |
No | Legal identifier; schemeAgencyId one of "KvK", "OIN", "RSIN". |
taxId |
OrderSchemeId |
No | Tax identifier; schemeAgencyId is "BTW". |
establishment |
OrderEstablishment |
No | Establishment details. |
personContacts |
OrderPersonContact[] |
Yes | Contact persons. At least one, each with name.formattedName. |
The supplier (your agency). Same shape as OrderCustomer but personContacts is optional.
| Field | Type | Required | Description |
|---|---|---|---|
id |
OrderOrganizationId[] |
No | Organization identifiers. Maximum 2 items. |
legalId |
OrderSchemeId |
No | Legal identifier (KvK/OIN/RSIN). |
taxId |
OrderSchemeId |
No | Tax identifier (BTW). |
establishment |
OrderEstablishment |
No | Establishment details. |
personContacts |
OrderPersonContact[] |
No | Contact persons. |
Organization identifier with value and scheme.
| Field | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | Identifier value. |
schemeAgencyId |
string | Yes¹ | "Customer" or "Supplier". ¹Required when the id is present. |
Scheme-based identifier used for legalId and taxId.
| Field | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | Identifier value. |
schemeAgencyId |
string | Yes | legalId: "KvK"/"OIN"/"RSIN". taxId: "BTW". |
Establishment details for the organization.
| Field | Type | Required | Description |
|---|---|---|---|
responsibilityCode |
ValueWrapper |
Yes¹ | Responsibility code. ¹Required when establishment is present. |
id |
OrderOrganizationId[] |
No | Establishment identifiers. Maximum 2. |
legalId |
OrderSchemeId |
No | Legal identifier of the establishment. |
Contact person at an organization.
| Field | Type | Required | Description |
|---|---|---|---|
name |
OrderPersonName |
Yes | Contact person's name. |
communication |
OrderCommunication |
No | Phone and/or email channels. |
| Field | Type | Required | Description |
|---|---|---|---|
formattedName |
string | Yes | The contact's full formatted name. |
Communication channels for a contact. Note the order-side shape uses separate phone and email arrays.
| Field | Type | Required | Description |
|---|---|---|---|
phone |
PhoneNumber[] |
No | Phone numbers. |
email |
EmailAddress[] |
No | Email addresses. |
| Field | Type | Required | Description |
|---|---|---|---|
formattedNumber |
string | Yes¹ | The phone number. ¹Required when a phone entry is present. |
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | Yes | The email address. |
useCode |
string | No | When present: "Business" or "Private". |
The requested position.
Staffyou extensions:
shiftDescription(andcommentsat the order root) are custom Staffyou additions;workingPeriods[].breakDurationis a required Staffyou extension. See Section 9.
Required fields: positionLocation, positionPeriod, workingPeriods
| Field | Type | Required | Description |
|---|---|---|---|
positionId |
ValueWrapper |
No | Position identifier (e.g. industry/role id). |
positionTitle |
string | No | Position title (e.g. "Horeca medewerker"). |
positionTask |
PositionTask |
No | Task id and/or description. |
positionLocation |
OrderPositionLocation |
Yes | Where the work takes place. |
positionOpenQuantity |
integer | No | Number of workers requested for this order. |
requestedWorker |
RequestedWorker |
No | A specific worker requested by name/id, if any. |
positionOfferingTypes |
ValueWrapper |
No | Offering type, e.g. "temporary staffing". |
positionPeriod |
OrderPositionPeriod |
Yes | Start and (optional) end of the position. |
workingPeriods |
WorkingPeriod[] |
Yes | Working periods. At least one item. |
positionQualifications |
PositionQualifications |
No | Requirements such as minimum age. |
positionReason |
string | No | Reason the position is open. |
shiftDescription |
string | No | Custom Staffyou extension. Human-readable shift/event name. |
| Field | Type | Required | Description |
|---|---|---|---|
id |
ValueWrapper |
No | Task identifier. |
description |
ValueWrapper |
No | Task description. |
Location where the work is performed.
| Field | Type | Required | Description |
|---|---|---|---|
id |
OrderOrganizationId[] |
No | Location identifiers. Maximum 2 items. |
name |
string | No | Location name. When the shift also specifies a sub-location, both are sent here as "<location> - <sub-location>" — see the note below. |
countryCode |
ValueWrapper |
No | Country code, e.g. { "value": "NL" }. |
city |
string | No | City. |
postalCode |
string | No | Postal code. |
streetName |
string | No | Street name. |
houseNumber |
string | No | House / building number. |
Sub-locations: a Staffyou shift can specify a sub-location — a more precise place within the address, such as
"Kitchen"or"Hall B". SETU'spositionLocationhas no dedicated field for this, so Staffyou appends it tonameseparated by-, giving values such as"Main Location - Kitchen". When the shift has no sub-location,namecarries the location name alone. A change to either part triggers a staffing order update (see Section 6.5).
| Field | Type | Required | Description |
|---|---|---|---|
start |
string (date-time) | Yes | Start of the position. |
end |
string (date-time) | No | End of the position. |
Working period for the order.
Staffyou extension:
breakDurationis a required custom Staffyou addition. See Section 9.
| Field | Type | Required | Description |
|---|---|---|---|
workDuration |
DurationValue |
No | Worked duration (e.g. total shift time in hours). |
baseDuration |
DurationValue |
No | Base duration. |
breakDuration |
DurationValue |
Yes | Custom Staffyou extension. Unpaid break time. |
Quantitative duration with a unit.
| Field | Type | Required | Description |
|---|---|---|---|
value |
number | Yes | Non-negative numeric value. |
unitCode |
ValueWrapper |
Yes | Unit; value must be one of "Days", "Hours", "Minutes". |
A simple { "value": "..." } wrapper used for codes and units.
| Field | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | The code value. |
A specific worker requested for the position.
| Field | Type | Required | Description |
|---|---|---|---|
workerId |
OrderOrganizationId[] |
No | Worker identifiers. |
person |
RequestedPerson |
No | The worker's name. |
| Field | Type | Required | Description |
|---|---|---|---|
name |
OrderPersonName |
No | The worker's name. |
| Field | Type | Required | Description |
|---|---|---|---|
requestForQuotationId |
OrderSchemeId |
No | Reference to a request for quotation. |
quoteId |
OrderSchemeId |
No | Reference to a quote. |
| Field | Type | Required | Description |
|---|---|---|---|
minimumAge |
integer | No | Minimum age requirement, if any. |
The Staffyou Agency Integration API is fully SETU Purchase to Pay v2.0 compliant. To meet operational needs that the standard does not cover, Staffyou has added a small number of additive, optional extensions. They never replace or change the semantics of standard SETU fields, so a client that ignores them remains conformant with the standard.
The current extensions are listed below. Each one is also flagged in the relevant schema in Section 7 (assignments) and Section 8 (staffing orders).
workingPeriods[].breakDurationWhere: positionProfile.workingPeriods[].breakDuration (assignments and staffing orders)
Type: Duration / DurationValue
Purpose: communicate the unpaid break time within a shift. SETU's WorkingPeriod describes the period and worked duration but does not provide a dedicated field for break time. Adding breakDuration alongside workDuration lets the full timekeeping information travel in one place without breaking the SETU schema.
Note for staffing orders: Staffyou always populates
breakDurationon outgoing staffing orders, and it is treated as required there (Staffyou validates it before sending). Your endpoint should expect it on everyworkingPeriodsentry.
{
"workingPeriods": [
{
"workDuration": { "value": 8.5, "unitCode": { "value": "Hours" } },
"breakDuration": { "value": 30, "unitCode": { "value": "Minutes" } }
}
]
}
commentsWhere: positionProfile.comments (assignments) / comments at the staffing order root (orders)
Type: string
Purpose: free-text notes about on-site regulations, dress code, footwear, and similar practical instructions that the worker needs before arriving on shift. Staffyou recommends a simple pipe-separated Key: value convention so the field stays parseable by downstream systems.
On staffing orders Staffyou composes this field from up to two sources on the shift, in this order, joined with |. Keys that have no value on the shift are omitted entirely, and if none are set the field is null:
| Key | Source on the shift |
|---|---|
Shoe: |
The footwear regulation selected for the shift. |
Clothing: |
The clothing regulation selected for the shift. |
{
"comments": "Shoe: Black sneakers | Clothing: Dark blue jeans"
}
positionProfile.shiftDescriptionWhere: positionProfile.shiftDescription (assignments and staffing orders)
Type: string
Purpose: the human-readable name of the shift or event. SETU's positionTitle describes the job role (e.g. "Kok"), but it doesn't carry the operational context of which shift or event the worker is attending. shiftDescription fills that gap and is what appears in worker-facing screens and rosters.
Examples: "Avonddienst zaal 1", "Feyenoord – Ajax 22-09", "Brunchshift 09:00 – 14:00".
All extension fields are optional from a schema standpoint (with the practical exception that Staffyou always sends breakDuration on staffing orders). Clients that do not yet support them can omit them entirely on the assignment side; the API will still accept the request. Conversely, sending these fields against a strictly SETU-compliant system should not cause issues because they sit at well-defined paths and are namespaced within positionProfile / workingPeriods.
The following examples illustrate typical request and response payloads. Field values are illustrative; replace identifiers, dates, and rates as appropriate for your integration.
Request: POST /purchase-to-pay/assignment/ASSIGN-2026-001234
Here the route {id} ASSIGN-2026-001234 is the agency's own assignment reference (Staffyou stores it as the WorkTicket ExternalReference), while documentId.value is the Staffyou shift id the worker is being planned on — the value Staffyou sent in the staffing order. Only documentId.value is read by Staffyou; it must be a valid shift GUID.
{
"documentId": {
"value": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"schemeAgencyId": "Supplier"
},
"customer": {
"id": [
{ "value": "CUST-001", "schemeAgencyId": "Customer" }
],
"legalId": { "value": "12345678", "schemeAgencyId": "KvK" }
},
"supplier": {
"id": [
{ "value": "SUP-STAFFYOU", "schemeAgencyId": "Supplier" }
],
"legalId": { "value": "87654321", "schemeAgencyId": "KvK" }
},
"assignedWorker": {
"workerId": [
{ "value": "EMP-9f1c-...", "schemeAgencyId": "Supplier" }
]
},
"positionProfile": {
"positionTitle": "Kok",
"positionTaskDescription": "Lijnkok in horecagelegenheid",
"shiftDescription": "Avonddienst keuken – zaterdag",
"positionPeriod": {
"start": "2026-07-01T17:00:00Z",
"expectedEnd": "2026-07-01T01:30:00Z"
},
"workingPeriods": [
{
"workDuration": { "value": 8.5, "unitCode": { "value": "Hours" } },
"breakDuration": { "value": 30, "unitCode": { "value": "Minutes" } }
}
],
"positionLocation": {
"address": {
"streetName": "Coolsingel",
"buildingNumber": "1",
"postalCode": "3011AD",
"city": "Rotterdam"
},
"countryCode": "NL",
"primaryLocation": true
},
"collectiveLabourAgreement": {
"id": "HORECA",
"name": "Horeca CAO"
},
"comments": "Shoe: Black sneakers | Clothing: Dark blue jeans"
},
"payRates": [
{
"rateType": "TimeInterval",
"intervalCode": "HT100",
"amount": { "value": 18.50, "currency": "EUR" },
"multiplier": 100,
"period": { "start": "2026-07-01T00:00:00Z" },
"toBeBilledIndicator": true,
"toBePaidIndicator": true
}
]
}
Response: 201 Created
{
"assignmentId": "ASSIGN-2026-001234",
"status": "created",
"message": "Assignment created successfully"
}
Request: PUT /purchase-to-pay/assignment/ASSIGN-2026-001234
{
"assignedWorker": {
"workerId": [
{ "value": "EMP-7a2d-...", "schemeAgencyId": "Supplier" }
]
},
"reasonOfChange": "Original worker is ill; replacement worker assigned."
}
Close the original assignment and create a new one with a fresh identifier:
# 1. Close the original assignment
DELETE /purchase-to-pay/assignment/ASSIGN-2026-001234
# 2. Create a new assignment with the replacement worker
POST /purchase-to-pay/assignment/ASSIGN-2026-001235
The body of step 2 is a full CreateAssignmentRequest referencing the replacement worker.
Request: GET /employees/by-email?email=jan.jansen@example.com
Response: 200 OK
{
"found": true,
"employeeId": "9f1c1a44-1a3b-4c4f-9a7b-2c5d6e7f8901",
"message": "Employee found"
}
Request: POST /employees
{
"firstName": "Jan",
"lastName": "Jansen",
"email": "jan.jansen@example.com",
"gender": "Man",
"mobile": "+31612345678",
"dateOfBirth": "19900115",
"streetName": "Coolsingel",
"streetNumber": "1",
"postalCode": "3011AD",
"city": "Rotterdam"
}
This is the request your agency receives from Staffyou. The {id} path parameter and documentId.value are the Staffyou shift identifier.
Request: POST /purchase-to-pay/staffing-order/order/a1b2c3d4-e5f6-7890-abcd-ef1234567890
x-api-key: <key you issued to Staffyou>
setuVersionId: 2.0
Content-Type: application/json
{
"documentId": {
"value": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"schemeAgencyId": "Customer"
},
"customer": {
"id": [{ "value": "employer-guid", "schemeAgencyId": "Customer" }],
"personContacts": [
{ "name": { "formattedName": "Restaurant ABC" } }
]
},
"orderType": "Order",
"positionProfile": {
"positionId": { "value": "industry-guid" },
"positionTitle": "Horeca medewerker",
"positionTask": { "description": { "value": "Serving guests" } },
"positionOpenQuantity": 2,
"positionPeriod": {
"start": "2026-07-16T08:00:00",
"end": "2026-07-16T17:00:00"
},
"workingPeriods": [
{
"workDuration": { "value": 9.0, "unitCode": { "value": "Hours" } },
"breakDuration": { "value": 30, "unitCode": { "value": "Minutes" } }
}
],
"positionLocation": {
"name": "Main Location - Kitchen",
"streetName": "Kalverstraat",
"houseNumber": "1",
"postalCode": "1012NX",
"city": "Amsterdam",
"countryCode": { "value": "NL" }
},
"positionOfferingTypes": { "value": "temporary staffing" },
"shiftDescription": "Event: Grand Opening"
},
"comments": "Shoe: Black sneakers | Clothing: Dark blue jeans"
}
Response your agency returns: 201 Created (any 2xx is accepted)
{
"orderId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "accepted",
"message": "Order received"
}
Sent when the shift changes — here the employer shortened the shift, changed the break, and moved it to another sub-location. The number of requested staffers is unchanged; a change to any payload field is enough to trigger the update.
Request: PUT /purchase-to-pay/staffing-order/order/a1b2c3d4-e5f6-7890-abcd-ef1234567890
{
"documentId": {
"value": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"schemeAgencyId": "Customer"
},
"customer": {
"id": [{ "value": "employer-guid", "schemeAgencyId": "Customer" }],
"personContacts": [
{ "name": { "formattedName": "Restaurant ABC" } }
]
},
"orderType": "Order",
"reasonOfChange": "Order updated",
"positionProfile": {
"positionTitle": "Horeca medewerker",
"positionOpenQuantity": 2,
"positionPeriod": {
"start": "2026-07-16T09:00:00",
"end": "2026-07-16T17:00:00"
},
"workingPeriods": [
{
"workDuration": { "value": 8.0, "unitCode": { "value": "Hours" } },
"breakDuration": { "value": 45, "unitCode": { "value": "Minutes" } }
}
],
"positionLocation": {
"name": "Main Location - Terrace",
"streetName": "Kalverstraat",
"houseNumber": "1",
"postalCode": "1012NX",
"city": "Amsterdam",
"countryCode": { "value": "NL" }
}
},
"comments": "Shoe: Black sneakers | Clothing: Dark blue jeans"
}
Response your agency returns: 200 OK
Sent when the shift is cancelled in Staffyou. No request body.
Request: DELETE /purchase-to-pay/staffing-order/order/a1b2c3d4-e5f6-7890-abcd-ef1234567890
x-api-key: <key you issued to Staffyou>
setuVersionId: 2.0
Response your agency returns: 200 OK
Sent when the employer cancels one of your workers while the shift stays open. {id} is the assignment id of that placement. No request body. See Section 6.7.
Request: DELETE /purchase-to-pay/assignment/ASSIGN-2026-001234
x-api-key: <key you issued to Staffyou>
setuVersionId: 2.0
Response your agency returns: 200 OK (also for an id you no longer hold, or do not hold yet)
Sent when the employer assigns one of your workers to a shift directly in Staffyou. {id} is a new assignment id issued by Staffyou — store it for later PUT/DELETE calls. See Section 6.8.
Request: POST /purchase-to-pay/assignment/9c4f2a61-3d8e-4b7a-a5c2-6e1f0d9b8a73
x-api-key: <key you issued to Staffyou>
setuVersionId: 2.0
Content-Type: application/json
{
"documentId": { "value": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "schemeAgencyId": "Customer" },
"customer": {
"id": [{ "value": "b3d41a4c-5d73-4658-8b9e-6f66b3a4971f", "schemeAgencyId": "Customer" }],
"personContacts": [{ "name": { "formattedName": "Hotel De Kroon" } }]
},
"supplier": {
"id": [{ "value": "7c1e2f4a-3b5d-4e6f-8a9b-0c1d2e3f4a5b", "schemeAgencyId": "Customer" }]
},
"assignedWorker": {
"workerId": [{ "value": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d", "schemeAgencyId": "Supplier" }],
"person": { "name": { "formattedName": "Jan Jansen" } }
},
"positionProfile": {
"positionTitle": "Kok",
"positionPeriod": { "start": "2026-07-16T17:00:00", "end": "2026-07-16T23:30:00" }
}
}
Response your agency returns: 201 Created (or 200 OK; also for an id you already hold)
Afterwards your agency could replace this worker in place with Staffyou's PUT /purchase-to-pay/assignment/9c4f2a61-3d8e-4b7a-a5c2-6e1f0d9b8a73 (Section 10.2), exactly as for an assignment it placed itself.
# Look up an employee by email
curl -X GET \
"https://staffyou-integration-agency-test.azurewebsites.net/employees/by-email?email=jan.jansen@example.com" \
-H "x-api-key: $STAFFYOU_API_KEY"
# Create a new employee
curl -X POST \
"https://staffyou-integration-agency-test.azurewebsites.net/employees" \
-H "x-api-key: $STAFFYOU_API_KEY" \
-H "Content-Type: application/json" \
-d @employee.json
# Place an assignment
curl -X POST \
"https://staffyou-integration-agency-test.azurewebsites.net/purchase-to-pay/assignment/ASSIGN-2026-001234" \
-H "x-api-key: $STAFFYOU_API_KEY" \
-H "Content-Type: application/json" \
-d @assignment.json
# Delete an assignment
curl -X DELETE \
"https://staffyou-integration-agency-test.azurewebsites.net/purchase-to-pay/assignment/ASSIGN-2026-001234" \
-H "x-api-key: $STAFFYOU_API_KEY"
A typical first integration of the Staffyou-hosted endpoints follows the steps below:
401) and then a valid key.GET /employees/by-email to confirm authentication and response handling.POST /employees and store the returned employeeId.POST /purchase-to-pay/assignment/{id} using the employeeId as the worker identifier.PUT to test worker replacement and field updates.DELETE.To receive orders from Staffyou:
POST, PUT, and DELETE /purchase-to-pay/staffing-order/order/{id}, plus DELETE /purchase-to-pay/assignment/{id} for cancelling a single placement and POST /purchase-to-pay/assignment/{id} for a placement the employer made.ApiUrl) with your Staffyou integration manager. Staffyou will send this key in x-api-key on every call.x-api-key header on every request; reject unknown keys with 401.StaffingOrder body. Use documentId.value (= the {id} path parameter) as your correlation key, and positionProfile.positionOpenQuantity as the number of workers requested.2xx on success. On failure, return a 4xx/5xx with a short JSON body describing the problem — Staffyou logs it for troubleshooting.documentId.value as the assignment's documentId.value.DELETE /purchase-to-pay/assignment/{id} (Section 6.7): the employer cancelled that specific worker. Free the placement, keep the order open, and place a replacement under a new assignment id if you can.POST /purchase-to-pay/assignment/{id} (Section 6.8): the employer placed one of your workers itself. Count it against the order and keep the Staffyou-issued {id} for later PUT/DELETE calls.Several distinct identifiers flow through the integration. Keeping them apart — in particular the route {id} versus documentId.value on an assignment — is the single most important part of a correct implementation.
| Identifier | Generated by | Where it appears | Meaning |
|---|---|---|---|
| Shift id | Staffyou | documentId.value on both staffing orders (direction B) and assignments (direction A) |
The Staffyou shift (TimeSlot) GUID. It is the link between an order and the assignment(s) that fulfil it. |
| Order id | Staffyou | {id} path parameter on the staffing order endpoints |
Equal to the shift id (documentId.value). Stable across submit, update, and cancel for the same shift. |
| Assignment id | Your agency — or Staffyou for a placement the employer made (Section 6.8) | {id} path parameter on the assignment endpoints (also echoed in the body id field) |
The identifier of a placement. Staffyou stores it as the WorkTicket's ExternalReference so either side can reference the same placement later. |
| Worker id | Staffyou | assignedWorker.workerId[].value |
The employeeId returned by POST /employees (or GET /employees/by-email). |
How the shift id ties the two directions together:
documentId.value (and in the {id} route of the order).POST /purchase-to-pay/assignment/{id} with:
documentId.value — this is the shift Staffyou sent you, and it tells Staffyou which shift the worker is being planned on;{id} — Staffyou creates a WorkTicket for the placement and saves this {id} as its ExternalReference, so the same placement can be referenced on a later PUT or DELETE;assignedWorker.workerId[].value.So on an assignment the route {id} and documentId.value are different identifiers and must not be confused: the route id is your assignment reference (stored as ExternalReference), while documentId.value is Staffyou's shift id (which shift to assign on). Assignment ids must remain stable for the lifetime of the placement.
POST is effectively idempotent on the client side — re-sending the same payload with the same {id} after a network failure will either succeed (if the previous request did not reach the server) or return 409 Conflict (if it did). Treat 409 as a benign signal that the assignment already exists rather than a hard error.POST for an order id it already holds idempotently (either update in place or respond 409 Conflict) rather than creating a duplicate.POST /purchase-to-pay/assignment/{id} for an id you already hold, and a DELETE for an id you no longer (or do not yet) hold, as success rather than an error.2026-07-01T17:00:00Z or 2026-07-16T08:00:00).dateOfBirth field on employee endpoints uses the compact yyyyMMdd format (e.g. 19900115).These formats are intentionally different because they follow different parts of the SETU standard.
Validation errors on the Staffyou-hosted endpoints return a 400 with the operation-specific response object: the status field is set to a failure value and message contains a human-readable description. Clients should log message and the full response body for support purposes. For 401 responses, refer to type, title, and detail in the ProblemDetails object. On the staffing order endpoints you implement, return equivalent, human-readable error bodies so failures are easy to diagnose from the Staffyou logs.
Production endpoints, API keys, and any client-specific configuration will be provided as part of the go-live process. The contract documented in this specification is the same in test and production; only the base URLs and credentials change. For direction B, provide Staffyou with your production base URL and a production API key.
For integration questions, API key requests, and production credentials, please contact your Staffyou integration manager.
Bug reports and unexpected behaviour in the test environment should be raised through the same channel, including:
© Staffyou B.V., Rotterdam. SETU Purchase to Pay v2.0 integration API.