November 23, 2017
Retrieve the invoice information.

This script makes a single call to the getInvoices() method in the
SoftLayer_Account API service and uses a object mask to get more
information about the invoices.

Important manual pages

Author: SoftLayer Technologies, Inc. <>
import SoftLayer

Client configuration
Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'

# Declare the API client
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']

# Declaring the object mask to get information about the invoices.
objectMask = "mask[payment,amount,invoiceTotalOneTimeAmount,invoiceTotalRecurringAmount,invoiceTotalOneTimeTaxAmount,invoiceTotalRecurringTaxAmount]"

    # Retrieve the invoices for the account.
    invoices = accountService.getInvoices(mask=objectMask)
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to retrieve the invoices. " % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue