> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Update related data records
> Updates all or specific records for a key in a related data set. For the requests without filter, the behavior is the same as in file import ("delete all + add").
There is no possibility to update the unique RD column. The unique column is treated as a part of the key that's why to change such entities it needs to be deleted and created as the new row.
Request body example:
{
"datasetName": "products",
"key": "testuser@domain.com",
"data": [
{
"name": "quantity",
"value": "14"
}
]
,
"filter": [{
"name": "bicycle",
"value": "1"
}]
}
## OpenAPI
````json POST /relatedData/updateRecords
{
"openapi": "3.0.4",
"info": {
"title": "Engage public API",
"version": "1"
},
"servers": [
{
"url": "https://your-engage-domain.com/api/rest"
}
],
"tags": [
{
"name": "Address Attributes"
},
{
"name": "Async"
},
{
"name": "Audit Log"
},
{
"name": "Automation"
},
{
"name": "Blacklist"
},
{
"name": "CMS"
},
{
"name": "Contact"
},
{
"name": "Content"
},
{
"name": "Coupon"
},
{
"name": "Draft Message"
},
{
"name": "Ecommerce"
},
{
"name": "Group"
},
{
"name": "Group Attributes"
},
{
"name": "Landing Page"
},
{
"name": "Member Attributes"
},
{
"name": "Membership"
},
{
"name": "Message"
},
{
"name": "Meta"
},
{
"name": "Mobile Push"
},
{
"name": "Prepared Message"
},
{
"name": "Process"
},
{
"name": "Profile Attributes"
},
{
"name": "Related Data"
},
{
"name": "Segmentation"
},
{
"name": "System"
},
{
"name": "System User"
},
{
"name": "Usage Statistics"
},
{
"name": "User"
},
{
"name": "Whiteboard"
}
],
"paths": {
"/relatedData/updateRecords": {
"post": {
"tags": [
"Related Data"
],
"summary": "Update related data records",
"description": "Updates all or specific records for a key in a related data set. For the requests without filter, the behavior is the same as in file import (\"delete all + add\").{
\"datasetName\": \"products\",
\"key\": \"testuser@domain.com\",
\"data\": [
{
\"name\": \"quantity\",
\"value\": \"14\"
}
]
,
\"filter\": [{
\"name\": \"bicycle\",
\"value\": \"1\"
}]
}",
"operationId": "updateRecords",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RelatedDataRecordAndFilter"
}
}
},
"x-bodyName": "body"
},
"responses": {
"200": {
"description": "Successful response - number of deleted previous occurrences for the specified key. One record was added",
"content": {
"application/octet-stream": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "",
"content": {
"application/octet-stream": {}
}
}
}
}
}
},
"components": {
"schemas": {
"RelatedDataRecordAndFilter": {
"type": "object",
"properties": {
"datasetName": {
"type": "string"
},
"key": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attribute"
}
},
"filter": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"Attribute": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}
````