50

Business Organisation API Guide

Create Business Organisation Directory - Successfully

POST /v1/business-organisations/versions

Request Body Fields

Path Type Optional Description

id

Integer

true

This ID helps identify versions of a business organisation 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 business organisation. To do this, use the sboid or number in combination with the data range (valid from/valid until).

Example value: 1

sboid

String

true

Swiss Business Organisation ID (SBOID)

Example value: ch:1:sboid:100052

said

String

true

Swiss Administration ID (SAID)

Example value: 100052

descriptionDe

String

false

Description German

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionFr

String

false

Description French

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionIt

String

false

Description Italian

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionEn

String

false

Description English

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

abbreviationDe

String

false

Abbreviation German

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationFr

String

false

Abbreviation French

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationIt

String

false

Abbreviation Italian

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationEn

String

false

Abbreviation English

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

organisationNumber

Integer

false

Organisation Number

Example value: 146

contactEnterpriseEmail

String

true

Enterprise E-Mail address

Example value: hans.muster@enterprise.ch

Must conform to regex $|)@(?:[a-zA-Z0-9-]\.)+[a-zA-Z]{2,6}$

Length must be between 0 and 255

status

String

true

Status

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

businessTypes

Array[String]

true

Business Types

Must be one of ["STREET","STREET_WITHOUT_TRAFFIC","RAILROAD","RAILROAD_UIC","TRAIN_WITHOUT_TRAFFIC","SHIP","SHIP_WITHOUT_TRAFFIC","AIR","LEISURE_ACTIVITIES","TARIFF_ASSOCIATION","FAIR","TRAVEL_AGENCY_ORGANISATION","CUSTOMER_INFORMATION","REPLACEMENT_SERVICE","SUBSIDIARY","INTERNAL_BILLING_PURPOSES","UNKNOWN"]

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/business-organisations/versions' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "sboid" : "ch:1:sboid:100000",
  "said" : null,
  "descriptionDe" : "desc-de",
  "descriptionFr" : "desc-fr",
  "descriptionIt" : "desc-it",
  "descriptionEn" : "desc-en",
  "abbreviationDe" : "abkde",
  "abbreviationFr" : "abkfr",
  "abbreviationIt" : "abkit",
  "abbreviationEn" : "abken",
  "organisationNumber" : 1234,
  "contactEnterpriseEmail" : "mail@mail.ch",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null
}'

Example response

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

{
  "creationDate" : "2025-04-15T14:07:57.712108",
  "creator" : "e123456",
  "editionDate" : "2025-04-15T14:07:57.712142",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1012,
  "sboid" : "ch:1:sboid:100000",
  "said" : "100000",
  "descriptionDe" : "desc-de",
  "descriptionFr" : "desc-fr",
  "descriptionIt" : "desc-it",
  "descriptionEn" : "desc-en",
  "abbreviationDe" : "abkde",
  "abbreviationFr" : "abkfr",
  "abbreviationIt" : "abkit",
  "abbreviationEn" : "abken",
  "organisationNumber" : 1234,
  "contactEnterpriseEmail" : "mail@mail.ch",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : 0
}

Get All Business Organisation Directories - Successfully

GET /v1/business-organisations

Query Parameters

Parameter Type Optional Description

searchCriteria

Array[String]

true

inSboids

Array[String]

true

validOn

String

true

statusChoices

Array[String]

true

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

page

Integer

true

size

Integer

true

sort

Array[String]

true

Example request

$ curl 'http://localhost:8080/v1/business-organisations' -i -X GET

Example response

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

{
  "objects" : [ {
    "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"
  }, {
    "sboid" : "ch:1:sboid:1000001",
    "said" : "1000001",
    "descriptionDe" : "desc-de1",
    "descriptionFr" : "desc-fr1",
    "descriptionIt" : "desc-it1",
    "descriptionEn" : "desc-en1",
    "abbreviationDe" : "de1",
    "abbreviationFr" : "fr1",
    "abbreviationIt" : "it1",
    "abbreviationEn" : "en1",
    "organisationNumber" : 1234,
    "contactEnterpriseEmail" : "mail1@mail.ch",
    "status" : "VALIDATED",
    "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
    "validFrom" : "2001-01-01",
    "validTo" : "2001-12-31"
  } ],
  "totalCount" : 2
}

Get Business Organisation Directories Versions - Successfully

GET /v1/business-organisations/versions

Query Parameters

Parameter Type Optional Description

searchCriteria

Array[String]

true

inSboids

Array[String]

true

statusChoices

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/business-organisations/versions' -i -X GET

Example response

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

{
  "objects" : [ {
    "creationDate" : "2025-04-15T14:07:55.201284",
    "creator" : "e123456",
    "editionDate" : "2025-04-15T14:07:55.20132",
    "editor" : "e123456",
    "status" : "VALIDATED",
    "id" : 1005,
    "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",
    "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
    "validFrom" : "2000-01-01",
    "validTo" : "2000-12-31",
    "etagVersion" : 0
  } ],
  "totalCount" : 1
}

Get Business Organisation Directories Versions By SBOID - Successfully

GET /v1/business-organisations/versions/ch:1:sboid:1000001

Path Variables

Path Variable Type Optional Description

sboid

String

false

Example request

$ curl 'http://localhost:8080/v1/business-organisations/versions/ch:1:sboid:1000001' -i -X GET

Example response

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

[ {
  "creationDate" : "2025-04-15T14:07:56.706982",
  "creator" : "e123456",
  "editionDate" : "2025-04-15T14:07:56.707017",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1009,
  "sboid" : "ch:1:sboid:1000001",
  "said" : "1000001",
  "descriptionDe" : "desc-de1",
  "descriptionFr" : "desc-fr1",
  "descriptionIt" : "desc-it1",
  "descriptionEn" : "desc-en1",
  "abbreviationDe" : "de1",
  "abbreviationFr" : "fr1",
  "abbreviationIt" : "it1",
  "abbreviationEn" : "en1",
  "organisationNumber" : 1234,
  "contactEnterpriseEmail" : "mail1@mail.ch",
  "businessTypes" : [ ],
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31",
  "etagVersion" : 1
}, {
  "creationDate" : "2025-04-15T14:07:57.2086",
  "creator" : "e123456",
  "editionDate" : "2025-04-15T14:07:57.208671",
  "editor" : "e123456",
  "status" : "VALIDATED",
  "id" : 1010,
  "sboid" : "ch:1:sboid:1000001",
  "said" : "1000001",
  "descriptionDe" : "desc-de1-changed",
  "descriptionFr" : "desc-fr1",
  "descriptionIt" : "desc-it1",
  "descriptionEn" : "desc-en1",
  "abbreviationDe" : "de1",
  "abbreviationFr" : "fr1",
  "abbreviationIt" : "it1",
  "abbreviationEn" : "en1",
  "organisationNumber" : 1234,
  "contactEnterpriseEmail" : "mail1@mail.ch",
  "businessTypes" : [ ],
  "validFrom" : "2002-01-01",
  "validTo" : "2002-12-31",
  "etagVersion" : 1
} ]

Get Business Organisation Directories Versions- Unsuccessfully

GET /v1/business-organisations/versions/ch:1:sboid:110000112

Path Variables

Path Variable Type Optional Description

sboid

String

false

Example request

$ curl 'http://localhost:8080/v1/business-organisations/versions/ch:1:sboid:110000112' -i -X GET

Example response

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

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

Create Business Organisation Directory when provided field is too long - Unsuccessfully

POST /v1/business-organisations/versions

Request Body Fields

Path Type Optional Description

id

Integer

true

This ID helps identify versions of a business organisation 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 business organisation. To do this, use the sboid or number in combination with the data range (valid from/valid until).

Example value: 1

sboid

String

true

Swiss Business Organisation ID (SBOID)

Example value: ch:1:sboid:100052

said

String

true

Swiss Administration ID (SAID)

Example value: 100052

descriptionDe

String

false

Description German

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionFr

String

false

Description French

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionIt

String

false

Description Italian

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionEn

String

false

Description English

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

abbreviationDe

String

false

Abbreviation German

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationFr

String

false

Abbreviation French

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationIt

String

false

Abbreviation Italian

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationEn

String

false

Abbreviation English

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

organisationNumber

Integer

false

Organisation Number

Example value: 146

contactEnterpriseEmail

String

true

Enterprise E-Mail address

Example value: hans.muster@enterprise.ch

Must conform to regex $|)@(?:[a-zA-Z0-9-]\.)+[a-zA-Z]{2,6}$

Length must be between 0 and 255

status

String

true

Status

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

businessTypes

Array[String]

true

Business Types

Must be one of ["STREET","STREET_WITHOUT_TRAFFIC","RAILROAD","RAILROAD_UIC","TRAIN_WITHOUT_TRAFFIC","SHIP","SHIP_WITHOUT_TRAFFIC","AIR","LEISURE_ACTIVITIES","TARIFF_ASSOCIATION","FAIR","TRAVEL_AGENCY_ORGANISATION","CUSTOMER_INFORMATION","REPLACEMENT_SERVICE","SUBSIDIARY","INTERNAL_BILLING_PURPOSES","UNKNOWN"]

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/business-organisations/versions' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "sboid" : "ch:1:sboid:100000",
  "said" : null,
  "descriptionDe" : "desc-de",
  "descriptionFr" : "desc-fr",
  "descriptionIt" : "desc-it",
  "descriptionEn" : "desc-en",
  "abbreviationDe" : "de",
  "abbreviationFr" : "frufrufrufrufrufrufr",
  "abbreviationIt" : "it",
  "abbreviationEn" : "en",
  "organisationNumber" : 123,
  "contactEnterpriseEmail" : "mail@mail.ch",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null
}'

Example response

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

{
  "status" : 400,
  "message" : "Constraint for requestbody was violated",
  "error" : "Method argument not valid error",
  "details" : [ {
    "message" : "Value frufrufrufrufrufrufr rejected due to size must be between 1 and 10",
    "field" : "abbreviationFr",
    "displayInfo" : {
      "code" : "ERROR.CONSTRAINT",
      "parameters" : [ {
        "key" : "rejectedValue",
        "value" : "frufrufrufrufrufrufr"
      }, {
        "key" : "cause",
        "value" : "size must be between 1 and 10"
      } ]
    }
  } ]
}

Update Business Organisation Directory when required field is not provided - Unsuccessfully

POST /v1/business-organisations/versions

Request Body Fields

Path Type Optional Description

id

Integer

true

This ID helps identify versions of a business organisation 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 business organisation. To do this, use the sboid or number in combination with the data range (valid from/valid until).

Example value: 1

sboid

String

true

Swiss Business Organisation ID (SBOID)

Example value: ch:1:sboid:100052

said

String

true

Swiss Administration ID (SAID)

Example value: 100052

descriptionDe

String

false

Description German

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionFr

String

false

Description French

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionIt

String

false

Description Italian

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionEn

String

false

Description English

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

abbreviationDe

String

false

Abbreviation German

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationFr

String

false

Abbreviation French

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationIt

String

false

Abbreviation Italian

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationEn

String

false

Abbreviation English

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

organisationNumber

Integer

false

Organisation Number

Example value: 146

contactEnterpriseEmail

String

true

Enterprise E-Mail address

Example value: hans.muster@enterprise.ch

Must conform to regex $|)@(?:[a-zA-Z0-9-]\.)+[a-zA-Z]{2,6}$

Length must be between 0 and 255

status

String

true

Status

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

businessTypes

Array[String]

true

Business Types

Must be one of ["STREET","STREET_WITHOUT_TRAFFIC","RAILROAD","RAILROAD_UIC","TRAIN_WITHOUT_TRAFFIC","SHIP","SHIP_WITHOUT_TRAFFIC","AIR","LEISURE_ACTIVITIES","TARIFF_ASSOCIATION","FAIR","TRAVEL_AGENCY_ORGANISATION","CUSTOMER_INFORMATION","REPLACEMENT_SERVICE","SUBSIDIARY","INTERNAL_BILLING_PURPOSES","UNKNOWN"]

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/business-organisations/versions' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "sboid" : "ch:1:sboid:100000",
  "said" : null,
  "descriptionDe" : "desc-de",
  "descriptionFr" : "desc-fr",
  "descriptionIt" : "desc-it",
  "descriptionEn" : "desc-en",
  "abbreviationDe" : null,
  "abbreviationFr" : "fr",
  "abbreviationIt" : "it",
  "abbreviationEn" : "en",
  "organisationNumber" : 123,
  "contactEnterpriseEmail" : "mail@mail.ch",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null
}'

Example response

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

{
  "status" : 400,
  "message" : "Constraint for requestbody was violated",
  "error" : "Method argument not valid error",
  "details" : [ {
    "message" : "Value null rejected due to must not be null",
    "field" : "abbreviationDe",
    "displayInfo" : {
      "code" : "ERROR.CONSTRAINT",
      "parameters" : [ {
        "key" : "rejectedValue",
        "value" : "null"
      }, {
        "key" : "cause",
        "value" : "must not be null"
      } ]
    }
  } ]
}

Update Business Organisation Directory when id provided does not exist - Unsuccessfully

POST /v1/business-organisations/versions/123456789

Path Variables

Path Variable Type Optional Description

id

Integer

false

Request Body Fields

Path Type Optional Description

id

Integer

true

This ID helps identify versions of a business organisation 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 business organisation. To do this, use the sboid or number in combination with the data range (valid from/valid until).

Example value: 1

sboid

String

true

Swiss Business Organisation ID (SBOID)

Example value: ch:1:sboid:100052

said

String

true

Swiss Administration ID (SAID)

Example value: 100052

descriptionDe

String

false

Description German

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionFr

String

false

Description French

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionIt

String

false

Description Italian

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionEn

String

false

Description English

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

abbreviationDe

String

false

Abbreviation German

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationFr

String

false

Abbreviation French

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationIt

String

false

Abbreviation Italian

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationEn

String

false

Abbreviation English

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

organisationNumber

Integer

false

Organisation Number

Example value: 146

contactEnterpriseEmail

String

true

Enterprise E-Mail address

Example value: hans.muster@enterprise.ch

Must conform to regex $|)@(?:[a-zA-Z0-9-]\.)+[a-zA-Z]{2,6}$

Length must be between 0 and 255

status

String

true

Status

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

businessTypes

Array[String]

true

Business Types

Must be one of ["STREET","STREET_WITHOUT_TRAFFIC","RAILROAD","RAILROAD_UIC","TRAIN_WITHOUT_TRAFFIC","SHIP","SHIP_WITHOUT_TRAFFIC","AIR","LEISURE_ACTIVITIES","TARIFF_ASSOCIATION","FAIR","TRAVEL_AGENCY_ORGANISATION","CUSTOMER_INFORMATION","REPLACEMENT_SERVICE","SUBSIDIARY","INTERNAL_BILLING_PURPOSES","UNKNOWN"]

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/business-organisations/versions/123456789' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : "VALIDATED",
  "id" : null,
  "sboid" : "ch:1:sboid:100000",
  "said" : null,
  "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",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2000-01-01",
  "validTo" : "2000-12-31",
  "etagVersion" : null
}'

Example response

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

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

Delete Business Organisation when id provided does exist - Successful

DELETE /v1/business-organisations/ch:1:sboid:1000000

Path Variables

Path Variable Type Optional Description

sboid

String

false

Example request

$ curl 'http://localhost:8080/v1/business-organisations/ch:1:sboid:1000000' -i -X DELETE

Example response

HTTP/1.1 200 OK

Create Business Organisation when Abbreviation conflict occurs

POST /v1/business-organisations/versions

Request Body Fields

Path Type Optional Description

id

Integer

true

This ID helps identify versions of a business organisation 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 business organisation. To do this, use the sboid or number in combination with the data range (valid from/valid until).

Example value: 1

sboid

String

true

Swiss Business Organisation ID (SBOID)

Example value: ch:1:sboid:100052

said

String

true

Swiss Administration ID (SAID)

Example value: 100052

descriptionDe

String

false

Description German

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionFr

String

false

Description French

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionIt

String

false

Description Italian

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

descriptionEn

String

false

Description English

Example value: Verkehrsbetriebe STI AG

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 60

abbreviationDe

String

false

Abbreviation German

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationFr

String

false

Abbreviation French

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationIt

String

false

Abbreviation Italian

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

abbreviationEn

String

false

Abbreviation English

Example value: STI

Must conform to regex [\u0000-\u00ff]*

Length must be between 1 and 10

organisationNumber

Integer

false

Organisation Number

Example value: 146

contactEnterpriseEmail

String

true

Enterprise E-Mail address

Example value: hans.muster@enterprise.ch

Must conform to regex $|)@(?:[a-zA-Z0-9-]\.)+[a-zA-Z]{2,6}$

Length must be between 0 and 255

status

String

true

Status

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

businessTypes

Array[String]

true

Business Types

Must be one of ["STREET","STREET_WITHOUT_TRAFFIC","RAILROAD","RAILROAD_UIC","TRAIN_WITHOUT_TRAFFIC","SHIP","SHIP_WITHOUT_TRAFFIC","AIR","LEISURE_ACTIVITIES","TARIFF_ASSOCIATION","FAIR","TRAVEL_AGENCY_ORGANISATION","CUSTOMER_INFORMATION","REPLACEMENT_SERVICE","SUBSIDIARY","INTERNAL_BILLING_PURPOSES","UNKNOWN"]

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/business-organisations/versions' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "creationDate" : null,
  "creator" : null,
  "editionDate" : null,
  "editor" : null,
  "status" : null,
  "id" : null,
  "sboid" : null,
  "said" : null,
  "descriptionDe" : "desc-de1",
  "descriptionFr" : "desc-fr1",
  "descriptionIt" : "desc-it1",
  "descriptionEn" : "desc-en1",
  "abbreviationDe" : "de1",
  "abbreviationFr" : "fr1",
  "abbreviationIt" : "it1",
  "abbreviationEn" : "en1",
  "organisationNumber" : 1234,
  "contactEnterpriseEmail" : "mail1@mail.ch",
  "businessTypes" : [ "RAILROAD", "AIR", "SHIP" ],
  "validFrom" : "2001-01-01",
  "validTo" : "2001-12-31",
  "etagVersion" : null
}'

Example response

HTTP/1.1 409 Conflict
Content-Type: application/json
Content-Length: 3242

{
  "status" : 409,
  "message" : "A conflict occurred due to a business rule",
  "error" : "BO conflict",
  "details" : [ {
    "message" : "abbreviationDe de1 already taken from 01.01.2001 to 31.12.2001 by ch:1:sboid:1100000",
    "field" : "abbreviationDe",
    "displayInfo" : {
      "code" : "BODI.BUSINESS_ORGANISATION.CONFLICT.ABBREVIATIONDE",
      "parameters" : [ {
        "key" : "field",
        "value" : "abbreviationDe"
      }, {
        "key" : "abbreviationDe",
        "value" : "de1"
      }, {
        "key" : "validFrom",
        "value" : "01.01.2001"
      }, {
        "key" : "validTo",
        "value" : "31.12.2001"
      }, {
        "key" : "sboid",
        "value" : "ch:1:sboid:1100000"
      } ]
    }
  }, {
    "message" : "abbreviationEn en1 already taken from 01.01.2001 to 31.12.2001 by ch:1:sboid:1100000",
    "field" : "abbreviationEn",
    "displayInfo" : {
      "code" : "BODI.BUSINESS_ORGANISATION.CONFLICT.ABBREVIATIONEN",
      "parameters" : [ {
        "key" : "field",
        "value" : "abbreviationEn"
      }, {
        "key" : "abbreviationEn",
        "value" : "en1"
      }, {
        "key" : "validFrom",
        "value" : "01.01.2001"
      }, {
        "key" : "validTo",
        "value" : "31.12.2001"
      }, {
        "key" : "sboid",
        "value" : "ch:1:sboid:1100000"
      } ]
    }
  }, {
    "message" : "abbreviationFr fr1 already taken from 01.01.2001 to 31.12.2001 by ch:1:sboid:1100000",
    "field" : "abbreviationFr",
    "displayInfo" : {
      "code" : "BODI.BUSINESS_ORGANISATION.CONFLICT.ABBREVIATIONFR",
      "parameters" : [ {
        "key" : "field",
        "value" : "abbreviationFr"
      }, {
        "key" : "abbreviationFr",
        "value" : "fr1"
      }, {
        "key" : "validFrom",
        "value" : "01.01.2001"
      }, {
        "key" : "validTo",
        "value" : "31.12.2001"
      }, {
        "key" : "sboid",
        "value" : "ch:1:sboid:1100000"
      } ]
    }
  }, {
    "message" : "abbreviationIt it1 already taken from 01.01.2001 to 31.12.2001 by ch:1:sboid:1100000",
    "field" : "abbreviationIt",
    "displayInfo" : {
      "code" : "BODI.BUSINESS_ORGANISATION.CONFLICT.ABBREVIATIONIT",
      "parameters" : [ {
        "key" : "field",
        "value" : "abbreviationIt"
      }, {
        "key" : "abbreviationIt",
        "value" : "it1"
      }, {
        "key" : "validFrom",
        "value" : "01.01.2001"
      }, {
        "key" : "validTo",
        "value" : "31.12.2001"
      }, {
        "key" : "sboid",
        "value" : "ch:1:sboid:1100000"
      } ]
    }
  }, {
    "message" : "organisationNumber 1234 already taken from 01.01.2001 to 31.12.2001 by ch:1:sboid:1100000",
    "field" : "organisationNumber",
    "displayInfo" : {
      "code" : "BODI.BUSINESS_ORGANISATION.CONFLICT.ORGANISATIONNUMBER",
      "parameters" : [ {
        "key" : "field",
        "value" : "organisationNumber"
      }, {
        "key" : "organisationNumber",
        "value" : "1234"
      }, {
        "key" : "validFrom",
        "value" : "01.01.2001"
      }, {
        "key" : "validTo",
        "value" : "31.12.2001"
      }, {
        "key" : "sboid",
        "value" : "ch:1:sboid:1100000"
      } ]
    }
  } ]
}