> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc.dreamclass.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidoc.dreamclass.io/_mcp/server.

# GetRelations

GET https://dreamclassapi/v1/students/relations

Get a list of the available relations for guardians/students

Reference: https://apidoc.dreamclass.io/dream-class-api/students/get-relations

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/students/relations:
    get:
      operationId: get-relations
      summary: GetRelations
      description: Get a list of the available relations for guardians/students
      tags:
        - subpackage_students
      parameters:
        - name: tenant
          in: header
          required: false
          schema:
            type: string
        - name: schoolCode
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1StudentsRelationsGetResponsesContentApplicationJsonSchemaItems
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1StudentsRelationsGetResponsesContentApplicationJsonSchemaItems:
      type: object
      properties:
        id:
          type: integer
        translation:
          type: string
        institutionId:
          type: integer
      required:
        - id
        - translation
        - institutionId
      title: >-
        DreamclassapiV1StudentsRelationsGetResponsesContentApplicationJsonSchemaItems

```

## Examples



**Request**

```json
{}
```

**Response**

```json
[
  {
    "id": 1,
    "translation": "RELATION.FATHER",
    "institutionId": 101
  },
  {
    "id": 2,
    "translation": "RELATION.MOTHER",
    "institutionId": 101
  },
  {
    "id": 3,
    "translation": "RELATION.GUARDIAN",
    "institutionId": 101
  },
  {
    "id": 4,
    "translation": "RELATION.SIBLING",
    "institutionId": 101
  }
]
```

**SDK Code**

```python Students_GetRelations_example
import requests

url = "https://https/dreamclassapi/v1/students/relations"

payload = {}
headers = {
    "tenant": "greenvalleyschool",
    "schoolCode": "GV123",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript Students_GetRelations_example
const url = 'https://https/dreamclassapi/v1/students/relations';
const options = {
  method: 'GET',
  headers: {
    tenant: 'greenvalleyschool',
    schoolCode: 'GV123',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Students_GetRelations_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/dreamclassapi/v1/students/relations"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("tenant", "greenvalleyschool")
	req.Header.Add("schoolCode", "GV123")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Students_GetRelations_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/students/relations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["tenant"] = 'greenvalleyschool'
request["schoolCode"] = 'GV123'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Students_GetRelations_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/dreamclassapi/v1/students/relations")
  .header("tenant", "greenvalleyschool")
  .header("schoolCode", "GV123")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Students_GetRelations_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/dreamclassapi/v1/students/relations', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'schoolCode' => 'GV123',
    'tenant' => 'greenvalleyschool',
  ],
]);

echo $response->getBody();
```

```csharp Students_GetRelations_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/students/relations");
var request = new RestRequest(Method.GET);
request.AddHeader("tenant", "greenvalleyschool");
request.AddHeader("schoolCode", "GV123");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Students_GetRelations_example
import Foundation

let headers = [
  "tenant": "greenvalleyschool",
  "schoolCode": "GV123",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/students/relations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```