Person
Add
This query allows the addition of refugees. The body must be in json format and follow the following structure:
[
{
'field_id_1': 'value 1-1',
'field_id_2': 'value 2-1',
'date': '',
...
},
{
'field_id_1': 'value 1-2',
'field_id_2': 'value 2-3',
'date': ''
...
}
]The server may responds with an error if one of the required fields is not provided or if the data type is wrong.
The server responds by listing the ids of the persons created
Add persons
POST https://netw4ppl.tech/api/person
Headers
Name
Type
Description
Content-Type
String
application/json
Authorization*
String
Bearer <API TOKEN>
Application-id*
String
<Application-id>
Request Body
Name
Type
Description
[
"a9314fb6-8614-474e-9b89-b26ac27a2703",
"7d8fd444-bd35-4d7a-93ba-f88e7e735a3c",
"59cf9cdb-634b-4f79-a0da-e618c9b5f163"
]{
"message": "The given data was invalid.",
"errors": {
"0.full_name": [
"The 0.full_name field is required."
],
"0.age": [
"The 0.age field is required."
],
"0.date": [
"The 0.date field is required."
]
}
}Update
To update the relationships between two people, you have to use the same query as to create a relationship while adding the id attribute of the relationship to modify in the body :
[
{
'id': '',
'field_id_1': 'value 1-1',
'field_id_2': 'value 2-1',
'date': '',
...
},
{
'id': '',
'field_id_1': 'value 1-2',
'field_id_2': 'value 2-3',
'date': '',
...
}
]Last updated