50

Relation API Guide

Get Relations by Sloid - Successfully

GET /v1/relations/ch:1:sloid:8507000:1

Path Variables

Path Variable Type Optional Description

sloid

String

false

Example request

$ curl 'http://localhost:8080/v1/relations/ch:1:sloid:8507000:1' -i -X GET

Example response

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

[ {
  "contrastingAreas" : "YES",
  "creationDate" : "2026-03-30T09:40:37.228079",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.228122",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:8507000:1",
  "etagVersion" : 0,
  "id" : 1028,
  "number" : {
    "checkDigit" : 8,
    "number" : 1234567,
    "numberShort" : 34567,
    "uicCountryCode" : 12
  },
  "parentServicePointSloid" : "ch:1:sloid:8507000",
  "referencePointElementType" : "PLATFORM",
  "referencePointSloid" : "ch:1:sloid:123456",
  "status" : "VALIDATED",
  "stepFreeAccess" : "NO",
  "tactileVisualMarks" : "YES",
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31"
} ]

Update Relation - Successfully

PUT /v1/relations/1034

Path Variables

Path Variable Type Optional Description

id

Integer

false

Request Body Fields

Path Type Optional Description

parentServicePointSloid

String

true

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

referencePointSloid

String

true

Reference 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

elementSloid

String

true

Element 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

tactileVisualMarks

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY","WITH_REMOTE_CONTROL"]

contrastingAreas

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY"]

stepFreeAccess

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","YES_WITH_LIFT","YES_WITH_RAMP"]

referencePointElementType

String

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

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

status

String

true

Status

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

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

Example request

$ curl 'http://localhost:8080/v1/relations/1034' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "contrastingAreas" : "NO",
  "creationDate" : "2026-03-30T09:40:37.389076",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.38908",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:123456:1",
  "etagVersion" : 0,
  "id" : null,
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "referencePointElementType" : null,
  "referencePointSloid" : "ch:1:sloid:7000:1",
  "status" : null,
  "stepFreeAccess" : "NO",
  "tactileVisualMarks" : "YES",
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31"
}'

Example response

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

[ {
  "contrastingAreas" : "YES",
  "creationDate" : "2026-03-30T09:40:37.384349",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.384354",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:123456:1",
  "etagVersion" : 1,
  "id" : 1033,
  "number" : {
    "checkDigit" : 8,
    "number" : 1234567,
    "numberShort" : 34567,
    "uicCountryCode" : 12
  },
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "referencePointElementType" : "PLATFORM",
  "referencePointSloid" : "ch:1:sloid:7000:1",
  "status" : "VALIDATED",
  "stepFreeAccess" : "NO",
  "tactileVisualMarks" : "YES",
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31"
}, {
  "contrastingAreas" : "NO",
  "creationDate" : "2026-03-30T09:40:37.389076",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.413297",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:123456:1",
  "etagVersion" : 2,
  "id" : 1034,
  "number" : {
    "checkDigit" : 8,
    "number" : 1234567,
    "numberShort" : 34567,
    "uicCountryCode" : 12
  },
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "referencePointElementType" : "PLATFORM",
  "referencePointSloid" : "ch:1:sloid:7000:1",
  "status" : "VALIDATED",
  "stepFreeAccess" : "NO",
  "tactileVisualMarks" : "YES",
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31"
} ]

Update Relation with constraints violation- Unsuccessfully

PUT /v1/relations/1031

Path Variables

Path Variable Type Optional Description

id

Integer

false

Request Body Fields

Path Type Optional Description

parentServicePointSloid

String

true

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

referencePointSloid

String

true

Reference 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

elementSloid

String

true

Element 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

tactileVisualMarks

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY","WITH_REMOTE_CONTROL"]

contrastingAreas

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY"]

stepFreeAccess

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","YES_WITH_LIFT","YES_WITH_RAMP"]

referencePointElementType

String

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

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

status

String

true

Status

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

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

Example request

$ curl 'http://localhost:8080/v1/relations/1031' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "contrastingAreas" : null,
  "creationDate" : "2026-03-30T09:40:37.288261",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.28827",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:123456:1",
  "etagVersion" : 0,
  "id" : null,
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "referencePointElementType" : null,
  "referencePointSloid" : "ch:1:sloid:7000:1",
  "status" : null,
  "stepFreeAccess" : null,
  "tactileVisualMarks" : null,
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31"
}'

Example response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 1587

{
  "status" : 400,
  "message" : "Following constraints were violated: [Property 'contrastingAreas' has invalid value: 'null', Property 'tactileVisualMarks' has invalid value: 'null', Property 'stepFreeAccess' has invalid value: 'null']",
  "error" : "Constraint violation",
  "details" : [ {
    "displayInfo" : {
      "code" : "ERROR.CONSTRAINT_VIOLATION.NOT_NULL",
      "parameters" : [ {
        "key" : "propertyPath",
        "value" : "contrastingAreas"
      }, {
        "key" : "value",
        "value" : "null"
      }, {
        "key" : "message",
        "value" : "{jakarta.validation.constraints.NotNull.message}"
      } ]
    },
    "field" : "contrastingAreas",
    "message" : "must not be null"
  }, {
    "displayInfo" : {
      "code" : "ERROR.CONSTRAINT_VIOLATION.NOT_NULL",
      "parameters" : [ {
        "key" : "propertyPath",
        "value" : "tactileVisualMarks"
      }, {
        "key" : "value",
        "value" : "null"
      }, {
        "key" : "message",
        "value" : "{jakarta.validation.constraints.NotNull.message}"
      } ]
    },
    "field" : "tactileVisualMarks",
    "message" : "must not be null"
  }, {
    "displayInfo" : {
      "code" : "ERROR.CONSTRAINT_VIOLATION.NOT_NULL",
      "parameters" : [ {
        "key" : "propertyPath",
        "value" : "stepFreeAccess"
      }, {
        "key" : "value",
        "value" : "null"
      }, {
        "key" : "message",
        "value" : "{jakarta.validation.constraints.NotNull.message}"
      } ]
    },
    "field" : "stepFreeAccess",
    "message" : "must not be null"
  } ]
}

Update Relation when id not exists- Unsuccessfully

PUT /v1/relations/12345678

Path Variables

Path Variable Type Optional Description

id

Integer

false

Request Body Fields

Path Type Optional Description

parentServicePointSloid

String

true

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

referencePointSloid

String

true

Reference 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

elementSloid

String

true

Element 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

tactileVisualMarks

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY","WITH_REMOTE_CONTROL"]

contrastingAreas

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","PARTIALLY"]

stepFreeAccess

String

false

Must be one of ["TO_BE_COMPLETED","YES","NO","NOT_APPLICABLE","YES_WITH_LIFT","YES_WITH_RAMP"]

referencePointElementType

String

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

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

status

String

true

Status

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

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

Example request

$ curl 'http://localhost:8080/v1/relations/12345678' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "contrastingAreas" : "NO",
  "creationDate" : "2026-03-30T09:40:37.605332",
  "creator" : "e123456",
  "editionDate" : "2026-03-30T09:40:37.605341",
  "editor" : "e123456",
  "elementSloid" : "ch:1:sloid:123456:1",
  "etagVersion" : 0,
  "id" : null,
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "referencePointElementType" : null,
  "referencePointSloid" : "ch:1:sloid:7000:1",
  "status" : null,
  "stepFreeAccess" : "NO",
  "tactileVisualMarks" : "YES",
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31"
}'

Example response

HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 394

{
  "status" : 404,
  "message" : "Entity not found",
  "error" : "Not found",
  "details" : [ {
    "displayInfo" : {
      "code" : "ERROR.ENTITY_NOT_FOUND",
      "parameters" : [ {
        "key" : "field",
        "value" : "id"
      }, {
        "key" : "value",
        "value" : "12345678"
      } ]
    },
    "field" : "id",
    "message" : "Object with id 12345678 not found"
  } ]
}

Get Relations with filter - Successfully

GET /v1/relations

Query Parameters

Parameter Type Optional Description

referencePointElementTypes

Array[String]

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

referencePointSloids

Array[String]

true

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"]

createdAfter

String

true

modifiedAfter

String

true

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/relations?servicePointNumbers=1234567&referencePointsloids=ch:1:sloid:7000:1&statusRestrictions=VALIDATED&sloids=ch:1:sloid:7000:11&fromDate=2000-01-01&toDate=2000-12-31&validOn=2000-06-28&createdAfter=2026-03-30%2009:40:36&modifiedAfter=2026-03-30%2009:40:37' -i -X GET

Example response

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

{
  "objects" : [ {
    "contrastingAreas" : "YES",
    "creationDate" : "2026-03-30T09:40:37.501524",
    "creator" : "e123456",
    "editionDate" : "2026-03-30T09:40:37.501536",
    "editor" : "e123456",
    "elementSloid" : "ch:1:sloid:7000:11",
    "etagVersion" : 0,
    "id" : 1038,
    "number" : {
      "checkDigit" : 8,
      "number" : 1234567,
      "numberShort" : 34567,
      "uicCountryCode" : 12
    },
    "parentServicePointSloid" : "ch:1:sloid:7000",
    "referencePointElementType" : "PLATFORM",
    "referencePointSloid" : "ch:1:sloid:7000:1",
    "status" : "VALIDATED",
    "stepFreeAccess" : "NO",
    "tactileVisualMarks" : "YES",
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31"
  } ],
  "totalCount" : 1
}

Get Relations with filter without match - Successfully

GET /v1/relations

Query Parameters

Parameter Type Optional Description

referencePointElementTypes

Array[String]

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

referencePointSloids

Array[String]

true

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"]

createdAfter

String

true

modifiedAfter

String

true

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/relations?servicePointNumbers=1000000' -i -X GET

Example response

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

{
  "objects" : [ ],
  "totalCount" : 0
}

Get Relations with filter array filter - Successfully

GET /v1/relations

Query Parameters

Parameter Type Optional Description

referencePointElementTypes

Array[String]

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

referencePointSloids

Array[String]

true

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"]

createdAfter

String

true

modifiedAfter

String

true

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/relations?servicePointNumbers=1234567&servicePointNumbers=1000000&referencePointSloid=ch:1:sloid:7000:1&sloids=ch:1:sloid:54321&sloids=ch:1:sloid:7000:11&ch:1:sloid:7000:111&fromDate=2000-01-01&toDate=2000-12-31&validOn=2000-06-28&createdAfter=2026-03-30%2009:40:36&modifiedAfter=2026-03-30%2009:40:37' -i -X GET

Example response

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

{
  "objects" : [ {
    "contrastingAreas" : "YES",
    "creationDate" : "2026-03-30T09:40:37.535638",
    "creator" : "e123456",
    "editionDate" : "2026-03-30T09:40:37.535649",
    "editor" : "e123456",
    "elementSloid" : "ch:1:sloid:7000:11",
    "etagVersion" : 0,
    "id" : 1039,
    "number" : {
      "checkDigit" : 8,
      "number" : 1234567,
      "numberShort" : 34567,
      "uicCountryCode" : 12
    },
    "parentServicePointSloid" : "ch:1:sloid:7000",
    "referencePointElementType" : "PLATFORM",
    "referencePointSloid" : "ch:1:sloid:7000:1",
    "status" : "VALIDATED",
    "stepFreeAccess" : "NO",
    "tactileVisualMarks" : "YES",
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31"
  } ],
  "totalCount" : 1
}

Get Relations with ReferenceElementType filter - Successfully

GET /v1/relations

Query Parameters

Parameter Type Optional Description

referencePointElementTypes

Array[String]

true

Must be one of ["PLATFORM","CONTACT_POINT","TOILET","PARKING_LOT"]

referencePointSloids

Array[String]

true

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"]

createdAfter

String

true

modifiedAfter

String

true

validOn

String

true

fromDate

String

true

toDate

String

true

validToFromDate

String

true

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/relations?referencePointElementTypes=TOILET' -i -X GET

Example response

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

{
  "objects" : [ {
    "contrastingAreas" : "YES",
    "creationDate" : "2026-03-30T09:40:37.467002",
    "creator" : "e123456",
    "editionDate" : "2026-03-30T09:40:37.467009",
    "editor" : "e123456",
    "elementSloid" : "ch:1:sloid:7000:11",
    "etagVersion" : 0,
    "id" : 1036,
    "number" : {
      "checkDigit" : 8,
      "number" : 1234567,
      "numberShort" : 34567,
      "uicCountryCode" : 12
    },
    "parentServicePointSloid" : "ch:1:sloid:7000",
    "referencePointElementType" : "TOILET",
    "referencePointSloid" : "ch:1:sloid:7000:1",
    "status" : "VALIDATED",
    "stepFreeAccess" : "NO",
    "tactileVisualMarks" : "YES",
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31"
  } ],
  "totalCount" : 1
}