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
Field | Type | Required |
---|---|---|
nama | String | ✔️ |
nik | String | ✔️ |
no_kk | string | ✔️ |
sex | string | ✔️ |
tempatlahir | string | ✔️ |
tanggallahir | string | ✔️ |
alamat | string | |
nama_ayah | string | |
nama_ibu | string | |
hubungan | string | ✔️ |
agama | string | ✔️ |
pendidikan_terakhir | string | ✔️ |
kawin | string | ✔️ |
kewarganegaraan | string | ✔️ |
pekerjaan | string | ✔️ |
dusun | string | ✔️ |
rw | string | ✔️ |
rt | string | ✔️ |
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