Description
Implement support for multi-modal stop places through the write API. Use atomic, NeTEx-compatible payloads. Client must send full parent + children payloads, and Tiamat treats it as the exhaustive truth.
Endpoints
| Operation |
Method |
Path |
Body |
| Create parent + children |
POST |
/write/multimodal |
XML: StopPlacesDto with parent (first) + children |
| Update parent + children |
PATCH |
/write/multimodal |
XML: StopPlacesDto with full parent + all children |
| Get parent + children |
GET |
/write/multimodal/{parentId} |
- |
| Delete parent |
DELETE |
/write/{stopPlaceId} |
- (existing endpoint) |
Payload format
Use existing StopPlacesDto (XML wrapper). First element is the parent (no quays), remaining elements are the children (
with parentSiteRef + quays).
<stopPlaces>
<StopPlace version="1" id="parent-id">
<Name>Parent</Name>
</StopPlace>
<StopPlace version="1" id="child-id-1">
<Name>Child 1</Name>
<StopPlaceType>busStation</StopPlaceType>
<ParentSiteRef ref="parent-id" version="1"/>
<quays></quays>
</StopPlace>
<StopPlace version="1" id="child-id-2">
<Name>Child 2</Name>
<StopPlaceType>railStation</StopPlaceType>
<ParentSiteRef ref="parent-id" version="1"/>
<quays></quays>
</StopPlace>
</stopPlaces>
Key points
- Atomic payloads: Each request contains the "full truth" (no separate add/remove/update child endpoints.)
- CREATE
(POST): All children are present in payload. Minimum 2 children required.
- UPDATE
(PATCH): Payload is exhaustive. The parent must have an existing Tiamat ID.
- Children with Tiamat IDs → matched to existing children and updated
- Children without Tiamat IDs → created as new children
- Existing children absent from the payload → removed from parent, become mono-modal stops (parentSiteRef cleared)
- After the operation, minimum 2 children must remain (reject otherwise?)
- GET: Returns the same StopPlacesDto format (parent first, then children)
- DELETE: Reuses existing DELETE /write/{stopPlaceId} endpoint (already handles parent stop places via
StopPlaceTerminator)
Requirements
- Parent must NOT have quays
- Children must have quays and parentSiteRef
- Minimum 2 children on create and after any update
- Children must not be parent stop places themselves
- New children must not already have a parentSiteRef
- On update, child Tiamat IDs in the payload must be children of the specified parent
- Removed children become mono-modal (parentSiteRef cleared)
Acceptance criteria
Note: An exhaustive list of validation rules still needs to be defined.
Description
Implement support for multi-modal stop places through the write API. Use atomic, NeTEx-compatible payloads. Client must send full parent + children payloads, and Tiamat treats it as the exhaustive truth.
Endpoints
/write/multimodalStopPlacesDtowith parent (first) + children/write/multimodalStopPlacesDtowith full parent + all children/write/multimodal/{parentId}/write/{stopPlaceId}Payload format
Use existing StopPlacesDto (XML wrapper). First element is the parent (no quays), remaining elements are the children (
with parentSiteRef + quays).
Key points
(POST): All children are present in payload. Minimum 2 children required.(PATCH): Payload is exhaustive. The parent must have an existing Tiamat ID.StopPlaceTerminator)
Requirements
Acceptance criteria
Note: An exhaustive list of validation rules still needs to be defined.