{
  "x-generator": "NSwag v14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "Staffyou Agency Integration API",
    "description": "SETU Purchase to Pay v2.0 integration API for connecting Staffyou with external staffing agencies",
    "version": "v2.0"
  },
  "servers": [
    {
      "url": "https://staffyou-integration-agency-prod.azurewebsites.net"
    }
  ],
  "paths": {
    "/purchase-to-pay/assignment/{id}": {
      "post": {
        "tags": [
          "Assignment"
        ],
        "summary": "Place an assignment (SETU v2.0).",
        "operationId": "Assignment_Create",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the assignment",
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "request",
          "description": "The assignment details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAssignmentRequest"
              }
            }
          },
          "required": true,
          "x-position": 2
        },
        "responses": {
          "201": {
            "description": "Assignment successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The agency may not place this worker on this staffing order (no staffing relationship with its employer, no seat, or its seats are filled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssignmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Staffing order or worker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssignmentResponse"
                }
              }
            }
          },
          "409": {
            "description": "Assignment already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssignmentResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Assignment"
        ],
        "summary": "Update an assignment (worker replacement) (SETU v2.0).",
        "operationId": "Assignment_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the assignment to update",
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "request",
          "description": "The update details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAssignmentRequest"
              }
            }
          },
          "required": true,
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Assignment updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The agency may not place the new worker on this staffing order (no staffing relationship with its employer, or no seat)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssignmentResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replacement was refused by a placement rule (double booking, contract, cancellation state)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssignmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Assignment or worker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssignmentResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Assignment"
        ],
        "summary": "Delete an assignment (SETU v2.0).",
        "operationId": "Assignment_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the assignment to delete",
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Assignment deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Assignment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAssignmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/employees": {
      "post": {
        "tags": [
          "Employee"
        ],
        "summary": "Create a new agency employee.",
        "description": "Employee creation is processed synchronously and returns the created employee ID on success.",
        "operationId": "Employee_Create",
        "requestBody": {
          "x-name": "request",
          "description": "The employee details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOwnEmployeeRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Employee created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateOwnEmployeeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error or email already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateOwnEmployeeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/employees/by-email": {
      "get": {
        "tags": [
          "Employee"
        ],
        "summary": "Look up an employee by email address.",
        "operationId": "Employee_GetByEmail",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "The email address to search for",
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Search completed - employee found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEmployeeByEmailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid email format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Employee not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}": {
      "get": {
        "tags": [
          "Employee"
        ],
        "summary": "Look up one of your agency's workers by employee ID.",
        "description": "The assignment Staffyou sends when the employer places one of your workers\n(POST /purchase-to-pay/assignment/{id}) identifies the worker by employee ID only. This returns\nthe worker's profile, in the field names and formats of POST /employees, so you can find or\ncreate the matching candidate in your own system. Only your agency's own workers are returned;\nany other ID answers 404.",
        "operationId": "Employee_GetById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The employee ID (assignedWorker.workerId on the assignment)",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Employee found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEmployeeByIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "No employee of your agency with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEmployeeByIdResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateAssignmentResponse": {
        "type": "object",
        "description": "Create Assignment Response\n            \nResponse returned after successfully creating a new assignment.\n            \nHTTP Status Codes:\n201 Created - Assignment successfully created\n400 Bad Request - Validation error (missing required fields)\n401 Unauthorized - Invalid or missing API key\n500 Internal Server Error - Server error",
        "additionalProperties": false,
        "properties": {
          "assignmentId": {
            "type": "string",
            "description": "The unique identifier of the created assignment.",
            "example": "ASSIGN-2024-001234"
          },
          "status": {
            "type": "string",
            "description": "Status of the operation.",
            "example": "created"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message providing additional details about the operation result.",
            "nullable": true,
            "example": "Assignment created successfully"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        },
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateAssignmentRequest": {
        "type": "object",
        "description": "Create Assignment Request (SETU v2.0)\n            \nSETU-compliant request for creating a new worker assignment.\n            \nEndpoint: POST /purchase-to-pay/assignment/{id}\nAuthentication: Required (API Key in header)\nContent-Type: application/json",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the assignment (from URL path)."
          },
          "documentId": {
            "description": "Document identifier for this assignment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentId"
              }
            ]
          },
          "customer": {
            "description": "The staffing customer (client) receiving the worker.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          },
          "supplier": {
            "description": "The staffing supplier (agency) providing the worker.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          },
          "assignedWorker": {
            "description": "The worker being assigned.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/AssignedWorker"
              }
            ]
          },
          "positionProfile": {
            "description": "Position profile details for the assignment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PositionProfile"
              }
            ]
          },
          "payRates": {
            "type": "array",
            "description": "Pay rates for the assignment. Required, minimum 1 item.",
            "items": {
              "$ref": "#/components/schemas/PayRate"
            }
          },
          "resourceClassificationInclusion": {
            "description": "Resource classification for cost allocation.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceClassification"
              }
            ]
          },
          "staffingIds": {
            "description": "Staffing-related identifiers.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaffingIds"
              }
            ]
          },
          "customerSpecificRequirements": {
            "type": "string",
            "description": "URI reference to customer-specific requirements.",
            "nullable": true
          }
        }
      },
      "DocumentId": {
        "type": "object",
        "description": "Document identifier following SETU v2.0 standards.",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "Unique identifier value for the document."
          },
          "schemeAgencyId": {
            "type": "string",
            "description": "Schema agency identifier. Usually \"Supplier\"."
          }
        }
      },
      "Organization": {
        "type": "object",
        "description": "Organization (customer or supplier) following SETU v2.0 standards.",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "array",
            "description": "Organization identifiers. Array with max 2 items.",
            "items": {
              "$ref": "#/components/schemas/OrganizationId"
            }
          },
          "legalId": {
            "description": "Legal identifier (e.g., KvK number in Netherlands).",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/SchemeId"
              }
            ]
          },
          "taxId": {
            "description": "Tax identifier (e.g., BTW number in Netherlands).",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/SchemeId"
              }
            ]
          },
          "establishment": {
            "description": "Establishment details.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Establishment"
              }
            ]
          },
          "personContacts": {
            "type": "array",
            "description": "Contact persons at the organization.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PersonContact"
            }
          }
        }
      },
      "OrganizationId": {
        "type": "object",
        "description": "Organization identifier with value and scheme.",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "Identifier value."
          },
          "schemeAgencyId": {
            "type": "string",
            "description": "Scheme agency (e.g., \"Supplier\", \"Customer\").",
            "nullable": true
          }
        }
      },
      "SchemeId": {
        "type": "object",
        "description": "Scheme-based identifier (for legal/tax IDs).",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "Identifier value."
          },
          "schemeAgencyId": {
            "type": "string",
            "description": "Scheme agency (e.g., \"KvK\", \"OIN\", \"RSIN\", \"BTW\")."
          }
        }
      },
      "Establishment": {
        "type": "object",
        "description": "Establishment details.",
        "additionalProperties": false,
        "properties": {
          "responsibilityCode": {
            "type": "string",
            "description": "Responsibility code.",
            "nullable": true
          },
          "id": {
            "type": "array",
            "description": "Establishment identifiers.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/OrganizationId"
            }
          },
          "legalId": {
            "description": "Legal identifier for the establishment.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/SchemeId"
              }
            ]
          }
        }
      },
      "PersonContact": {
        "type": "object",
        "description": "Contact person at an organization.",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Contact person's name.",
            "nullable": true
          },
          "communication": {
            "type": "array",
            "description": "Communication channels (phone, email).",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Communication"
            }
          },
          "roleCode": {
            "type": "string",
            "description": "Role code for the contact person.",
            "nullable": true
          }
        }
      },
      "Communication": {
        "type": "object",
        "description": "Communication channel (phone or email).",
        "additionalProperties": false,
        "properties": {
          "channelCode": {
            "type": "string",
            "description": "Channel type: \"phone\" or \"email\"."
          },
          "dialNumber": {
            "type": "string",
            "description": "The phone number or email address.",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Email address (when channelCode is \"email\").",
            "nullable": true
          }
        }
      },
      "AssignedWorker": {
        "type": "object",
        "description": "Assigned worker details.",
        "additionalProperties": false,
        "properties": {
          "workerId": {
            "type": "array",
            "description": "Worker identifiers. Required, 1-2 items.",
            "items": {
              "$ref": "#/components/schemas/OrganizationId"
            }
          }
        }
      },
      "PositionProfile": {
        "type": "object",
        "description": "Position profile for the assignment.",
        "additionalProperties": false,
        "properties": {
          "positionTitle": {
            "type": "string",
            "description": "Position title.",
            "nullable": true
          },
          "positionTaskDescription": {
            "type": "string",
            "description": "Position/task description.",
            "nullable": true
          },
          "positionPeriod": {
            "description": "Position period (start/end dates). Required.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PositionPeriod"
              }
            ]
          },
          "workingPeriods": {
            "type": "array",
            "description": "Working periods defining hours/duration. Required, minimum 1 item.",
            "items": {
              "$ref": "#/components/schemas/WorkingPeriod"
            }
          },
          "positionLocation": {
            "description": "Position location/address.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PositionLocation"
              }
            ]
          },
          "jobCategories": {
            "type": "array",
            "description": "Job categories/classifications.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/JobCategory"
            }
          },
          "collectiveLabourAgreement": {
            "description": "Applicable collective labour agreement.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CollectiveLabourAgreement"
              }
            ]
          },
          "travelDistance": {
            "type": "number",
            "description": "Travel distance in kilometers.",
            "format": "decimal",
            "nullable": true
          }
        }
      },
      "PositionPeriod": {
        "type": "object",
        "description": "Position period defining start and end dates.",
        "additionalProperties": false,
        "properties": {
          "start": {
            "type": "string",
            "description": "Start date of the position. Required.",
            "format": "date-time"
          },
          "expectedEnd": {
            "type": "string",
            "description": "Expected end date of the position.",
            "format": "date-time",
            "nullable": true
          },
          "actualEnd": {
            "type": "string",
            "description": "Actual end date. Set this to cancel/end an assignment.",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "WorkingPeriod": {
        "type": "object",
        "description": "Working period defining hours and duration.",
        "additionalProperties": false,
        "properties": {
          "baseDuration": {
            "type": "number",
            "description": "Base duration in hours. Required.",
            "format": "decimal"
          },
          "unitCode": {
            "type": "string",
            "description": "Duration unit (e.g., \"Hour\", \"Day\", \"Week\")."
          },
          "workDuration": {
            "type": "number",
            "description": "Work duration.",
            "format": "decimal",
            "nullable": true
          },
          "minDuration": {
            "type": "number",
            "description": "Minimum duration.",
            "format": "decimal",
            "nullable": true
          },
          "maxDuration": {
            "type": "number",
            "description": "Maximum duration.",
            "format": "decimal",
            "nullable": true
          }
        }
      },
      "PositionLocation": {
        "type": "object",
        "description": "Position location/address.",
        "additionalProperties": false,
        "properties": {
          "address": {
            "description": "Street address.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "countryCode": {
            "type": "string",
            "description": "Country code (ISO 3166-1 alpha-2).",
            "nullable": true
          },
          "primaryLocation": {
            "type": "boolean",
            "description": "Whether this is the primary location.",
            "nullable": true
          }
        }
      },
      "Address": {
        "type": "object",
        "description": "Physical address.",
        "additionalProperties": false,
        "properties": {
          "streetName": {
            "type": "string",
            "description": "Street name and number.",
            "nullable": true
          },
          "buildingNumber": {
            "type": "string",
            "description": "Building/house number.",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City name.",
            "nullable": true
          }
        }
      },
      "JobCategory": {
        "type": "object",
        "description": "Job category/classification.",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "description": "Category code.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Category description.",
            "nullable": true
          }
        }
      },
      "CollectiveLabourAgreement": {
        "type": "object",
        "description": "Collective labour agreement (CAO).",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "CAO identifier/code.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "CAO name.",
            "nullable": true
          }
        }
      },
      "PayRate": {
        "type": "object",
        "description": "Pay rate for the assignment.",
        "additionalProperties": false,
        "properties": {
          "rateType": {
            "type": "string",
            "description": "Rate type: \"TimeInterval\" or \"Allowance\"."
          },
          "intervalCode": {
            "type": "string",
            "description": "Rate code (e.g., \"HT100\" for 100% hourly rate)."
          },
          "amount": {
            "description": "Pay amount.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Amount"
              }
            ]
          },
          "multiplier": {
            "type": "number",
            "description": "Multiplier percentage (e.g., 100 for 100%).",
            "format": "decimal",
            "nullable": true
          },
          "period": {
            "description": "Applicable period for this rate.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatePeriod"
              }
            ]
          },
          "toBeBilledIndicator": {
            "type": "boolean",
            "description": "Whether this rate is billed to customer.",
            "nullable": true
          },
          "toBePaidIndicator": {
            "type": "boolean",
            "description": "Whether this rate is paid to worker.",
            "nullable": true
          }
        }
      },
      "Amount": {
        "type": "object",
        "description": "Monetary amount with currency.",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "number",
            "description": "Numeric value.",
            "format": "decimal"
          },
          "currency": {
            "type": "string",
            "description": "Currency code (ISO 4217, e.g., \"EUR\")."
          }
        }
      },
      "RatePeriod": {
        "type": "object",
        "description": "Period for a pay rate.",
        "additionalProperties": false,
        "properties": {
          "start": {
            "type": "string",
            "description": "Start date of the rate period. Required.",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "End date of the rate period.",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ResourceClassification": {
        "type": "object",
        "description": "Resource classification for cost allocation.",
        "additionalProperties": false,
        "properties": {
          "department": {
            "description": "Department code.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ClassificationCode"
              }
            ]
          },
          "costCenter": {
            "description": "Cost center code.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ClassificationCode"
              }
            ]
          },
          "project": {
            "description": "Project code.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ClassificationCode"
              }
            ]
          },
          "purchaseOrderNumber": {
            "type": "string",
            "description": "Purchase order number.",
            "nullable": true
          }
        }
      },
      "ClassificationCode": {
        "type": "object",
        "description": "Classification code with optional description.",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "description": "Code value.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Code description.",
            "nullable": true
          }
        }
      },
      "StaffingIds": {
        "type": "object",
        "description": "Staffing-related identifiers.",
        "additionalProperties": false,
        "properties": {
          "requestForQuotationId": {
            "type": "string",
            "description": "Reference to a request for quotation.",
            "nullable": true
          }
        }
      },
      "UpdateAssignmentResponse": {
        "type": "object",
        "description": "Update Assignment Response (SETU v2.0)\n            \nResponse returned after updating an assignment.\n            \nHTTP Status Codes:\n200 OK - Assignment successfully updated\n400 Bad Request - Validation error (invalid data)\n401 Unauthorized - Invalid or missing API key\n404 Not Found - Assignment not found\n500 Internal Server Error - Server error",
        "additionalProperties": false,
        "properties": {
          "assignmentId": {
            "type": "string",
            "description": "The unique identifier of the assignment that was updated."
          },
          "status": {
            "type": "string",
            "description": "Status of the operation."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message providing additional details about the operation result.",
            "nullable": true
          }
        }
      },
      "UpdateAssignmentRequest": {
        "type": "object",
        "description": "Update Assignment Request (SETU v2.0)\n            \nSETU-compliant request for updating an existing assignment.\n            \nEndpoint: PUT /purchase-to-pay/assignment/{id}\nAuthentication: Required (API Key in header)\nContent-Type: application/json",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the assignment to update (from URL path)."
          },
          "documentId": {
            "description": "Document identifier for this assignment.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentId"
              }
            ]
          },
          "customer": {
            "description": "The staffing customer (client) receiving the worker.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          },
          "supplier": {
            "description": "The staffing supplier (agency) providing the worker.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          },
          "assignedWorker": {
            "description": "The worker being assigned.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/AssignedWorker"
              }
            ]
          },
          "positionProfile": {
            "description": "Updated position profile details.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PositionProfile"
              }
            ]
          },
          "payRates": {
            "type": "array",
            "description": "Updated pay rates for the assignment.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PayRate"
            }
          },
          "resourceClassificationInclusion": {
            "description": "Updated resource classification.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceClassification"
              }
            ]
          },
          "staffingIds": {
            "description": "Staffing-related identifiers.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaffingIds"
              }
            ]
          },
          "reasonOfChange": {
            "type": "string",
            "description": "Reason for this change/update.",
            "nullable": true
          },
          "customerSpecificRequirements": {
            "type": "string",
            "description": "URI reference to customer-specific requirements.",
            "nullable": true
          }
        }
      },
      "DeleteAssignmentResponse": {
        "type": "object",
        "description": "Delete Assignment Response (SETU v2.0)\n            \nResponse returned after deleting an assignment.\n            \nHTTP Status Codes:\n200 OK - Assignment successfully deleted\n401 Unauthorized - Invalid or missing API key\n404 Not Found - Assignment not found\n500 Internal Server Error - Server error",
        "additionalProperties": false,
        "properties": {
          "assignmentId": {
            "type": "string",
            "description": "The unique identifier of the assignment that was deleted."
          },
          "status": {
            "type": "string",
            "description": "Status of the operation."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message providing additional details.",
            "nullable": true
          }
        }
      },
      "CreateOwnEmployeeResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean"
          },
          "employeeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "message": {
            "type": "string"
          }
        }
      },
      "CreateOwnEmployeeRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "gender": {
            "description": "The gender of the employee.",
            "nullable": true,
            "example": "Man",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Gender"
              }
            ]
          },
          "mobile": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "description": "The date of birth of the employee.",
            "example": 19900115
          },
          "streetName": {
            "type": "string"
          },
          "streetNumber": {
            "type": "string"
          },
          "streetNumberAddition": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          }
        }
      },
      "Gender": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "Man",
          "Vrouw",
          "Other",
          "Undisclosed"
        ],
        "enum": [
          "Man",
          "Vrouw",
          "Other",
          "Undisclosed"
        ]
      },
      "GetEmployeeByEmailResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "found": {
            "type": "boolean"
          },
          "employeeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GetEmployeeByIdResponse": {
        "type": "object",
        "description": "One of the agency's own workers, in the field names and formats of the POST /employees request\nthe agency uses to create them. Only Found, EmployeeId and\nMessage are set when the worker is not found.",
        "additionalProperties": false,
        "properties": {
          "found": {
            "type": "boolean"
          },
          "employeeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "gender": {
            "description": "The gender of the employee.",
            "nullable": true,
            "example": "Man",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Gender"
              }
            ]
          },
          "dateOfBirth": {
            "type": "string",
            "description": "The date of birth of the employee.",
            "nullable": true,
            "example": 19900115
          },
          "streetName": {
            "type": "string",
            "nullable": true
          },
          "streetNumber": {
            "type": "string",
            "nullable": true
          },
          "streetNumberAddition": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "API Key authentication",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}