Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get organisation tree

Get the tree of organisations that the requested organisation is part of

GET/api/v1/{app_id}/organisations/{id}/tree
Authorization
AuthorizationAPI key · headerrequired

Bearer token (format: "Bearer {token}")

Path parameters
app_idstringrequired

UUID of the app

idstringrequired

UUID of the organisation

Responses
200

OK

ancestorsCompanyNodeResponse[]
Show properties
Array of CompanyNodeResponse
app_idstring
commentstring
contact_namestring
created_atstring
credit_checkboolean
custom_fieldsobject
emailstring
external_refstring
idstring
invoice_emailstring
namestring
organisation_numberstring
parent_idstring | null
phonestring
statusstring
tax_id_vat_numberstring
updated_atstring
company_treeOrganisationTree
Show properties
app_idstring
childrenOrganisationTree[]
Show properties
Array of OrganisationTree
Circular reference to OrganisationTree.
commentstring
contact_namestring
created_atstring
credit_checkboolean
custom_fieldsobject
emailstring
external_refstring
idstring
invoice_emailstring
namestring
organisation_numberstring
parent_idstring | null
phonestring
statusstring
tax_id_vat_numberstring
updated_atstring
400

Invalid request

detailsstring[] | null
messagestring
successboolean
404

Organisation not found

detailsstring[] | null
messagestring
successboolean
500

Internal server error

detailsstring[] | null
messagestring
successboolean
Try it
Server
Authorization
Parameters
Request
curl -X GET '//customers.enad.io/api/v1/string/organisations/string/tree' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "ancestors": [
    {
      "app_id": "string",
      "comment": "string",
      "contact_name": "string",
      "created_at": "string",
      "credit_check": true,
      "custom_fields": {
        "property1": "string",
        "property2": "string"
      },
      "email": "string",
      "external_ref": "string",
      "id": "string",
      "invoice_email": "string",
      "name": "string",
      "organisation_number": "string",
      "parent_id": "string",
      "phone": "string",
      "status": "string",
      "tax_id_vat_number": "string",
      "updated_at": "string"
    }
  ],
  "company_tree": {
    "app_id": "string",
    "children": [
      {}
    ],
    "comment": "string",
    "contact_name": "string",
    "created_at": "string",
    "credit_check": true,
    "custom_fields": {
      "property1": "string",
      "property2": "string"
    },
    "email": "string",
    "external_ref": "string",
    "id": "string",
    "invoice_email": "string",
    "name": "string",
    "organisation_number": "string",
    "parent_id": "string",
    "phone": "string",
    "status": "string",
    "tax_id_vat_number": "string",
    "updated_at": "string"
  }
}