50

Parking Lot API Guide

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots' -i -X GET

Example response

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

{
  "objects" : [ {
    "creationDate" : "2025-06-06T09:33:27.489609",
    "creator" : "e123456",
    "editionDate" : "2025-06-06T09:33:27.489687",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1013,
    "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 information",
    "placesAvailable" : "YES",
    "prmPlacesAvailable" : "TO_BE_COMPLETED",
    "number" : {
      "number" : 1234567,
      "uicCountryCode" : 12,
      "numberShort" : 34567,
      "checkDigit" : 8
    }
  } ],
  "totalCount" : 1
}

Get Parking Lot Versions - Successfully

GET /v1/parking-lots/ch:1:sloid:12345:1

Path Variables

Path Variable Type Optional Description

sloid

String

false

Example request

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

Example response

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

[ {
  "creationDate" : "2025-06-06T09:33:26.483926",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:26.48396",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1007,
  "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 information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED",
  "number" : {
    "number" : 1234567,
    "uicCountryCode" : 12,
    "numberShort" : 34567,
    "checkDigit" : 8
  }
} ]

Get Parking Lot Versions with filter - Successfully

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots?numbers=12345&sloids=ch:1:sloid:12345:1&statusRestrictions=VALIDATED&fromDate=2000-01-01&toDate=2000-12-31&validOn=2000-06-28&createdAfter=2025-06-06%2009:33:26&modifiedAfter=2025-06-06%2009:33:27' -i -X GET

Example response

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

{
  "objects" : [ {
    "creationDate" : "2025-06-06T09:33:27.174882",
    "creator" : "e123456",
    "editionDate" : "2025-06-06T09:33:27.174939",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1012,
    "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 information",
    "placesAvailable" : "YES",
    "prmPlacesAvailable" : "TO_BE_COMPLETED",
    "number" : {
      "number" : 1234567,
      "uicCountryCode" : 12,
      "numberShort" : 34567,
      "checkDigit" : 8
    }
  } ],
  "totalCount" : 1
}

Get Parking Lot Versions with sloid array filter - Successfully

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots?numbers=12345&sloids=ch:1:sloid:12345:1&sloids=ch:1:sloid:54321&fromDate=2000-01-01&toDate=2000-12-31&validOn=2000-06-28&createdAfter=2025-06-06%2009:33:25&modifiedAfter=2025-06-06%2009:33:26' -i -X GET

Example response

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

{
  "objects" : [ {
    "creationDate" : "2025-06-06T09:33:26.263528",
    "creator" : "e123456",
    "editionDate" : "2025-06-06T09:33:26.263567",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1006,
    "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 information",
    "placesAvailable" : "YES",
    "prmPlacesAvailable" : "TO_BE_COMPLETED",
    "number" : {
      "number" : 1234567,
      "uicCountryCode" : 12,
      "numberShort" : 34567,
      "checkDigit" : 8
    }
  } ],
  "totalCount" : 1
}

Get Parking Lot Versions with sloid filter - Successfully

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots?sloids=ch:1:sloid:12345:3' -i -X GET

Example response

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

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

Get Parking Lot Versions with number filter - Successfully

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots?servicePointNumbers=1334567' -i -X GET

Example response

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

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

Get Parking Lot Versions with parentSloid filter - Successfully

GET /v1/parking-lots

Query Parameters

Parameter Type Optional Description

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/parking-lots?parentServicePointSloids=ch:1:sloid:1234' -i -X GET

Example response

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

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

Get Parking Lot Overview - Successfully

GET /v1/parking-lots/overview/ch:1:sloid:12345

Path Variables

Path Variable Type Optional Description

parentServicePointSloid

String

false

Example request

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

Example response

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

[ {
  "creationDate" : "2025-06-06T09:33:24.295921",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:24.295977",
  "editor" : "e123456",
  "status" : null,
  "id" : 1000,
  "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 information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED",
  "recordingStatus" : "INCOMPLETE"
} ]

Create Parking Lots - Successfully

POST /v1/parking-lots

Request Body Fields

Path Type Optional Description

placesAvailable

String

false

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

prmPlacesAvailable

String

false

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

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/parking-lots' -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 information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED"
}'

Example response

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

{
  "creationDate" : "2025-06-06T09:33:25.870416",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:25.870447",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1005,
  "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 information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED",
  "number" : {
    "number" : 8507000,
    "uicCountryCode" : 85,
    "numberShort" : 7000,
    "checkDigit" : 3
  }
}

Create Parking Lots - Successfully

POST /v1/parking-lots

Request Body Fields

Path Type Optional Description

placesAvailable

String

false

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

prmPlacesAvailable

String

false

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

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/parking-lots' -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 information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED"
}'

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
}

Update Parking Lots - Successfully

PUT /v1/parking-lots/1009

Path Variables

Path Variable Type Optional Description

id

Integer

false

Request Body Fields

Path Type Optional Description

placesAvailable

String

false

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

prmPlacesAvailable

String

false

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

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/parking-lots/1009' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : "2025-06-06T09:33:26.697906",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:26.697938",
  "editor" : "e123456",
  "status" : null,
  "id" : null,
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31",
  "etagVersion" : 0,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "Designation wrong",
  "additionalInformation" : "Additional information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED"
}'

Example response

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

[ {
  "creationDate" : "2025-06-06T09:33:26.690253",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:26.690283",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1008,
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 1,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "Designation",
  "additionalInformation" : "Additional information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED",
  "number" : {
    "number" : 1234567,
    "uicCountryCode" : 12,
    "numberShort" : 34567,
    "checkDigit" : 8
  }
}, {
  "creationDate" : "2025-06-06T09:33:26.697906",
  "creator" : "e123456",
  "editionDate" : "2025-06-06T09:33:26.787911",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1009,
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31",
  "etagVersion" : 2,
  "sloid" : "ch:1:sloid:12345:1",
  "parentServicePointSloid" : "ch:1:sloid:7000",
  "designation" : "Designation wrong",
  "additionalInformation" : "Additional information",
  "placesAvailable" : "YES",
  "prmPlacesAvailable" : "TO_BE_COMPLETED",
  "number" : {
    "number" : 1234567,
    "uicCountryCode" : 12,
    "numberShort" : 34567,
    "checkDigit" : 8
  }
} ]