I'm writing a script that will hit the Eloqua API to add a new sessions to an event as per the docs here. I'm using the endpoint /api/REST/2.0/assets/eventRegistration/{id}
from the docs and doing a put request that looks like this:
{
"type": "EventRegistration",
"id": "131",
"sessions": [
{
"type": "EventSession",
"id": "46",
"name": "TEST+PUT+SESSION"
}
]
}
But that request overwrites the event and deletes any other sessions that already exist. Is there a way to tell the api to just add a new session and not overwrite or do I need to do a get request first and then a put?
All existing sessions are required when adding new sessions, so you will need to retrieve all sessions to include existing sessions in the PUT.