Update Entity Data
The below API is used to update an entity header and data fields in Entity Management.
Request: POST
Signature: /api/mobile/UpdateEntityData?Token={Login_Token}
Body:
{
"EntityID":"ENTITY_ID",
"Field":
[
{
"Code":"ENTITY_HEADER_CODE",
"Value":"ENTITY_HEADER_VALUE"
}
]
"Data":
[
{
"Code":"FIELD_CODE_DATE",
"Value":"DD MMM YYYY",
"Remarks":"FIELD_CODE_DATE_REMARKS"
},
{
"Code":"FIELD_CODE_LIST",
"Value":"ITEM1;ITEM2;ITEM3",
"Remarks":"FIELD_CODE_LIST
_REMARKS"
},
{
"Code":"FIELD_CODE_TEXT",
"Value":"FIELD_CODE_TEXT VALUE",
"Remarks":"FIELD_CODE_TEXT
_REMARKS"
},
{
"Code":"FIELD_CODE_NUMERIC",
"Value":FIELD_CODE_NUMERIC VALUE,
"Remarks":"FIELD_CODE_NUMERIC
_REMARKS"
}
]
}
Sample: /api/mobile/UpdateEntityData?Token=VomYEMiECFFyAQ3==
Body:
{
"Serial":" ENT001",
"Field":
[
{
"Code":"ACCOUNTNUMBER",
"Value":"EGKH798679002"
},
{
"Code":"POSTALADDRESS",
"Value":"23, Bakers Street"
},
]
"Data":
[
{
"Code":"EXDATE",
"Value":" 17 Oct 2018",
"Remarks":"Bond expired on this date"
},
{
"Code":"COMM",
"Value":"Coffee;Tea",
"Remarks":"Multiple commodities"
},
{
"Code":"ACCMAN",
"Value":"Tom",
"Remarks":"Current Account Manager Name"
}
]
}
Response:
{
"Code": 1,
"Info": "Entity data updated successfully",
"RowsAffected": 1,
"Scalar": null,
"Identity": 0,
"RetInfo": null
}
Things to know about this API:
- Token - You can use Login API to get token displayed under Info
- These fields are mandatory while sending request body:
- Entity ID
- Code
- Value
- Below are the Entity Header Fields and their Code:
- Data value for Item list must be separated with semi colon (;)