{"openapi":"3.1.0","info":{"title":"SDEP - Short-Term Rental Platform (STR) API","description":"Endpoints for short-term rental platforms to view areas and to submit activities.","version":"PRD-0.0.1-2604241245"},"servers":[{"url":"/api/str/v1"}],"paths":{"/areas":{"get":{"tags":["str"],"summary":"Get all areas","description":"Get all areas. By default, returns all areas (unlimited). Use optional pagination parameters to limit results.\n\n**Each area contains:**\n- `areaId`: Functional ID identifying this area\n- `areaName`: Display name (optional) of the area\n- `regulation`: Regulation type of the area - 'listing', 'activity', or 'all'\n- `filename`: Name of the area shapefile (e.g., 'area.zip')\n- `competentAuthorityId`: Functional ID referencing the competent authority that owns the area\n- `competentAuthorityName`: Display name (optional) of the competent authority\n- `createdAt`: Timestamp when this area version was created (UTC)","operationId":"getAreas","security":[{"OAuth2ClientCredentials":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip (default: 0)","default":0,"title":"Offset"},"description":"Number of records to skip (default: 0)"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Maximum number of records to return (default: unlimited, max: 1000 when specified)","title":"Limit"},"description":"Maximum number of records to return (default: unlimited, max: 1000 when specified)"}],"responses":{"200":{"description":"List of areas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaListResponse"},"example":{"areas":[{"areaId":"959a7439-7cad-4009-96ec-353b44723db9","areaName":"Amsterdam","regulation":"all","filename":"Amsterdam.zip","competentAuthorityId":"sdep-ca0363","competentAuthorityName":"Amsterdam (inclusief Weesp)","createdAt":"2025-01-01T00:00:00Z"},{"areaId":"904ee15d-70a6-4e69-a704-6018646803a8","areaName":"Rotterdam","regulation":"all","filename":"Rotterdam.zip","competentAuthorityId":"sdep-ca0599","competentAuthorityName":"Rotterdam","createdAt":"2025-01-01T00:00:00Z"}]}}}},"500":{"description":"Internal Server Error - an unexpected issue occurred that prevented the request from being completed"},"503":{"description":"Service Unavailable - temporarily unable to process requests due to overload, maintenance, or dependency issues (database/authorization server)"},"400":{"description":"Bad request - invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions"}}}},"/areas/count":{"get":{"tags":["str"],"summary":"Get areas count (optional, to support pagination)","description":"Get areas count (optional, to support pagination).","operationId":"countAreas","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaCountResponse"}}}},"500":{"description":"Internal Server Error - an unexpected issue occurred that prevented the request from being completed"},"503":{"description":"Service Unavailable - temporarily unable to process requests due to overload, maintenance, or dependency issues (database/authorization server)"},"401":{"description":"Unauthorized - missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions"}},"security":[{"OAuth2ClientCredentials":[]}]}},"/areas/{areaId}":{"get":{"tags":["str"],"summary":"Get area (shapefile)","description":"Get area (shapefile) based on functional ID.","operationId":"getArea","security":[{"OAuth2ClientCredentials":[]}],"parameters":[{"name":"areaId","in":"path","required":true,"schema":{"type":"string","title":"Areaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/zip":{}}},"500":{"description":"Internal Server Error - an unexpected issue occurred that prevented the request from being completed"},"503":{"description":"Service Unavailable - temporarily unable to process requests due to overload, maintenance, or dependency issues (database/authorization server)"},"401":{"description":"Unauthorized - missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions"},"404":{"description":"Resource Not Found - area unavailable"}}}},"/activities/bulk":{"post":{"tags":["str"],"summary":"Submit activities in bulk for the currently authenticated platform","description":"Submit 1-1000 activities into the activities collection for the currently authenticated platform.\n\n**ID pattern:**\n\n`activityId` is provided by the platform as a business identifier (optional).\nIf not provided (or empty string), a UUID is auto-generated (RFC 9562).\n\n**Versioning:**\n\nThe same `activityId` can be resubmitted - this creates a new version with a different timestamp.\nUnique constraint: (`activityId`, `createdAt`, current authenticated platform).\n\n**Validation flow (4 steps):**\n\n1. **Syntax and semantical validation** - each item is validated individually.\n   Failed items are marked NOK with the error reason; valid items continue.\n2. **Referential Integrity Check** - area IDs are verified. Items with unknown `areaId` are marked NOK; valid items continue.\n3. **Bulk Insert** - all remaining valid items are inserted in a single multi-row INSERT.\n4. **Feedback** - per-item OK/NOK response preserving original order.\n\n**Intra-batch duplicates (last-wins):**\nWhen the same `activityId` appears multiple times in a single batch, only the last\noccurrence is processed. Earlier occurrences receive NOK.\n\n**The request contains:**\n- `activities`: Array of activity objects to process (1-1000 items per batch)\n\n**Each activity item in the request contains:**\n- `activityId`: Functional ID identifying the activity (auto-generated UUID if not provided; alphanumeric with hyphens `^[A-Za-z0-9-]+$`, max 64 chars)\n- `activityName`: Display name of the activity (optional, max 64 chars)\n- `status`: Lifecycle status of the activity. Defaults to `finished` when omitted; may also be `cancelled`\n- `areaId`: Functional ID referencing the area where the activity took place\n- `url`: URL of the originating listing/advertisement (max 128 chars)\n- `address`: Address composite (`thoroughfare`, `locatorDesignatorNumber` (optional), `locatorDesignatorLetter` (optional), `locatorDesignatorAddition` (optional), `postCode`, `postName`, `fullAddress`)\n- `registrationNumber`: Registration number of the address (max 32 chars)\n- `numberOfGuests`: Number of guests (1-1024)\n- `countryOfGuests`: Array of country codes of guests (1-1024; each element is ISO 3166-1 alpha-3 or `N/A`, uppercase only); array length must equal `numberOfGuests`.\n- `temporal`: Temporal composite (`startDatetime`, `endDatetime`)\n\n**The response contains:**\n- `totalReceived`: Total number of items received in the request\n- `succeeded`: Number of items successfully created (status OK)\n- `failed`: Number of items that failed validation or processing (status NOK)\n- `results`: Per-item results preserving the original request order\n\n**Each results item contains:**\n- `activityIndex`: Zero-based index of this item in the original request list\n- `activityId`: Activity functional ID provided by the client in the request\n- `status`: Processing result - `OK` (created successfully) or `NOK` (failed validation or processing)\n- `activity`: The full activity object (present for OK items, omitted for NOK items)\n- `errors`: Structured error details (present for NOK items, omitted for OK items)\n\n**The activity object (for the OK items) contains:**\n- `activityId`: Functional ID identifying this activity\n- `activityName`: Display name (optional) of the activity\n- `status`: Lifecycle status of the activity: `finished` or `cancelled`\n- `areaId`: Functional ID referencing the area where this activity took place\n- `competentAuthorityId`: Functional ID of the competent authority that owns the referenced area\n- `competentAuthorityName`: Display name (optional) of the competent authority\n- `url`: URL of the originating listing/advertisement\n- `address`: Address composite (`thoroughfare`, `locatorDesignatorNumber` (optional), `locatorDesignatorLetter` (optional), `locatorDesignatorAddition` (optional), `postCode`, `postName`, `fullAddress`)\n- `registrationNumber`: Registration number of the address (max 32 chars)\n- `numberOfGuests`: Number of guests (1-1024)\n- `countryOfGuests`: Array of country codes of guests (each element is ISO 3166-1 alpha-3 or `N/A`); array length equals `numberOfGuests`.\n- `temporal`: Temporal composite (startDatetime, endDatetime)\n- `platformId`: Functional ID referencing the platform that owns the activity\n- `platformName`: Display name (optional) of the platform\n- `createdAt`: Timestamp when this activity version was created (UTC)\n\n**Response HTTP status:**\n- 201: all items created successfully\n- 200: partial success (some OK, some NOK)\n- 401: missing or invalid token\n- 403: insufficient permissions\n- 422: all items failed","operationId":"postActivitiesBulk","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityBulkRequest"},"example":{"activities":[{"activityId":"550e8400-e29b-41d4-a716-446655440000","activityName":"Amsterdam Summer Rental","status":"finished","areaId":"959a7439-7cad-4009-96ec-353b44723db9","url":"http://example.com/amsterdam-myhouse-1","address":{"thoroughfare":"Prinsengracht","locatorDesignatorNumber":263,"locatorDesignatorLetter":"a","locatorDesignatorAddition":"II","postCode":"1016GV","postName":"Amsterdam","fullAddress":"Prinsengracht 263a-II, 1016GV Amsterdam"},"registrationNumber":"REG0001","numberOfGuests":4,"countryOfGuests":["NLD","NLD","DEU","BEL"],"temporal":{"startDatetime":"2025-06-01T14:00:00Z","endDatetime":"2025-06-07T11:00:00Z"}},{"activityName":"Rotterdam Weekend Stay","status":"cancelled","areaId":"904ee15d-70a6-4e69-a704-6018646803a8","url":"http://example.com/rotterdam-apartment-2","address":{"thoroughfare":"Witte de Withstraat","locatorDesignatorNumber":45,"postCode":"3012BK","postName":"Rotterdam","fullAddress":"Witte de Withstraat 45, 3012BK Rotterdam"},"registrationNumber":"REG0002","numberOfGuests":2,"countryOfGuests":["FRA","FRA"],"temporal":{"startDatetime":"2025-07-12T15:00:00Z","endDatetime":"2025-07-14T10:00:00Z"}},{"activityId":"771a0622-g41d-63f6-c938-668877662222","activityName":"Utrecht City Break","areaId":"bb22937c-fa9b-4ce6-b3d9-6e2ac49f621c","url":"http://example.com/utrecht-studio-3","address":{"thoroughfare":"Oudegracht","locatorDesignatorNumber":100,"postCode":"3511AX","postName":"Utrecht","fullAddress":"Oudegracht 100, 3511AX Utrecht"},"registrationNumber":"REG0003","numberOfGuests":3,"countryOfGuests":["GBR","GBR","IRL"],"temporal":{"startDatetime":"2025-08-10T11:00:00Z","endDatetime":"2025-08-05T14:00:00Z"}},{"activityName":"Den Haag Apartment","areaId":"6d1da866-c6c4-48f7-a15a-a7aae27c73f8","url":"http://example.com/denhaag-apartment-4","address":{"thoroughfare":"Turfmarkt","locatorDesignatorNumber":147,"postCode":"2500EA","postName":"Den Haag","fullAddress":"Turfmarkt 147, 2500EA Den Haag"},"registrationNumber":"REG0004","numberOfGuests":1,"countryOfGuests":["ESP"]},{"activityId":"882b1733-h52e-74g7-d049-779988773333","activityName":"Groningen Loft","areaId":"00000000-0000-0000-0000-000000000000","url":"http://example.com/groningen-loft-5","address":{"thoroughfare":"Herestraat","locatorDesignatorNumber":20,"postCode":"9711LA","postName":"Groningen","fullAddress":"Herestraat 20, 9711LA Groningen"},"registrationNumber":"REG0005","numberOfGuests":2,"countryOfGuests":["ITA","ITA"],"temporal":{"startDatetime":"2025-09-01T14:00:00Z","endDatetime":"2025-09-03T10:00:00Z"}},{"activityId":"993c2844-i63f-85h8-e15a-880099884444","activityName":"Eindhoven Studio","areaId":"959a7439-7cad-4009-96ec-353b44723db9","url":"http://example.com/eindhoven-studio-6","address":{"thoroughfare":"Stratumseind","locatorDesignatorNumber":12,"postCode":"5611EP","postName":"Eindhoven","fullAddress":"Stratumseind 12, 5611EP Eindhoven"},"registrationNumber":"REG0006","numberOfGuests":3,"countryOfGuests":["NLD","NLD"],"temporal":{"startDatetime":"2025-10-01T14:00:00Z","endDatetime":"2025-10-03T10:00:00Z"}}]}}},"required":true},"responses":{"201":{"description":"All activities created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityBulkResponse"},"example":{"totalReceived":2,"succeeded":2,"failed":0,"results":[{"activityIndex":0,"activityId":"550e8400-e29b-41d4-a716-446655440000","status":"OK","activity":{"activityId":"550e8400-e29b-41d4-a716-446655440000","status":"finished","areaId":"959a7439-7cad-4009-96ec-353b44723db9","competentAuthorityId":"sdep-ca0363","competentAuthorityName":"Amsterdam (inclusief Weesp)","url":"http://example.com/amsterdam-myhouse-1","address":{"thoroughfare":"Prinsengracht","locatorDesignatorNumber":263,"postCode":"1016GV","postName":"Amsterdam","fullAddress":"Prinsengracht 263, 1016GV Amsterdam"},"registrationNumber":"REG0001","numberOfGuests":4,"countryOfGuests":["NLD","DEU","BEL","N/A"],"temporal":{"startDatetime":"2025-06-01T14:00:00Z","endDatetime":"2025-06-07T11:00:00Z"},"platformId":"str01","platformName":"Test STR 01","createdAt":"2025-06-01T12:00:00Z"}},{"activityIndex":1,"activityId":"660f9511-f30c-52e5-b827-557766551111","status":"OK","activity":{"activityId":"660f9511-f30c-52e5-b827-557766551111","status":"cancelled","areaId":"904ee15d-70a6-4e69-a704-6018646803a8","competentAuthorityId":"sdep-ca0599","competentAuthorityName":"Rotterdam","url":"http://example.com/rotterdam-apartment-2","address":{"thoroughfare":"Witte de Withstraat","locatorDesignatorNumber":45,"postCode":"3012BK","postName":"Rotterdam","fullAddress":"Witte de Withstraat 45, 3012BK Rotterdam"},"registrationNumber":"REG0002","numberOfGuests":2,"countryOfGuests":["FRA","FRA"],"temporal":{"startDatetime":"2025-07-12T15:00:00Z","endDatetime":"2025-07-14T10:00:00Z"},"platformId":"str01","platformName":"Test STR 01","createdAt":"2025-06-01T12:00:00Z"}}]}}}},"500":{"description":"Internal Server Error - an unexpected issue occurred that prevented the request from being completed"},"503":{"description":"Service Unavailable - temporarily unable to process requests due to overload, maintenance, or dependency issues (database/authorization server)"},"200":{"description":"Partial success - some activities created, some failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityBulkResponse"},"example":{"totalReceived":6,"succeeded":2,"failed":4,"results":[{"activityIndex":0,"activityId":"550e8400-e29b-41d4-a716-446655440000","status":"OK","activity":{"activityId":"550e8400-e29b-41d4-a716-446655440000","activityName":"Amsterdam Summer Rental","status":"finished","areaId":"959a7439-7cad-4009-96ec-353b44723db9","competentAuthorityId":"sdep-ca0363","competentAuthorityName":"Amsterdam (inclusief Weesp)","url":"http://example.com/amsterdam-myhouse-1","address":{"thoroughfare":"Prinsengracht","locatorDesignatorNumber":263,"locatorDesignatorLetter":"a","locatorDesignatorAddition":"II","postCode":"1016GV","postName":"Amsterdam","fullAddress":"Prinsengracht 263a-II, 1016GV Amsterdam"},"registrationNumber":"REG0001","numberOfGuests":4,"countryOfGuests":["NLD","NLD","DEU","BEL"],"temporal":{"startDatetime":"2025-06-01T14:00:00Z","endDatetime":"2025-06-07T11:00:00Z"},"platformId":"sdep-str01","platformName":"Test STR 01 (interactive usage, persistent)","createdAt":"2026-04-17T12:31:45.492466Z"}},{"activityIndex":1,"activityId":"660f9511-f30c-52e5-b827-557766551111","status":"OK","activity":{"activityId":"660f9511-f30c-52e5-b827-557766551111","activityName":"Rotterdam Weekend Stay","status":"cancelled","areaId":"904ee15d-70a6-4e69-a704-6018646803a8","competentAuthorityId":"sdep-ca0599","competentAuthorityName":"Rotterdam","url":"http://example.com/rotterdam-apartment-2","address":{"thoroughfare":"Witte de Withstraat","locatorDesignatorNumber":45,"postCode":"3012BK","postName":"Rotterdam","fullAddress":"Witte de Withstraat 45, 3012BK Rotterdam"},"registrationNumber":"REG0002","numberOfGuests":2,"countryOfGuests":["FRA","FRA"],"temporal":{"startDatetime":"2025-07-12T15:00:00Z","endDatetime":"2025-07-14T10:00:00Z"},"platformId":"sdep-str01","platformName":"Test STR 01 (interactive usage, persistent)","createdAt":"2026-04-17T12:31:45.492466Z"}},{"activityIndex":2,"activityId":"771a0622-g41d-63f6-c938-668877662222","status":"NOK","errors":{"detail":[{"msg":"Value error, End datetime must be after start datetime","type":"value_error","loc":["temporal","endDatetime"]}]}},{"activityIndex":3,"status":"NOK","errors":{"detail":[{"msg":"Field required","type":"missing","loc":["temporal"]}]}},{"activityIndex":4,"activityId":"882b1733-h52e-74g7-d049-779988773333","status":"NOK","errors":{"detail":[{"msg":"Area with areaId '00000000-0000-0000-0000-000000000000' not found","type":"not_found_error","loc":["areaId"]}]}},{"activityIndex":5,"activityId":"993c2844-i63f-85h8-e15a-880099884444","status":"NOK","errors":{"detail":[{"msg":"Value error, numberOfGuests (3) must equal the number of elements in countryOfGuests (2)","type":"value_error","loc":[]}]}}]}}}},"401":{"description":"Unauthorized - missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - insufficient permissions"},"422":{"description":"All activities failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityBulkResponse"},"example":{"totalReceived":2,"succeeded":0,"failed":2,"results":[{"activityIndex":0,"activityId":"550e8400-e29b-41d4-a716-446655440000","status":"NOK","errors":{"detail":[{"msg":"Area with areaId '00000000-0000-0000-0000-000000000000' not found","type":"not_found_error","loc":["areaId"]},{"msg":"Value error, End datetime must be after start datetime","type":"value_error","loc":["temporal","endDatetime"]}]}},{"activityIndex":1,"status":"NOK","errors":{"detail":[{"msg":"Area with areaId '00000000-0000-0000-0000-000000000000' not found","type":"not_found_error","loc":["areaId"]},{"msg":"Field required","type":"missing","loc":["temporal"]}]}}]}}}}},"security":[{"OAuth2ClientCredentials":[]}]}}},"components":{"schemas":{"ActivityBulkRequest":{"properties":{"activities":{"items":{"$ref":"#/components/schemas/ActivityRequest"},"type":"array","maxItems":1000,"minItems":1,"title":"Activities","description":"Array of activity objects to process (1-1000 items per batch)"}},"type":"object","required":["activities"],"title":"Activity.BulkRequest","description":"Bulk activity request schema.\n\nThe `activities` field is typed as `list[ActivityRequest]` for the OpenAPI\ncontract, but item-level validation is skipped at request-parse time (via\n`SkipValidation`). This preserves the Application-First Validation flow:\neach item is validated individually in the service layer, so one invalid\nitem is marked NOK without failing the whole batch."},"ActivityBulkResponse":{"properties":{"totalReceived":{"type":"integer","minimum":0.0,"title":"Totalreceived","description":"Total number of items received in the request","examples":[2]},"succeeded":{"type":"integer","minimum":0.0,"title":"Succeeded","description":"Number of items successfully created (status OK)","examples":[2]},"failed":{"type":"integer","minimum":0.0,"title":"Failed","description":"Number of items that failed validation or processing (status NOK)","examples":[0]},"results":{"items":{"$ref":"#/components/schemas/ActivityBulkResultItem"},"type":"array","title":"Results","description":"Per-item results preserving the original request order","example":[{"activity":{"activityId":"550e8400-e29b-41d4-a716-446655440000","address":{"fullAddress":"Prinsengracht 263, 1016GV Amsterdam","locatorDesignatorNumber":263,"postCode":"1016GV","postName":"Amsterdam","thoroughfare":"Prinsengracht"},"areaId":"3ab7c2b9-5c8d-4100-bc3e-00ac115f0495","competentAuthorityId":"sdep-ca0363","competentAuthorityName":"Gemeente Amsterdam","countryOfGuests":["NLD","DEU","BEL","N/A"],"createdAt":"2025-06-01T12:00:00Z","numberOfGuests":4,"platformId":"str01","platformName":"Test STR 01","registrationNumber":"REG0001","status":"finished","temporal":{"endDatetime":"2025-06-07T11:00:00Z","startDatetime":"2025-06-01T14:00:00Z"},"url":"http://example.com/amsterdam-myhouse-1"},"activityId":"550e8400-e29b-41d4-a716-446655440000","activityIndex":0,"status":"OK"},{"activityIndex":1,"errors":{"detail":[{"loc":["areaId"],"msg":"Area with areaId 'c5f54e98-226a-411b-b015-ca13070c6dc5' not found","type":"not_found_error"}]},"status":"NOK"}]}},"type":"object","required":["totalReceived","succeeded","failed","results"],"title":"Activity.BulkResponse","description":"Bulk activity response schema.\n\nReturns per-item OK/NOK feedback with summary counts.\nValidation flow Step 4: the original list enriched with status and error_message."},"ActivityBulkResultItem":{"properties":{"activityIndex":{"type":"integer","minimum":0.0,"title":"Activityindex","description":"Zero-based index of this item in the original request list","examples":[0]},"activityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activityid","description":"Activity functional ID provided by the client in the request","examples":["550e8400-e29b-41d4-a716-446655440000"]},"status":{"type":"string","enum":["OK","NOK"],"title":"Status","description":"Processing result - `OK` (created successfully) or `NOK` (failed validation or processing)","examples":["OK"]},"activity":{"anyOf":[{"$ref":"#/components/schemas/ActivityResponse"},{"type":"null"}],"description":"The full activity object (present for OK items, omitted for NOK items)"},"errors":{"anyOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"null"}],"description":"Structured error details (present for NOK items, omitted for OK items)","examples":[{"detail":[{"loc":["areaId"],"msg":"Area with areaId 'unknown-id' not found","type":"not_found_error"}]}]}},"type":"object","required":["activityIndex","status"],"title":"Activity.BulkResultItem","description":"Result for a single item in a bulk activity response."},"ActivityRequest":{"properties":{"activityId":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$"},{"type":"null"}],"title":"Activityid","description":"Functional ID identifying the activity (auto-generated UUID if not provided; alphanumeric with hyphens `^[A-Za-z0-9-]+$`, max 64 chars)","examples":["550e8400-e29b-41d4-a716-446655440000","550E8400-E29B-41D4-A716-446655440000"]},"activityName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Activityname","description":"Display name of the activity (optional, max 64 chars)","examples":["Amsterdam Summer Rental"]},"status":{"$ref":"#/components/schemas/ActivityStatus","description":"Lifecycle status of the activity. Defaults to `finished` when omitted; may also be `cancelled`.","default":"finished","examples":["finished","cancelled"]},"areaId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Areaid","description":"Functional ID referencing the area where the activity took place","examples":["3ab7c2b9-5c8d-4100-bc3e-00ac115f0495","3AB7C2B9-5C8D-4100-BC3E-00AC115F0495"]},"url":{"type":"string","maxLength":128,"minLength":1,"title":"Url","description":"URL of the originating listing/advertisement (max 128 chars)","examples":["http://example.com/amsterdam-myhouse-1"]},"address":{"$ref":"#/components/schemas/CommonAddressRequest","description":"Address composite (`thoroughfare`, `locatorDesignatorNumber` (optional), `locatorDesignatorLetter` (optional), `locatorDesignatorAddition` (optional), `postCode`, `postName`, `fullAddress`)"},"registrationNumber":{"type":"string","maxLength":32,"minLength":1,"title":"Registrationnumber","description":"Registration number of the address (max 32 chars)","examples":["REG0001"]},"numberOfGuests":{"type":"integer","maximum":1024.0,"minimum":1.0,"title":"Numberofguests","description":"Number of guests (1-1024)","examples":[4]},"countryOfGuests":{"items":{"type":"string"},"type":"array","maxItems":1024,"minItems":1,"title":"Countryofguests","description":"Array of country codes of guests (1-1024; each element is ISO 3166-1 alpha-3 or 'N/A', uppercase only). Length must equal numberOfGuests.","examples":[["NLD","NLD","DEU","BEL"]]},"temporal":{"$ref":"#/components/schemas/CommonTemporalRequest","description":"Temporal composite (`startDatetime`, `endDatetime`)"}},"type":"object","required":["areaId","url","address","registrationNumber","numberOfGuests","countryOfGuests","temporal"],"title":"Activity.Request","description":"Activity request schema for creating rental activities.\n\nPlatform:\n- NOT in request payload (extracted from JWT token at API layer)\n- PlatformId comes from token's client_id claim\n- PlatformName comes from token's client_name claim\n- Will be auto-created if it doesn't exist yet\n\nActivity ID:\n- Optional: If not provided, will be auto-generated (RFC 9562 UUID)\n\nActivity Name:\n- Optional: Display name (max 64 chars)\n\nValidation Layer:\n- Validates all syntax constraints (lengths, ranges, types)\n\nConstraints (enforced at database level):\n- Unique constraint: (activityId, createdAt, platform) for versioning support"},"ActivityResponse":{"properties":{"activityId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Activityid","description":"Functional ID identifying this activity","examples":["550e8400-e29b-41d4-a716-446655440000","550E8400-E29B-41D4-A716-446655440000"]},"activityName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Activityname","description":"Display name (optional) of the activity"},"status":{"$ref":"#/components/schemas/ActivityStatus","description":"Lifecycle status of the activity: `finished` or `cancelled`.","examples":["finished","cancelled"]},"areaId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Areaid","description":"Functional ID referencing the area where this activity took place","examples":["3ab7c2b9-5c8d-4100-bc3e-00ac115f0495","3AB7C2B9-5C8D-4100-BC3E-00AC115F0495"]},"competentAuthorityId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Competentauthorityid","description":"Functional ID referencing the competent authority that owns the area","examples":["sdep-ca0363","SDEP-CA0363"]},"competentAuthorityName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Competentauthorityname","description":"Display name (optional) of the competent authority"},"url":{"type":"string","title":"Url","description":"URL of the originating listing/advertisement"},"address":{"$ref":"#/components/schemas/CommonAddressResponse","description":"Address composite (`thoroughfare`, `locatorDesignatorNumber` (optional), `locatorDesignatorLetter` (optional), `locatorDesignatorAddition` (optional), `postCode`, `postName`, `fullAddress`)"},"registrationNumber":{"type":"string","title":"Registrationnumber","description":"Registration number of the address"},"numberOfGuests":{"type":"integer","title":"Numberofguests","description":"Number of guests (1-1024)"},"countryOfGuests":{"items":{"type":"string"},"type":"array","title":"Countryofguests","description":"Array of country codes of guests (each element is ISO 3166-1 alpha-3 or 'N/A'); array length equals numberOfGuests."},"temporal":{"$ref":"#/components/schemas/CommonTemporalResponse","description":"Temporal composite (`startDatetime`, `endDatetime`)"},"platformId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Platformid","description":"Functional ID referencing the platform that owns the activity","examples":["str01","STR01"]},"platformName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Platformname","description":"Display name (optional) of the platform"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Timestamp when this activity version was created (UTC)"}},"type":"object","required":["activityId","status","areaId","competentAuthorityId","url","address","registrationNumber","numberOfGuests","countryOfGuests","temporal","platformId","createdAt"],"title":"Activity.Response","description":"Activity response schema."},"ActivityStatus":{"type":"string","enum":["finished","cancelled"],"title":"Activity.Status","description":"Lifecycle status for an activity record."},"AreaCountResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count","description":"Total number of areas in context of the current SDEP/member state","examples":[42]}},"type":"object","required":["count"],"title":"Area.CountResponse","description":"Count of areas response schema."},"AreaListResponse":{"properties":{"areas":{"items":{"$ref":"#/components/schemas/AreaResponse"},"type":"array","title":"Areas","description":"List of areas in context of the current SDEP/member state"}},"type":"object","required":["areas"],"title":"Area.ListResponse","description":"List of areas response schema."},"AreaResponse":{"properties":{"areaId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Areaid","description":"Functional ID identifying this area","examples":["959a7439-7cad-4009-96ec-353b44723db9"]},"areaName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Areaname","description":"Display name (optional) of the area","examples":["Amsterdam"]},"regulation":{"$ref":"#/components/schemas/Regulation","description":"Regulation type of the area - 'listing', 'activity', or 'all'","default":"all","examples":["all"]},"filename":{"type":"string","maxLength":64,"title":"Filename","description":"Name of the area shapefile (e.g., 'area.zip')","examples":["Amsterdam.zip"]},"competentAuthorityId":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9-]+$","title":"Competentauthorityid","description":"Functional ID of the competent authority that owns the area","examples":["sdep-ca0363"]},"competentAuthorityName":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Competentauthorityname","description":"Display name (optional) of the competent authority","examples":["Amsterdam (inclusief Weesp)"]},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Timestamp when this area version was created (UTC)","examples":["2025-01-01T00:00:00Z"]}},"type":"object","required":["areaId","filename","competentAuthorityId","createdAt"],"title":"Area.Response","description":"Area response schema."},"CommonAddressRequest":{"properties":{"thoroughfare":{"type":"string","maxLength":80,"title":"Thoroughfare","description":"Street / public space name","examples":["Prinsengracht"]},"locatorDesignatorNumber":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Locatordesignatornumber","description":"Numeric house number component (optional, >= 0 when provided)","examples":[263]},"locatorDesignatorLetter":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locatordesignatorletter","description":"Letter/character suffix (optional, e.g. 'a', 'bis', 'ter')","examples":["a"]},"locatorDesignatorAddition":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Locatordesignatoraddition","description":"Additional qualifier (optional, e.g. 'II', 'Apt 3')","examples":["II"]},"postCode":{"type":"string","maxLength":10,"minLength":1,"pattern":"^[0-9A-Za-z]+$","title":"Postcode","description":"Postal code (no spaces, alphanumeric)","examples":["1016GV"]},"postName":{"type":"string","maxLength":80,"title":"Postname","description":"City / town / village","examples":["Amsterdam"]},"fullAddress":{"type":"string","maxLength":318,"title":"Fulladdress","description":"Full address as a single string (required, max 318 chars)","examples":["Turfmarkt 147a-5h, 2500EA Den Haag"]}},"type":"object","required":["thoroughfare","postCode","postName","fullAddress"],"title":"Common.AddressRequest","description":"Address composite schema for activity requests (INSPIRE/STR-AP field names).\n\nValidation Layer:\n- All syntax validation (lengths, types, constraints) happens here\n- Service layer receives validated data"},"CommonAddressResponse":{"properties":{"thoroughfare":{"type":"string","title":"Thoroughfare","description":"Street / public space name"},"locatorDesignatorNumber":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locatordesignatornumber","description":"Numeric house number component (optional)"},"locatorDesignatorLetter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locatordesignatorletter","description":"Letter/character suffix (optional)"},"locatorDesignatorAddition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locatordesignatoraddition","description":"Additional qualifier (optional)"},"postCode":{"type":"string","title":"Postcode","description":"Postal code"},"postName":{"type":"string","title":"Postname","description":"City / town / village"},"fullAddress":{"type":"string","title":"Fulladdress","description":"Full address as a single string"}},"type":"object","required":["thoroughfare","postCode","postName","fullAddress"],"title":"Common.AddressResponse","description":"Address composite schema for activity responses (INSPIRE/STR-AP field names)."},"Regulation":{"type":"string","enum":["listing","activity","all"],"title":"Common.Regulation","description":"Regulation type for an area: 'listing', 'activity', or 'all' (covers both)."},"CommonTemporalRequest":{"properties":{"startDatetime":{"type":"string","format":"date-time","title":"Startdatetime","description":"Start date and time of the rental activity (year must be >= 2025)","examples":["2025-06-01T14:00:00Z"]},"endDatetime":{"type":"string","format":"date-time","title":"Enddatetime","description":"End date and time of the rental activity (must be after startDatetime)","examples":["2025-06-07T11:00:00Z"]}},"type":"object","required":["startDatetime","endDatetime"],"title":"Common.TemporalRequest","description":"Temporal composite schema for activity requests.\n\nValidation Layer:\n- Validates datetime formats\n- Date-only submissions are permitted, and will be stored internally using a 00:00:00 timestamp\n- Ensures start year is >= 2025\n- Ensures start is before end"},"CommonTemporalResponse":{"properties":{"startDatetime":{"type":"string","format":"date-time","title":"Startdatetime","description":"Start date and time of the rental activity"},"endDatetime":{"type":"string","format":"date-time","title":"Enddatetime","description":"End date and time of the rental activity"}},"type":"object","required":["startDatetime","endDatetime"],"title":"Common.TemporalResponse","description":"Temporal composite schema for activity responses."},"ErrorDetail":{"properties":{"msg":{"type":"string","title":"Msg","description":"Human-readable error message"},"type":{"type":"string","title":"Type","description":"Error type identifier"},"loc":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},{"type":"null"}],"title":"Loc","description":"Location of the error (e.g. ['body', 'fieldName'])"}},"type":"object","required":["msg","type"],"title":"Error.Detail","description":"Detail of a single error."},"ErrorResponse":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array","title":"Detail","description":"List of error details"}},"type":"object","required":["detail"],"title":"Error.Response","description":"Standardized error response format."}},"securitySchemes":{"OAuth2ClientCredentials":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{},"tokenUrl":"https://sdep.gov.nl/api/auth/v1/token"}}}}}}