Transport Company API Guide
Get Transport Companies - Successfully
GET /v1/transport-companies
Query Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
searchCriteria |
Array[String] |
true |
|
statusChoices |
Array[String] |
true |
Must be one of ["OPERATOR","CURRENT","SUPERVISION","OPERATING_PART","LIQUIDATED","INACTIVE","FORMER_OPERATING_PART"] |
page |
Integer |
true |
|
size |
Integer |
true |
|
sort |
Array[String] |
true |
Example request
$ curl 'http://localhost:8080/v1/transport-companies' -i -X GET
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 384
{
"objects" : [ {
"id" : 5,
"number" : "#0001",
"abbreviation" : null,
"description" : "Beste Company",
"businessRegisterName" : null,
"transportCompanyStatus" : null,
"businessRegisterNumber" : null,
"enterpriseId" : "enterprisige ID",
"ricsCode" : null,
"businessOrganisationNumbers" : null,
"comment" : null
} ],
"totalCount" : 1
}
Get Transport Company - Successfully
GET /v1/transport-companies/5
Path Variables
Path Variable | Type | Optional | Description |
---|---|---|---|
id |
Integer |
false |
Example request
$ curl 'http://localhost:8080/v1/transport-companies/5' -i -X GET
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 318
{
"id" : 5,
"number" : "#0001",
"abbreviation" : null,
"description" : "Beste Company",
"businessRegisterName" : null,
"transportCompanyStatus" : null,
"businessRegisterNumber" : null,
"enterpriseId" : "enterprisige ID",
"ricsCode" : null,
"businessOrganisationNumbers" : null,
"comment" : null
}
Create Transport Company Relation - Successfully
POST /v1/transport-company-relations
Request Body Fields
Path | Type | Optional | Description |
---|---|---|---|
transportCompanyId |
Integer |
false |
Transport Company Id Example value: 5 |
sboid |
String |
false |
Swiss Business Organisation ID (SBOID) Example value: ch:1:sboid:100052 Length must be between 1 and 32 |
validFrom |
String |
false |
Valid From Example value: 2022-01-01 |
validTo |
String |
false |
Valid To Example value: 2022-01-01 |
Example request
$ curl 'http://localhost:8080/v1/transport-company-relations' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"transportCompanyId" : 5,
"sboid" : "ch:1:sboid:1000000",
"validFrom" : "2020-05-05",
"validTo" : "2021-05-05"
}'
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 638
{
"id" : 1007,
"businessOrganisation" : {
"sboid" : "ch:1:sboid:1000000",
"said" : "1000000",
"descriptionDe" : "desc-de",
"descriptionFr" : "desc-fr",
"descriptionIt" : "desc-it",
"descriptionEn" : "desc-en",
"abbreviationDe" : "de",
"abbreviationFr" : "fr",
"abbreviationIt" : "it",
"abbreviationEn" : "en",
"organisationNumber" : 123,
"contactEnterpriseEmail" : "mail@mail.ch",
"status" : "VALIDATED",
"businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
"validFrom" : "2000-01-01",
"validTo" : "2000-12-31"
},
"validFrom" : "2020-05-05",
"validTo" : "2021-05-05"
}