# Retrieve by Id

**Retrieve Student**

<mark style="color:green;">`POST`</mark> `/v1/student/retrieve`

This endpoint retrieves detailed information about a specific student based on their ID and the associated school. It requires authentication via a valid access token and a JSON payload with the necessary parameters.

**Headers**:

| Name          | Value                   |
| ------------- | ----------------------- |
| Content-Type  | `application/json`      |
| Authorization | `Bearer <access_token>` |

**Body**:

```json
{
    "school_slug": "string",
    "student_id": "number"
}
```

<table><thead><tr><th width="283">Name</th><th width="98">Type</th><th width="202">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>school_slug</code></td><td>string</td><td>The slug identifier for the school.</td><td>Mandatory</td></tr><tr><td><code>student_id</code></td><td>number</td><td>The unique ID of the student to retrieve.</td><td>Mandatory</td></tr></tbody></table>

**Response**: On success, the endpoint returns a `200 OK` status with a JSON payload containing the student's details.

**Response**

```json
{
  "id": "number",
  "student_id": "number",
  "code": "string",
  "firstname": "string",
  "middlename": "string",
  "lastname": "string",
  "dob": "string",
  "sex": "string",
  "school_id": "number",
  "family_id": "number",
  "student_type_id": "number",
  "created_at": "string",
  "updated_at": "string",
  "family": {
    "id": "number",
    "family_name": "string",
    "primary_phone": "string",
    "family_contacts": "string",
    "address": "string",
    "created_at": "string",
    "updated_at": "string"
  },
  "school": {
    "id": "number",
    "name": "string",
    "code": "string",
    "slug": "string",
    "city": "string",
    "country": "string",
    "street": "string",
    "phone_number": "string",
    "email": "string",
    "logo": "any",
    "school_type": "string",
    "created_at": "string",
    "updated_at": "string"
  },
  "sections": [
    {
      "id": "number",
      "section": {
        "id": "number",
        "section_id": "string",
        "title": "string",
        "grade": {
          "id": "number",
          "title": "string"
        }
      }
    }
  ],
  "student_type": {
    "id": "number",
    "student_type": "string",
    "slug": "string",
    "registration_fee": "string",
    "monthly_fee": "string",
    "created_at": "string",
    "updated_at": "string",
    "school_id": "number"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dugsi-docs.tiigsi.io/student-endpoints/retrieve-by-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
