UpdateGuest
Updates one or more fields on an existing guest.Input Properties
UpdateGuestRequest
Output Properties
UpdateGuestResponse
Http Request
PATCH https://yourcompany-api.exigo.com/3.0/guest HTTP/1.1 Content-Type: application/json Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword){ "guestID": 1, "customerID": 1, "customerKey": "1", "firstName": null, "middleName": null, "lastName": null, "nameSuffix": null, "company": null, "guestStatus": 1, "address1": null, "address2": null, "address3": null, "city": null, "county": null, "zip": null, "phone": null, "phone2": null, "mobilePhone": null, "email": null, "date1": "2024-11-21T00:00:00-06:00", "date2": "2024-11-21T00:00:00-06:00", "date3": "2024-11-21T00:00:00-06:00", "date4": "2024-11-21T00:00:00-06:00", "date5": "2024-11-21T00:00:00-06:00", "notes": null }
Http Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length{ "result": null }
Soap Request
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /3.0/ExigoApi.asmx HTTP/1.1 Host: totallife-api.exigo.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://api.exigo.com/UpdateGuest" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ApiAuthentication xmlns="http://api.exigo.com/"> <LoginName>string</LoginName> <Password>string</Password> <Company>string</Company> <Identity>string</Identity> <RequestTimeUtc>dateTime</RequestTimeUtc> <Signature>string</Signature> </ApiAuthentication> </soap:Header> <soap:Body> <UpdateGuestRequest xmlns="http://api.exigo.com/"> <GuestID>int</GuestID> <CustomerID>int</CustomerID> <CustomerKey>string</CustomerKey> <FirstName>string</FirstName> <MiddleName>string</MiddleName> <LastName>string</LastName> <NameSuffix>string</NameSuffix> <Company>string</Company> <Gender>Unknown or Male or Female</Gender> <GuestStatus>int</GuestStatus> <LanguageID>int</LanguageID> <Address1>string</Address1> <Address2>string</Address2> <Address3>string</Address3> <City>string</City> <County>string</County> <State>string</State> <Zip>string</Zip> <Country>string</Country> <Phone>string</Phone> <Phone2>string</Phone2> <MobilePhone>string</MobilePhone> <Email>string</Email> <Field1>string</Field1> <Field2>string</Field2> <Field3>string</Field3> <Field4>string</Field4> <Field5>string</Field5> <Field6>string</Field6> <Field7>string</Field7> <Field8>string</Field8> <Field9>string</Field9> <Field10>string</Field10> <Field11>string</Field11> <Field12>string</Field12> <Field13>string</Field13> <Field14>string</Field14> <Field15>string</Field15> <Date1>dateTime</Date1> <Date2>dateTime</Date2> <Date3>dateTime</Date3> <Date4>dateTime</Date4> <Date5>dateTime</Date5> <Notes>string</Notes> </UpdateGuestRequest> </soap:Body> </soap:Envelope>
Soap Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <UpdateGuestResult xmlns="http://api.exigo.com/" /> </soap:Body> </soap:Envelope>
C# Rest Client
Install Nuget package Exigo.Api.Client
try
{
//Create Api Client
var api = new ExigoApiClient("yourcmpany", "yourlogin", "yourpassword");
//Create Request
var req = new UpdateGuestRequest();
req.GuestID = 1; //The unique identifier of the guest
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
req.FirstName = 1;
req.MiddleName = 1;
req.LastName = 1;
req.NameSuffix = 1;
req.Company = 1;
req.GuestStatus = 1;
req.Address1 = 1;
req.Address2 = 1;
req.Address3 = 1;
req.City = 1;
req.County = 1;
req.Zip = 1;
req.Phone = 1;
req.Phone2 = 1;
req.MobilePhone = 1;
req.Email = 1;
req.Date1 = DateTime.Today;
req.Date2 = DateTime.Today;
req.Date3 = DateTime.Today;
req.Date4 = DateTime.Today;
req.Date5 = DateTime.Today;
req.Notes = 1;
//Send Request to Server and Get Response
var res = await api.UpdateGuestAsync(req);
//Now examine the results:
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
C# Soap Client
try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.LoginName = "yourLoginName";
auth.Password = "yourPassword";
auth.Company = "yourCompany";
api.ApiAuthenticationValue = auth;
//Create Request
UpdateGuestRequest req = new UpdateGuestRequest();
req.GuestID = 1; //The unique identifier of the guest
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
req.FirstName = 1;
req.MiddleName = 1;
req.LastName = 1;
req.NameSuffix = 1;
req.Company = 1;
req.GuestStatus = 1;
req.Address1 = 1;
req.Address2 = 1;
req.Address3 = 1;
req.City = 1;
req.County = 1;
req.Zip = 1;
req.Phone = 1;
req.Phone2 = 1;
req.MobilePhone = 1;
req.Email = 1;
req.Date1 = DateTime.Today;
req.Date2 = DateTime.Today;
req.Date3 = DateTime.Today;
req.Date4 = DateTime.Today;
req.Date5 = DateTime.Today;
req.Notes = 1;
//Send Request to Server and Get Response
UpdateGuestResponse res = api.UpdateGuest(req);
//Now examine the results:
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
VB.Net
Try
'Create Main API Context Object
Dim api as new ExigoApi()
'Create Authentication Header
Dim auth as new ApiAuthentication()
auth.LoginName = "yourLoginName"
auth.Password = "yourPassword"
auth.Company = "yourCompany"
api.ApiAuthenticationValue = auth
'Create Request
Dim req as new UpdateGuestRequest()
req.GuestID = 1
req.CustomerID = 1
req.CustomerKey = "1"
req.FirstName = 1
req.MiddleName = 1
req.LastName = 1
req.NameSuffix = 1
req.Company = 1
req.GuestStatus = 1
req.Address1 = 1
req.Address2 = 1
req.Address3 = 1
req.City = 1
req.County = 1
req.Zip = 1
req.Phone = 1
req.Phone2 = 1
req.MobilePhone = 1
req.Email = 1
req.Date1 = DateTime.Today
req.Date2 = DateTime.Today
req.Date3 = DateTime.Today
req.Date4 = DateTime.Today
req.Date5 = DateTime.Today
req.Notes = 1
'Send Request to Server and Get Response
Dim res As UpdateGuestResponse = api.UpdateGuest(req)
'Now examine the results:
Catch ex As Exception
Console.WriteLine("Error: " & ex.Message)
End Try
PHP
Note: PHP is not officially supported.<?php
try
{
//Setup the SoapClient and Authentication
$api = new SoapClient("http://api.exigo.com/3.0/ExigoApi.asmx?WSDL");
$ns = "http://api.exigo.com/";
$auth = array()
$auth["LoginName"] = new SoapVar("yourLoginName",XSD_STRING,null,null,null,$ns);
$auth["Password"] = new SoapVar("yourPassword",XSD_STRING,null,null,null,$ns);
$auth["Company"] = new SoapVar("yourCompany",XSD_STRING,null,null,null,$ns);
$headerBody = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader($ns, 'ApiAuthentication', $headerBody);
$api->__setSoapHeaders(array($header));
//Create Request
$req->GuestID = 1;
$req->CustomerID = 1;
$req->CustomerKey = "1";
$req->FirstName = 1;
$req->MiddleName = 1;
$req->LastName = 1;
$req->NameSuffix = 1;
$req->Company = 1;
$req->GuestStatus = 1;
$req->Address1 = 1;
$req->Address2 = 1;
$req->Address3 = 1;
$req->City = 1;
$req->County = 1;
$req->Zip = 1;
$req->Phone = 1;
$req->Phone2 = 1;
$req->MobilePhone = 1;
$req->Email = 1;
$req->Date1 = 1;
$req->Date2 = 1;
$req->Date3 = 1;
$req->Date4 = 1;
$req->Date5 = 1;
$req->Notes = 1;
//Send Request to Server and Get Response
$res = $api.UpdateGuest($req);
//Now examine the results:
}
catch (SoapFault $ex)
{
echo "Error: ", $ex->getMessage();
}
?>
Java
Note: Java is not officially supported.try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.setLoginName("yourLoginName");
auth.setPassword("yourPassword");
auth.setCompany("yourCompany");
api.setApiAuthenticationValue(auth);
//Create Request
UpdateGuestRequest req = new UpdateGuestRequest();
req.setGuestID(1);
req.setCustomerID(1);
req.setCustomerKey("1");
req.setFirstName(1);
req.setMiddleName(1);
req.setLastName(1);
req.setNameSuffix(1);
req.setCompany(1);
req.setGuestStatus(1);
req.setAddress1(1);
req.setAddress2(1);
req.setAddress3(1);
req.setCity(1);
req.setCounty(1);
req.setZip(1);
req.setPhone(1);
req.setPhone2(1);
req.setMobilePhone(1);
req.setEmail(1);
req.setDate1(1);
req.setDate2(1);
req.setDate3(1);
req.setDate4(1);
req.setDate5(1);
req.setNotes(1);
//Send Request to Server and Get Response
UpdateGuestResponse res = api.getExigoApiSoap().updateGuest(req, auth);
//Now examine the results:
}
catch (Exception ex)
{
System.out.println("Error: " + ex.getMessage());
}