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:

    1. Token - You can use Login API to get token displayed under Info
    2. These fields are mandatory while sending request body:
        • Entity ID
        • Code
        • Value
    3. Below are the Entity Header Fields and their Code:
    1. Data value for Item list must be separated with semi colon (;)