50

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.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.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.statement

String

false

Statement of citizen

Example value: I need some more busses please.

Length must be between 0 and 5000

statement.stopPlace

String

true

StopPlace information for the statement

Example value: Bern, Wyleregg

Length must be between 0 and 255

statement.statementSender

Object

false

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.statementSender.emails

Array[String]

true

E-Mail addresses

Length must be between 1 and 10

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: 1385

{
  "creationDate" : "2025-12-08T09:01:58.742295",
  "creator" : "test-client",
  "editionDate" : "2025-12-08T09:01:58.742302",
  "editor" : "test-client",
  "id" : 1028,
  "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.",
  "statementAnonymous" : false,
  "anonymousStatement" : null,
  "documents" : [ {
    "id" : 1011,
    "fileName" : "dummy1.pdf",
    "fileSize" : 12616,
    "anonymous" : false
  }, {
    "id" : 1012,
    "fileName" : "dummy.pdf",
    "fileSize" : 12616,
    "anonymous" : false
  } ],
  "publicComment" : null,
  "internalComment" : null,
  "cantonTransferComment" : null,
  "topic" : null,
  "dossierId" : 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" ]
  }
}