---
updatedAt: 2026-06-24T15:01:46.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Get admin division tree by external ID (deprecated)

**DEPRECATED**. Call [List holiday calendars](ref:list-holiday-calendars) instead. 

This endpoint is deprecated starting April 30, 2026, and final removal from both test (EXT) and production environments on October 30, 2026.

Get the full tree of administrative divisions using an external ID


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform setup - Divisions",
    "description": "Use administrative divisions to align organization territory with business needs",
    "version": "v1.0",
    "contact": {
      "name": "Pismo Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io",
      "description": "Sandbox API server for testing"
    }
  ],
  "security": [
    {
      "S2SAuthentication": []
    }
  ],
  "tags": [
    {
      "name": "Administrative divisions (deprecated)",
      "description": "View and manage administrative divisions."
    }
  ],
  "components": {
    "parameters": {
      "AdminDivisionExternalIdPath": {
        "description": "Client-supplied external ID",
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "PageQuery": {
        "description": "Page must be greater than `0`. Default = `1`.",
        "in": "query",
        "name": "page",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "PerPageQuery": {
        "description": "PerPage must be greater than `0`. Default = `10`.",
        "in": "query",
        "name": "perPage",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "AdminDivisionExternalID": {
        "type": "string",
        "description": "Client-supplied external ID. It must comply with the rule `^[a-zA-Z0-9-]+$`.",
        "example": "8675309"
      },
      "AdminDivisionID": {
        "type": "integer",
        "description": "Admininistrative division ID",
        "example": 84849
      },
      "AdminDivisionName": {
        "type": "string",
        "description": "Administrative division name",
        "example": "Scotland"
      },
      "AdminDivisionParentID": {
        "type": "integer",
        "description": "Parent ID"
      },
      "AdminDivisionType": {
        "type": "string",
        "description": "Admin division type",
        "enum": [
          "City",
          "State",
          "Country"
        ],
        "example": "State"
      },
      "handler.HTTPError": {
        "description": "Code and error message.",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      },
      "pagination.Pagination": {
        "type": "object",
        "properties": {
          "pages": {
            "type": "integer",
            "description": "Total number of result pages.",
            "example": 1
          },
          "current_page": {
            "type": "integer",
            "description": "Current result page.",
            "example": 1
          },
          "per_page": {
            "type": "integer",
            "description": "Maximum results per page.",
            "example": 10
          },
          "total_items": {
            "type": "integer",
            "description": "Total number of result items.",
            "example": 1
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/presenter.v1AdministrativeDivisionResponse"
            }
          }
        }
      },
      "presenter.v1AdministrativeDivisionResponse": {
        "type": "object",
        "description": "Administrative division data.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/AdminDivisionID"
          },
          "name": {
            "$ref": "#/components/schemas/AdminDivisionName"
          },
          "type": {
            "$ref": "#/components/schemas/AdminDivisionType"
          },
          "parent_id": {
            "$ref": "#/components/schemas/AdminDivisionParentID"
          },
          "external_id": {
            "$ref": "#/components/schemas/AdminDivisionExternalID"
          }
        }
      }
    },
    "responses": {
      "401UnauthorizedError": {
        "description": "Access token is missing or invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/handler.HTTPError"
            }
          }
        }
      },
      "500InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/handler.HTTPError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "S2SAuthentication": {
        "type": "http",
        "scheme": "bearer",
        "description": "All requests must be previously authenticated with an account token."
      }
    },
    "examples": {
      "MissingTenantResponse": {
        "value": {
          "code": "400",
          "message": "Missing x-tenant header"
        }
      },
      "InvalidParamsResponse": {
        "value": {
          "code": "400",
          "message": "Invalid {parameter_name} parameter value"
        }
      },
      "GetPaginatedListOfAdministrativeDivisionsTree": {
        "value": {
          "pages": 1,
          "current_page": 1,
          "per_page": 10,
          "total_items": 3,
          "items": [
            {
              "id": 43,
              "name": "Brazil",
              "type": "Country",
              "parent_id": 41,
              "external_id": "BR"
            },
            {
              "id": 44,
              "name": "Minas Gerais",
              "type": "State",
              "parent_id": 43,
              "external_id": "MG"
            },
            {
              "id": 45,
              "name": "Rio de Janeiro",
              "type": "State",
              "parent_id": 43,
              "external_id": "RJ"
            },
            {
              "id": 4533,
              "name": "Itaboraí",
              "type": "City",
              "parent_id": 45,
              "external_id": "RJ-Itaboraí"
            }
          ]
        }
      },
      "GetPaginatedListOfAdministrativeDivisionsTreeWithMetadata": {
        "value": {
          "pages": 1,
          "current_page": 1,
          "per_page": 10,
          "total_items": 3,
          "items": [
            {
              "id": 43,
              "name": "Brazil",
              "type": "Country",
              "external_id": "BR",
              "working_days": [
                1,
                2,
                3,
                4,
                5
              ],
              "metadata": {
                "accrue_interest": true,
                "check_dormancy": true,
                "create_account": false,
                "defer_statement_due_date": true,
                "defer_transactions": true,
                "post_interest": false,
                "post_transactions": false,
                "run_cycle_closing": false
              }
            },
            {
              "id": 44,
              "name": "Minas Gerais",
              "type": "State",
              "parent_id": 43,
              "external_id": "MG",
              "working_days": [
                1,
                2,
                3,
                4,
                5
              ],
              "metadata": {
                "accrue_interest": true,
                "check_dormancy": true,
                "create_account": false,
                "defer_statement_due_date": true,
                "defer_transactions": true,
                "post_interest": false,
                "post_transactions": false,
                "run_cycle_closing": false
              }
            },
            {
              "id": 45,
              "name": "Rio de Janeiro",
              "type": "State",
              "parent_id": 43,
              "external_id": "RJ",
              "working_days": [
                1,
                2,
                3,
                4,
                5
              ],
              "metadata": {
                "accrue_interest": true,
                "check_dormancy": true,
                "create_account": false,
                "defer_statement_due_date": true,
                "defer_transactions": true,
                "post_interest": false,
                "post_transactions": false,
                "run_cycle_closing": false
              }
            },
            {
              "id": 4533,
              "name": "Itaboraí",
              "type": "City",
              "parent_id": 45,
              "external_id": "RJ-Itaboraí",
              "working_days": [
                1,
                2,
                3,
                4,
                5
              ],
              "metadata": {
                "accrue_interest": true,
                "check_dormancy": true,
                "create_account": false,
                "defer_statement_due_date": true,
                "defer_transactions": true,
                "post_interest": false,
                "post_transactions": false,
                "run_cycle_closing": false
              }
            }
          ]
        }
      }
    }
  },
  "paths": {
    "/divisions-core/v1/administrative-division/external-id/{id}/tree": {
      "get": {
        "summary": "Get admin division tree by external ID (deprecated)",
        "description": "**DEPRECATED**. Call [List holiday calendars](https://developers.pismo.io/pismo-docs/reference/list-holiday-calendars) instead. \n\nThis endpoint is deprecated starting April 30, 2026, and final removal from both test (EXT) and production environments on October 30, 2026.\n\nGet the full tree of administrative divisions using an external ID\n",
        "operationId": "get-v1-admin-division-tree-external-id",
        "deprecated": true,
        "tags": [
          "Administrative divisions (deprecated)"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AdminDivisionExternalIdPath"
          },
          {
            "$ref": "#/components/parameters/PageQuery"
          },
          {
            "$ref": "#/components/parameters/PerPageQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of administrative divisions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pagination.Pagination"
                },
                "examples": {
                  "PaginatedListOfAdministrativeDivisionsTree": {
                    "$ref": "#/components/examples/GetPaginatedListOfAdministrativeDivisionsTree"
                  },
                  "PaginatedListOfAdministrativeDivisionsTreeWithMetadata": {
                    "$ref": "#/components/examples/GetPaginatedListOfAdministrativeDivisionsTreeWithMetadata"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/handler.HTTPError"
                },
                "examples": {
                  "response-missing-tenant": {
                    "$ref": "#/components/examples/MissingTenantResponse"
                  },
                  "invalid-params-response": {
                    "$ref": "#/components/examples/InvalidParamsResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401UnauthorizedError"
          },
          "500": {
            "$ref": "#/components/responses/500InternalServerError"
          }
        }
      }
    }
  }
}
```