Update an existing n-n association by linking two instances.
The association definition must already exist. The IDs must be provided in the same order as the association roles.
For example, for an association defined from Use Case to Country:
-
Fixed association marker ID
-
Association definition ID for Use Case → Country (contact Support to obtain it, this is not the field ID).
-
Use Case instance ID
-
Country instance ID
HTTP URL
https://<your-instance>.yooi.io/api/store/events?wait=true
HTTP method
POST
Parameters (body)
[
{
"id": [
"605d3e73-85b7-5f92-a45a-490eb7920383",
"{associationDefinitionId}",
"{sourceInstanceId}",
"{targetInstanceId}"
],
"properties": {}
}
]
-
605d3e73-85b7-5f92-a45a-490eb7920383: fixed ID identifying an association n-n update event -
associationDefinitionId: ID of the existing n-n association definition -
sourceInstanceId: ID of the instance corresponding to the first association role -
targetInstanceId: ID of the instance corresponding to the second association role
The order is important. For a Use Case → Country association, the Use Case instance ID must be placed before the Country instance ID.
Header
Content-Type: application/json
Authorization: Bearer #yourtoken#
Example
curl -X 'POST' \
'https://<your-instance>.yooi.io/api/store/events?wait=true' \
-H 'Authorization: Bearer #yourtoken#' \
-H 'Content-Type: application/json' \
-d '[
{
"id": [
"605d3e73-85b7-5f92-a45a-490eb7920383",
"1a795bb9-7bb1-4592-a06e-48ae1e486b65",
"143b0d38-710b-419b-bbba-b86f123e64c2",
"5a57d323-3007-446a-aa78-1e073f2c7ad2"
],
"properties": {}
}
]'
Response
{
"eventId": "1784819031926-0",
"status": "validated"
}