Skip to main content

Events

Events

This object represents events. Events are services honoring a deceased person.

Insert or update (upsert) an Event

Uniqueness is determined based on a combination of the location unique identifier and the external ID. If a record with the same location unique identifier and external unique identifier already exists, the existing record will be updated. Otherwise, a new record will be created.

New data is merged with existing data. See clarification below for details.

Parameters

location_unique_identifier
Requiredstring

The unique identifier of the location. See Locations for more information.

external_identifier
Requiredstring

The external identifier of this event, to enforce uniqueness. This is the identifier of the event in your system.

event_name
Requiredstring

The name of the event.

event_datetime
RequiredISO_8601_datetime_string

The date and time of the event, formatted as an ISO 8601 datetime string (e.g. 2017-01-01T12:00:00Z).

person
(optional)object

Details about the person who passed.

full_name
Requiredstring

The full name of the deceased person.

date_of_birth
(optional)ISO_8601_date_string

The date of birth of the deceased person (formatted as an ISO 8601 date string, e.g., YYYY-MM-DD).

date_of_death
(optional)ISO_8601_date_string

The date of death of the deceased person (formatted as an ISO 8601 date string, e.g., YYYY-MM-DD).

additional_event_metadata
(optional)object

Additional metadata about the event. This can include any additional information you would like to store about the event. This object should not exceed 10KB in size.

Returns

A dictionary representing the created or updated event object.

POST
/v1/events/upsert
curl -X POST https://api.mogulbridge.com/v1/events/upsert \
-u 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: \
-H "Content-Type: application/json" \
-d '{
  "location_unique_identifier": "loc_3Sq9r1G3qjERHSxu9NKAk",
  "external_identifier": "your-external-identifier",
  "event_name": "Service for John Doe",
  "event_datetime": "2017-01-01T12:00:00Z",
  "person": {
    "full_name": "John Doe",
    "date_of_birth": "1950-05-20",
    "date_of_death": "2023-11-10"
  },
  "additional_event_metadata": {
    "number_of_guests": 50,
    "number_of_photos": 120,
    "venue": "Downtown Community Center",
    "caterer": "Gourmet Catering Co.",
    "special_requests": ["Vegetarian menu", "Live streaming"]
  }
}'
RESPONSE
{
  "object": "event",
  "inserted_at": "2024-05-24T15:18:39Z",
  "updated_at": "2024-05-24T17:06:23Z",
  "unique_identifier": "evt_4haZF1buBfJx9LT1dpqfF",
  "external_identifier": "your-external-identifier",
  "event_name": "Service for John Doe",
  "event_datetime": "2017-01-01T12:00:00Z",
  "location_unique_identifier": "loc_XFRitug2hXD3ESq6NXRfo",
  "public_data": {
    "person": {
      "full_name": "John Doe",
      "date_of_birth": "1950-05-20",
      "date_of_death": "2023-11-10"
    },
    "additional_event_metadata": {
      "number_of_guests": 50,
      "number_of_photos": 120,
      "venue": "Downtown Community Center",
      "caterer": "Gourmet Catering Co.",
      "special_requests": [
        "Vegetarian menu",
        "Live streaming"
      ]
    }
  }
}