Through this API you can create an inhouse personnel.
EndPoint
https://app.fracttal.com/api/personnel
Method POST
Input Parameters in the Body
Parameter | Type of field | Required | Description |
first_name | Text | Yes | Names of the inhouse personnel |
last_name | Text | Optional | Surnames of the inhouse personnel |
code | Text | Optional | inhouse personnel code. |
Text | Optional | ||
active | Text | Optional | Enable resource. Send true or false |
code_asset_location | Text | Optional | Code of the asset in which the inhouse personnel will be located. |
group_1 | Text | Optional | Description of the Classification 1 |
group_2 | Text | Optional | Description of the Classification 2 |
address | Text | Optional | Address |
city | Text | Optional | City |
state | Text | Optional | State |
zip_code | Text | Optional | Zip Code |
country | Text | Optional | Country. |
latitude | Text | Optional | Latitude |
longitud | Text | Optional | Length. |
telephone | Text | Optional | Telephone. |
telephone_2 | Text | Optional | Telephone 2. |
sms | Text | Optional | SMS. |
id_hourly_rate | Entire | Optional | Id of the ordinary hour (Should not be sent if the description_hourly_rate field is sent) |
description_hourly_rate | Text | Optional | Description of the ordinary hour (Should not be sent if the id_hourly_rate field is sent) |
Output Parameters
Parameter | Type of field | Description |
success | Boolean | True if the insert was successful or false otherwise |
message | Text | 200 if it was successful |
data | Text | Json with the inserted item |
total | Number | Number of records inserted (It will always be 1) |
Example:
Petition: (POST) https://app.fracttal.com/api/personnel
Body
{
"first_name":"Fracttal SPA",
"last_name":"Software de Gestión de activos y mantenimiento",
"code":"fracttal_recurso_humano",
"address":"San Pio X",
"country":"Chile",
"email":"[email protected]",
"active": "true",
"city":"Providencia",
"state": "Region Metropolitana",
"telephone_1":"555-555-55",
"id_hourly_rate":47
}
Example Response:
{
"success": true,
"message": "200",
"data": {
"id": 60,
"id_company": 69,
"id_asset_location": null,
"id_account": null,
"id_custom_field_group": null,
"path_image": null,
"first_name": "Fracttal SPA",
"last_name": "Software de Gestión de activos y mantenimiento",
"email": "[email protected]",
"saved_configuration_table": false,
"active": true,
"creation_date": "2018-01-23",
"address": "San Pio X",
"city": "Providencia",
"state": "Region Metropolitana",
"zip_code": null,
"telephone": null,
"telephone_2": null,
"sms": null,
"id_group_2": null,
"id_group_1": null,
"id_hourly_rate": 47,
"code": "fracttal_recurso_humano",
"country": "Chile",
"is_changed": false,
"latitude": null,
"longitud": null,
"id_work_shift": null,
"id_personnel_import": null,
"path_signature": null
},
"total": 0
}