setle-docs

Organization API

Organizations

Fetching organizations

This endpoint can be used to fetch all organizations to which you are related based on the provided access token, either as a member that has been invited (e.g. agency employees) or as the owner of the organization.

GET /organizations

Response body

[
  {
    "id": "string",
    "phone_number": "string",
    "email_address": "string",
    "organization_name": "string",
    "country": "string",
    "region": "string",
    "street": "string",
    "house_number": "string",
    "house_number_extra": "string",
    "zipcode": "string",
    "place": "string"
  }
]

Response code

200 OK

Editing organizations

This endpoint can be used to edit the basic information of your organization. Only organization owners can adjust this information.

PATCH /organizations/{organization_id}

Request body

{
  "phone_number": "string",
  "email_address": "string",
  "organization_name": "string",
  "country": "string",
  "street": "string",
  "house_number": "string",
  "house_number_extra": "string",
  "zipcode": "string",
  "place": "string"
}

Response body

{
  "id": "string",
  "phone_number": "string",
  "email_address": "string",
  "organization_name": "string",
  "country": "string",
  "region": "string",
  "street": "string",
  "house_number": "string",
  "house_number_extra": "string",
  "zipcode": "string",
  "place": "string"
}

Response code

200 OK

Members

Fetching members

This endpoint returns a list of all members that have been added to the organization. Members include both employees (e.g. broker accounts) and clients (e.g. potential buyers of a real estate agency).

GET /organizations/{organization_id}/members

Response body

[
  {
    "id": "string",
    "email_address": "string",
    "first_name": "string",
    "last_name": "string",
    "member_type": "string"
  }
]

Response code

200 OK

Inviting members

Members, such as organization employees or potential buyers, can be added by inviting them to your organization. This endpoint creates new members and attaches them to the organization. New members will also get notified by email, in order to guide them through the process of activating their accounts.

POST /organizations/{organization_id}/members

Request body

{
  "email_address": "string",
  "first_name": "string",
  "last_name": "string",
  "member_type": "string"
}

Response body

{
  "id": "string",
  "email_address": "string",
  "first_name": "string",
  "last_name": "string",
  "member_type": "string"
}

Response code

201 Created

Deleting members

This endpoint can be used to remove members from the organization. Important: when members are deleted using this endpoint, all connections to specific estates will also be deleted.

DELETE /organizations/{organization_id}/members/{member_id}

Response code

200 OK