Dependents
Overview
Dependents endpoints provide CRUD operations for dependents linked to an expat.
Endpoint Summary
| Method | Route | Purpose |
|---|---|---|
GET | /v1/data/expats/{expatId}/dependents | List dependents |
POST | /v1/data/expats/{expatId}/dependents | Create dependent |
GET | /v1/data/expats/{expatId}/dependents/{dependentId} | Get dependent by ID |
PUT | /v1/data/expats/{expatId}/dependents/{dependentId} | Update dependent |
DELETE | /v1/data/expats/{expatId}/dependents/{dependentId} | Delete dependent |
GET /v1/data/expats/{expatId}/dependents
Return all dependents for the selected expat.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expatId | number | Yes | Expat identifier. |
Example Request
curl -X GET "{{BASE_URL}}/v1/data/expats/{{EXPAT_ID}}/dependents" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"
Success Response (200)
{
"success": true,
"result": {
"dependents": [
{
"id": 41,
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"residence_country": "DE",
"primary_citizenship": "RO",
"birth_date": "1992-06-04",
"birth_country": "RO",
"birth_city": "Bucharest",
"notes": null,
"gender": "female",
"accompanied_status": "accompanied"
}
]
}
}
POST /v1/data/expats/{expatId}/dependents
Create a dependent for the selected expat.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Content-Type | Yes | application/json |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expatId | number | Yes | Expat identifier. |
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | Yes | Dependent first name. |
last_name | string | Yes | Dependent last name. |
relationship | string | Yes | Relationship with expat. |
birth_date | string | Yes | Birth date (YYYY-MM-DD). |
residence_country | string | No | ISO country code. |
primary_citizenship | string | No | Citizenship code. |
birth_country | string | No | Birth country. |
birth_city | string | No | Birth city. |
notes | string | No | Optional notes. |
gender | string | No | Gender value. |
accompanied_status | string | No | Accompanied status value. |
Example Request
curl -X POST "{{BASE_URL}}/v1/data/expats/{{EXPAT_ID}}/dependents" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"birth_date": "1992-06-04",
"residence_country": "DE",
"primary_citizenship": "RO"
}'
Success Response (200)
{
"success": true,
"result": {
"dependent": {
"id": 41,
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"residence_country": "DE",
"primary_citizenship": "RO",
"birth_date": "1992-06-04",
"birth_country": "RO",
"birth_city": "Bucharest",
"notes": null,
"gender": "female",
"accompanied_status": "accompanied"
}
}
}
GET /v1/data/expats/{expatId}/dependents/{dependentId}
Return one dependent by ID.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expatId | number | Yes | Expat identifier. |
dependentId | number | Yes | Dependent identifier. |
Example Request
curl -X GET "{{BASE_URL}}/v1/data/expats/{{EXPAT_ID}}/dependents/{{DEPENDENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"
Success Response (200)
{
"success": true,
"result": {
"dependent": {
"id": 41,
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"residence_country": "DE",
"primary_citizenship": "RO",
"birth_date": "1992-06-04",
"birth_country": "RO",
"birth_city": "Bucharest",
"notes": null,
"gender": "female",
"accompanied_status": "accompanied"
}
}
}
PUT /v1/data/expats/{expatId}/dependents/{dependentId}
Update an existing dependent.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Content-Type | Yes | application/json |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expatId | number | Yes | Expat identifier. |
dependentId | number | Yes | Dependent identifier. |
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | Yes | Dependent first name. |
last_name | string | Yes | Dependent last name. |
relationship | string | Yes | Relationship with expat. |
birth_date | string | Yes | Birth date (YYYY-MM-DD). |
residence_country | string | No | ISO country code. |
primary_citizenship | string | No | Citizenship code. |
birth_country | string | No | Birth country. |
birth_city | string | No | Birth city. |
notes | string | No | Optional notes. |
gender | string | No | Gender value. |
accompanied_status | string | No | Accompanied status value. |
Example Request
curl -X PUT "{{BASE_URL}}/v1/data/expats/{{EXPAT_ID}}/dependents/{{DEPENDENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"birth_date": "1992-06-04",
"notes": "Updated note"
}'
Success Response (200)
{
"success": true,
"result": {
"dependent": {
"id": 41,
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"residence_country": "DE",
"primary_citizenship": "RO",
"birth_date": "1992-06-04",
"birth_country": "RO",
"birth_city": "Bucharest",
"notes": "Updated note",
"gender": "female",
"accompanied_status": "accompanied"
}
}
}
DELETE /v1/data/expats/{expatId}/dependents/{dependentId}
Delete a dependent.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expatId | number | Yes | Expat identifier. |
dependentId | number | Yes | Dependent identifier. |
Example Request
curl -X DELETE "{{BASE_URL}}/v1/data/expats/{{EXPAT_ID}}/dependents/{{DEPENDENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"
Success Response (200)
{
"success": true,
"result": {
"dependent": {
"id": 41,
"first_name": "Anna",
"last_name": "Doe",
"relationship": "spouse",
"residence_country": "DE",
"primary_citizenship": "RO",
"birth_date": "1992-06-04",
"birth_country": "RO",
"birth_city": "Bucharest",
"notes": "Updated note",
"gender": "female",
"accompanied_status": "accompanied"
}
},
"message": "Dependent removed successfully."
}