Update
Updates attribute values for a specific record. You can update multiple attributes of the same record in the same request.
Syntax
Copy
POST <<i>host_address</i>>/api/openApi/Update
Content-Type: application/json
{
"ApiInfo": {
"Token": <<i>access_token</i>>
},
"Request": {
"Id": <<i>record_id</i>>,
"EntityName": <<i>parent_entity</i>>,
"Values": [
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
},
...
{
"Attribute": <<i>attribute_name</i>>,
"Value": <<i>attribute_value</i>>
}
]
}
}
| Parameter | Description |
|---|---|
host_address
|
URL of the FintechOS platform server. |
access_token
|
Access token used to connect to the API endpoint. For details, see GetToken. |
record_id
|
Unique identifier of the record you wish to update. |
parent_entity
|
Name of the parent entity of the record you wish to update. |
attribute_name
|
Name of the record's attribute you wish to update. |
attribute_value
|
The value you wish to allocate the record's attribute. |
Response
Copy
{
"Id": "33a68416-f04e-4aad-bf05-6f19292d42f0",
"Message": "Record updated",
"IsSuccess": true,
"ClientScript": null,
"ErrorCode": 0,
"Serialized": null,
"UIResult": null
}
| Key | Description |
|---|---|
Id
|
Unique identifier of he record you updated. |
Message
|
Indicates the outcome of the record update. |
IsSuccess
|
Indicates if the record update was successful. |
Examples
In this example:
- A customer changes her surname and is issued new identity papers with a new series (idCardSeries).
- The server's address is https://FintechOSPortal.
- The access token used to connect to the API endpoint is e9735b2a-b5f8-461a-9fec-a819a071a2ff. For information on how to obtain the access token, see GetToken.
- The record that identifies the customer has the 91d0dc16-1dc7-4c58-b82e-e8751e756f5d ID.
- The entity that stores the customers' personal data is called customers.
- The customer's new surname is Rockefeller and the new identity card series is 478765782011.
- The response indicates that the record was updated successfully ("IsSuccess": true).
Request
Copy
POST https://FintechOSPortal/api/openApi/Update
Content-Type: application/json
{
"ApiInfo": {
"Token": e9735b2a-b5f8-461a-9fec-a819a071a2ff
},
"Request": {
"Id": "91d0dc16-1dc7-4c58-b82e-e8751e756f5d",
"EntityName": "customers",
"Values": [
{
"Attribute": "surname",
"Value": "Rockefeller"
},
{
"Attribute": "idCardSeries",
"Value": "478765782011"
}
]
}
}
Response
Copy
{
"Id": "91d0dc16-1dc7-4c58-b82e-e8751e756f5d",
"Message": "Record updated",
"IsSuccess": true,
"ClientScript": null,
"ErrorCode": 0,
"Serialized": null,
"UIResult": null
}