Friend API

The Minddistrict API to access and modify friend data is accessible under the sub-URL /c of the API.

This data is only accessible from the friend user itself and API Users, professionals and other users don’t have access to any information about friends.

Friend JSON object

Information about friends in the Minddistrict API is transferred as json objects containing the following information:

Name

Value

Explanation

Value type

Notes

active

Active

Uncheck to deactivate the user acount. The user can not log in to the platform as long as the account is inactive.

Boolean

Required
email

Email address

The email address is used as login name for the platform. It should be unique in the platform. It may not contain uppercase characters.

String

Required
picture

Profile picture

You can upload a profile picture.

File

Setting-dependent
name

Name

-

String

Required

The @type meta information for this object is: http://ns.minddistrict.com/friend.

View a friend

To view a friend send a GET request to the URL of the friend:

GET /api/2/c/169a5b27fb204d15bd9d3fa6387713d7 HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABfxfsnPben0WfdUb4hUG8g-JotLeltPejn7kNMKwRJhfu8IK9EGrOX9TaeqVvj8yXRr-ScW7vD5kwICC7Ivknriekbs-QdNtko3luoUgx0UQ7n9jMY0qIcDNF5G_enprvU95_FLorST4wqkq-8P4NKKMuEm0HNGcAac69Jyo76g7zWxOTww05wDr-eEcd7Qm_MoVpB

The response will be the corresponding friend object:

HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 1979
Content-Type: application/json;charset=UTF-8

{
    "@changes": {
        "creation_time": "2020-12-01T08:13:27",
        "modification_time": "2020-12-01T08:13:27"
    },
    "@links": [
        {
            "name": "application",
            "url": "https://customer.minddistrict.com/api/2"
        },
        {
            "name": "catalogue.selfhelp.items",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/catalogue/items"
        },
        {
            "name": "favorites.items",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/favorites/items"
        },
        {
            "name": "logout",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/logout"
        },
        {
            "name": "planning",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/planning"
        },
        {
            "name": "planning.ics",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/planning/ics"
        },
        {
            "name": "planning.items",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/planning/items"
        },
        {
            "name": "tasks",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/tasks"
        },
        {
            "name": "tasks.items",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/tasks/items"
        },
        {
            "name": "tools",
            "url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7/tools"
        }
    ],
    "@type": "http://ns.minddistrict.com/friend",
    "@url": "https://customer.minddistrict.com/api/2/c/169a5b27fb204d15bd9d3fa6387713d7",
    "active": true,
    "email": "fred@example.com",
    "name": "Fred Flintstone",
    "picture": null
}

Editing a friend

To modify friend data send a PATCH request to the URL of the friend with the modification contained in the body:

PATCH /api/2/c/169a5b27fb204d15bd9d3fa6387713d7 HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABfxfsnPben0WfdUb4hUG8g-JotLeltPejn7kNMKwRJhfu8IK9EGrOX9TaeqVvj8yXRr-ScW7vD5kwICC7Ivknriekbs-QdNtko3luoUgx0UQ7n9jMY0qIcDNF5G_enprvU95_FLorST4wqkq-8P4NKKMuEm0HNGcAac69Jyo76g7zWxOTww05wDr-eEcd7Qm_MoVpB
Content-Length: 34
Content-Type: application/json

{
    "name": "Frank Flintstone"
}