Send the request
HTTP URL : https://<your-instance>.yooi.io/api/store/object/id/{object id}
HTTP method: PATCH
HTTP body : a JSON document with object properties as keys and corresponding values
Read the response
{
"eventId": {EVENT ID}, // unique event identifier for the update
"objectId": {UPDATED OBJECT ID}, // id of the updated object
"key": {UPDATED OBJECT ID}
}Update a country's population
We want to update the population field of the country France.
- The object id is the previously retrieved created France id. See Create an Object.
- The JSON document contains:
- Country population field: 65000000
- Send the request.
curl -X 'PATCH' \ 'https://<your-instance>.yooi.io/api/store/object/id/936793b5-ca4a-481d-8dcd-756221937e95' \ -H 'Authorization: Bearer {integrationToken}' \ -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 as in the request.
{ "eventId": "1632753285439-0", "objectId": "936793b5-ca4a-481d-8dcd-756221937e95", "key": "936793b5-ca4a-481d-8dcd-756221937e95" }