employees_partial_update
PATCH
/pegasus/employees/api/employees/{id}/
const url = 'https://example.com/pegasus/employees/api/employees/1/';const options = { method: 'PATCH', headers: {cookie: 'sessionid=<sessionid>', 'Content-Type': 'application/json'}, body: '{"name":"example","department":"hr","salary":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/pegasus/employees/api/employees/1/ \ --header 'Content-Type: application/json' \ --cookie sessionid=<sessionid> \ --data '{ "name": "example", "department": "hr", "salary": 1 }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
integer
A unique integer value identifying this employee.
Request Body
Section titled “Request Body ”object
id
integer
user
integer
name
Your employee’s name.
string
department
hr- Human Resourcesfinance- Financeengineering- Engineeringmarketing- Marketingsales- Sales
string
salary
Your employee’s annual salary.
integer
created_at
string format: date-time
updated_at
string format: date-time
object
id
integer
user
integer
name
Your employee’s name.
string
department
hr- Human Resourcesfinance- Financeengineering- Engineeringmarketing- Marketingsales- Sales
string
salary
Your employee’s annual salary.
integer
created_at
string format: date-time
updated_at
string format: date-time
object
id
integer
user
integer
name
Your employee’s name.
string
department
hr- Human Resourcesfinance- Financeengineering- Engineeringmarketing- Marketingsales- Sales
string
salary
Your employee’s annual salary.
integer
created_at
string format: date-time
updated_at
string format: date-time
Responses
Section titled “ Responses ” Media type application/json
object
id
required
integer
user
required
integer
name
required
Your employee’s name.
string
department
required
hr- Human Resourcesfinance- Financeengineering- Engineeringmarketing- Marketingsales- Sales
string
salary
required
Your employee’s annual salary.
integer
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "department": "hr"}