EMS API Functions—ADD Operations

AddBooking

(Requires EMS API Advanced License) 

Description

Adds a booking to a reservation in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ReservationID

Reservation ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

Response Elements 

Name

Description

Type

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddBooking()
	Dim svc As New EMSAPI.ServiceSoapClient
	Dim objReader As New System.IO.StringReader(svc.AddBooking
	(“UserID”, “Password”, 1234, 3199, Date.Today, 
	CDate(“1/1/1900 8:00 AM”), CDate(“1/1/1900 9:00 AM”),
	”Meeting”,1))
	Dim dst As New DataSet("Data")
	dst.ReadXml(objReader)
End Sub

Example Response 

<Booking>
<Data>
	<BookingID>4567</BookingID>
	</Data>
</Booking>

AddBooking2

(Requires EMS API Advanced License) 

Description

Adds a Booking to a Reservation in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ReservationID

Reservation ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

EventTypeID

Event Type ID

Integer

Response Elements 

Name

Description

Type

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddBooking()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddBooking2(“UserID”, “Password”, 1234, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1, 1))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Booking>
<Data>
	<BookingID>4567</BookingID>
	</Data>
</Booking>

AddContact

(Requires EMS API Advanced License) 

Description

Creates a contact in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

ContactName

Contact Name

String

Title

Title

String

Address1

Address Line 1

String

Address2

Address Line 2

String

City

City

String

State

State

String

ZipCode

Zip Code

String

Country

Country

String

Phone

Phone

String

Fax

Fax

String

EmailAddress

Email Address

String

ExternalReference

External Reference

String

Response Elements 

Name

Description

Type

ContactID

Contact ID that was created in EMS

Integer

Sample Code 

Private Sub AddContact()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddContact(“UserID”, “Password”, 1234,
		”Test Contact”, “”, “123 Main St.”, “”, “Denver”, 
		“CO”, “80111”, ””, “x123”, “”, “Test@test.com”, “”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Contact>
<Data>
	<ContactID>12345</ContactID>
	</Data>
</Contact>

AddGroup

(Requires EMS API Advanced License)

Description

Creates a group in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupName

Group Name

String

GroupTypeID

Group Type ID

Integer

Address1

Address Line 1

String

Address2

Address Line 2

String

City

City

String

State

State

String

ZipCode

Zip Code

String

Country

Country

String

Phone

Phone

String

Fax

Fax

String

EmailAddress

Email Address

String

ExternalReference

External Reference

String

Response Elements 

Name

Description

Type

GroupID

Group ID that was created in EMS

Integer

Sample Code 

Private Sub AddGroup()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddGroup(“UserID”, “Password”,”Test Group”, 
		0, “123 Main St.”, “”, “Denver”, “CO”, “80111”, 
		””, “x123”, “”, “Test@test.com”, “”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Group>
<Data>
	<GroupID>1234</GroupID>
	</Data>
</Group>

AddPayment

(Requires EMS API Advanced License) 

Description

Adds a payment to an invoice in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

TransactionDate

Transaction Date

Date

PaymentTypeID

Payment Type ID

Integer

CheckNo

Check Number

String

PaymentAmount

Payment Amount

Decimal

InvoiceNo

Invoice Number

String

Notes

Notes

String

Response Elements 

Name

Description

TYPE

Message

“Success!” or error, i.e. “Invoice Number is invalid.”

String

Sample Code 

Private Sub AddPayment()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddPayment(“UserID”, “Password”, #12/15/2011#, 
		0, “1234”,”INV100”,””))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Messages>
<Message>
	<Message>Success!</Message>
	</Message>
</Messages>

AddReservation

(Requires EMS API Advanced License) 

Description

Creates a reservation in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

Response Elements

Name

Description

Type

ReservationID

Reservation ID that was created in EMS

Integer

BookingID

Booking ID that was created in EMS

Integer

Sample Code

Private Sub AddReservation()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddReservation(“UserID”, “Password”, 11, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

<Reservation>
<Data>
	<ReservationID>1234</ReservationID>
	<BookingID>4567</BookingID>
	</Data>
</Reservation>

AddReservation2

(Requires EMS API Advanced License)

Description

Creates a reservation in EMS tied to a Web User.

Request Parameters 

name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

End Time

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

EventTypeID

Event Type ID

Integer

WebUserID

Web User ID

Integer

WebTemplateID

Web Template ID

Integer

Response Elements 

Name

Description

Type

ReservationID

Reservation ID that was created in EMS

Integer

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddReservation2()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddReservation2(“UserID”, “Password”, 11, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1, 2, 468, 2))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Reservation>
<Data>
	<ReservationID>1234</ReservationID>
	<BookingID>4567</BookingID>
	</Data>
</Reservation>

AddReservation3

(Requires EMS API Advanced License) 

Description

Creates a Reservation in EMS tied to a Web User.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

End Time

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

EventTypeID

Event Type ID

Integer

WebUserID

Web User ID

Integer

WebTemplateID

Web Template ID

Integer

ReservationSourceID

Reservation Source ID

Integer

Response Elements 

Name

Description

Type

ReservationID

Reservation ID that was created in EMS

Integer

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddReservation3()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddReservation3(“UserID”, “Password”, 11, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1, 2, 468, 2, 1))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Reservation>
<Data>
	<ReservationID>1234</ReservationID>
	<BookingID>4567</BookingID>
	</Data>
</Reservation>

AddReservation4

(Requires EMS API Advanced License) 

Description

Creates a reservation in EMS tied to a Web User and includes a Billing Reference.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

End Time

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

EventTypeID

Event Type ID

Integer

WebUserID

Web User ID

Integer

WebTemplateID

Web Template ID

Integer

ReservationSourceID

Reservation Source ID

Integer

BillingReference

Billing Reference

String

Response Elements 

Name

Description

Type

ReservationID

Reservation ID that was created in EMS

Integer

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddReservation4()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddReservation4(“UserID”, “Password”, 11, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1, 2, 468, 2, 1, “abc”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Reservation>
<Data>
	<ReservationID>1234</ReservationID>
	<BookingID>4567</BookingID>
	</Data>
</Reservation>

AddReservation5

(Requires EMS API Advanced License) 

Description

Creates a reservation in EMS tied to a Web User and includes a Billing Reference.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

End Time

DateTime

EventName

Event Name

String

StatusID

Status ID

Integer

EventTypeID

Event Type ID

Integer

WebUserID

Web User ID

Integer

WebTemplateID

Web Template ID

Integer

ReservationSourceID

Reservation Source ID

Integer

BillingReference

Billing Reference

String

PONumber

PO Number for reservation

String

SetupCount

Setup count for booking

Integer

Response Elements 

Name

Description

Type

ReservationID

Reservation ID that was created in EMS

Integer

BookingID

Booking ID that was created in EMS

Integer

Sample Code 

Private Sub AddReservation5()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddReservation4(“UserID”, “Password”, 11, 
		3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”),”Meeting”,1, 2, 468, 
		2, 1, “abc”, ‘00001lasdf’, ‘2’))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<Reservation>
<Data>
	<ReservationID>1234</ReservationID>
	<BookingID>4567</BookingID>
	</Data>
</Reservation>

AddServiceOrder

(Requires EMS API Advanced License) 

Description

This API allows new service orders to be added to bookings.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

CategoryID

EMS category ID for which to add service order

Integer

BookingID

EMS Booking ID to attach service order

Integer

StateID

EMS State

Integer

ServeTypeID

EMS Service Type

Integer

TimeStart

Service Order Start Time

Datetime

TimeEnd

Service Order End Time

Datetime

EstimatedCount

Estimated Count

Integer

GuaranteedCount

Guaranteed Count

Integer

ActualCount

Actual Count

Integer

Response Elements 

Name

Description

Type

ServiceOrderID

Service Order ID that was created in EMS

Integer

Sample Code 

Private Sub AddServiceOrder()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddUDFt(“UserID”, “Password”, 1, 2, 1, 2, 
		‘1/1/2012 11:00:00.000 AM’, ‘2/1/2012 12:00:00.000 
		PM’, 1, 2, 1))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<ServiceOrder>
<Data>
	<ServiceOrderID >12345</ServiceOrderID>
	</Data>
</ServiceOrder>

AddServiceOrderDetail

(Requires EMS API Advanced License) 

Description

This API allows new service order details (resources) to be added to existing service orders.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ServiceOrderID

Service Order ID for which to add details

Integer

ResourceID

Resource ID to be added

Integer

Quantity

Quantity of item being ordered

Decimal

PricingMethodID

1: 'Unit'

2: 'Hourly (Reserved Time)'

3: 'Hourly (Event Time)'

4: 'Hourly (Service Time)'

5: 'Hourly (Specific)'

6: 'Half Day/Full Day (Reserved Time)'

7: 'Half Day/Full Day (Event Time)'

8: 'Half Day/Full Day (Service Time)'

Integer

UnitPrice

Price per unit

Decimal

Notes

Notes

String

SpecialInstructions

Special Instructions

String

Response Elements 

Name

Description

Type

ServiceOrderDetailID

Service Order Detail ID that was created in EMS

Integer

Sample Code 

Private Sub AddServiceOrderDetail()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddServiceOrderDetail(“UserID”, “Password”, 
		1, 2, 1, 2, 1, 1.00, ‘notest’, “special instructions”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<ServiceOrderDetail>
<Data>
	<ServiceOrderDetailID>12345</ServiceOrderDetailID>
	</Data>
</ServiceOrderDetail>

AddUDF

(Requires EMS API Advanced License)

Description

Creates a UDF in EMS (reservation- or booking-level UDF only).

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ParentLevelID

EMS Reservation Level: Reservation = 0, Booking = 1

Integer

ParentID

Reservation ID or Booking ID

Integer

UDFDefID

UDF Definition ID

Integer

UDFValue

UDF Value

String

Response Elements 

Name

Description

Type

UDFID

UDF ID that was created in EMS

Integer

Sample Code 

Private Sub AddUDF()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddUDFt(“UserID”, “Password”, 1, 2, 1, “udf text”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<UDF>
<Data>
	<UDFID>12345</UDFID>
	</Data>
</UDF>

AddWebRequest

(Requires EMS API Advanced License) 

Description

Creates a Web Request in EMS.

Request Parameters 

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

EventName

Event Name

String

EventTypeID

Event Type ID

Integer

GroupName

Group Name

String

Contact

Contact

String

Phone

Phone

String

Fax

Fax

String

EmailAddress

Email Address

String

WebUserID

Web User ID

Integer

BuildingID

Building ID

Integer

RoomID

Room ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

SetupTypeID

Setup Type ID

Integer

SetupCount

Setup Count

Integer

Notes

Notes

String

Response Elements 

Name

Description

Type

WebRequestID

Web Request ID that was created in EMS

Integer

Sample Code 

Private Sub AddWebRequest()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.AddWebRequest(“UserID”, “Password”, 
		“Meeting”, 5, “ABC Company”, “John Smith”, 
		“555-1212”, “555-1213”, “JohnSmith@abc.com”, 25, 
		1, 3199, Date.Today, CDate(“1/1/1900 8:00 AM”), 
		CDate(“1/1/1900 9:00 AM”), 3,10, “Notes…”))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response 

<WebRequest>
<Data>
	<WebRequestID>1234</WebRequestID>
	</Data>
</WebRequest>

AddWebUser

(Requires EMS API Advanced License) 

Description

Creates a Web User in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

WebUserName

Web User Name

String

WebUserPassword

Web User Password

String

EmailAddress

Email Address

String

Phone

Phone

String

Fax

Fax

String

ExternalReference

External Reference

String

NetworkID

Network ID

String

TimeZoneID

Time Zone ID

Integer

StatusID

Status ID (0=Active, 1=Pending, 2=Inactive, 3=Activate On Login

Integer

WebSecurityTemplateID

Web Security Template ID

Integer

WebProcessTemplates

Web Process Template List

Array Of Integers

Groups

Group List

Array Of Integers

Validated

Validated

Boolean

Response Elements

Name

Description

Type

WebUserID

Web User ID that was created in EMS

Integer

Sample Code

Private Sub AddWebUser()
               Dim gintWebProcessTemplates As New Generic.List(Of Int32)
               Dim gintGroups As New Generic.List(Of Int32)
 
               gintWebProcessTemplates.Add(1)
               gintWebProcessTemplates.Add(2)
               gintWebProcessTemplates.Add(3)
 
               gintGroups.Add(1234)
 
               Dim strWebTemplates As New EMSAPI.ArrayOfInt
               Dim strGroups As New EMSAPI.ArrayOfInt
 
		strWebTemplates.AddRange(gintWebProcessTemplates.ToArray)
               	strGroups.AddRange(gintGroups.ToArray)
 
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader(svc.AddWebUsert(“UserID”, 
		“Password”, “New Web User”, “password”, “newwebuser@test.com”, “x123”, “”, “”, “”, 
		68, 0, 1, strWebTemplates, strGroups, 0))
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

<WebUser>
<Data>
	<WebUserID>2314</WebUserID>
	</Data>
</WebUser>