Skip to main content
Skip table of contents

[Integrations] Update an Object

Request

  1. HTTP URL : https://<your-instance>.yooi.io/api/store/object/id/{object id}

  2. HTTP method: PATCH

  3. HTTP body : a JSON document with object properties as keys and corresponding values

Response

JSON
{
 "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. 

  1. The object id is the previously retrieved created France id

  2. The JSON document contains:

    • Country population field: 6500000

BASH
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.

JSON
{
  "eventId": "1632753285439-0",
  "objectId": "936793b5-ca4a-481d-8dcd-756221937e95",
  "key": "936793b5-ca4a-481d-8dcd-756221937e95"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.