Skip to content

How to work with the profile service

Concepts

  • All data in the profile service is personal data which is protected and only accessible in the name of a user. Or in other words: with an identification-level of the session or device.
  • Data of registered users is only accessible with a valid authorization token of the user.

See (How-to get access to the API).

Some user data is shared between all partners:

  • person
  • party

Other is automatically connected and restricted to the partner (solution provider's subscription) itself:

  • partner data
  • orders
  • tickets

The user can see all his/her data in the my.discover.swiss portal.

The subscription key (API management) is related to a user in Api Management and this User is related to the partner. Therefore you do not necessarily get the same results with different subscription keys. But we can configure several users and subscriptions for the same partner.

API

Data Models

The profile service is storing all data related to a user (profile/device/session).

  • Person
    General information to the person. This is used as the "customer" in an order.
  • Party
    Groups of travelers
  • PartnerData Generic data store to save any data you need in the user's profile. There can be several of them per profile. The idea is that you give them the same name for each user. for example "favorites", "xmas-quiz-2020", ...
  • Orders
    All orders booked with this profile (only get).
  • Tickets All tickets bought with this profile (only get).
  • ProfileMedia All images related to this profile.

Endpoints

There is not much special on the endpoints. Check out the profile service reference.

Info

For B2C orders first you need to get Token and create a profile. For more details see profile service reference.

Tip

For creating orders and tickets see How to work with the marketplace

Localization

default: de-CH

Language: Profile data is not available in all languages, it is stored in the current language of the request. So for example product names in old orders won't change if you change the language of the request to get them.

DateTime formatting: "2019-08-09T13:59:57.097+02:00"

Use Accept-Timezone header to specify request timezone. Supply a TimeZone id property acquired from Infocenter /timezones route or IANA code in order to get data with desired time offset

The default timezone is UTC

Number formatting: CH -> 250.00

Business Trail

All relevant events related to the user we write in a log. We call it "Business Trail" to not be confused with "audit trail" which is usually used to track all data-changes on a technical data level.

The business trail is meant for the support and maybe we can work with the data in the future as well. It is personal data and we do not write any data in the regular server logs which could be personally relevant.

Tip

Because many of such events will happen on client side, you are invited to add your own events there.

The data you write and all entries which are written based on a request coming from you, will be related to the partner like other partner data (see above).

Next steps


Last update: February 1, 2024 17:37:15