Skip to main content

Dependents

Overview

Dependents endpoints provide CRUD operations for dependents linked to an expat.

Endpoint Summary

MethodRoutePurpose
GET/v1/data/expats/{expatId}/dependentsList dependents
POST/v1/data/expats/{expatId}/dependentsCreate 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

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
expatIdnumberYesExpat 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

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesapplication/json
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
expatIdnumberYesExpat identifier.

Request Body Fields

FieldTypeRequiredDescription
first_namestringYesDependent first name.
last_namestringYesDependent last name.
relationshipstringYesRelationship with expat.
birth_datestringYesBirth date (YYYY-MM-DD).
residence_countrystringNoISO country code.
primary_citizenshipstringNoCitizenship code.
birth_countrystringNoBirth country.
birth_citystringNoBirth city.
notesstringNoOptional notes.
genderstringNoGender value.
accompanied_statusstringNoAccompanied 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

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
expatIdnumberYesExpat identifier.
dependentIdnumberYesDependent 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

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesapplication/json
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
expatIdnumberYesExpat identifier.
dependentIdnumberYesDependent identifier.

Request Body Fields

FieldTypeRequiredDescription
first_namestringYesDependent first name.
last_namestringYesDependent last name.
relationshipstringYesRelationship with expat.
birth_datestringYesBirth date (YYYY-MM-DD).
residence_countrystringNoISO country code.
primary_citizenshipstringNoCitizenship code.
birth_countrystringNoBirth country.
birth_citystringNoBirth city.
notesstringNoOptional notes.
genderstringNoGender value.
accompanied_statusstringNoAccompanied 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

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
expatIdnumberYesExpat identifier.
dependentIdnumberYesDependent 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."
}