Update Penduduk

To edit the data in the specified collection with the specified parameters. When a JSON object is saved, the object properties are automatically added to the collection you specified.

Method : POST

URL : /penduduk/(ID)?_method=PUT

Body : Form Data

FieldTypeRequired
namaString✔️
nikString✔️
no_kkstring✔️
sexstring✔️
tempatlahirstring✔️
tanggallahirstring✔️
alamatstring
nama_ayahstring
nama_ibustring
hubunganstring✔️
agamastring✔️
pendidikan_terakhirstring✔️
kawinstring✔️
kewarganegaraanstring✔️
pekerjaanstring✔️
dusunstring✔️
rwstring✔️
rtstring✔️

Response : 200 OK

{
"message": "Success add penduduk",
"status": 200
}

Response : 422 UNPROCESSABLE CONTENT

{
"error": {
"nama": ["The nama field is required."],
"nik": ["The nik field is required."],
"no_kk": ["The no kk field is required."],
"hubungan": ["The hubungan field is required."],
"sex": ["The sex field is required."],
"tempatlahir": ["The tempatlahir field is required."],
"tanggallahir": ["The tanggallahir field is required."],
"agama": ["The agama field is required."],
"pendidikan_terakhir": ["The pendidikan terakhir field is required."],
"kawin": ["The kawin field is required."],
"pekerjaan": ["The pekerjaan field is required."],
"kewarganegaraan": ["The kewarganegaraan field is required."],
"dusun": ["The dusun field is required."],
"rw": ["The rw field is required."],
"rt": ["The rt field is required."]
}
}

Response : 500 ERROR

Internal Server Error