Wohnbaugenossenschaften API documentation

Getting Started


Guide to use the API

The API synchronizes data from WBG CRManagers into one database. The API environment can be accessed via: https://api.wbgschweiz-web.ch further methods will be documented soon.


The WBG API uses the OAuth 2.0 protocol for simple, whereas a token must be requested via the authenticate method, and then embedded in the header or request header (Authorization: Bearer ) for each request. If a token has expired, a new token needs to be requested using credentials

Post authenticate

Description request a valid authentication token with credentials
Resource https://api.wbgschweiz-web.ch/api/oauth2-authenticate
Parameters username username of credentials example: sample@intes.com
password password of credentials example: *****
grant_type The grant type example: password
client_id The client id example: 3286HJdsSA6e723187HJGYWThhsytw
client_secret The client secret example: KJHdwjkhw&876321JKHdgs672

GET data methods

 Get data from API (returned in JSON).

Each request must have "Authorization = Bearer < token >" in its header.


Description returns all organizations and persons from all WBG CRMs listed by the sorting rule as follows:

Sort the list by Organization kurzname,
   after each organization there are persons of that organization sorted by last name.

You can use offset and limit to return only a specific number of data. OFFSET and LIMIT are not required, if not specified, method returns all records.
Parameters OFFSET [integer] Skip data on response. (Not required) example: 10
LIMIT [integer] Limit number of data on response. (Not required) example: 10
Resource https://api.wbgschweiz-web.ch/api/members-list/{OFFSET?}/{LIMIT?}
example of response
                        meta: {
                           success: true,
                           status_code: 200
                        data: [{
                            "type": "Organization",
                            "id": 391,
                            "accountname": "example",
                            "kurzname": "example",
                            "email1": "example@example.ch",
                            "haupt_strasse": "example",
                            "haupt_postfach": "example 430",
                            "haupt_plz": "example",
                            "haupt_ort": "example",
                            "kategorie": "example",
                            "subkategorie": "example",
                            "rv_name": "example",
                            "rv_color": "example"
                        pagination: {
                            offset: "0",
                            fetch: "1",
                            next_url: "api/member-list/1/1",
                            count_all: 5,
                            count_fetch: 1


Description get all organizations from all CRMs
Resource https://api.wbgschweiz-web.ch/api/organizations


Description get organizations from specific rv
Parameters rv id [integer] id of the RV (
1 = Nordwestschweiz;
2 = Winterthur;
3 = Aargau;
4 = Ostschweiz;
5 = Zentralschweiz;
6 = Bern-Solothurn;
7 = Z├╝rich
example: 1
Resource https://api.wbgschweiz-web.ch/api/organizations-by-rv/{rv_id}


Description get details of a specific organization grouped by blocks as in CRM
Parameters id [integer] id of the organization example: 10
Resource https://api.wbgschweiz-web.ch/api/organizations/{id}


Description get all persons from all CRMs
Resource https://api.wbgschweiz-web.ch/api/persons


Description get details of a specific person grouped by blocks as in CRM
Parameters id [integer] id of the person example: 10
Resource https://api.wbgschweiz-web.ch/api/persons/{id}

GET Activities

Description get activities
Parameters read [integer] choose to get read or unread activities example: 1 or 0
OFFSET [integer] Skip data on response. (Not required) example: 10
LIMIT [integer] Limit number of data on response. (Not required) example: 10
Resource https://api.wbgschweiz-web.ch/api/activities/{read}/{offset?}/{limit?}

Check read/unread Activities

Description Check read/unread activities. Turns 1 if 0, 0 if 1
Parameters id [integer] id of the activity example: 10
Resource https://api.wbgschweiz-web.ch/api/activity/check-read/{id}

Get user profile

Description Get user profile
Parameters - - -
Resource https://api.wbgschweiz-web.ch/api/user-profile