You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| type | ID of the `contact_type` for the new person. Pass in `person` for older versions. | string |
1280
+
| parent | ID of the parent document, which is a place, for the new person. The type of the parent must belong to one of the allowed `parents` for the `contact_type` id in the settings config. | UUID string |
| reported_date | Timestamp of when the record was reported or created. Defaults to now. | 'YYYY-MM-DDTHH:mm:ssZ', 'YYYY-MM-DDTHH:mm:ss.SSSZ', or unix epoch. |
1287
+
|_id | ID of the new person document to be created. | UUID string |
1288
+
| short_name | String to denote short name of the person. | string |
1289
+
| phone | Phone number of the person in string format. | string |
1290
+
| role | Role of the person in string format. | string |
1291
+
1292
+
1293
+
#### Examples
1294
+
Create a person with a clinic as its parent place.
1295
+
1296
+
```bash
1297
+
POST /api/v1/person
1298
+
Content-type: application/json
1299
+
1300
+
{
1301
+
"name": "dummyuser",
1302
+
"type": "person",
1303
+
"parent":"01992f01-f155-4386-8538-5080c3155585"
1304
+
}
1305
+
```
1306
+
1307
+
Example response:
1308
+
```json
1309
+
{
1310
+
"_id": "4dcd842e813fd1bcabec03f98f002a98",
1311
+
"_rev": "1-bf4ecb779a3a369f6162a149853cbb02",
1312
+
"name": "dummyuser",
1313
+
"type": "contact",
1314
+
"parent": {
1315
+
"_id": "01992f01-f155-4386-8538-5080c3155585",
1316
+
"parent": {
1317
+
"_id": "35a2f31e-705c-4833-b385-efd069b1ce3f",
1318
+
"parent": {
1319
+
"_id": "29368c93-d267-4e80-8fbe-6543f702ff30"
1320
+
}
1321
+
}
1322
+
},
1323
+
"reported_date": 1755519112122,
1324
+
"contact_type": "person"
1325
+
}
1326
+
```
1327
+
1328
+
### PUT /api/v1/person
1329
+
1330
+
*Added in x.x.x*
1331
+
#### Description
1332
+
Used to update mutable fields of a person, or delete them if they are not part of update payload.
1333
+
1334
+
#### Supported Properties
1335
+
1336
+
Use JSON in the request body to specify a person’s details.
0 commit comments