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:
<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>
None
mbapi
command
showXMLHeader
params
mergePrimaryContact
whether to merge primary contact information with the client
clientID
The ID of the client to fetch. This will always select at most 1 client.
domainID
The ID of a domain associated with the client to fetch. This is useful if a client ID is not readily available.
packageID
The ID of a package associated with the client to fetch. This is useful if a client ID is not readily available.
invoiceID
The ID of an invoice associated with the client to fetch. This is useful if a client ID is not readily available.
certID
The ID of as SSL cert associated with the client to fetch. This is useful if a client ID is not readily available.
creditID
The ID of an accounting credit associated with the client to fetch. This is useful if a client ID is not readily available.
clientContactID
The ID of a contact associated with the client to fetch. This is useful if a client ID is not readily available.
clientBillingAccountID
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
The given name of the client. This can be different from the any of the client contacts.
clientLastName
The surname name of the client. This can be different from the any of the client contacts.
clientEmail
The email of the client. This can be different from the any of the client contacts.
clientCompany
The company name of the client. This can be different from the any of the client contacts.
clientDateCreatedLessThan
The maximum UNIX timestamp for which a client in the result set was created.
clientDateCreated
The exact UNIX timestamp for which a client in the result set was created.
clientDateCreatedGreaterThan
The minimum UNIX timestamp for which a client in the result set was created
contactUsername
The customer generated username for this client that is used for logging into the system.
countriesID
The ID of a country associated with the client.
applyTax
Set to 1 to fetch clients that are taxable. Set to 0 to fetch clients that are not taxed.
clientStatus
The string or integer representation of a status associated with the client.
clientActive
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
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
0 for inactive 1 for active packages on this client's account.
packageStatus
The integer representation of a status associated with the client's package.
packageType
The integer representation of a type ID associated with the client's package.
getDomainData
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
Set to 1 obtain all invoice data associated with the client.
getAccountingData
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
accounting entries least date
generalLedgerDateCreatedGreatest
accounting entries greatest date
getCertData
Set to 1 obtain all SSL certificate data associated with the client. Possible Values: 0=None, 1=All Data, 2=Sum by Status
getContactData
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
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
Set to 1 obtain all bookmarks associated with the client.
getClientAttributeData
Set to 1 obtain all client attributes associated with the client.
getCompanyData
Set to 1 obtain all company data that the client is associated with.
getClientGroupData
Set to 1 obtain all client group data for the groups that the client is associated with.
getCompanyData
Set to 1 obtain all company information this client is associated with.
getClientStats
Set to 1 obtain a count of clients grouped by status. Useful for reports.
getClientTrend
Set to 1 obtain a count of clients grouped by groupClientTrendBy. Useful for reports.
groupClientTrendBy
Set to the grouping time to use when calling getClientTrend. Options: "day", "week", "month", "year". Useful for reports.
getClientLastAccess
Set to 1 obtain the session data for the client. This includes the active login and login IP
getTicketData
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
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
Used with some columns to denote type of comparison to use the the query. Ex. LIKE, =
sortDir
sortColumn
recordOffset
numRecords