{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-list-all-organizations-response-dto-schema.json",
  "title": "ListAllOrganizationsResponseDto",
  "description": "Get list of organizations response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-authentication-api-openapi.yml#/components/schemas/ListAllOrganizationsResponseDto",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ListAllResponseDto_AllOrganizationsResponseDto_"
    }
  ],
  "$defs": {
    "AllOrganizationsResponseDto": {
      "type": "object",
      "properties": {
        "organizations": {
          "type": "array",
          "description": "List of organizations. When a console organization is available in the response, this indicates that the console organization is a parent of the listed organization.",
          "items": {
            "$ref": "#/$defs/OrganizationDto"
          }
        },
        "consoleOrganizations": {
          "type": "array",
          "description": "List of console organizations",
          "items": {
            "$ref": "#/$defs/ConsoleOrganization"
          }
        }
      },
      "description": "Get list of organizations response."
    },
    "ConsoleOrganization": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "BILL-generated ID of the organization. The value begins with `008`."
        },
        "name": {
          "type": "string",
          "description": "Organization name"
        }
      },
      "description": "Console organization response."
    },
    "ListAllResponseDto_AllOrganizationsResponseDto_": {
      "type": "object",
      "properties": {
        "nextPage": {
          "type": "string"
        },
        "prevPage": {
          "type": "string"
        },
        "results": {
          "$ref": "#/$defs/AllOrganizationsResponseDto"
        }
      },
      "description": "Response from a list API request with paging references."
    },
    "OrganizationDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "BILL-generated ID of the organization. The value begins with `008`."
        },
        "name": {
          "type": "string",
          "description": "Organization name"
        },
        "consoleOrganizationId": {
          "type": "string",
          "description": "BILL-generated ID of the console organization. The value begins with `008`.\n\nWhen a console organization is available in the response, this indicates that the console organization is a parent of the listed organization."
        }
      },
      "description": "Organization response."
    }
  }
}