HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

Create Event RegistrationOptions with the API

I'm looking to add a Registration option and pricing through the API. The way I go about it currently is to clone an event that has RegistrationOptions/Functions and then update the pricing using the /api/ItemPrice endpoint.

Below is an example I use to add function code "REG" to the EXAMPEVENT code.

PUT /api/Event/EXAMPEVENT

{
    "$type": "Asi.Soa.Events.DataContracts.EventData, Asi.Contracts",
    "Location": {
        "$type": "Asi.Soa.Membership.DataContracts.LocationPartyAddressData, Asi.Contracts",
        "Name": ""
    },
    "Capacity": 0,
    "AddGuests": true,
    "RegisterOthers": true,
    "AdditionalDescription": "",
    "Functions": {
        "$type": "Asi.Soa.Events.DataContracts.EventFunctionDataCollection, Asi.Contracts",
        "$values": []
    },
    "RegistrationOptions": {
        "$type": "Asi.Soa.Events.DataContracts.OptionEventFunctionDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Events.DataContracts.OptionEventFunctionData, Asi.Contracts",
                "RelatedFunctions": {
                    "$type": "Asi.Soa.Events.DataContracts.EventRelatedFunctionDataCollection, Asi.Contracts",
                    "$values": []
                },
                "AvailableTo": 3,
                "EventFunctionId": "EXAMPEVENT/REG",
                "EventFunctionCode": "REG",
                "Name": "Registration",
                "Description": "",
                "IsEventRegistrationOption": true,
                "RegistrationType": 3,
                "Category": {
                    "$type": "Asi.Soa.Events.DataContracts.EventFunctionCategoryData, Asi.Contracts",
                    "EventFunctionCategoryId": "REG",
                    "Name": "REG"
                },
                "Status": "",
                "SortOrder": 0,
                "Location": {
                    "$type": "Asi.Soa.Membership.DataContracts.LocationPartyAddressData, Asi.Contracts",
                    "Name": ""
                },
                "Capacity": 300,
                "MaximumQuantityPerRegistrant": 1,
                "Item": {
                    "$type": "Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts",
                    "Description": "",
                    "ItemClass": {
                        "$type": "Asi.Soa.Commerce.DataContracts.ItemClassSummaryData, Asi.Contracts",
                        "ItemClassId": "MEETING",
                        "Name": "Event Function"
                    },
                    "ItemCode": "EXAMPEVENT/REG",
                    "ItemId": "EXAMPEVENT/REG",
                    "Name": "Registration"
                },
                "ProgramGroups": {
                    "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollectionCollection, Asi.Contracts",
                    "$values": [
                        {
                            "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                            "$values": [
                                {
                                    "$type": "Asi.Soa.Events.DataContracts.ProgramGroupData, Asi.Contracts",
                                    "ProgramGroupId": "Date Not Specified",
                                    "Name": "Date Not Specified",
                                    "Sort": "9999-01-01"
                                }
                            ]
                        },
                        {
                            "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                            "$values": []
                        },
                        {
                            "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                            "$values": []
                        }
                    ]
                },
                "ConflictCodes": {
                    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
                    "$values": []
                },
                "EventFormSectionId": "",
                "FinancialEntityId": "",
                "ContinuingEducationCreditInformation": {
                    "$type": "Asi.Soa.Events.DataContracts.ContinuingEducationCreditInformationDataCollection, Asi.Contracts",
                    "$values": [
                        {
                            "$type": "Asi.Soa.Events.DataContracts.ContinuingEducationCreditInformationData, Asi.Contracts",
                            "CreditType": ""
                        }
                    ]
                }
            }
        ]
    },
    "RegistrationClosedMessage": "Registration is closed.",
    "ProgramGroupInfo": {
        "$type": "Asi.Soa.Events.DataContracts.ProgramGroupInfoDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Events.DataContracts.ProgramGroupInfoData, Asi.Contracts",
                "ProgramGroupInfoId": "Day",
                "Name": "Day",
                "ProgramGroups": {
                    "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                    "$values": []
                }
            },
            {
                "$type": "Asi.Soa.Events.DataContracts.ProgramGroupInfoData, Asi.Contracts",
                "ProgramGroupInfoId": "Category",
                "Name": "Category",
                "AllowFreeFormValues": true,
                "ProgramGroups": {
                    "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                    "$values": []
                }
            },
            {
                "$type": "Asi.Soa.Events.DataContracts.ProgramGroupInfoData, Asi.Contracts",
                "ProgramGroupInfoId": "Track",
                "Name": "Track",
                "AllowFreeFormValues": true,
                "ProgramGroups": {
                    "$type": "Asi.Soa.Events.DataContracts.ProgramGroupDataCollection, Asi.Contracts",
                    "$values": []
                }
            }
        ]
    },
    "EventFormId": "",
    "EventFormSectionId": "",
    "PublishingInformation": {
        "$type": "Asi.Soa.Core.DataContracts.PublishingInformationData, Asi.Contracts",
        "StartDate": null,
        "ExpirationDate": "2023-11-13T23:59:00",
        "Keywords": {
            "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
            "$values": []
        },
        "PublishingState": 0
    },
    "FinancialEntityId": "GEN",
    "NotificationPartyId": "",
    "EventId": "EXAMPEVENT",
    "EventCode": "EXAMPEVENT",
    "Name": "Example Event",
    "Description": "This survey course presents the methods and techniques that organizations in our industry use to efficiently and successfully manage processes. Join us as we compare and contrast practices and discuss appropriate circumstances for which to apply each practice.",
    "RegistrationType": 3,
    "Category": {
        "$type": "Asi.Soa.Events.DataContracts.EventCategoryData, Asi.Contracts",
        "EventCategoryId": "CH"
    },
    "ParentIdentity": {
        "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
        "EntityTypeName": "Public",
        "IdentityElements": {
            "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
            "$values": [
                "Public Groups"
            ]
        }
    },
    "Status": "A",
    "DisplayLayouts": {
        "$type": "Asi.Soa.Core.DataContracts.DisplayLayoutDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Core.DataContracts.DisplayLayoutData, Asi.Contracts",
                "LayoutDirectory": "~/EventDetail"
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.DisplayLayoutData, Asi.Contracts",
                "LayoutType": 1,
                "LayoutDocument": {
                    "$type": "Asi.Soa.Core.DataContracts.DocumentSummaryData, Asi.Contracts",
                    "DocumentId": "debfa74b-e29a-496d-ac46-1b033417481a"
                }
            }
        ]
    },
    "StartDateTime": "2023-10-22T00:00:00",
    "EndDateTime": "2023-10-22T00:00:00",
    "AdditionalAttributes": {
        "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "fullAddressAttribute",
                "Value": {
                    "$type": "Asi.Soa.Membership.DataContracts.FullAddressData, Asi.Contracts",
                    "Address": {
                        "$type": "Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts",
                        "AddressLines": {
                            "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
                            "$values": [
                                "",
                                "",
                                ""
                            ]
                        },
                        "CityName": "",
                        "CountryCode": "",
                        "CountrySubEntityCode": "",
                        "FullAddress": "",
                        "PostalCode": ""
                    },
                    "CommunicationPreferences": {
                        "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceDataCollection, Asi.Contracts",
                        "$values": [
                            {
                                "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                                "Reason": "mail"
                            },
                            {
                                "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                                "Reason": "bill"
                            },
                            {
                                "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                                "Reason": "ship"
                            }
                        ]
                    },
                    "DisplayName": ""
                }
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "WebEnabled",
                "Value": {
                    "$type": "System.Boolean",
                    "$value": true
                }
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "ViewOnly",
                "Value": {
                    "$type": "System.Boolean",
                    "$value": false
                }
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro1",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro2",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro3",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro4",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro5",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro6",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro7",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro8",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro9",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "MUFPro10",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "TAX_AUTHORITY",
                "Value": ""
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "TAX_BY_ADDRESS",
                "Value": {
                    "$type": "System.Boolean",
                    "$value": false
                }
            },
            {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "VAT_RULE",
                "Value": ""
            }
        ]
    }
}

In the API result it does show with a successful 200, but if I run a GET call or try to load it up in iMIS it doesn't show. Could there be a missing value?

And if there is an option to add pricing groups to the event registration items I would love to see an example of that as well.