Update custom data values for a record.
URL: /data/v2/updateData
Method: POST
Method Parameters
Name |
Type |
Required |
Description |
apiKey |
string |
Yes |
The API key for your organisation. |
model |
object |
Yes |
The object detailing the specified values. See Model Object Properties. |
Model Object Properties
Name |
Type |
Required |
Description |
uniqueKey |
string |
Yes |
The unique key of a record. |
layerKey |
string |
Yes |
The API key matching the Layer in which the record is stored. |
dataFields |
object array |
Yes |
See DataField Object Properties. |
DataField Object Properties
Name |
Type |
Required |
Description |
key |
string |
Yes |
The API key matching the DataField in which to store the value. |
value |
string |
Yes |
The value to store in the DataField. Maximum value length of 100 characters. If the DataField is of Text type, values longer than 100 characters will be truncated. If the DataField is of Number type, the minimum value is -9,999,999,999,999.999999 and the maximum value is 9,999,999,999,999.999999. Values less or greater than this will result in an error. If the DataField is of YesNo type, acceptable values are:
Other values will result in a "No" value being stored. If the DataField is of Date type, values should be passed using the YYYY-MM-DD format. |
Success response
Code |
Description |
200 |
The request was carried out successfully. |
Error responses
The following responses may be returned in addition to the standard ones specified under Common Information.
Code |
Notes |
Error Message |
200 |
The request for the following DataField Key(s) could not be met: { key }, { key }, { key } |
Indicates partial success. The request was carried out successfully for all Keys provided with the exception of the Keys returned in the error message. For any keys returned, either:
|
Note: You may receive more than one of the above response messages indicating partial success. | ||
400 |
No DataFields were provided. |
The dataFields parameter was null or empty. |
DataField Keys are not unique. |
There were duplicate DataField keys passed in the dataFields parameter array. |
|
The number value entered was out of range. Number values must be between -9,999,999,999,999.999999 and 9,999,999,999,999.999999. |
The key parameter of a DataField object specifies a DataField of Number type. The value parameter value specified a number outside of the range this DataField type allows. |
Example call
URL: https://api.vision-mapping.com/data/v2/updateData?apiKey=INSERT_YOUR_KEY_HERE
Body:
{"uniqueKey":"abc","layerKey":"abc","dataFields":[{"key":"abc","value":"abc"}]}
Comments
0 comments
Article is closed for comments.