Get organizations tree for a contact

GET /api-v1/organization/tree/{id}

Headers

  • TARGET-ORGANIZATION-ID integer(int32)

    ID of organization, for which the operation must be performed

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

Path parameters

  • id integer Required

    id

Responses

  • 200 */*

    OK

    Hide response attributes Show response attributes object
    • availableEmployees array[object]
      Hide availableEmployees attributes Show availableEmployees attributes object
      • email string
      • id integer
      • name string
    • availableRoles array[object]
      Hide availableRoles attributes Show availableRoles attributes object
      • description string
      • id integer
      • isDefault boolean
      • name string
      • realId integer
      • roleType string

        Values are ORGANIZATION or GLOBAL.

      • type string

        Values are ROLE or SUPER_ROLE.

    • globalRoles array[object]
      Hide globalRoles attributes Show globalRoles attributes object
      • id integer
      • isDefault boolean
      • name string
      • type string

        Values are ROLE or SUPER_ROLE.

    • id integer
    • isActive boolean
    • name string
    • organizationId integer
    • parentOrganizationId integer(int32)
    • roles array[object]
      Hide roles attributes Show roles attributes object
      • id integer
      • isDefault boolean
      • name string
      • type string

        Values are ROLE or SUPER_ROLE.

    • subUserContactId integer
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

GET /api-v1/organization/tree/{id}
curl \
 --request GET 'https://wyzio.app/api-v1/organization/tree/{id}' \
 --header "TARGET-ORGANIZATION-ID: 42" \
 --header "WEAL-TOKEN: string"
Response examples (200)
[
  {
    "availableEmployees": [
      {
        "email": "string",
        "id": 42,
        "name": "string"
      }
    ],
    "availableRoles": [
      {
        "description": "string",
        "id": 42,
        "isDefault": true,
        "name": "string",
        "realId": 42,
        "roleType": "ORGANIZATION",
        "type": "ROLE"
      }
    ],
    "globalRoles": [
      {
        "id": 42,
        "isDefault": true,
        "name": "string",
        "type": "ROLE"
      }
    ],
    "id": 42,
    "isActive": true,
    "name": "string",
    "organizationId": 42,
    "parentOrganizationId": 42,
    "roles": [
      {
        "id": 42,
        "isDefault": true,
        "name": "string",
        "type": "ROLE"
      }
    ],
    "subUserContactId": 42
  }
]