EMS API Functions—Update Operations

Following are the EMS API update functions:

ClosedUpdateBooking

Requires EMS API Advanced License

Description

Updates a single Booking in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

BookingID

Booking ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

StatusID

Status ID

Integer

RoomID

Room ID

Integer

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Room is not available.”

String

Sample Code

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

Example Response

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

ClosedUpdateBooking2

Requires EMS API Advanced License

Description

Updates a single Booking in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

BookingID

Booking ID

Integer

BookingDate

Booking Date

DateTime

StartTime

Start Time

DateTime

EndTime

EndTime

DateTime

StatusID

Status ID

Integer

RoomID

Room ID

Integer

EventName

Event Name

String

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Room is not available.”

String

Sample Code

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

Example Response

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

ClosedUpdateBookingCheckIn

Requires EMS API Advanced License

Description

Updates check in for a single booking.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

BookingID

Booking ID

Integer

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Booking does not exist.”

String

Sample Code

Private Sub UpdateBookingCheckIn()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.UpdateBookingCheckIn(“UserID”, “Password”, 12345)
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

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

ClosedUpdateContact

Requires EMS API Advanced License

Description

Updates a single Contact in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ContactID

Contact 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

Active

Active

Boolean

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Contact Name  is required.”

String

Sample Code

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

Example Response

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

ClosedUpdateGroup

Requires EMS API Advanced License

Description

Updates a single Group in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

GroupID

Group ID

Integer

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

Active

Active

Boolean

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Group Name is required.”

String

Sample Code

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

Example Response

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

ClosedUpdateReservation

Requires EMS API Advanced License

Description

Updates a single Reservation in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ReservationID

Reservation ID (use -1 to lookup by Booking ID)

Integer

BookingID

Booking ID (ignored unless Reservation ID = -1)

Integer

WebUserID

Web User ID (0 = none. Use -1 to use existing Reservation’s Web User ID)

Integer

WebTemplateID

Web Template ID (0 = none. Use -1 to use existing Reservation’s Web Template ID, otherwise Web Template ID must be accessible by the Web User)

Integer

ReservationSourceID

Reservation Source ID (Use -1 to use existing Reservation Source ID)

I

BillingReference

Billing Reference

String

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Reservation ID does not exist.”

String

Sample Code

Private Sub UpdateReservation()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.UpdateReservation(“UserID”, “Password”, 
		1234, 0, 1, 2, 1, “abc”)
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

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

ClosedUpdateServiceOrder

Requires EMS API Advanced License

Description

Enables you to update a service order.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ServiceOrderID

EMS Service Order ID for which to edit

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

Message

“Success!” or error, i.e. “Service Order ID does not exist.”

String

Sample Code

Private Sub UpdateServiceOrder()
               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

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

ClosedUpdateServiceOrderDetail

Requires EMS API Advanced License

Description

This API allows for edits to service order details (resources).

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

ServiceOrderDetailID

Service Order Details ID for which to edit

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

Message

“Success!” or error, i.e. “Service Order Detail ID does not exist.”

String

Sample Code

Private Sub UpdateServiceOrderDetail()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc.UpdateServiceOrderDetail(“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

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

ClosedUpdateUDF

Requires EMS API Advanced License

Description

Updates a single UDF in EMS (Reservation or Booking level UDF only)

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

UDFID

User Defined Field ID

Integer

UDFValue

UDF Value

String

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “UDF ID is invalid.”

String

Sample Code

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

Example Response

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

ClosedUpdateWebUser

Requires EMS API Advanced License

Description

Updates a single Web User in EMS.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

WebUserID

Web User ID

Integer

WebUserName

Web User Name

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

Message

“Success!” or error, i.e. “Contact Name  is required.”

String

Sample Code

Private Sub UpdateWebUser()
               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.UpdateWebUser(“UserID”, “Password”, 2312, 
		“Test Web User”, “testwebuser@test.com”, “x123”, 
		“”, “”, “”, 68, 0, 1, strWebTemplates, strGroups, 0)
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

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

ClosedUpdateWebUserOptions

Requires EMS API Advanced License

Description

Updates web user options for a single web user.

Request Parameters

Name

Description

Type

UserName

EMS User Name

String

Password

EMS User Password

String

WebUserID

Web User ID

Integer

WebProcessTemplateID

Web Process Template ID

Integer

OptionName

Option name

String

OptionValue

Option value

String

Response Elements

Name

Description

Type

Message

“Success!” or error, i.e. “Web User does not exist.”

String

Sample Code

Private Sub UpdateWebUserOptions()
               Dim svc As New EMSAPI.ServiceSoapClient
               Dim objReader As New System.IO.StringReader
		(svc. UpdateWebUserOptions (“UserID”, “Password”, 
		5, 10, “EventTypeID”, “1”)
               Dim dst As New DataSet("Data")
               dst.ReadXml(objReader)
End Sub

Example Response

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