Event/Training Calendar

api/Calendar

API Description
POST api/Calendar

This method will return all events available to display online.

Try Now:

Post Call Array Length: 4

This method returns an array of all events within client Rubi system which have a "Display On Web" property of "True".
The method requires an array of 3 values:
  • uid - if a user is logged in pass the uid value otherwise empty string
  • EventType - an Event Type value can be supplied to filter return results otherwise "All"
  • EventTimeFrame - should be either "Future" or "Past"
  • APIKey
This method will return an eid value which can be used in conjunction with other methods.
Please note: Date values will be returned as standard UK formatted dates e.g. dd/MM/yyyy
If you require an actual Date value please contact support@rubicrm.com

api/CalendarDetail

API Description
POST api/CalendarDetail

This method will return details about a specific event.

Try Now:

Post Call Array Length: 3

  • uid - if a user is logged in pass the uid value otherwise empty string
  • eid - retrieved from Calendar method
  • APIKey
This method returns details relating to a specific event including whether users should be able to book online, if this is a "Member Only" event and pricing.
Please note: Date values will be returned as standard UK formatted dates e.g. dd/MM/yyyy
If you require an actual Date value please contact support@rubicrm.com
When used in conjunction with a uid, number of places remaining for this users organisation will also be returned.

Directory

api/Directory

API Description
POST api/Directory

This method will return all records which can be displayed in a directory.

Try Now:

Post Call Array Length: 3

  • uid - if a user is logged in pass the uid value otherwise empty string
  • cid - can be used to return specific results otherwise empty string for all results
  • APIKey
Please note: Date values will be returned as standard UK formatted dates e.g. dd/MM/yyyy
If you require an actual Date value please contact support@rubicrm.com

Login / Password Reset

Login

API Description
POST api/Login

This method is used to login a user and validate their credentials.

Try Now:

Convert String to Base64 encrypted format:


Post Call Array Length: 3

  • emailaddress - value is required and cannot be an empty string
  • password - value is required and cannot be an empty string
  • APIKey

Password value supplied must be converted to Base64 with 4 random characters added to the right and 6 random characters to the left. This method will check to see if the supplied values match with the values stored within client Rubi system.Returned response will be a JSON array with the following values:

  • uid
  • EmailAddress
  • FirstName
  • LastName
  • KnownAs
  • Company - Company/Organisation name the user is associated with
  • WebAdmin - Indicates if the user has "admin" permissions
  • LoginVerified - Indicates if the user has successfully validated their email address
  • ConsentReceived - Indicates if the user has provided their consent under GDPR within last 365 days
  • UserStatus - Indicates the Membership/Customer status of the user
  • AllowLogin - Can be custom configured as required

If a user's "LoginVerified" value returns false, an automated validation email will be sent to the user with a validation link enabling them to validate their email address.

api/Validation

API Description
POST api/Validation

This method is used to validate a users email address.

Try Now:

Post Call Array Length: 3

  • val - should be obtained as a querystring value on your page and denotes the encrypted users email address. This value is required and cannot be an empty string
  • id - should be obtained as a querystring value on your page and denotes whether the link is still active. This value is required and cannot be an empty string
  • APIKey

api/LoginReset

API Description
POST api/LoginReset

This method is used to generate a password reset link for a user.

Try Now:

Post Call Array Length: 2

  • emailaddress - value is required and cannot be an empty string
  • APIKey

An automated email will be generated and sent to the user containing a link to your password reset page. Links will expire after 60 minutes.

An automated validation email may also be sent to the user with a validation link enabling them to validate their email address if they have not previously done so.

api/PasswordReset

API Description
POST api/PasswordReset

This method is used to reset a user password.

Try Now:

Post Call Array Length: 4

  • val - should be obtained as a querystring value on your page and denotes the encrypted users email address. This value is required and cannot be an empty string
  • id - should be obtained as a querystring value on your page and denotes whether the link is still active. This value is required and cannot be an empty string
  • newpassword - Password value supplied must be converted to Base64 with 4 random characters added to the right and 6 random characters to the left.
  • APIKey

Registration Process

api/EmailCheck

API Description
POST api/EmailCheck

This method is used to check if an email address is recognised/already associated with a contact record within the CRM.

Try Now:

Post Call Array Length: 2

  • emailaddress - value is required and cannot be an empty string
  • APIKey

If a single match to the supplied email address is found a stringified array of 5 values will be returned with the first value being the Users GUID, the second being the users first name, the third being the users last name, the fourth being which company the user is associated with and the last being a true/false value indicating if the email address has been verified. If 0 items are returned the email address is not recognised.

api/Registration

API Description
POST api/Registration

This method is used to supply all registration values to register a new user.

Try Now:

Post Call Array Length: 1


This method should be used in conjunction with other methods. Suggested flow for registrations:

  • Step 1 - Capture users email address and use Login method to check if the email address is already registered. If email is registered prompt user to reset password, otherwise, continue to step 2.

  • Step 2 - Capture users Company/Organisation Postcode and use the PortalList method to return matching records. User should then be able to choose an existing record to add themselves to or given an "My Organisation Is Not Listed" option.

  • Step 3 - Allow user to make a selection. If the user selects an existing record, maintain the selected "cid" value for use in the main Registration method, if user selects "My Organisation Is Not Listed" maintain an empty string as the "cid".

  • Step 4 - If the user selects an existing record, maintain all details about the Company/Organisation as the user is not required to enter this information again. Only values relating to the individual are required. NB: Users registering against an existing record should not be offered ability to activate a subscription.

  • Step 5 - If the user selects "My Organisation Is Not Listed" make a call to PortalList to return any available subscription packages. Maintain users selection.

  • Step 6 - Show the user any applicable terms & conditions as retrieved from PortalProperties and maintain the content.

  • Step 7 - Provide the following values:
    • cid
    • ssid
    • CompanyIndividual
    • Company
    • CompanyTel
    • CompanyEmail
    • CompanyWeb
    • Category
    • Employees
    • CompanyAddress1
    • CompanyAddress2
    • CompanyAddress3
    • CompanyAddress4
    • CompanyCounty
    • CompanyPostcode
    • CompanyCountry
    • ContactFirstName
    • ContactLastName
    • ContactEmail
    • ContactTel
    • ContactMob
    • ContactWhereHear
    • ContactAddress1
    • ContactAddress2
    • ContactAddress3
    • ContactAddress4
    • ContactCounty
    • ContactPostcode
    • ContactCountry
    • Consent

Booking Process

api/Booking

API Description
POST api/Booking

This method is used to create bookings for a user.

Try Now:

Post Call Array Length: 4

  • uid (GUID of logged in user making the booking(s)) - value is required and cannot be an empty string
  • eid (GUID of the event user is trying to book) - value is required and cannot be an empty string
  • bookingplaces (integer value of number of places) - value is required and must be > 0
  • APIKey

Prior to calling this method, the CalendarDetail method should be checked for if BookOnline is available, number of remaining places and if user should be able to make the booking (MemberOnly).

api/BookingAttendeesToBook

API Description
POST api/BookingAttendeesToBook

This method will return named attendees on specified event.

Try Now:

Post Call Array Length: 3

  • uid (GUID of logged in user making the booking(s)) - value is required and cannot be an empty string
  • bid (GUID of a Booking returned by UserBasket) - value is required and cannot be an empty string
  • APIKey

This method is used to return a list of Bookings and Contact for the event specified by the bid (BookingGUID). This data can then be used in conjunction with BookingUpdate to update a booking's specific named attendee.

api/BookingUpdate

API Description
POST api/BookingUpdate

This method will update a specific booking.

Try Now:

Post Call Array Length: 5

  • uid - value is required and cannot be an empty string
  • bid - ID of the booking being updated - value is required and cannot be an empty string
  • updatetype - see below
  • updatevalue
  • APIKey

Available Update Type options:

  • SpecialRequests - any special requests for the booking
  • Attendee - updates a booking to a specific contact (see BookingAttendeesToBook supply ContactGUID)
  • NamedGuest - stringified array of GuestOrg, GuestName, GuestEmail
  • Remove - will delete the booking

Membership

api/Subscription

API Description
POST api/Subscription

This option is used to add a "Join" subscription to the users basket if required.

Try Now:

Post Call Array Length: 4

The method requires an array of 4 values:
  • uid - value is required and cannot be an empty string
  • ssid - the Sale Service ID selected by user as returned from PortalList "Subscriptions"
  • action - should be either "Add" or "Remove"
  • APIKey
When an item has been added or removed, a call to UserItemCount can be performed and UserBasket to refresh the users basket.

User Dashboard

api/User

API Description
POST api/User

This method will return information related to the logged in user.

Try Now:

Post Call Array Length: 4

  • uid - value is required and cannot be an empty string
  • calltype - see below
  • uservalues - should be an empty string
  • APIKey

Available call type options:

  • UserProfile - returns an array of data relating to the individual user
  • UserCompany - returns an array of data relating to the individual users Company/Organisation
  • UserBookings - returns an array of all bookings for this user or where the user made the booking for someone else
  • Users - returns an array of other Contacts within same organisation (will only return data if the user is authorised Main or Web Admin)
  • UserOffers – Returns an array of all offers submitted by the user’s company
  • UserEvents – Returns an array of all events submitted by the user’s company
  • UserNews – Returns an array of all news items submitted by the user’s company
  • UserVacancies – Returns an array of all vacancies submitted by the user’s company

api/UserActions

API Description
POST api/UserActions

This method allows a user to update information.

Try Now:

Post Call Array Length: 4

  • uid - value is required and cannot be an empty string
  • calltype - see below
  • uservalues - stringified array with details of array below
  • APIKey

Available call type options:

  • UserProfileUpdate
  • UserCompanyUpdate
  • UserUpdate
  • UserOfferUpdate
  • UserEventUpdate
  • UserNewsUpdate
  • UserVacancyUpdate
  • UserConsent

Updates to user information is performed by supplying a stringified array of data for each call type as follows:

UserProfileUpdate

Title
FirstName
LastName
KnownAs
EmailAddress
JobTitle
MobileCountry
Mobile
TelCountry
Tel
TelExt
Address1 - if the contact has a personal address different to main Company/Organisation address
Address2 - if the contact has a personal address different to main Company/Organisation address
Address3 - if the contact has a personal address different to main Company/Organisation address
Address4 - if the contact has a personal address different to main Company/Organisation address
County - if the contact has a personal address different to main Company/Organisation address (see PortalList method)
Postcode - if the contact has a personal address different to main Company/Organisation address
Country - if the contact has a personal address different to main Company/Organisation address (see PortalList method)
SocialMedia - stringified array of social media information with "SocialMedia" and "SocialMediaURL" properties
MarketingPreferences - stringified array of marketing interest preferences with "Marketing", "Email", "Mail" and "Tel" properties where "Email", "Mail" and "Tel" are true or false

Calls can include all values or individual values in the uservalues stringified array.

An example of updating KnownAs value individually:
[{\"KnownAs\":\"John\"}]

An example of updating LinkedIn social media value individually:
[{\"SocialMedia\":\"[{\\\"SocialMedia\\\":\\\"LinkedIn\\\", \\\"SocialMediaURL\\\":\\\"<URL>\\\"}]\"}]

An example of updating both KnownAs value and LinkedIn social media value together:
[{\"KnownAs\":\"John\", \"SocialMedia\":\"[{\\\"SocialMedia\\\":\\\"LinkedIn\\\", \\\"SocialMediaURL\\\":\\\"<URL>\\\"}]\"}]

UserCompanyUpdate

Company
CompanyTelCountry
CompanyTel
CompanyFax
CompanyEmail
CompanyWeb
Category
BusinessDescription
Address1 - relates to Company/Organisation main address
Address2 - relates to Company/Organisation main address
Address3 - relates to Company/Organisation main address
Address4 - relates to Company/Organisation main address
County - relates to Company/Organisation main address (see PortalList method)
Postcode - relates to Company/Organisation main address
Country - relates to Company/Organisation main address (see PortalList method)
SocialMedia - stringified array of social media information with "SocialMedia" and "SocialMediaURL" properties

Calls can include all values or individual values in the uservalues stringified array.

An example of updating CompanyEmail value individually:
[{\"CompanyEmail\":\"support@rubicrm.com\"}]

An example of updating LinkedIn social media value individually:
[{\"SocialMedia\":\"[{\\\"SocialMedia\\\":\\\"LinkedIn\\\", \\\"SocialMediaURL\\\":\\\"<URL>\\\"}]\"}]

An example of updating both CompanyEmail value and LinkedIn social media value together:
[{\"CompanyEmail\":\"support@rubicrm.com\", \"SocialMedia\":\"[{\\\"SocialMedia\\\":\\\"LinkedIn\\\", \\\"SocialMediaURL\\\":\\\"<URL>\\\"}]\"}]

UserUpdate

This method will allow a main contact or web admin to update contact record’s to say the contact has "Left".

uid - uid of contact being marked as "Left".
ContactLeft - true/false when updating an existing contact.

UserConsent

This method allows storage of exact "consent" text the user is agreeing to. Should be performed on a yearly (365 day) basis. Property is returned via users login as to whether consent agreement is currently required.

ConsentReceived - true/false
ConsentText - full consent/terms and conditions text being agreed to

Member Submitted Item List

api/MemberOffers

API Description
POST api/MemberOffers

This method will return all offers available to display online.

Try Now:

Post Call Array Length: 3

This method returns an array of all offers within client RubiCRM system which are approved and within the timeframe to display.
The method requires an array of 3 values:
  • uid - if a user is logged in pass the uid value otherwise empty string
  • oid - can be an empty string for all offers or provide an oid for a specific offer
  • APIKey

api/MemberEvents

API Description
POST api/MemberEvents

This method will return all events available to display online.

Try Now:

Post Call Array Length: 3

This method returns an array of all events within client RubiCRM system which are approved and within the timeframe to display.
The method requires an array of 3 values:
  • uid - if a user is logged in pass the uid value otherwise empty string
  • mid - can be an empty string for all events or provide an mid for a specific event
  • APIKey

api/MemberNews

API Description
POST api/MemberNews

This method will return all news available to display online.

Try Now:

Post Call Array Length: 3

This method returns an array of all news within client RubiCRM system which are approved and within the timeframe to display.
The method requires an array of 3 values:
  • uid - if a user is logged in pass the uid value otherwise empty string
  • nid - can be an empty string for all news or provide an nid for a specific news item
  • APIKey

api/MemberVacancies

API Description
POST api/MemberVacancies

This method will return all vacancies available to display online.

Try Now:

Post Call Array Length: 3

This method returns an array of all vacancies within client RubiCRM system which are approved and within the timeframe to display.
The method requires an array of 3 values:
  • uid - if a user is logged in pass the uid value otherwise empty string
  • vid - can be an empty string for all vacancies or provide an nid for a specific vacancy
  • APIKey

Payment Process

api/UserPayment

API Description
POST api/UserPayment

This method is used to submit items from a users basket for payment. The PortalProperties method will have properties relating to whether the client wishes to allow Members and Non Members to select to pay by card or request an invoice.

Try Now:

Post Call Array Length: 15

  • uid - value is required and cannot be an empty string
  • paymenttype - options available for this item are "Invoice", "CardPayment" or "Confirm" ("Confirm" should only be used where the items total = 0.00
  • paymentitems - an array of ItemGUIDs returned from UserBasket
  • address1 - Address1 of Payment Address. Cannot be an empty string
  • address2 - Address2 of Payment Address
  • address3 - Address3 of Payment Address
  • address4 - Address4 of Payment Address. Cannot be an empty string
  • county - County/State of Payment Address options return from PortalList "County" call. Value passed to API must be ListValue
  • postcode - Postcode/ZIP of Payment Address
  • country - Country of Payment Address options return from PortalList "Country" call. Value passed to API must be ListValue
  • emailaddress - Email Address for Payment
  • ponumber - PO# for Payment. Can be empty string
  • mobcountry - Mobile Phone Country Code for Payment. Cannot be an empty string
  • mob - Mobile Phone for Payment. Cannot be an empty string
  • APIKey
This method will return an array with the following details:

TransactionID - this value can be used to pass to Card Payment Processing provider
TransactionType - this value will match "paymenttype" provided when making calling the method
ItemGUID - this value will match value provided when making calling the method
ItemTotal - this value will be the total value of the item including any applicable VAT/TAX
ItemDetail - string value of what the item is
ItemStatus - will return either the "Booking" or "Subscription" status
Address1 - this value will match value provided when making calling the method
Address2 - this value will match value provided when making calling the method
Address3 - this value will match value provided when making calling the method
Address4 - this value will match value provided when making calling the method
County - this value will match value provided when making calling the method
Postcode - this value will match value provided when making calling the method
Country - this value will match value provided when making calling the method
EmailAddress - this value will match value provided when making calling the method
PONumber - this value will match value provided when making calling the method
MobCountry - this value will match value provided when making calling the method
Mob - this value will match value provided when making calling the method
EmailSubject - will have an email subject for generating emails to send to end-user (applies to "Invoice" or "Confirm" items only)
EmailBody - will have an email body for generating emails to send to end-user (applies to "Invoice" or "Confirm" items only)
EmailBCC - will have an email bcc array for generating emails to send to end-user (applies to "Invoice" or "Confirm" items only)
EmailAttachments - will have an attachments array for generating emails to send to end-user (applies to "Invoice" or "Confirm" items only)
IMPORTANT: Card Payments will return a single array with the total value for the card payment. The TransactionID and other details returned, including the ItemTotal can then be passed to the card payment provider for authorisation.

api/StripeResult

API Description
POST api/StripeResult

This method allows the response string result of payment from Stripe to be submitted.

Try Now:

Post Call Array Length: 2

When Stripe is the Card Payment Provider, this method requires the following values as a stringified array:
["TransactionID", "StripeResponse", "APIKey"]
  • Transaction ID that is supplied on the User Payment call
  • StripeResponse value will be a stringified array of all of the values returned by Stripe

For successfully approved transactions, the returned response for this method will include the following in an array which can be used to generate an email to the user:
EmailAddress
EmailSubject
EmailBody
EmailBCC
EmailAttachments
EmailResult
FirstName
LastName

If the RubiAPI is setup to send automated emails the above will be returned with the "EmailResult" value set to the response for the email send action.

Miscellaneous API Calls

api/UserBasket

API Description
POST api/UserBasket

This method returns any items currently waiting payment/action in the users basket.

Try Now:

Post Call Array Length: 3

  • uid - value is required and cannot be an empty string
  • item - options available for this item are "Bookings", "Subscriptions" or empty string (to return "All" items)
  • APIKey
This method will return an array of any items requiring action by the user. ItemGUIDs returned in this array should be used when making payment. Subscriptions in the users basket may include "Join" or "Renew" subscriptions. The PortalProperties method will have properties relating to whether the client wishes to allow Members and Non Members to select to pay by card or request an invoice.

api/UserItemCount

API Description
POST api/UserItemCount

This method will return a count of any items currently waiting payment/action in the users basket or counts of Member Offers, Member News or Member Events.

Try Now:

Post Call Array Length: 3

  • uid - value is required and cannot be an empty string
  • item - options available for this item are "Basket".
  • APIKey
This method will return an array of item counts e.g. for displaying count next to users "basket".

api/PortalList

API Description
POST api/PortalList

This method is used to return various options available for dropdown selections.

Try Now:

Post Call Array Length: 2

  • list - see below
  • APIKey

Available options:

  • County
  • Country
  • WhereHear
  • BusinessCategory
  • Classification
  • Subscriptions - relates to available membership/customer subscription packages available if users wish to "Join"
  • Postcode|yourpostcodevalue - (e.g. Postcode|LS12) used as part of registration process to return records matching supplied postcode. Results will include a "My Organisation Is Not Listed" option (See Registration method)

api/FileUpload

API Description
POST api/FileUpload

This method allows users to upload files to save to their record.

Parameters:

Post Call Array Length: 5

  • file - this should be the file object chosen by the user on their device
  • uid - value is required and cannot be an empty string
  • uploadtype - available options are "userimagefile" or "logofile"
  • oldfile - the url of the current file is it exists otherwise empty string
Sample jQuery code:
function fileupload(mycontrol, uploadtype, oldfile) {
var myid = mycontrol.prop('id');
var datafile = mycontrol.data('file');
mycontrol.click(function () {
$('#' + datafile).click();
});
$('#' + datafile).unbind('click');
$('#' + datafile).change(function () {
var filecontrol = $(this);
if (filecontrol.val() === '') {
alert('Please select file');
return;
}
else {
var formData = new FormData();
var file = filecontrol[0];
var filesize = file.files[0].size;
if (filesize > 1000000) {
alert("Files must be < 1mb in size");
}
else {
formData.append('file', file.files[0]);
formData.append('uid', uid);
formData.append('uploadtype', uploadtype);
formData.append('oldfile', oldfile);
$.ajax({
url: 'api/FileUpload',
type: 'POST',
data: formData,
contentType: false,
processData: false,
success: function (data) {
if (data === "Success: Upload Complete") {
window.location.reload();
}
else if (data.indexOf("Error") > -1) {
$('#span' + myid).text(data);
}
},
error: function () {
$('#span' + myid).text("Failure to upload. Please try again");
}
});
}
}
});
}