POST api/update-worker-as-appuser/update

Request Information

URI Parameters

None.

Body Parameters

Farm_Worker
NameDescriptionTypeAdditional information
Id

integer

None.

Farm_PenId

integer

Required

Name

string

Required

Email

string

None.

Gender

string

Required

PhoneNo

string

Required

Salary

decimal number

None.

DepartmentId

integer

None.

Role

Role

None.

DateHired

date

None.

DateFired

date

None.

DateCreated

date

None.

DateModified

date

None.

IsAppUser

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Farm_PenId": 2,
  "Name": "sample string 3",
  "Email": "sample string 4",
  "Gender": "sample string 5",
  "PhoneNo": "sample string 6",
  "Salary": 1.1,
  "DepartmentId": 7,
  "Role": {
    "Id": 1,
    "RoleName": "sample string 2",
    "RoleDescription": "sample string 3",
    "Application": "sample string 4"
  },
  "DateHired": "2025-12-04T23:14:27.546705+01:00",
  "DateFired": "2025-12-04T23:14:27.546705+01:00",
  "DateCreated": "2025-12-04T23:14:27.546705+01:00",
  "DateModified": "2025-12-04T23:14:27.546705+01:00",
  "IsAppUser": true
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[BaseLibrary.Entities.RolePermission, BaseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[BaseLibrary.Entities.RolePermission, BaseLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Farm_Worker'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.