GetClients

Description

This command is used to obtain client data and all associated data tied to that client. This includes contacts, billing accounts, packages, domains, ssl certs, accounting data, bookmarks, and client group data. This data can be retrieved in full, or many can be grouped by status and return statistical information. Care should be used in using this command as it is easily possible to return very large data sets that can cause processing difficulties. Something similar to the following XML should be passed to dispatchMBAPI() when you want to call the GetClients command:

Attributes

package
modernbill
subpackage
mbapi
version
0.1
author
Michael Fountain

Example Request

	<mbapi>
		<command><!-- None --></command>
		<showXMLHeader><!-- None --></showXMLHeader>
		<params>
			<mergePrimaryContact><!-- boolean --></mergePrimaryContact>
			<clientID><!-- int --></clientID>
			<domainID><!-- int --></domainID>
			<packageID><!-- int --></packageID>
			<invoiceID><!-- int --></invoiceID>
			<certID><!-- int --></certID>
			<creditID><!-- int --></creditID>
			<clientContactID><!-- int --></clientContactID>
			<clientBillingAccountID><!-- int --></clientBillingAccountID>
			<clientFirstName><!-- string --></clientFirstName>
			<clientLastName><!-- string --></clientLastName>
			<clientEmail><!-- string --></clientEmail>
			<clientCompany><!-- string --></clientCompany>
			<clientDateCreatedLessThan><!-- int --></clientDateCreatedLessThan>
			<clientDateCreated><!-- int --></clientDateCreated>
			<clientDateCreatedGreaterThan><!-- int --></clientDateCreatedGreaterThan>
			<contactUsername><!-- string --></contactUsername>
			<countriesID><!-- int --></countriesID>
			<applyTax><!-- int --></applyTax>
			<clientStatus><!-- string/int --></clientStatus>
			<clientActive><!-- int --></clientActive>
			<getPackageData><!-- int --></getPackageData>
			<packageActive><!-- string/int --></packageActive>
			<packageStatus><!-- string/int --></packageStatus>
			<packageType><!-- string/int --></packageType>
			<getDomainData><!-- int --></getDomainData>
			<getInvoiceData><!-- int --></getInvoiceData>
			<getAccountingData><!-- int --></getAccountingData>
			<generalLedgerDateCreatedLeast><!-- int --></generalLedgerDateCreatedLeast>
			<generalLedgerDateCreatedGreatest><!-- int --></generalLedgerDateCreatedGreatest>
			<getCertData><!-- int --></getCertData>
			<getContactData><!-- int --></getContactData>
			<getBillingData><!-- int --></getBillingData>
			<getBookmarkData><!-- int --></getBookmarkData>
			<getClientAttributeData><!-- int --></getClientAttributeData>
			<getCompanyData><!-- int --></getCompanyData>
			<getClientGroupData><!-- int --></getClientGroupData>
			<getCompanyData><!-- int --></getCompanyData>
			<getClientStats><!-- int --></getClientStats>
			<getClientTrend><!-- int --></getClientTrend>
			<groupClientTrendBy><!-- string --></groupClientTrendBy>
			<getClientLastAccess><!-- int --></getClientLastAccess>
			<getTicketData><!-- int --></getTicketData>
			<getNoteData><!-- int --></getNoteData>
			<comparisonOperator><!-- string --></comparisonOperator>
			<sortDir><!-- None --></sortDir>
			<sortColumn><!-- None --></sortColumn>
			<recordOffset><!-- None --></recordOffset>
			<numRecords><!-- None --></numRecords>
		</params>
	</mbapi>

		

Example Response

None
		

Request Elements

mbapi
Type
None
Description
None
Children
command
Type
None
Description
None
showXMLHeader
Type
None
Description
None
params
Type
None
Description
None
Children
mergePrimaryContact
Type
boolean
Description

whether to merge primary contact information with the client

clientID
Type
int
Description

The ID of the client to fetch. This will always select at most 1 client.

domainID
Type
int
Description

The ID of a domain associated with the client to fetch. This is useful if a client ID is not readily available.

packageID
Type
int
Description

The ID of a package associated with the client to fetch. This is useful if a client ID is not readily available.

invoiceID
Type
int
Description

The ID of an invoice associated with the client to fetch. This is useful if a client ID is not readily available.

certID
Type
int
Description

The ID of as SSL cert associated with the client to fetch. This is useful if a client ID is not readily available.

creditID
Type
int
Description

The ID of an accounting credit associated with the client to fetch. This is useful if a client ID is not readily available.

clientContactID
Type
int
Description

The ID of a contact associated with the client to fetch. This is useful if a client ID is not readily available.

clientBillingAccountID
Type
int
Description

The ID of a billing account associated with the client to fetch. This is associated through the client contact. This is useful if a client ID is not readily available.

clientFirstName
Type
string
Description

The given name of the client. This can be different from the any of the client contacts.

clientLastName
Type
string
Description

The surname name of the client. This can be different from the any of the client contacts.

clientEmail
Type
string
Description

The email of the client. This can be different from the any of the client contacts.

clientCompany
Type
string
Description

The company name of the client. This can be different from the any of the client contacts.

clientDateCreatedLessThan
Type
int
Description

The maximum UNIX timestamp for which a client in the result set was created.

clientDateCreated
Type
int
Description

The exact UNIX timestamp for which a client in the result set was created.

clientDateCreatedGreaterThan
Type
int
Description

The minimum UNIX timestamp for which a client in the result set was created

contactUsername
Type
string
Description

The customer generated username for this client that is used for logging into the system.

countriesID
Type
int
Description

The ID of a country associated with the client.

applyTax
Type
int
Description

Set to 1 to fetch clients that are taxable. Set to 0 to fetch clients that are not taxed.

clientStatus
Type
string/int
Description

The string or integer representation of a status associated with the client.

clientActive
Type
int
Description

Set to 1 to fetch clients that are active. Set to 0 to fetch clients that are not active. This setting is complementary to the client status.

getPackageData
Type
int
Description

Set to obtain package data associated with the client. Possible Values: 0=None, 1=All Data, 2=Sum by Status, 3=Sum by Billing Cycle, 4=Sum by Product ID

packageActive
Type
string/int
Description

0 for inactive 1 for active packages on this client's account.

packageStatus
Type
string/int
Description

The integer representation of a status associated with the client's package.

packageType
Type
string/int
Description

The integer representation of a type ID associated with the client's package.

getDomainData
Type
int
Description

Set to obtain domain data associated with the client. Possible Values: 0=None, 1=All Data, 2=Sum by Status, 3=Sum by TLD

getInvoiceData
Type
int
Description

Set to 1 obtain all invoice data associated with the client.

getAccountingData
Type
int
Description

Set to 1 obtain all transactional accounting data associated with the client 2= Last 5, 3=Last. This is different from billinag account information which can be obtained with getBillingData

generalLedgerDateCreatedLeast
Type
int
Description

accounting entries least date

generalLedgerDateCreatedGreatest
Type
int
Description

accounting entries greatest date

getCertData
Type
int
Description

Set to 1 obtain all SSL certificate data associated with the client. Possible Values: 0=None, 1=All Data, 2=Sum by Status

getContactData
Type
int
Description

Set to obtain all contact data associated with the client. Possible Values: 0=None, 1=All Data, 2=Sum by Count, 3=Primary Contact, 4=Single Record by clientContactID

getBillingData
Type
int
Description

Set to obtain all billng account associated with the client or contact. Possible Values: 0=None, 1=All Data, 2=Sum by Count, 3=Many records by clientContactID, 4=Single Record by clientBillingAccountID, 5=Single Record by clientEmail

getBookmarkData
Type
int
Description

Set to 1 obtain all bookmarks associated with the client.

getClientAttributeData
Type
int
Description

Set to 1 obtain all client attributes associated with the client.

getCompanyData
Type
int
Description

Set to 1 obtain all company data that the client is associated with.

getClientGroupData
Type
int
Description

Set to 1 obtain all client group data for the groups that the client is associated with.

getCompanyData
Type
int
Description

Set to 1 obtain all company information this client is associated with.

getClientStats
Type
int
Description

Set to 1 obtain a count of clients grouped by status. Useful for reports.

getClientTrend
Type
int
Description

Set to 1 obtain a count of clients grouped by groupClientTrendBy. Useful for reports.

groupClientTrendBy
Type
string
Description

Set to the grouping time to use when calling getClientTrend. Options: "day", "week", "month", "year". Useful for reports.

getClientLastAccess
Type
int
Description

Set to 1 obtain the session data for the client. This includes the active login and login IP

getTicketData
Type
int
Description

Set to 1 obtain all ticket data for the client. Possible Values: 0=None, 1=All Data, 2=Last 5 Tickets, 3=Last Ticket

getNoteData
Type
int
Description

Set to 1 obtain all staff notes on the client. Possible Values: 0=None, 1=All Data, 2=Last 5 Notes, 3=Last Note

comparisonOperator
Type
string
Description

Used with some columns to denote type of comparison to use the the query. Ex. LIKE, =

sortDir
Type
None
Description
None
sortColumn
Type
None
Description
None
recordOffset
Type
None
Description
None
numRecords
Type
None
Description
None

Response Elements

None