I attach a reference info of requests:
Information before executing the PUT method:
`
url of GET method: {{domain-perfex}}/api/staffs/6
response:
{
"staffid": "6",
"email": "lflores@keos.co",
"firstname": "Luis1",
"lastname": "",
"facebook": "luis flores",
"linkedin": "luis flores",
"phonenumber": "11111",
"skype": "",
"password": "$2a$08$CJt63Sl4wo9NuvKrm4.ViuhIhBfH4emrF7QxKBBXDdpZTpwveJMvW",
"datecreated": "2023-09-13 12:11:58",
"profile_image": null,
"last_ip": "179.6.164.150",
"last_login": "2023-10-27 08:19:18",
"last_activity": "2023-10-27 12:22:04",
"last_password_change": "2023-10-27 10:48:47",
"new_pass_key": null,
"new_pass_key_requested": null,
"admin": "1",
"role": "1",
"active": "1",
"default_language": "es",
"direction": "",
"media_path_slug": "luis-flores",
"is_not_staff": "0",
"hourly_rate": "0.00",
"two_factor_auth_enabled": "0",
"two_factor_auth_code": null,
"two_factor_auth_code_requested": null,
"email_signature": "",
"google_auth_secret": null,
"full_name": "Luis1 ",
"permissions": [],
"customfields": [
{
"label": "OKR Leads",
"value": "1"
}
]
}`
This is how I run the update:
`
url of PUT method: {{domain-perfex}}/api/staffs
Body of method:
{
"custom_fields[staff][13]": [
{
"field_name": "custom_fields[staff][13]",
"custom_field_id": "13",
"label": "OKR Leads",
"required": "1",
"type": "number",
"value": ""
}
]
}
Response of method:
error 500
`
This is another way I tried to update the custom_field
`
Url of PUT method: {{domain-perfex}}/api/staffs/6
Body of method:
{
"firstname": "Luis1",
"email": "lflores@keos.co",
"password": "luis123",
"hourly_rate": "0.00",
"phonenumber": "11111",
"facebook": "luis flores",
"linkedin": "luis flores",
"skype": "",
"default_language": "es",
"email_signature": "",
"direction": "",
"customfields": [
{
"label": "OKR Leads",
"value": "2"
}
]
}
Response of method:
{
"status": true,
"message": "Staff Update Successful."
}
`
Information after executing the PUT method:
`
url of GET method: {{domain-perfex}}/api/staffs/6
response:
{
"staffid": "6",
"email": "lflores@keos.co",
"firstname": "Luis1",
"lastname": "",
"facebook": "luis flores",
"linkedin": "luis flores",
"phonenumber": "11111",
"skype": "",
"password": "$2a$08$CJt63Sl4wo9NuvKrm4.ViuhIhBfH4emrF7QxKBBXDdpZTpwveJMvW",
"datecreated": "2023-09-13 12:11:58",
"profile_image": null,
"last_ip": "179.6.164.150",
"last_login": "2023-10-27 08:19:18",
"last_activity": "2023-10-27 12:22:04",
"last_password_change": "2023-10-27 10:48:47",
"new_pass_key": null,
"new_pass_key_requested": null,
"admin": "1",
"role": "1",
"active": "1",
"default_language": "es",
"direction": "",
"media_path_slug": "luis-flores",
"is_not_staff": "0",
"hourly_rate": "0.00",
"two_factor_auth_enabled": "0",
"two_factor_auth_code": null,
"two_factor_auth_code_requested": null,
"email_signature": "",
"google_auth_secret": null,
"full_name": "Luis1 ",
"permissions": [],
"customfields": [
{
"label": "OKR Leads",
"value": "1"
}
]
}
`
Finally this is the custom_field info:
`
url of GET method: {{domain-perfex}}/api/custom_fields/staff/13
response of method:
[
{
"field_name": "custom_fields[staff][13]",
"custom_field_id": "13",
"label": "OKR Leads",
"required": "1",
"type": "number",
"value": ""
}
]
`
As you can see I try to change the value of the custom field, but it does not seem to update even though the PUT method returns a satisfactory message