Create an event

post

/api/rest/2.0/assets/eventRegistration

Creates an event that matches the criteria specified by the request body.

Request

Supported Media Types
Body ()
The request body defines the details of the event to be created.
Root Schema : EventRegistration
Type: object
Title: EventRegistration
Show Source
Nested Schema : fields
Type: array
Array consisting of event field properties.
Show Source
Nested Schema : permissions
Type: array
This property is not used for events.
Show Source
Nested Schema : sessionFields
Type: array
Array consisting of session fields within a session.
Show Source
Nested Schema : sessionFieldValues
Type: array
Array consisting of session fields values for a session. You must create session fields and session before creating the session field values.
Show Source
Nested Schema : sessions
Type: array
Array consisting of event sessions.
Show Source
Nested Schema : CustomObjectField
Type: object
Title: CustomObjectField
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSessionField
Type: object
Title: EventSessionField
Show Source
Nested Schema : FieldOutputFormat
Type: object
Title: FieldOutputFormat
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSessionFieldValue
Type: object
Title: EventSessionFieldValue
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSession
Type: object
Title: EventSession
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Back to Top

Response

Supported Media Types

201 Response

Success.
Body ()
Root Schema : EventRegistration
Type: object
Title: EventRegistration
Show Source
Nested Schema : fields
Type: array
Array consisting of event field properties.
Show Source
Nested Schema : permissions
Type: array
This property is not used for events.
Show Source
Nested Schema : sessionFields
Type: array
Array consisting of session fields within a session.
Show Source
Nested Schema : sessionFieldValues
Type: array
Array consisting of session fields values for a session. You must create session fields and session before creating the session field values.
Show Source
Nested Schema : sessions
Type: array
Array consisting of event sessions.
Show Source
Nested Schema : CustomObjectField
Type: object
Title: CustomObjectField
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSessionField
Type: object
Title: EventSessionField
Show Source
Nested Schema : FieldOutputFormat
Type: object
Title: FieldOutputFormat
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSessionFieldValue
Type: object
Title: EventSessionFieldValue
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source
Nested Schema : EventSession
Type: object
Title: EventSession
Show Source
Nested Schema : permissions
Type: array
This property is not used.
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Note the following:

  • When using negative numbers, -1 cannot be used.
  • You must create session fields and session before creating the session field values. See Update a form for example.
  • When setting FieldOutputFormat, only the display format's id is required. See a list of default display formats here. If using custom display formats, these should be set in Eloqua.

Create an event:


POST /api/REST/2.0/assets/eventRegistration
Content-Type: application/json
			

Request body:


{
  "name": "Modern Marketing Experience",
  "description": "Modern Marketing Experience brings together Modern Marketers from around the globe",
  "emailAddressFieldId": "-2",
  "fields": [
    {
      "type": "CustomObjectField",
      "id": "-2",
      "name": "Email",
      "dataType": "text",
      "displayType": "text"
    },
    {
      "type": "CustomObjectField",
      "name": "First Name",
      "dataType": "text",
      "displayType": "text"
    },
    {
      "type": "CustomObjectField",
      "name": "Industry",
      "dataType": "text",
      "displayType": "singleSelect",
      "optionListId": "9"
    },
    {
      "type": "CustomObjectField",
      "name": "Markie Submitted",
      "checkedValue": "Yes",
      "dataType": "text",
      "defaultValue": "No",
      "displayType": "checkbox",
      "uncheckedValue": "No"
    },
    {
      "type": "CustomObjectField",
      "name": "Birthday",
      "dataType": "date",
      "displayType": "text"
    },
    {
      "type": "CustomObjectField",
      "name": "Years Using Eloqua",
      "dataType": "number",
      "displayType": "text"
    },
    {
      "type": "CustomObjectField",
      "name": "MME Location",
      "dataType": "text",
      "defaultValue": "North America",
      "displayType": "singleSelect",
      "optionListId": "108"
    }
  ],
  "sessionFields": [
    {
      "type": "EventSessionField",
      "name": "Date",
      "dataType": "date",
      "outputFormat": {
        "type": "FieldOutputFormat",
        "id": "19"
      }
    },
    {
      "type": "EventSessionField",
      "name": "Location",
      "dataType": "text"
    }
  ],
  "sessions": [
    {
      "type": "EventSession",
      "name": "North America"
    },
    {
      "type": "EventSession",
      "name": "Europe"
    }
  ],
  "uniqueCodeFieldId": "-2"
}
			

Response:


{
  "type": "EventRegistration",
  "id": "1260",
  "createdAt": "1493156690",
  "createdBy": "71",
  "depth": "complete",
  "description": "Modern Marketing Experience brings together Modern Marketers from around the globe",
  "folderId": "81",
  "name": "Modern Marketing Experience",
  "updatedAt": "1493156690",
  "updatedBy": "71",
  "emailAddressFieldId": "3958",
  "fields": [
    {
      "type": "CustomObjectField",
      "id": "3958",
      "initialId": "-2",
      "depth": "complete",
      "name": "Email",
      "dataType": "text",
      "displayType": "text",
      "internalName": "Email1"
    },
    {
      "type": "CustomObjectField",
      "id": "3959",
      "depth": "complete",
      "name": "First Name",
      "dataType": "text",
      "displayType": "text",
      "internalName": "First_Name1"
    },
    {
      "type": "CustomObjectField",
      "id": "3960",
      "depth": "complete",
      "name": "Industry",
      "dataType": "text",
      "displayType": "singleSelect",
      "internalName": "Industry1",
      "optionListId": "9"
    },
    {
      "type": "CustomObjectField",
      "id": "3961",
      "depth": "complete",
      "name": "Markie Submitted",
      "checkedValue": "Yes",
      "dataType": "text",
      "defaultValue": "No",
      "displayType": "checkbox",
      "internalName": "Markie_Submitted1",
      "uncheckedValue": "No"
    },
    {
      "type": "CustomObjectField",
      "id": "3962",
      "depth": "complete",
      "name": "Birthday",
      "dataType": "date",
      "displayType": "text",
      "internalName": "Birthday1"
    },
    {
      "type": "CustomObjectField",
      "id": "3963",
      "depth": "complete",
      "name": "Years Using Eloqua",
      "dataType": "number",
      "displayType": "text",
      "internalName": "Years_Using_Eloqua1"
    },
    {
      "type": "CustomObjectField",
      "id": "3964",
      "depth": "complete",
      "name": "MME Location",
      "dataType": "text",
      "defaultValue": "North America",
      "displayType": "singleSelect",
      "internalName": "MME_Location1",
      "optionListId": "108"
    }
  ],
  "sessionFields": [
    {
      "type": "EventSessionField",
      "id": "535",
      "name": "Date",
      "dataType": "date",
      "outputFormat": {
        "type": "FieldOutputFormat",
        "id": "19",
        "dataType": "date",
        "format": "dddd MMMM d, yyyy"
      }
    },
    {
      "type": "EventSessionField",
      "id": "536",
      "name": "Location",
      "dataType": "text"
    }
  ],
  "sessions": [
    {
      "type": "EventSession",
      "id": "51",
      "name": "North America"
    },
    {
      "type": "EventSession",
      "id": "52",
      "name": "Europe"
    }
  ],
  "uniqueCodeFieldId": "3958"
}
			
Back to Top