> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2p3/relationships.md).

# Relationships

A relationship defines the kind of association between a student and a parent

## List of parent-children relationships

> Retrieves all children linked to a specific parent, along with the relationship type (e.g. Mother, Father, Guardian). Results are paginated.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ChildRelation":{"type":"object","description":"Represents the link between a parent/guardian and a student, including the relationship type.","properties":{"id":{"type":"integer","description":"ManageBac ID of the child (student) record."},"relationship":{"type":"string","nullable":true,"enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"],"description":"The relationship of the parent/guardian to the child. Null if not specified."}}},"Meta":{"type":"object","description":"Pagination metadata included in all list (index) responses.","properties":{"current_page":{"type":"integer","description":"The page number of the current result set, starting from 1."},"total_pages":{"type":"integer","description":"The total number of pages available for this query."},"total_count":{"type":"integer","description":"The total number of records matching the query across all pages."},"per_page":{"type":"integer","description":"The number of records returned per page. Defaults to 100; can be overridden with the per_page query parameter (max 200)."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children":{"get":{"summary":"List of parent-children relationships","operationId":"listOfParentChildrenRelationships","tags":["Relationships"],"description":"Retrieves all children linked to a specific parent, along with the relationship type (e.g. Mother, Father, Guardian). Results are paginated.\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."},{"name":"page","in":"query","required":false,"schema":{"type":"string"},"description":"An integer defining which page to display. Defaults to 1."},{"name":"per_page","in":"query","required":false,"schema":{"type":"string"},"description":"An integer defining the number of records to display per page. Defaults to 100."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"children":{"type":"array","items":{"$ref":"#/components/schemas/ChildRelation"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}}}}}}
```

## Create a parent-child relationship

> Creates a new relationship between a parent and a child (student). The relationship type (e.g. Mother, Father, Guardian) must be provided.\
> \
> If the child already has a relationship with this parent, a 422 error is returned.\
> If the relationship was previously deleted, it is restored instead of creating a duplicate.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ChildRelation":{"type":"object","description":"Represents the link between a parent/guardian and a student, including the relationship type.","properties":{"id":{"type":"integer","description":"ManageBac ID of the child (student) record."},"relationship":{"type":"string","nullable":true,"enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"],"description":"The relationship of the parent/guardian to the child. Null if not specified."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children":{"post":{"summary":"Create a parent-child relationship","operationId":"createParentChildRelationship","tags":["Relationships"],"description":"Creates a new relationship between a parent and a child (student). The relationship type (e.g. Mother, Father, Guardian) must be provided.\n\nIf the child already has a relationship with this parent, a 422 error is returned.\nIf the relationship was previously deleted, it is restored instead of creating a duplicate.\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"child":{"$ref":"#/components/schemas/ChildRelation"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"type":"object","properties":{"child":{"$ref":"#/components/schemas/ChildRelation"},"errors":{"type":"object","properties":{"relationship":{"type":"array","items":{"allOf":[{"type":"string"}]}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"child":{"$ref":"#/components/schemas/ChildRelation"}},"required":["child"]}}}}}}}}
```

## Bulk update a parent-children relationships

> Replaces all parent-children relationships for a given parent. The provided list of children and relationships becomes the complete set -- any existing relationships not included in the payload are removed.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ChildRelation":{"type":"object","description":"Represents the link between a parent/guardian and a student, including the relationship type.","properties":{"id":{"type":"integer","description":"ManageBac ID of the child (student) record."},"relationship":{"type":"string","nullable":true,"enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"],"description":"The relationship of the parent/guardian to the child. Null if not specified."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children":{"put":{"summary":"Bulk update a parent-children relationships","operationId":"bulkUpdateParentChildrenRelationships","tags":["Relationships"],"description":"Replaces all parent-children relationships for a given parent. The provided list of children and relationships becomes the complete set -- any existing relationships not included in the payload are removed.\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"children":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ChildRelation"}]}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"type":"object","properties":{"children":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ChildRelation"}]}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"children":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ChildRelation"}]}}},"required":["children"]}}}}}}}}
```

## Get parent-child relationship

> Retrieves the relationship details between a specific parent and child, including the relationship type (e.g. Mother, Father, Guardian).<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ChildRelation":{"type":"object","description":"Represents the link between a parent/guardian and a student, including the relationship type.","properties":{"id":{"type":"integer","description":"ManageBac ID of the child (student) record."},"relationship":{"type":"string","nullable":true,"enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"],"description":"The relationship of the parent/guardian to the child. Null if not specified."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children/{id}":{"get":{"summary":"Get parent-child relationship","operationId":"getParentChildRelationship","tags":["Relationships"],"description":"Retrieves the relationship details between a specific parent and child, including the relationship type (e.g. Mother, Father, Guardian).\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the child (student) record."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"child":{"$ref":"#/components/schemas/ChildRelation"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}}}}
```

## Update parent-child relationship

> Updates the relationship type between a specific parent and child. The relationship must already exist; if it does not, a 404 error is returned.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ChildRelation":{"type":"object","description":"Represents the link between a parent/guardian and a student, including the relationship type.","properties":{"id":{"type":"integer","description":"ManageBac ID of the child (student) record."},"relationship":{"type":"string","nullable":true,"enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"],"description":"The relationship of the parent/guardian to the child. Null if not specified."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children/{id}":{"put":{"summary":"Update parent-child relationship","operationId":"updateParentChildRelationship","tags":["Relationships"],"description":"Updates the relationship type between a specific parent and child. The relationship must already exist; if it does not, a 404 error is returned.\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the child (student) record."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"child":{"$ref":"#/components/schemas/ChildRelation"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"child":{"type":"object","properties":{"relationship":{"type":"string","enum":["Mother","Father","Stepmother","Stepfather","Legal Guardian","Grandmother","Grandfather","Sister","Brother","Uncle","Aunt","Other Guardian","Consultant Recruiter"]}}}},"required":["child"]}}}}}}}}
```

## Remove parent-child relationship

> Removes the relationship between a specific parent and child. The relationship record is soft-deleted and can be restored by creating the same relationship again via POST.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Relationships","description":"A relationship defines the kind of association between a student and a parent"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/parents/{parent_id}/children/{id}":{"delete":{"summary":"Remove parent-child relationship","operationId":"deleteParentChildRelationship","tags":["Relationships"],"description":"Removes the relationship between a specific parent and child. The relationship record is soft-deleted and can be restored by creating the same relationship again via POST.\n","parameters":[{"name":"parent_id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the parent record."},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique numeric identifier of the child (student) record."}],"responses":{"204":{"description":"No content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}}}}
```
