Exigo Web Services API v2022.12.19.1

CreateGuest

Creates a new guest. Can optionally be put in a party.

Input Properties

CreateGuestRequest
PropertyData TypeNotes
HostIDInt32The unique identifier of the host that the guest was created/referred by.
PartyIDInt32Optional. If set, the guest will be placed in the provided party.
CustomerIDInt32Optional. If set, the guest will be linked to the provided customer account.
FirstNameStringOptional. The guest's first name.
MiddleNameStringOptional. The guest's middle name.
LastNameStringOptional. The guest's last name.
NameSuffixStringOptional. The guest's name suffix.
CompanyStringOptional. The guest's company name.
Gender GenderOptional. The guest's gender.
LanguageIDInt32Optional. The guest's preferred language. Defaults to 0.
GuestStatusInt32Optional. The guest's status as defined by the company. Defaults to 1.
Address1StringOptional.
Address2StringOptional.
Address3StringOptional.
CityStringOptional.
CountyStringOptional.
StateStringOptional. The state of the guest's address. This field is required if Address1 is provided.
ZipStringOptional.
CountryStringOptional. The country of the guest's address. This field is required if Address1 is provided.
PhoneStringOptional.
Phone2StringOptional.
MobilePhoneStringOptional.
EmailStringOptional.
Field1StringOptional.
Field2StringOptional.
Field3StringOptional.
Field4StringOptional.
Field5StringOptional.
Field6StringOptional.
Field7StringOptional.
Field8StringOptional.
Field9StringOptional.
Field10StringOptional.
Field11StringOptional.
Field12StringOptional.
Field13StringOptional.
Field14StringOptional.
Field15StringOptional.
NotesStringOptional. Any additional notes about the guest.
EntryDateDateTimeThe date the guest was created. The provided date must be greater than 1/1/1900.
CustomerKeyStringOptional. If set, the guest will be linked to the provided customer account.

Output Properties

CreateGuestResponse
PropertyData TypeNotes
GuestIDInt32

Http Request

POST https://yourcompany-api.exigo.com/3.0/guest HTTP/1.1
Content-Type: application/json
Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword)

{ "hostID": 1, "partyID": 1, "customerID": 1, "firstName": "John", "lastName": "Doe", "company": "ACME, Inc.", "guestStatus": 1, "address1": "123 Some Street", "state": "TX", "country": "US", "email": "joecool@me.com", "customerKey": "1" }

Http Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length

{ "guestID": 1, "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: api.exigo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://api.exigo.com/CreateGuest"

<?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> <CreateGuestRequest xmlns="http://api.exigo.com/"> <Date1>dateTime</Date1> <Date2>dateTime</Date2> <Date3>dateTime</Date3> <Date4>dateTime</Date4> <Date5>dateTime</Date5> <HostID>int</HostID> <PartyID>int</PartyID> <CustomerID>int</CustomerID> <FirstName>string</FirstName> <MiddleName>string</MiddleName> <LastName>string</LastName> <NameSuffix>string</NameSuffix> <Company>string</Company> <Gender>Unknown or Male or Female</Gender> <LanguageID>int</LanguageID> <GuestStatus>int</GuestStatus> <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> <Notes>string</Notes> <EntryDate>dateTime</EntryDate> <CustomerKey>string</CustomerKey> </CreateGuestRequest> </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> <CreateGuestResult xmlns="http://api.exigo.com/"> <GuestID>int</GuestID> </CreateGuestResult> </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 CreateGuestRequest();

 

    req.HostID = 1;                 //The unique identifier of the host that the guest was created/referred by

    req.PartyID = 1;                //If set, the guest will be placed in the provided party

    req.CustomerID = 1;             //If set, the guest will be linked to the provided customer account

    req.FirstName = "John";         //The guest's first name

    req.LastName = "Doe";           //The guest's last name

    req.Company = "ACME, Inc.";     //The guest's company name

    req.GuestStatus = 1;            //The guest's status as defined by the company. Defaults to 1.

    req.Address1 = "123 Some Street";

    req.State = "TX";               //The state of the guest's address. This field is required if Address1 is provided.

    req.Country = "US";             //The country of the guest's address. This field is required if Address1 is provided.

    req.Email = "joecool@me.com";

    req.CustomerKey = "1";          // If set, the guest will be linked to the provided customer account

 

    //Send Request to Server and Get Response

    var res = await api.CreateGuestAsync(req);

 

    //Now examine the results:

    Console.WriteLine("GuestID: {0}", res.GuestID);

}

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

    CreateGuestRequest req = new CreateGuestRequest();

 

    req.HostID = 1;                 //The unique identifier of the host that the guest was created/referred by

    req.PartyID = 1;                //If set, the guest will be placed in the provided party

    req.CustomerID = 1;             //If set, the guest will be linked to the provided customer account

    req.FirstName = "John";         //The guest's first name

    req.LastName = "Doe";           //The guest's last name

    req.Company = "ACME, Inc.";     //The guest's company name

    req.GuestStatus = 1;            //The guest's status as defined by the company. Defaults to 1.

    req.Address1 = "123 Some Street";

    req.State = "TX";               //The state of the guest's address. This field is required if Address1 is provided.

    req.Country = "US";             //The country of the guest's address. This field is required if Address1 is provided.

    req.Email = "joecool@me.com";

    req.CustomerKey = "1";          // If set, the guest will be linked to the provided customer account

 

    //Send Request to Server and Get Response

    CreateGuestResponse res = api.CreateGuest(req);

 

    //Now examine the results:

    Console.WriteLine("GuestID: {0}", res.GuestID);

}

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 CreateGuestRequest()

 

    req.HostID = 1

    req.PartyID = 1

    req.CustomerID = 1

    req.FirstName = "John"

    req.LastName = "Doe"

    req.Company = "ACME, Inc."

    req.GuestStatus = 1

    req.Address1 = "123 Some Street"

    req.State = "TX"

    req.Country = "US"

    req.Email = "joecool@me.com"

    req.CustomerKey = "1"

 

    'Send Request to Server and Get Response

    Dim res As CreateGuestResponse = api.CreateGuest(req)

 

    'Now examine the results:

    Console.WriteLine("GuestID: {0}", res.GuestID)

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->HostID = 1;

    $req->PartyID = 1;

    $req->CustomerID = 1;

    $req->FirstName = "John";

    $req->LastName = "Doe";

    $req->Company = "ACME, Inc.";

    $req->GuestStatus = 1;

    $req->Address1 = "123 Some Street";

    $req->State = "TX";

    $req->Country = "US";

    $req->Email = "joecool@me.com";

    $req->CustomerKey = "1";

 

    //Send Request to Server and Get Response

    $res = $api.CreateGuest($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

    CreateGuestRequest req = new CreateGuestRequest();

 

    req.setHostID(1);

    req.setPartyID(1);

    req.setCustomerID(1);

    req.setFirstName("John");

    req.setLastName("Doe");

    req.setCompany("ACME, Inc.");

    req.setGuestStatus(1);

    req.setAddress1("123 Some Street");

    req.setState("TX");

    req.setCountry("US");

    req.setEmail("joecool@me.com");

    req.setCustomerKey("1");

 

    //Send Request to Server and Get Response

    CreateGuestResponse res = api.getExigoApiSoap().createGuest(req, auth);

 

    //Now examine the results:

}

catch (Exception ex)

{

    System.out.println("Error: " + ex.getMessage());

}

CSV

This method does not support csv output.