[Integrations] Update an Object
Request
HTTP URL :
https://<your-instance>.yooi.io/api/store/object/id/{object id}HTTP method:
PATCHHTTP body : a JSON document with object properties as keys and corresponding values
Response
{
 "eventId":{EVENT ID}, // unique event identifier for the update
 "objectId":{UPDATED OBJECT ID}, // id of the updated object
 "key":{UPDATED OBJECT ID}
}
Example
Update a country: France population
We want to update the field population of the country france.
The object id is the previously retrieved created France id
The JSON document contains:
Country population field: 6500000
curl -X 'PATCH' \
 'https://<your-instance>.yooi.io/api/store/object/id/936793b5-ca4a-481d-8dcd-756221937e95' \
 -H 'Authorization: Bearer yt_secret_ptAXBTZ38DzVeAR5rrl1y0S5AAUWbl0c' \
 -H 'Content-Type: application/json' \
 -d '{"ae94d0af-526c-458f-b522-7d5653bc492d": 65000000}'
The result of the API call contains the event ID. Object ID and key are the same than in the request.
{
  "eventId": "1632753285439-0",
  "objectId": "936793b5-ca4a-481d-8dcd-756221937e95",
  "key": "936793b5-ca4a-481d-8dcd-756221937e95"
}