API v1 Reference

Create Event Registration

The Create Event Registration request creates a new event registration record, attendee records, and a payment record. The payment record is attached to the event registration record. The event registration record is attached to an account. To create a payment, you’ll need to know the tender type. The individual or organization account must have been created before an event registration record can be created.

Limitations

  • Sessions are not supported. You cannot register for sessions through the API.
  • Registrations created through the API cannot automatically create NeonCRM accounts for attendees. However, you can use existing accounts for attendees by supplying their Account ID. Using the Create Account methods you can, in effect, produce the same result.
  • Any discounts that have been previously configured in NeonCRM that apply to your event will be applied to the registration after it is submitted through the API. You may use the Calculate Event Registration API method to ensure the registration amount is correct prior to submitting this API request.

REST

Request

https://api.neoncrm.com/neonws/services/api/event/createEventRegistration

Response


    {
        "createEventRegistration":
        {
            "operationResult": "SUCCESS",
            "responseMessage": "Event Registration created.",
            "responseDateTime": "2016-06-28T20:45:16.018+0000",
            "registrationId": 52937,
            "transaction":
            {
                "transactionId": 72223,
                "transactionStatus": "SUCCEED",
                "payments":
                {
                    "payment":
                    [
                        {
                            "paymentId": 56415,
                            "amount": 50,
                            "paymentStatus": "SUCCEED",
                            "tenderType":
                            {
                                "id": "4",
                                "name": "Credit Card (Online)"
                            },
                            "creditCardOnlinePayment":
                            {
                                "cardNumber": "***********1111",
                                "expirationMonth": 1,
                                "expirationYear": 20,
                                "cardType":
                                {
                                    "code": "v",
                                    "name": ""
                                },
                                "cardHolder": "Example Person"
                            }
                        }
                    ]
                }
            }
        }
    }

Request Parameters

Name Required Description
eventRegistration.registrantAccountId Yes Account ID of constituent who will be the event registrant
eventRegistration.eventId Yes ID of the event being registered
eventRegistration.registrationDateTime Yes Registration date. Format: YYYY-MM-dd hh:mm:ss
eventRegistration.registrationAmount Yes Total payment amount for the registration. You can determine the correct amount for this parameter by using Calculate Event Registration or by providing your own amount.
eventRegistration.couponCode A coupon code to be applied to this registration.
eventRegistration.taxDeductableAmount The amount of the registration that should be considered tax-deductable.
sendAcknowledgeEmail Determines whether the donation will trigger the default system email. Value must be TRUE or FALSE. FALSE is the default value if the parameter is not provided.
eventRegistration.source.id Possible values can be retrieved from List Sources method. Required if source.name is not provided.
eventRegistration.source.name Possible values can be retrieved from List Sources method. Required if source.id is not provided.
eventRegistration.ignoreCapacity Possible values: TRUE, FALSE. If true, registrations will be added to the event regardless of the event’s capacity. If FALSE, the request will return an error if the event is at capacity or if this registration causes the event to exceed capacity.
Event Registrant Custom Fields
eventRegistration.customFieldDataList.customFieldData.fieldId Event Registrant custom fields can be retrieved from the List Custom Fields method with the parameter of “Event”.
eventRegistration.customFieldDataList.customFieldData.fieldValue Event Registrant custom fields can be retrieved from the List Custom Fields method with the parameter of “Event”.
eventRegistration.customFieldDataList.customFieldData.fieldOptionId Event Registrant custom fields can be retrieved from the List Custom Fields method with the parameter of “Event”.
Event Tickets and Attendees
  • Events Using Tickets: For each ticket, provide the ticketId and eventAttendees JSON array. 
  • Free or Single Admission Events: Omit the ticketId parameter, provide a single eventAttendees JSON array
eventRegistration.tickets.ticket.ticketId Yes * This parameter is required for events which use tickets. Ticket IDs can be retrieved using the List Tickets API method.
eventRegistration.tickets.ticket.eventAttendees Yes Provide a JSON array of attendee objects as a string. All attendees associated with this ticket should be included. For each attendee, you must specify either an Account ID or a First and Last Name.
Example Attendees JSON object strings:
This example shows all possible fields that can be sent for an attendee.


[  
   {  
      "accountId": "",
      "firstName":"John",
      "lastName":"Doe",
      "addressLine1":"1234 Street Ave.",
      "addressLine2":"Unit 3",
      "addressLine3":"",
      "addressLine4":"",
      "addressType":"",
      "dob":"2000-01-30",
      "city":"Chicago",
      "company":"Z2 Systems, Inc.",
      "countryId":"1",
      "county":"Cook",
      "department":"Complaints",
      "email":"test@test.not",
      "fax":"555-123-1234",
      "gender":"M",
      "middleName":"",
      "phone":"555-321-1234",
      "phone2":"555-321-1234",
      "phone3":"555-321-1234",
      "prefix":"Dr.",
      "province":"",
      "salutation":"",
      "state":"IL",
      "suffix":"Jr.",
      "title":"Associate",
      "website":"www.neoncrm.com",
      "zipCode":"60613",
      "customFields":[  
         {  
            "fieldId":13,
            "fieldValue":"Blue",
            "fieldOptionId":""
         },
         {  
            "fieldId":29,
            "fieldValue":"",
            "fieldOptionId":128
         }
      ]
   }
]				
				

This example shows the format for attaching multiple attendees to a single ticket.


[  
   {  
      "firstName":"John",
      "lastName":"Doe",
      "customFields":[  
         {  
            "fieldId":13,
            "fieldValue":"Red",
            "fieldOptionId":""
         },
         {  
            "fieldId":29,
            "fieldValue":"",
            "fieldOptionId":62
         }
      ]
   },
   {  
      "firstName":"Jane",
      "lastName":"Doe",
      "customFields":[  
         {  
            "fieldId":13,
            "fieldValue":"Red",
            "fieldOptionId":""
         },
         {  
            "fieldId":29,
            "fieldValue":"",
            "fieldOptionId":62
         }
      ]
   }
]
  

This example shows how to use existing NeonCRM accounts as attendees.


[  
   {  
      "accountId":12345
   },
   {  
      "accountId":12346
   }
]
  
Payments
Payment.amount Yes Total payment amount for the registration. You can determine the correct amount for this parameter by using Calculate Event Registration or by providing your own amount.
Payment.tenderType.id Yes * Possible values can be retrieved from List Tenders method. Required if tenderType.name is not provided.
Payment.tenderType.name Yes * Possible values can be retrieved from List Tenders method. Required if tenderType.id is not provided.
Payment.note
Credit Card Online Payment
The following fields are applicable if tenderType = 4 (credit card online). NeonPay is currently not supported for credit card online payments.
Payment.creditCardOnlinePayment.cardNumber Yes * Required for third-party gateways. See Payments for further documentation.
Payment.creditCardOnlinePayment.token Yes * Required if using NeonPay or Neon Payment Processing. See Payments for further documentation.
Payment.creditCardOnlinePayment.expirationMonth Yes
Payment.creditCardOnlinePayment.expirationYear Yes
Payment.creditCardOnlinePayment.cardType.id Yes * Possible values can be retrieved from List Credit Card Types method. Required when cardType.name is not provided.
Payment.creditCardOnlinePayment.cardType.name Yes * Possible values: American Express, Discover, MasterCard, Visa. Can be retrieved from List Credit Card Types method. Required when cardType.id is not provided.
Payment.creditCardOnlinePayment.CVV2 Yes
Payment.creditCardOnlinePayment.cardHolder Yes Name of credit card holder, as shown on the card.
Payment.creditCardOnlinePayment.cardHolderEmail Yes * Required if using Neon Payment Processing.
Payment.creditCardOnlinePayment.billingAddressLine1
Payment.creditCardOnlinePayment.billingAddressLine2
Payment.creditCardOnlinePayment.city
Payment.creditCardOnlinePayment.state.code Possible values can be retrieved from the List States method. Required when state.name is not provided.
Payment.creditCardOnlinePayment.state.name Possible values can be retrieved from the List States method. Required when state.code is not provided.
Payment.creditCardOnlinePayment.province
Payment.creditCardOnlinePayment.country.id Possible values can be retrieved from the List Countries method. Required when country.name is not provided.
Payment.creditCardOnlinePayment.country.name Possible values can be retrieved from the List Countries method. Required when country.id is not provided.
Payment.creditCardOnlinePayment.zipCode
Payment.creditCardOnlinePayment.zipCodeSuffix
Credit Card Offline Payment
The following fields are applicable if tenderType = 2 (credit card offline, on-site credit card machine)
Payment.creditCardOfflinePayment.cardNumber
Payment.creditCardOfflinePayment.expirationMonth
Payment.creditCardOfflinePayment.expirationYear
Payment.creditCardOfflinePayment.cardType.id Possible values can be retrieved from List Credit Card Types method. Required when cardType.name is not provided.
Payment.creditCardOfflinePayment.cardType.name Possible values can be retrieved from List Credit Card Types method. Required when cardType.id is not provided.
Payment.creditCardOfflinePayment.CVV2
Payment.creditCardOfflinePayment.cardHolder
Payment.creditCardOfflinePayment.billingAddressLine1
Payment.creditCardOfflinePayment.billingAddressLine2
Payment.creditCardOfflinePayment.city
Payment.creditCardOfflinePayment.state.code Possible values can be retrieved from the List States method. Required when state.name is not provided.
Payment.creditCardOfflinePayment.state.name Possible values can be retrieved from the List States method. Required when state.code is not provided.
Payment.creditCardOfflinePayment.province
Payment.creditCardOfflinePayment.country.id Possible values can be retrieved from the List Countries method. Required when country.name is not provided.
Payment.creditCardOfflinePayment.country.name Possible values can be retrieved from the List Countries method. Required when country.id is not provided.
Payment.creditCardOfflinePayment.zipCode
Payment.creditCardOfflinePayment.zipCodeSuffix
eCheck / ACH Payment
The following fields are applicable if tenderType = 12 (E-Check/ACH)
Payment.echeckPayment.institution
Payment.echeckPayment.routingNumber Yes
Payment.echeckPayment.accountNumber Yes
Payment.echeckPayment.accountOwner
Payment.echeckPayment.CheckNumber
Payment.echeckPayment.accountType Possible values: Checking, Saving
Check Payment
The following fields are applicable if tenderType = 3 (Check)
Payment.checkPayment.institution
Payment.checkPayment.routingNumber
Payment.checkPayment.accountNumber
Payment.checkPayment.accountOwner
Payment.checkPayment.CheckNumber
Payment.checkPayment.accountType Possible values: Checking, Saving

Response Parameters

Name Required Description
registrationId Yes The ID of the event registration transaction (not the account).
transaction.transactionId Yes Transaction ID
transaction.transactionStatus Yes Possible values: Pending, Processing, Succeed, Declined, Error, Scheduled, Cancelled, Deferred
transaction.payments.payment Yes Transaction details of the payment

Error Codes

Code Text Description
50 CustomField id is required.
51 CustomField id is invalid.
52 CustomField option value is required.
53 CustomField option id is required.
54 CustomField option id is invalid.
55 CustomField option id is duplicated.
56 CustomField id is duplicated.
101 Payment amount is required.
102 Tender type id or name is required.
103 Tender type id or name is invalid.
104 Echeck routing number is required.
105 Echeck account number is required.
106 Echeck account owner is required.
107 Credit card number is required.
108 Credit card expiration date is required.
109 Credit card CVV2 is required.
110 Credit card type is invalid.
111 Billing Address state id or name is invalid.
112 Billing Address country id or name is invalid.
150 Unable to process payment.
151 Payment id is invalid.
152 Payment id is required.
153 Succeed credit card online or e-check payment cannot be reprocessed.
10014 Source id or name is invalid.
10130 Address Type is invalid.
10133 Address country is invalid
10134 Address state is invalid
11003 Amount is required
14003 Event registrant account id is required.
14004 Event registration amount is required.
14005 Event registration source is invalid.
14006 Event registration attendee is required.
14007 Event registration attendee is invalid.
14008 Event registration attendee’s account id is invalid.
14009 Event registration attendee’s country id is invalid.
14010 Event registration attendee’s state code is invalid.
14011 This event allows exactly one attendee per ticket.
14012 Event Ticket (id: ID#) has (#) left.
Event has (#) left.
Event Ticket (id: ID#) may have up to (#) attendee(s).
Event Ticket (id: ID#) must has (#) attendee(s).
14013 Event ticket id is invalid.
14014 Event coupon code is invalid.
14015 Event registration date is invalid.
14016 Event registration attendee JSON string is invalid.

Calculate Event Registration

Use this API method to determine the correct total amount for this registration. This method will take into account the number of attendees, the tickets chosen, as well as any coupon codes and discounts that have previously been configured from within NeonCRM.

The request parameters for this method are identical to those of Create Event Registration.

Request

https://api.neoncrm.com/neonws/services/api/event/calculateEventRegistration

Response


{
    "calculateEventRegistration": {
        "operationResult": "SUCCESS",
        "responseMessage": "Event registration calculated.",
        "responseDateTime": "2017-08-28T17:08:24.310+0000",
        "totalCharge": 2
    }
}