50

Reference Point API Guide

Get Reference Points - Successfully

GET /v1/reference-points

Query Parameters

Parameter Type Optional Description

referencePointAttributeTypes

Array[String]

true

Must be one of ["MAIN_STATION_ENTRANCE","ALTERNATIVE_STATION_ENTRANCE","ASSISTANCE_POINT","INFORMATION_DESK","PLATFORM","NO_REFERENCE_POINT"]

parentServicePointSloids

Array[String]

true

servicePointNumbers

Array[Integer]

true

sloids

Array[String]

true

statusRestrictions

Array[String]

true

Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"]

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

createdAfter

String

true

modifiedAfter

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/reference-points' -i -X GET

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 700

{
  "objects" : [ {
    "creationDate" : "2025-06-06T09:33:35.872032",
    "creator" : "e123456",
    "editionDate" : "2025-06-06T09:33:35.872067",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1020,
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31",
    "etagVersion" : 0,
    "sloid" : "ch:1:sloid:12345:1",
    "parentServicePointSloid" : "ch:1:sloid:12345",
    "designation" : "designation",
    "additionalInformation" : "additional",
    "mainReferencePoint" : true,
    "referencePointType" : "PLATFORM",
    "number" : {
      "number" : 1234567,
      "uicCountryCode" : 12,
      "numberShort" : 34567,
      "checkDigit" : 8
    }
  } ],
  "totalCount" : 1
}

Get Reference Point by Sloid - Successfully

GET /v1/reference-points/ch:1:sloid:12345:1

Path Variables

Path Variable Type Optional Description

sloid

String

false

Example request

$ curl 'http://localhost:8080/v1/reference-points/ch:1:sloid:12345:1' -i -X GET

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 618

[ {
  "creationDate" : "2025-06-06T09:33:34.175134",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:34.175167",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1015,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 0,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:12345",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM",
  "number" : {
    "number" : 1234567,
    "uicCountryCode" : 12,
    "numberShort" : 34567,
    "checkDigit" : 8
  }
} ]

Get Reference Point with filters - Successfully

GET /v1/reference-points

Query Parameters

Parameter Type Optional Description

referencePointAttributeTypes

Array[String]

true

Must be one of ["MAIN_STATION_ENTRANCE","ALTERNATIVE_STATION_ENTRANCE","ASSISTANCE_POINT","INFORMATION_DESK","PLATFORM","NO_REFERENCE_POINT"]

parentServicePointSloids

Array[String]

true

servicePointNumbers

Array[Integer]

true

sloids

Array[String]

true

statusRestrictions

Array[String]

true

Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"]

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

createdAfter

String

true

modifiedAfter

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/reference-points?numbers=12345&sloids=ch:1:sloid:12345:1&referencePointAttributeTypes=PLATFORM&fromDate=2000-01-01&toDate=2000-12-31&validOn=2000-06-28&createdAfter=2025-06-06%2009:33:35&modifiedAfter=2025-06-06%2009:33:36' -i -X GET

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 700

{
  "objects" : [ {
    "creationDate" : "2025-06-06T09:33:36.867482",
    "creator" : "e123456",
    "editionDate" : "2025-06-06T09:33:36.867524",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1025,
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31",
    "etagVersion" : 0,
    "sloid" : "ch:1:sloid:12345:1",
    "parentServicePointSloid" : "ch:1:sloid:12345",
    "designation" : "designation",
    "additionalInformation" : "additional",
    "mainReferencePoint" : true,
    "referencePointType" : "PLATFORM",
    "number" : {
      "number" : 1234567,
      "uicCountryCode" : 12,
      "numberShort" : 34567,
      "checkDigit" : 8
    }
  } ],
  "totalCount" : 1
}

Get Reference Point Overview by Parent Sloid - Successfully

GET /v1/reference-points/overview/ch:1:sloid:12345

Path Variables

Path Variable Type Optional Description

parentServicePointSloid

String

false

Example request

$ curl 'http://localhost:8080/v1/reference-points/overview/ch:1:sloid:12345' -i -X GET

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 618

[ {
  "creationDate" : "2025-06-06T09:33:36.266239",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:36.266271",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1021,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 0,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:12345",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM",
  "number" : {
    "number" : 1234567,
    "uicCountryCode" : 12,
    "numberShort" : 34567,
    "checkDigit" : 8
  }
} ]

Create Reference Points - Successfully

POST /v1/reference-points

Request Body Fields

Path Type Optional Description

mainReferencePoint

Boolean

false

Main reference point

referencePointType

String

false

Must be one of ["MAIN_STATION_ENTRANCE","ALTERNATIVE_STATION_ENTRANCE","ASSISTANCE_POINT","INFORMATION_DESK","PLATFORM","NO_REFERENCE_POINT"]

parentServicePointSloid

String

false

Parent Service Point Sloid: Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771

Length must be between 1 and 500

designation

String

false

Long designation of a location. Used primarily in customer information. Not all systems can process names of this length.

Example value: Biel/Bienne Bözingenfeld/Champs-de-Boujean

Length must be between 0 and 50

additionalInformation

String

true

Additional Information

Length must be between 0 and 2000

sloid

String

true

Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771:1

Length must be between 1 and 500

id

Integer

true

This ID helps identify versions of a prm object in the use case front end and/or update. This ID can be deleted if the version is no longer present. Do not use this ID to map your object to a prm object. To do this, use the sloid or parentServicePointSloid in combination with the data range (valid from/valid until).

Example value: 1

validFrom

String

false

Valid from

validTo

String

false

Valid to

etagVersion

Integer

true

Optimistic locking version - instead of ETag HTTP Header (see RFC7232:Section 2.3)

Example value: 5

creationDate

String

true

Object creation date

Example value: 01.01.2000

creator

String

true

User creator

Example value: u123456

editionDate

String

true

Last edition date

Example value: 01.01.2000

editor

String

true

User editor

Example value: u123456

status

String

true

Status

Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"]

Example request

$ curl 'http://localhost:8080/v1/reference-points' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM"
}'

Example response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 612

{
  "creationDate" : "2025-06-06T09:33:35.680226",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:35.680271",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1019,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 0,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM",
  "number" : {
    "number" : 8507000,
    "uicCountryCode" : 85,
    "numberShort" : 7000,
    "checkDigit" : 3
  }
}

Create Reference Point With automatic sloid - Successfully

POST /v1/reference-points

Request Body Fields

Path Type Optional Description

mainReferencePoint

Boolean

false

Main reference point

referencePointType

String

false

Must be one of ["MAIN_STATION_ENTRANCE","ALTERNATIVE_STATION_ENTRANCE","ASSISTANCE_POINT","INFORMATION_DESK","PLATFORM","NO_REFERENCE_POINT"]

parentServicePointSloid

String

false

Parent Service Point Sloid: Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771

Length must be between 1 and 500

designation

String

false

Long designation of a location. Used primarily in customer information. Not all systems can process names of this length.

Example value: Biel/Bienne Bözingenfeld/Champs-de-Boujean

Length must be between 0 and 50

additionalInformation

String

true

Additional Information

Length must be between 0 and 2000

sloid

String

true

Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771:1

Length must be between 1 and 500

id

Integer

true

This ID helps identify versions of a prm object in the use case front end and/or update. This ID can be deleted if the version is no longer present. Do not use this ID to map your object to a prm object. To do this, use the sloid or parentServicePointSloid in combination with the data range (valid from/valid until).

Example value: 1

validFrom

String

false

Valid from

validTo

String

false

Valid to

etagVersion

Integer

true

Optimistic locking version - instead of ETag HTTP Header (see RFC7232:Section 2.3)

Example value: 5

creationDate

String

true

Object creation date

Example value: 01.01.2000

creator

String

true

User creator

Example value: u123456

editionDate

String

true

Last edition date

Example value: 01.01.2000

editor

String

true

User editor

Example value: u123456

status

String

true

Status

Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"]

Example request

$ curl 'http://localhost:8080/v1/reference-points' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM"
}'

Example response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 612

{
  "creationDate" : "2025-06-06T09:33:33.973911",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:33.973943",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1014,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 0,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM",
  "number" : {
    "number" : 8507000,
    "uicCountryCode" : 85,
    "numberShort" : 7000,
    "checkDigit" : 3
  }
}

Create Reference Points without Stop Point- Unsuccessfully

POST /v1/reference-points

Request Body Fields

Path Type Optional Description

mainReferencePoint

Boolean

false

Main reference point

referencePointType

String

false

Must be one of ["MAIN_STATION_ENTRANCE","ALTERNATIVE_STATION_ENTRANCE","ASSISTANCE_POINT","INFORMATION_DESK","PLATFORM","NO_REFERENCE_POINT"]

parentServicePointSloid

String

false

Parent Service Point Sloid: Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771

Length must be between 1 and 500

designation

String

false

Long designation of a location. Used primarily in customer information. Not all systems can process names of this length.

Example value: Biel/Bienne Bözingenfeld/Champs-de-Boujean

Length must be between 0 and 50

additionalInformation

String

true

Additional Information

Length must be between 0 and 2000

sloid

String

true

Unique code for locations that is used in customer information. The structure is described in the “Swiss Location ID” specification, chapter 4.2. The document is available here: transportdatamanagement.ch/standards/

Example value: ch:1:sloid:18771:1

Length must be between 1 and 500

id

Integer

true

This ID helps identify versions of a prm object in the use case front end and/or update. This ID can be deleted if the version is no longer present. Do not use this ID to map your object to a prm object. To do this, use the sloid or parentServicePointSloid in combination with the data range (valid from/valid until).

Example value: 1

validFrom

String

false

Valid from

validTo

String

false

Valid to

etagVersion

Integer

true

Optimistic locking version - instead of ETag HTTP Header (see RFC7232:Section 2.3)

Example value: 5

creationDate

String

true

Object creation date

Example value: 01.01.2000

creator

String

true

User creator

Example value: u123456

editionDate

String

true

Last edition date

Example value: 01.01.2000

editor

String

true

User editor

Example value: u123456

status

String

true

Status

Must be one of ["DRAFT","VALIDATED","IN_REVIEW","WITHDRAWN","REVOKED"]

Example request

$ curl 'http://localhost:8080/v1/reference-points' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "designation",
  "additionalInformation" : "additional",
  "mainReferencePoint" : true,
  "referencePointType" : "PLATFORM"
}'

Example response

HTTP/1.1 412 Precondition Failed
Content-Type: application/json
Content-Length: 133

{
  "status" : 412,
  "message" : "The stop point with sloid ch:1:sloid:7000 does not exist.",
  "error" : null,
  "details" : null
}