Timetable Hearing Statements API Guide
Create Hearing Statement from External V2 (e.g. SKI Web) - Successfully
POST /v2/timetable-hearing/statements/external
Query Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
statement |
Object |
true |
|
statement.statementSender |
Object |
false |
|
statement.statementSender.emails |
Array[String] |
true |
E-Mail addresses Length must be between 1 and 10 |
statement.statementSender.firstName |
String |
true |
First Name Example value: Fabienne Length must be between 0 and 100 |
statement.statementSender.lastName |
String |
true |
Last Name Example value: Maurer Length must be between 0 and 100 |
statement.statementSender.organisation |
String |
true |
Organisation Example value: Post AG Length must be between 0 and 100 |
statement.statementSender.street |
String |
true |
Street Example value: Bahnhofstrasse 12 Length must be between 0 and 100 |
statement.statementSender.zip |
Integer |
true |
ZIP Code Example value: 3000 |
statement.statementSender.city |
String |
true |
City Example value: Bern Length must be between 0 and 50 |
statement.id |
Integer |
true |
Technical identifier Example value: 1 |
statement.timetableYear |
Integer |
true |
TimetableYear Example value: 2024 |
statement.statementStatus |
String |
true |
Current status Must be one of ["RECEIVED","IN_REVIEW","ACCEPTED","PARTLY_IMPLEMENTED","NOTED","REJECTED","MOVED","JUNK","REVOKED"] |
statement.ttfnid |
String |
true |
TimetableFieldNumberId regarding the statement Example value: ch:1:ttfnid:123234 |
statement.timetableFieldNumber |
String |
true |
Timetable field number Example value: 100; 80.099; 2700 |
statement.timetableFieldDescription |
String |
true |
Timetable field number description Example value: Fribourg/Freiburg - Bern - Thun (S-Bahn Bern, Linien S1, S2) |
statement.swissCanton |
String |
false |
Canton, the statement is for Must be one of ["ZURICH","BERN","LUCERNE","URI","SCHWYZ","OBWALDEN","NIDWALDEN","GLARUS","ZUG","FRIBOURG","SOLOTHURN","BASEL_CITY","BASEL_COUNTRY","SCHAFFHAUSEN","APPENZELL_AUSSERRHODEN","APPENZELL_INNERRHODEN","ST_GALLEN","GRAUBUNDEN","AARGAU","THURGAU","TICINO","VAUD","VALAIS","NEUCHATEL","GENEVE","JURA"] |
statement.oldSwissCanton |
String |
true |
Canton, the statement was before Must be one of ["ZURICH","BERN","LUCERNE","URI","SCHWYZ","OBWALDEN","NIDWALDEN","GLARUS","ZUG","FRIBOURG","SOLOTHURN","BASEL_CITY","BASEL_COUNTRY","SCHAFFHAUSEN","APPENZELL_AUSSERRHODEN","APPENZELL_INNERRHODEN","ST_GALLEN","GRAUBUNDEN","AARGAU","THURGAU","TICINO","VAUD","VALAIS","NEUCHATEL","GENEVE","JURA"] |
statement.stopPlace |
String |
true |
StopPlace information for the statement Example value: Bern, Wyleregg Length must be between 0 and 255 |
statement.responsibleTransportCompanies |
Array[Object] |
true |
|
statement.responsibleTransportCompanies[].id |
Integer |
true |
Technical identifier Example value: 1 |
statement.responsibleTransportCompanies[].number |
String |
true |
TransportCompany number Example value: \#0001 |
statement.responsibleTransportCompanies[].abbreviation |
String |
true |
TransportCompany abbreviation Example value: SBB |
statement.responsibleTransportCompanies[].businessRegisterName |
String |
true |
TransportCompany business register name Example value: Schweizerische Bundesbahnen SBB |
statement.responsibleTransportCompaniesDisplay |
String |
true |
Comma separated Transport Companies abbreviation Example value: BLS,SBB |
statement.statement |
String |
false |
Statement of citizen Example value: I need some more busses please. Length must be between 0 and 5000 |
statement.documents |
Array[Object] |
true |
List of uploaded documents Length must be between 0 and 3 |
statement.documents[].id |
Integer |
true |
Technical identifier Example value: 1 |
statement.documents[].fileName |
String |
false |
FileName of uploaded document Example value: Document.pdf Length must be between 0 and 500 |
statement.documents[].fileSize |
Integer |
false |
Content length Example value: 1123123 |
statement.justification |
String |
true |
Statement of Federal office of transport Example value: We can absolutely do that. Length must be between 0 and 5000 |
statement.comment |
String |
true |
Statement comment Example value: I am changing my statement from the canton Geneva to the canton Bern. Length must be between 0 and 280 |
statement.etagVersion |
Integer |
true |
Optimistic locking version - instead of ETag HTTP Header (see RFC7232:Section 2.3) Example value: 5 |
statement.creationDate |
String |
true |
Object creation date Example value: 01.01.2000 |
statement.creator |
String |
true |
User creator Example value: u123456 |
statement.editionDate |
String |
true |
Last edition date Example value: 01.01.2000 |
statement.editor |
String |
true |
User editor Example value: u123456 |
statement.status |
String |
true |
Status Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"] |
documents |
Array[File] |
true |
Example request
$ curl 'http://localhost:8080/v2/timetable-hearing/statements/external' -i -X POST \
-H 'Content-Type: multipart/form-data' \
-F 'statement= {
"statement": "I need some more busses please.",
"statementSender": {
"emails": ["maurer@post.ch", "max@post.ch"],
"firstName": "Fabienne",
"lastName": "Maurer",
"organisation": "Post AG",
"street": "Bahnhofstrasse 12",
"zip": 3000,
"city": "Bern"
},
"timetableFieldNumber": "1.1",
"swissCanton": "BERN",
"stopPlace": "Bern, Wyleregg"
}
;type=application/json' \
-F 'documents=@dummy.pdf;type=application/pdf' \
-F 'documents=@dummy1.pdf;type=application/pdf'
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1209
{
"creationDate" : "2025-08-19T08:35:44.734494",
"creator" : "test-client",
"editionDate" : "2025-08-19T08:35:44.734514",
"editor" : "test-client",
"status" : null,
"id" : 1027,
"timetableYear" : 2022,
"statementStatus" : "RECEIVED",
"ttfnid" : "ch:1:ttfnid:123123123",
"timetableFieldNumber" : null,
"timetableFieldDescription" : null,
"swissCanton" : "BERN",
"oldSwissCanton" : null,
"stopPlace" : "Bern, Wyleregg",
"responsibleTransportCompanies" : [ {
"id" : 1,
"number" : "#0001",
"abbreviation" : "SBB",
"businessRegisterName" : "Schweizerische Bundesbahnen SBB"
} ],
"responsibleTransportCompaniesDisplay" : "SBB",
"statement" : "I need some more busses please.",
"documents" : [ {
"id" : 1011,
"fileName" : "dummy.pdf",
"fileSize" : 12616
}, {
"id" : 1012,
"fileName" : "dummy1.pdf",
"fileSize" : 12616
} ],
"justification" : null,
"comment" : null,
"etagVersion" : 0,
"statementSender" : {
"firstName" : "Fabienne",
"lastName" : "Maurer",
"organisation" : "Post AG",
"street" : "Bahnhofstrasse 12",
"zip" : 3000,
"city" : "Bern",
"emails" : [ "max@post.ch", "maurer@post.ch" ]
}
}