Skip to content

Latest commit

 

History

History
2036 lines (1504 loc) · 94.2 KB

File metadata and controls

2036 lines (1504 loc) · 94.2 KB

whmcs_client.DefaultApi

All URIs are relative to https://your-whmcs-instance.com/includes

Method HTTP request Description
add_client POST /api.php?action=AddClient Add a new client
add_order POST /api.php?action=AddOrder Create a new order
affiliate_activate POST /api.php?action=AffiliateActivate Activate affiliate status
cancel_order POST /api.php?action=CancelOrder Cancel a pending order
delete_order POST /api.php?action=DeleteOrder Delete an order
domain_get_nameservers POST /api.php?action=DomainGetNameservers Get domain nameservers
domain_update_nameservers POST /api.php?action=DomainUpdateNameservers Update domain nameservers
domain_whois POST /api.php?action=DomainWhois Lookup domain WHOIS
get_affiliates POST /api.php?action=GetAffiliates Get affiliates
get_clients POST /api.php?action=GetClients Get clients
get_clients_details POST /api.php?action=GetClientsDetails Get client details
get_clients_domains POST /api.php?action=GetClientsDomains Get client domains
get_clients_products POST /api.php?action=GetClientsProducts Get client products
get_currencies POST /api.php?action=GetCurrencies Get currencies
get_invoices POST /api.php?action=GetInvoices Get invoices
get_invoices_details POST /api.php?action=GetInvoicesDetails Get invoices with line item details
get_orders POST /api.php?action=GetOrders Get orders
get_payment_methods POST /api.php?action=GetPaymentMethods Get payment methods
get_products POST /api.php?action=GetProducts Get products
get_tld_pricing POST /api.php?action=GetTLDPricing Get TLD pricing
get_transactions POST /api.php?action=GetTransactions Get transactions
update_client POST /api.php?action=UpdateClient Update client details

add_client

AddClientResponse add_client(username, password, firstname, lastname, email, address1, city, state, postcode, country, phonenumber, accesskey=accesskey, responsetype=responsetype, owner_user_id=owner_user_id, companyname=companyname, address2=address2, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, marketingoptin=marketingoptin, noemail=noemail, skipvalidation=skipvalidation)

Add a new client

Creates a new client account in WHMCS

Example

import whmcs_client
from whmcs_client.models.add_client_response import AddClientResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    firstname = 'firstname_example' # str | First name of the client
    lastname = 'lastname_example' # str | Last name of the client
    email = 'email_example' # str | Email address of the client
    address1 = 'address1_example' # str | Address line 1
    city = 'city_example' # str | City
    state = 'state_example' # str | State
    postcode = 'postcode_example' # str | Postal code
    country = 'country_example' # str | 2 character ISO country code
    phonenumber = 'phonenumber_example' # str | Phone number
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    owner_user_id = 56 # int | The ID of the user that should own the client (optional)
    companyname = 'companyname_example' # str | Company name (optional)
    address2 = 'address2_example' # str | Address line 2 (optional)
    tax_id = 'tax_id_example' # str | Client's tax ID (optional)
    password2 = 'password2_example' # str | Password for the new user account (optional)
    securityqid = 56 # int | Security question ID (optional)
    securityqans = 'securityqans_example' # str | Security question answer (optional)
    currency = 56 # int | Currency ID (optional)
    groupid = 56 # int | Client group ID (optional)
    customfields = 'customfields_example' # str | Base64 encoded serialized array of custom field values (optional)
    language = 'language_example' # str | Default language setting (optional)
    clientip = 'clientip_example' # str | Originating IP address (optional)
    notes = 'notes_example' # str | Admin only notes (optional)
    marketingoptin = True # bool | Opt-in to marketing emails (optional)
    noemail = True # bool | Set to true to suppress the Order Confirmation email being sent (optional)
    skipvalidation = True # bool | Ignore required field validation (optional)

    try:
        # Add a new client
        api_response = api_instance.add_client(username, password, firstname, lastname, email, address1, city, state, postcode, country, phonenumber, accesskey=accesskey, responsetype=responsetype, owner_user_id=owner_user_id, companyname=companyname, address2=address2, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, marketingoptin=marketingoptin, noemail=noemail, skipvalidation=skipvalidation)
        print("The response of DefaultApi->add_client:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->add_client: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
firstname str First name of the client
lastname str Last name of the client
email str Email address of the client
address1 str Address line 1
city str City
state str State
postcode str Postal code
country str 2 character ISO country code
phonenumber str Phone number
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
owner_user_id int The ID of the user that should own the client [optional]
companyname str Company name [optional]
address2 str Address line 2 [optional]
tax_id str Client's tax ID [optional]
password2 str Password for the new user account [optional]
securityqid int Security question ID [optional]
securityqans str Security question answer [optional]
currency int Currency ID [optional]
groupid int Client group ID [optional]
customfields str Base64 encoded serialized array of custom field values [optional]
language str Default language setting [optional]
clientip str Originating IP address [optional]
notes str Admin only notes [optional]
marketingoptin bool Opt-in to marketing emails [optional]
noemail bool Set to true to suppress the Order Confirmation email being sent [optional]
skipvalidation bool Ignore required field validation [optional]

Return type

AddClientResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Client created successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

add_order

AddOrderResponse add_order(username, password, clientid, paymentmethod, accesskey=accesskey, responsetype=responsetype, clientemail=clientemail, pid=pid, qty=qty, domain=domain, billingcycle=billingcycle, domaintype=domaintype, regperiod=regperiod, idnlanguage=idnlanguage, eppcode=eppcode, nameserver1=nameserver1, nameserver2=nameserver2, nameserver3=nameserver3, nameserver4=nameserver4, nameserver5=nameserver5, configoptions=configoptions, priceoverride=priceoverride, promocode=promocode, promooverride=promooverride, affid=affid, noinvoice=noinvoice, noinvoiceemail=noinvoiceemail, addons=addons, addonsqty=addonsqty, hostname=hostname, ns1prefix=ns1prefix, ns2prefix=ns2prefix, rootpw=rootpw, contactid=contactid, dnsmanagement=dnsmanagement, domainfields=domainfields, emailforwarding=emailforwarding, idprotection=idprotection, domainpriceoverride=domainpriceoverride, domainrenewoverride=domainrenewoverride, domainrenewals=domainrenewals, addonid=addonid, addonidqty=addonidqty, serviceid=serviceid, addonids=addonids, addonidsqty=addonidsqty, serviceids=serviceids, servicerenewals=servicerenewals, addonrenewals=addonrenewals)

Create a new order

Places a new order for products/services

Example

import whmcs_client
from whmcs_client.models.add_order_response import AddOrderResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    clientid = 56 # int | The ID of the client to add the order for
    paymentmethod = 'paymentmethod_example' # str | The payment method for the order in the system format (e.g., paypal, mailin)
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    clientemail = 'clientemail_example' # str | The email address of the client to update (optional)
    pid = [56] # List[int] | Array of product IDs to add to the order (optional)
    qty = [56] # List[int] | Array of product quantities (optional)
    domain = ['domain_example'] # List[str] | Array of domain names associated with the products/domains (optional)
    billingcycle = ['billingcycle_example'] # List[str] | Array of billing cycles for the products (optional)
    domaintype = ['domaintype_example'] # List[str] | For domain registrations, array of register or transfer values (optional)
    regperiod = [56] # List[int] | For domain registrations, the registration periods for the domains (optional)
    idnlanguage = ['idnlanguage_example'] # List[str] | For IDN domain registrations, the language codes for the domains (optional)
    eppcode = ['eppcode_example'] # List[str] | For domain transfers, the EPP codes for the domains being transferred (optional)
    nameserver1 = 'nameserver1_example' # str | The first nameserver to apply to all domains in the order (optional)
    nameserver2 = 'nameserver2_example' # str | The second nameserver to apply to all domains in the order (optional)
    nameserver3 = 'nameserver3_example' # str | The third nameserver to apply to all domains in the order (optional)
    nameserver4 = 'nameserver4_example' # str | The fourth nameserver to apply to all domains in the order (optional)
    nameserver5 = 'nameserver5_example' # str | The fifth nameserver to apply to all domains in the order (optional)
    configoptions = ['configoptions_example'] # List[str] | Array of base64 encoded serialized array of product configurable options values (optional)
    priceoverride = [3.4] # List[float] | Override the price of the product being ordered (optional)
    promocode = 'promocode_example' # str | The promotion code to apply to the order (optional)
    promooverride = True # bool | Should the promotion apply to the order even without matching promotional products (optional)
    affid = 56 # int | The affiliate ID to associate with the order (optional)
    noinvoice = True # bool | Set to true to suppress the invoice generating for the whole order (optional)
    noinvoiceemail = True # bool | Set to true to suppress the Invoice Created email being sent for the order (optional)
    addons = ['addons_example'] # List[str] | Array of comma separated lists of addons to create on order with the products (optional)
    addonsqty = ['addonsqty_example'] # List[str] | Array of comma-separated lists of quantities for addons associated with products (optional)
    hostname = ['hostname_example'] # List[str] | Array of hostnames for VPS/Dedicated Server orders (optional)
    ns1prefix = ['ns1prefix_example'] # List[str] | Array of first nameserver prefixes for VPS/Dedicated servers (e.g., ns1 in ns1.hostname.com) (optional)
    ns2prefix = ['ns2prefix_example'] # List[str] | Array of second nameserver prefixes for VPS/Dedicated servers (e.g., ns2 in ns2.hostname.com) (optional)
    rootpw = ['rootpw_example'] # List[str] | Array of desired root passwords for VPS/Dedicated servers (optional)
    contactid = 56 # int | The ID of the contact, associated with the client, that should apply to all domains in the order (optional)
    dnsmanagement = [True] # List[bool] | Add DNS Management to the Domain Order (optional)
    domainfields = ['domainfields_example'] # List[str] | Array of base64 encoded serialized array of TLD Specific Field Values (optional)
    emailforwarding = [True] # List[bool] | Add Email Forwarding to the Domain Order (optional)
    idprotection = [True] # List[bool] | Add ID Protection to the Domain Order (optional)
    domainpriceoverride = [3.4] # List[float] | Override the price of the registration price on the domain being ordered (optional)
    domainrenewoverride = [3.4] # List[float] | Override the price of the renewal price on the domain being ordered (optional)
    domainrenewals = None # Dict[str, int] | A name -> value object of domainName -> renewalPeriod renewals to add an order for (optional)
    addonid = 56 # int | The Addon ID for an Addon Only Order (optional)
    addonidqty = 56 # int | The quantity of addons in an addon-only order (optional)
    serviceid = 56 # int | The service ID for the addon only order (optional)
    addonids = [56] # List[int] | Array of addon IDs for an Addon Only Order (optional)
    addonidsqty = [56] # List[int] | Array of quantities for an addon-only order (optional)
    serviceids = [56] # List[int] | Array of service IDs to associate the addons for an Addon Only order (optional)
    servicerenewals = [56] # List[int] | Array of service IDs to be on-demand renewed (optional)
    addonrenewals = [56] # List[int] | Array of service addon IDs to be on-demand renewed (optional)

    try:
        # Create a new order
        api_response = api_instance.add_order(username, password, clientid, paymentmethod, accesskey=accesskey, responsetype=responsetype, clientemail=clientemail, pid=pid, qty=qty, domain=domain, billingcycle=billingcycle, domaintype=domaintype, regperiod=regperiod, idnlanguage=idnlanguage, eppcode=eppcode, nameserver1=nameserver1, nameserver2=nameserver2, nameserver3=nameserver3, nameserver4=nameserver4, nameserver5=nameserver5, configoptions=configoptions, priceoverride=priceoverride, promocode=promocode, promooverride=promooverride, affid=affid, noinvoice=noinvoice, noinvoiceemail=noinvoiceemail, addons=addons, addonsqty=addonsqty, hostname=hostname, ns1prefix=ns1prefix, ns2prefix=ns2prefix, rootpw=rootpw, contactid=contactid, dnsmanagement=dnsmanagement, domainfields=domainfields, emailforwarding=emailforwarding, idprotection=idprotection, domainpriceoverride=domainpriceoverride, domainrenewoverride=domainrenewoverride, domainrenewals=domainrenewals, addonid=addonid, addonidqty=addonidqty, serviceid=serviceid, addonids=addonids, addonidsqty=addonidsqty, serviceids=serviceids, servicerenewals=servicerenewals, addonrenewals=addonrenewals)
        print("The response of DefaultApi->add_order:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->add_order: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
clientid int The ID of the client to add the order for
paymentmethod str The payment method for the order in the system format (e.g., paypal, mailin)
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
clientemail str The email address of the client to update [optional]
pid List[int] Array of product IDs to add to the order [optional]
qty List[int] Array of product quantities [optional]
domain List[str] Array of domain names associated with the products/domains [optional]
billingcycle List[str] Array of billing cycles for the products [optional]
domaintype List[str] For domain registrations, array of register or transfer values [optional]
regperiod List[int] For domain registrations, the registration periods for the domains [optional]
idnlanguage List[str] For IDN domain registrations, the language codes for the domains [optional]
eppcode List[str] For domain transfers, the EPP codes for the domains being transferred [optional]
nameserver1 str The first nameserver to apply to all domains in the order [optional]
nameserver2 str The second nameserver to apply to all domains in the order [optional]
nameserver3 str The third nameserver to apply to all domains in the order [optional]
nameserver4 str The fourth nameserver to apply to all domains in the order [optional]
nameserver5 str The fifth nameserver to apply to all domains in the order [optional]
configoptions List[str] Array of base64 encoded serialized array of product configurable options values [optional]
priceoverride List[float] Override the price of the product being ordered [optional]
promocode str The promotion code to apply to the order [optional]
promooverride bool Should the promotion apply to the order even without matching promotional products [optional]
affid int The affiliate ID to associate with the order [optional]
noinvoice bool Set to true to suppress the invoice generating for the whole order [optional]
noinvoiceemail bool Set to true to suppress the Invoice Created email being sent for the order [optional]
addons List[str] Array of comma separated lists of addons to create on order with the products [optional]
addonsqty List[str] Array of comma-separated lists of quantities for addons associated with products [optional]
hostname List[str] Array of hostnames for VPS/Dedicated Server orders [optional]
ns1prefix List[str] Array of first nameserver prefixes for VPS/Dedicated servers (e.g., ns1 in ns1.hostname.com) [optional]
ns2prefix List[str] Array of second nameserver prefixes for VPS/Dedicated servers (e.g., ns2 in ns2.hostname.com) [optional]
rootpw List[str] Array of desired root passwords for VPS/Dedicated servers [optional]
contactid int The ID of the contact, associated with the client, that should apply to all domains in the order [optional]
dnsmanagement List[bool] Add DNS Management to the Domain Order [optional]
domainfields List[str] Array of base64 encoded serialized array of TLD Specific Field Values [optional]
emailforwarding List[bool] Add Email Forwarding to the Domain Order [optional]
idprotection List[bool] Add ID Protection to the Domain Order [optional]
domainpriceoverride List[float] Override the price of the registration price on the domain being ordered [optional]
domainrenewoverride List[float] Override the price of the renewal price on the domain being ordered [optional]
domainrenewals Dict[str, int] A name -> value object of domainName -> renewalPeriod renewals to add an order for [optional]
addonid int The Addon ID for an Addon Only Order [optional]
addonidqty int The quantity of addons in an addon-only order [optional]
serviceid int The service ID for the addon only order [optional]
addonids List[int] Array of addon IDs for an Addon Only Order [optional]
addonidsqty List[int] Array of quantities for an addon-only order [optional]
serviceids List[int] Array of service IDs to associate the addons for an Addon Only order [optional]
servicerenewals List[int] Array of service IDs to be on-demand renewed [optional]
addonrenewals List[int] Array of service addon IDs to be on-demand renewed [optional]

Return type

AddOrderResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Order created successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

affiliate_activate

WHMCSSuccessResponse affiliate_activate(username, password, userid, accesskey=accesskey, responsetype=responsetype)

Activate affiliate status

Activate affiliate referrals for a client

Example

import whmcs_client
from whmcs_client.models.whmcs_success_response import WHMCSSuccessResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    userid = 56 # int | The client ID to activate affiliate status for
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Activate affiliate status
        api_response = api_instance.affiliate_activate(username, password, userid, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->affiliate_activate:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->affiliate_activate: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
userid int The client ID to activate affiliate status for
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

WHMCSSuccessResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Affiliate activated successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

cancel_order

WHMCSSuccessResponse cancel_order(username, password, orderid, accesskey=accesskey, responsetype=responsetype, cancelsub=cancelsub, noemail=noemail)

Cancel a pending order

Cancels an order that is still pending

Example

import whmcs_client
from whmcs_client.models.whmcs_success_response import WHMCSSuccessResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    orderid = 56 # int | The ID of the pending order
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    cancelsub = True # bool | Attempt to cancel the subscription associated with the products (optional)
    noemail = True # bool | Set to true to stop the invoice payment email being sent if the invoice becomes paid (optional)

    try:
        # Cancel a pending order
        api_response = api_instance.cancel_order(username, password, orderid, accesskey=accesskey, responsetype=responsetype, cancelsub=cancelsub, noemail=noemail)
        print("The response of DefaultApi->cancel_order:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->cancel_order: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
orderid int The ID of the pending order
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
cancelsub bool Attempt to cancel the subscription associated with the products [optional]
noemail bool Set to true to stop the invoice payment email being sent if the invoice becomes paid [optional]

Return type

WHMCSSuccessResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Order cancelled successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_order

WHMCSSuccessResponse delete_order(username, password, orderid, accesskey=accesskey, responsetype=responsetype)

Delete an order

Permanently deletes a cancelled or fraud order

Example

import whmcs_client
from whmcs_client.models.whmcs_success_response import WHMCSSuccessResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    orderid = 56 # int | The order to be deleted
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Delete an order
        api_response = api_instance.delete_order(username, password, orderid, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->delete_order:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->delete_order: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
orderid int The order to be deleted
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

WHMCSSuccessResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Order deleted successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

domain_get_nameservers

DomainGetNameserversResponse domain_get_nameservers(username, password, domainid, accesskey=accesskey, responsetype=responsetype)

Get domain nameservers

Obtain the current nameservers for a domain

Example

import whmcs_client
from whmcs_client.models.domain_get_nameservers_response import DomainGetNameserversResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    domainid = 56 # int | The id of the domain to obtain the nameservers for
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Get domain nameservers
        api_response = api_instance.domain_get_nameservers(username, password, domainid, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->domain_get_nameservers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->domain_get_nameservers: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
domainid int The id of the domain to obtain the nameservers for
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

DomainGetNameserversResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Nameservers retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

domain_update_nameservers

WHMCSSuccessResponse domain_update_nameservers(username, password, accesskey=accesskey, responsetype=responsetype, domainid=domainid, domain=domain, ns1=ns1, ns2=ns2, ns3=ns3, ns4=ns4, ns5=ns5)

Update domain nameservers

Sends the save nameservers command to the registrar for the domain

Example

import whmcs_client
from whmcs_client.models.whmcs_success_response import WHMCSSuccessResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    domainid = 56 # int | The id of the domain to update the nameservers for (optional)
    domain = 'domain_example' # str | The domain name to update the nameservers for (optional)
    ns1 = 'ns1_example' # str | The first nameserver (optional)
    ns2 = 'ns2_example' # str | The second nameserver (optional)
    ns3 = 'ns3_example' # str | The third nameserver (optional)
    ns4 = 'ns4_example' # str | The fourth nameserver (optional)
    ns5 = 'ns5_example' # str | The fifth nameserver (optional)

    try:
        # Update domain nameservers
        api_response = api_instance.domain_update_nameservers(username, password, accesskey=accesskey, responsetype=responsetype, domainid=domainid, domain=domain, ns1=ns1, ns2=ns2, ns3=ns3, ns4=ns4, ns5=ns5)
        print("The response of DefaultApi->domain_update_nameservers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->domain_update_nameservers: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
domainid int The id of the domain to update the nameservers for [optional]
domain str The domain name to update the nameservers for [optional]
ns1 str The first nameserver [optional]
ns2 str The second nameserver [optional]
ns3 str The third nameserver [optional]
ns4 str The fourth nameserver [optional]
ns5 str The fifth nameserver [optional]

Return type

WHMCSSuccessResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Nameservers updated successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

domain_whois

DomainWhoisResponse domain_whois(username, password, domain, accesskey=accesskey, responsetype=responsetype)

Lookup domain WHOIS

Retrieve domain whois information

Example

import whmcs_client
from whmcs_client.models.domain_whois_response import DomainWhoisResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    domain = 'domain_example' # str | The domain name to lookup
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Lookup domain WHOIS
        api_response = api_instance.domain_whois(username, password, domain, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->domain_whois:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->domain_whois: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
domain str The domain name to lookup
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

DomainWhoisResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 WHOIS lookup completed successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_affiliates

GetAffiliatesResponse get_affiliates(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, visitors=visitors, paytype=paytype, payamount=payamount, onetime=onetime, balance=balance, withdrawn=withdrawn)

Get affiliates

Obtain an array of affiliates

Example

import whmcs_client
from whmcs_client.models.get_affiliates_response import GetAffiliatesResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned affiliate data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    userid = 56 # int | Obtain affiliate data for a specific client account (optional)
    visitors = 56 # int | Provide affiliates that match a specific visitor count (optional)
    paytype = 'paytype_example' # str | Provide affiliates matching the paytype provided (optional)
    payamount = 3.4 # float | Provide affiliates matching a specific overridden payout amount (optional)
    onetime = 56 # int | Provide affiliates configured to receive one time affiliates (optional)
    balance = 3.4 # float | Provide affiliates that have this balance (optional)
    withdrawn = 3.4 # float | Provide affiliates that have withdrawn this amount (optional)

    try:
        # Get affiliates
        api_response = api_instance.get_affiliates(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, visitors=visitors, paytype=paytype, payamount=payamount, onetime=onetime, balance=balance, withdrawn=withdrawn)
        print("The response of DefaultApi->get_affiliates:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_affiliates: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned affiliate data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
userid int Obtain affiliate data for a specific client account [optional]
visitors int Provide affiliates that match a specific visitor count [optional]
paytype str Provide affiliates matching the paytype provided [optional]
payamount float Provide affiliates matching a specific overridden payout amount [optional]
onetime int Provide affiliates configured to receive one time affiliates [optional]
balance float Provide affiliates that have this balance [optional]
withdrawn float Provide affiliates that have withdrawn this amount [optional]

Return type

GetAffiliatesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Affiliates retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_clients

GetClientsResponse get_clients(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, sorting=sorting, status=status, search=search, orderby=orderby)

Get clients

Obtain the clients that match passed criteria

Example

import whmcs_client
from whmcs_client.models.get_clients_response import GetClientsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned log data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    sorting = ASC # str | The direction to sort the results. ASC or DESC. (optional) (default to ASC)
    status = 'status_example' # str | Optional desired Client Status. 'Active', 'Inactive', or 'Closed'. (optional)
    search = 'search_example' # str | The search term to look for at the start of email, firstname, lastname, fullname or companyname (optional)
    orderby = 'orderby_example' # str | The column to order by. id, firstname, lastname, companyname, email, groupid, datecreated, status (optional)

    try:
        # Get clients
        api_response = api_instance.get_clients(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, sorting=sorting, status=status, search=search, orderby=orderby)
        print("The response of DefaultApi->get_clients:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_clients: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned log data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
sorting str The direction to sort the results. ASC or DESC. [optional] [default to ASC]
status str Optional desired Client Status. 'Active', 'Inactive', or 'Closed'. [optional]
search str The search term to look for at the start of email, firstname, lastname, fullname or companyname [optional]
orderby str The column to order by. id, firstname, lastname, companyname, email, groupid, datecreated, status [optional]

Return type

GetClientsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Clients retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_clients_details

GetClientsDetailsResponse get_clients_details(username, password, accesskey=accesskey, responsetype=responsetype, clientid=clientid, email=email, stats=stats)

Get client details

Obtain detailed information for a specific client

Example

import whmcs_client
from whmcs_client.models.get_clients_details_response import GetClientsDetailsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    clientid = 56 # int | The client id to obtain the details for (optional)
    email = 'email_example' # str | The email address of the client to search for (optional)
    stats = True # bool | Also return additional client statistics (optional)

    try:
        # Get client details
        api_response = api_instance.get_clients_details(username, password, accesskey=accesskey, responsetype=responsetype, clientid=clientid, email=email, stats=stats)
        print("The response of DefaultApi->get_clients_details:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_clients_details: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
clientid int The client id to obtain the details for [optional]
email str The email address of the client to search for [optional]
stats bool Also return additional client statistics [optional]

Return type

GetClientsDetailsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Client details retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_clients_domains

GetClientsDomainsResponse get_clients_domains(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, clientid=clientid, domainid=domainid, domain=domain)

Get client domains

Obtain the domains associated with a client

Example

import whmcs_client
from whmcs_client.models.get_clients_domains_response import GetClientsDomainsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned log data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    clientid = 56 # int | The client id to obtain the details for (optional)
    domainid = 56 # int | The specific domain id to obtain the details for (optional)
    domain = 'domain_example' # str | The specific domain to obtain the details for (optional)

    try:
        # Get client domains
        api_response = api_instance.get_clients_domains(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, clientid=clientid, domainid=domainid, domain=domain)
        print("The response of DefaultApi->get_clients_domains:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_clients_domains: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned log data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
clientid int The client id to obtain the details for [optional]
domainid int The specific domain id to obtain the details for [optional]
domain str The specific domain to obtain the details for [optional]

Return type

GetClientsDomainsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Domains retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_clients_products

GetClientsProductsResponse get_clients_products(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, clientid=clientid, serviceid=serviceid, pid=pid, domain=domain, username2=username2)

Get client products

Obtain a list of client purchased products matching the criteria

Example

import whmcs_client
from whmcs_client.models.get_clients_products_response import GetClientsProductsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned product data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    clientid = 56 # int | The client id to obtain the details for (optional)
    serviceid = 56 # int | The specific service id to obtain the details for (optional)
    pid = 56 # int | The specific product id to obtain the details for (optional)
    domain = 'domain_example' # str | The specific domain to obtain the service details for (optional)
    username2 = 'username2_example' # str | The specific username to obtain the details for (optional)

    try:
        # Get client products
        api_response = api_instance.get_clients_products(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, clientid=clientid, serviceid=serviceid, pid=pid, domain=domain, username2=username2)
        print("The response of DefaultApi->get_clients_products:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_clients_products: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned product data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
clientid int The client id to obtain the details for [optional]
serviceid int The specific service id to obtain the details for [optional]
pid int The specific product id to obtain the details for [optional]
domain str The specific domain to obtain the service details for [optional]
username2 str The specific username to obtain the details for [optional]

Return type

GetClientsProductsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Client products retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_currencies

GetCurrenciesResponse get_currencies(username, password, accesskey=accesskey, responsetype=responsetype)

Get currencies

Obtain the currencies configured in the system

Example

import whmcs_client
from whmcs_client.models.get_currencies_response import GetCurrenciesResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Get currencies
        api_response = api_instance.get_currencies(username, password, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->get_currencies:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_currencies: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

GetCurrenciesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Currencies retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_invoices

GetInvoicesResponse get_invoices(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, status=status, orderby=orderby, order=order)

Get invoices

Retrieve a list of invoices matching the provided criteria

Example

import whmcs_client
from whmcs_client.models.get_invoices_response import GetInvoicesResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned invoice data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    userid = 56 # int | Find invoices for a specific client id (optional)
    status = 'status_example' # str | Find invoices for a specific status, including Overdue (optional)
    orderby = 'orderby_example' # str | The field to sort results by (optional)
    order = 'order_example' # str | Sort direction for the invoice results (optional)

    try:
        # Get invoices
        api_response = api_instance.get_invoices(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, status=status, orderby=orderby, order=order)
        print("The response of DefaultApi->get_invoices:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_invoices: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned invoice data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
userid int Find invoices for a specific client id [optional]
status str Find invoices for a specific status, including Overdue [optional]
orderby str The field to sort results by [optional]
order str Sort direction for the invoice results [optional]

Return type

GetInvoicesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Invoices retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_invoices_details

GetInvoicesDetailsResponse get_invoices_details(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, status=status, orderby=orderby, order=order)

Get invoices with line item details

Custom action returning invoices in GetInvoice format with embedded line items

Example

import whmcs_client
from whmcs_client.models.get_invoices_details_response import GetInvoicesDetailsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned invoice data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    userid = 56 # int | Find invoices for a specific client id (optional)
    status = 'status_example' # str | Find invoices for a specific status, including Overdue (optional)
    orderby = 'orderby_example' # str | The field to sort results by (optional)
    order = 'order_example' # str | Sort direction for the invoice results (optional)

    try:
        # Get invoices with line item details
        api_response = api_instance.get_invoices_details(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, userid=userid, status=status, orderby=orderby, order=order)
        print("The response of DefaultApi->get_invoices_details:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_invoices_details: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned invoice data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
userid int Find invoices for a specific client id [optional]
status str Find invoices for a specific status, including Overdue [optional]
orderby str The field to sort results by [optional]
order str Sort direction for the invoice results [optional]

Return type

GetInvoicesDetailsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Invoices with line items retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_orders

GetOrdersResponse get_orders(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, id=id, userid=userid, requestor_id=requestor_id, status=status)

Get orders

Obtain orders matching the passed criteria

Example

import whmcs_client
from whmcs_client.models.get_orders_response import GetOrdersResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    limitstart = 0 # int | The offset for the returned order data (optional) (default to 0)
    limitnum = 25 # int | The number of records to return (optional) (default to 25)
    id = 56 # int | Find orders for a specific order id (optional)
    userid = 56 # int | Find orders for a specific client id (optional)
    requestor_id = 56 # int | Find orders for a specific requestor id (optional)
    status = 'status_example' # str | Find orders for a specific status (Active, Pending, Fraud, Cancelled) (optional)

    try:
        # Get orders
        api_response = api_instance.get_orders(username, password, accesskey=accesskey, responsetype=responsetype, limitstart=limitstart, limitnum=limitnum, id=id, userid=userid, requestor_id=requestor_id, status=status)
        print("The response of DefaultApi->get_orders:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_orders: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
limitstart int The offset for the returned order data [optional] [default to 0]
limitnum int The number of records to return [optional] [default to 25]
id int Find orders for a specific order id [optional]
userid int Find orders for a specific client id [optional]
requestor_id int Find orders for a specific requestor id [optional]
status str Find orders for a specific status (Active, Pending, Fraud, Cancelled) [optional]

Return type

GetOrdersResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Orders retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_payment_methods

GetPaymentMethodsResponse get_payment_methods(username, password, accesskey=accesskey, responsetype=responsetype)

Get payment methods

Retrieve activated payment methods

Example

import whmcs_client
from whmcs_client.models.get_payment_methods_response import GetPaymentMethodsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)

    try:
        # Get payment methods
        api_response = api_instance.get_payment_methods(username, password, accesskey=accesskey, responsetype=responsetype)
        print("The response of DefaultApi->get_payment_methods:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_payment_methods: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]

Return type

GetPaymentMethodsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Payment methods retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_products

GetProductsResponse get_products(username, password, accesskey=accesskey, responsetype=responsetype, pid=pid, gid=gid, module=module)

Get products

Retrieve configured products matching provided criteria

Example

import whmcs_client
from whmcs_client.models.get_products_response import GetProductsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    pid = 'pid_example' # str | Obtain a specific product id configuration. Can be a comma-separated list of ids. (optional)
    gid = 56 # int | Retrieve products in a specific group id (optional)
    module = 'module_example' # str | Retrieve products utilising a specific module (optional)

    try:
        # Get products
        api_response = api_instance.get_products(username, password, accesskey=accesskey, responsetype=responsetype, pid=pid, gid=gid, module=module)
        print("The response of DefaultApi->get_products:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_products: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
pid str Obtain a specific product id configuration. Can be a comma-separated list of ids. [optional]
gid int Retrieve products in a specific group id [optional]
module str Retrieve products utilising a specific module [optional]

Return type

GetProductsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Products retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_tld_pricing

GetTLDPricingResponse get_tld_pricing(username, password, accesskey=accesskey, responsetype=responsetype, currencyid=currencyid, clientid=clientid)

Get TLD pricing

Retrieve TLD pricing

Example

import whmcs_client
from whmcs_client.models.get_tld_pricing_response import GetTLDPricingResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    currencyid = 56 # int | The currency ID to fetch pricing for (optional)
    clientid = 56 # int | The client ID to fetch pricing for (optional)

    try:
        # Get TLD pricing
        api_response = api_instance.get_tld_pricing(username, password, accesskey=accesskey, responsetype=responsetype, currencyid=currencyid, clientid=clientid)
        print("The response of DefaultApi->get_tld_pricing:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_tld_pricing: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
currencyid int The currency ID to fetch pricing for [optional]
clientid int The client ID to fetch pricing for [optional]

Return type

GetTLDPricingResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 TLD pricing retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_transactions

GetTransactionsResponse get_transactions(username, password, accesskey=accesskey, responsetype=responsetype, invoiceid=invoiceid, clientid=clientid, transid=transid)

Get transactions

Obtain transactions matching the passed criteria

Example

import whmcs_client
from whmcs_client.models.get_transactions_response import GetTransactionsResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    invoiceid = 56 # int | Obtain transactions for a specific invoice id (optional)
    clientid = 56 # int | Find transactions for a specific client id (optional)
    transid = 'transid_example' # str | Find transactions for a specific transaction id (optional)

    try:
        # Get transactions
        api_response = api_instance.get_transactions(username, password, accesskey=accesskey, responsetype=responsetype, invoiceid=invoiceid, clientid=clientid, transid=transid)
        print("The response of DefaultApi->get_transactions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_transactions: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
invoiceid int Obtain transactions for a specific invoice id [optional]
clientid int Find transactions for a specific client id [optional]
transid str Find transactions for a specific transaction id [optional]

Return type

GetTransactionsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Transactions retrieved successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_client

UpdateClientResponse update_client(username, password, clientid, accesskey=accesskey, responsetype=responsetype, clientemail=clientemail, firstname=firstname, lastname=lastname, companyname=companyname, email=email, address1=address1, address2=address2, city=city, state=state, postcode=postcode, country=country, phonenumber=phonenumber, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, status=status, paymentmethod=paymentmethod, email_preferences_general=email_preferences_general, email_preferences_product=email_preferences_product, email_preferences_domain=email_preferences_domain, email_preferences_invoice=email_preferences_invoice, email_preferences_support=email_preferences_support, email_preferences_affiliate=email_preferences_affiliate, clearcreditcard=clearcreditcard, latefeeoveride=latefeeoveride, overideduenotices=overideduenotices, taxexempt=taxexempt, separateinvoices=separateinvoices, disableautocc=disableautocc, overrideautoclose=overrideautoclose)

Update client details

Modifies an existing client's information

Example

import whmcs_client
from whmcs_client.models.update_client_response import UpdateClientResponse
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)


# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    clientid = 56 # int | The ID of the client to update
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    clientemail = 'clientemail_example' # str | The email address of the client to update (optional)
    firstname = 'firstname_example' # str | First name of the client (optional)
    lastname = 'lastname_example' # str | Last name of the client (optional)
    companyname = 'companyname_example' # str | Company name (optional)
    email = 'email_example' # str | Email address of the client (optional)
    address1 = 'address1_example' # str | Address line 1 (optional)
    address2 = 'address2_example' # str | Address line 2 (optional)
    city = 'city_example' # str | City (optional)
    state = 'state_example' # str | State (optional)
    postcode = 'postcode_example' # str | Postal code (optional)
    country = 'country_example' # str | 2 character ISO country code (optional)
    phonenumber = 'phonenumber_example' # str | Phone number (optional)
    tax_id = 'tax_id_example' # str | Client's tax ID (optional)
    password2 = 'password2_example' # str | Password for the new user account (optional)
    securityqid = 56 # int | Security question ID (optional)
    securityqans = 'securityqans_example' # str | Security question answer (optional)
    currency = 56 # int | Currency ID (optional)
    groupid = 56 # int | Client group ID (optional)
    customfields = 'customfields_example' # str | Base64 encoded serialized array of custom field values (optional)
    language = 'language_example' # str | Default language setting (optional)
    clientip = 'clientip_example' # str | Originating IP address (optional)
    notes = 'notes_example' # str | Admin only notes (optional)
    status = 'status_example' # str | The status (e.g., Active) (optional)
    paymentmethod = 'paymentmethod_example' # str | The payment method for the order in the system format (e.g., paypal, mailin) (optional)
    email_preferences_general = True # bool | Receive general emails (optional)
    email_preferences_product = True # bool | Receive product emails (optional)
    email_preferences_domain = True # bool | Receive domain emails (optional)
    email_preferences_invoice = True # bool | Receive invoice emails (optional)
    email_preferences_support = True # bool | Receive support emails (optional)
    email_preferences_affiliate = True # bool | Receive affiliate emails (optional)
    clearcreditcard = True # bool | Clear stored credit card details (optional)
    latefeeoveride = True # bool | Override Late Fees setting (optional)
    overideduenotices = True # bool | Override Overdue Notices setting (optional)
    taxexempt = True # bool | Exempt from tax collections (optional)
    separateinvoices = True # bool | Group items into one invoice (optional)
    disableautocc = True # bool | Enable/disable automatic credit card processing (optional)
    overrideautoclose = True # bool | Enable/disable automatic account closure (optional)

    try:
        # Update client details
        api_response = api_instance.update_client(username, password, clientid, accesskey=accesskey, responsetype=responsetype, clientemail=clientemail, firstname=firstname, lastname=lastname, companyname=companyname, email=email, address1=address1, address2=address2, city=city, state=state, postcode=postcode, country=country, phonenumber=phonenumber, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, status=status, paymentmethod=paymentmethod, email_preferences_general=email_preferences_general, email_preferences_product=email_preferences_product, email_preferences_domain=email_preferences_domain, email_preferences_invoice=email_preferences_invoice, email_preferences_support=email_preferences_support, email_preferences_affiliate=email_preferences_affiliate, clearcreditcard=clearcreditcard, latefeeoveride=latefeeoveride, overideduenotices=overideduenotices, taxexempt=taxexempt, separateinvoices=separateinvoices, disableautocc=disableautocc, overrideautoclose=overrideautoclose)
        print("The response of DefaultApi->update_client:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->update_client: %s\n" % e)

Parameters

Name Type Description Notes
username str Admin username/API identifier
password str Admin password/API secret
clientid int The ID of the client to update
accesskey str Optional API access key [optional]
responsetype str Response format [optional] [default to json]
clientemail str The email address of the client to update [optional]
firstname str First name of the client [optional]
lastname str Last name of the client [optional]
companyname str Company name [optional]
email str Email address of the client [optional]
address1 str Address line 1 [optional]
address2 str Address line 2 [optional]
city str City [optional]
state str State [optional]
postcode str Postal code [optional]
country str 2 character ISO country code [optional]
phonenumber str Phone number [optional]
tax_id str Client's tax ID [optional]
password2 str Password for the new user account [optional]
securityqid int Security question ID [optional]
securityqans str Security question answer [optional]
currency int Currency ID [optional]
groupid int Client group ID [optional]
customfields str Base64 encoded serialized array of custom field values [optional]
language str Default language setting [optional]
clientip str Originating IP address [optional]
notes str Admin only notes [optional]
status str The status (e.g., Active) [optional]
paymentmethod str The payment method for the order in the system format (e.g., paypal, mailin) [optional]
email_preferences_general bool Receive general emails [optional]
email_preferences_product bool Receive product emails [optional]
email_preferences_domain bool Receive domain emails [optional]
email_preferences_invoice bool Receive invoice emails [optional]
email_preferences_support bool Receive support emails [optional]
email_preferences_affiliate bool Receive affiliate emails [optional]
clearcreditcard bool Clear stored credit card details [optional]
latefeeoveride bool Override Late Fees setting [optional]
overideduenotices bool Override Overdue Notices setting [optional]
taxexempt bool Exempt from tax collections [optional]
separateinvoices bool Group items into one invoice [optional]
disableautocc bool Enable/disable automatic credit card processing [optional]
overrideautoclose bool Enable/disable automatic account closure [optional]

Return type

UpdateClientResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Client updated successfully -
0 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]