November 23, 2017

List invoices.

The script retrieves all the invoices in a brand account.
It displays the same result like in

Important manual pages

Author: SoftLayer Technologies, Inc. <>

import SoftLayer.API
import json

USERNAME = 'set me'
API_KEY = 'set me'

client = SoftLayer.create_client_from_env(username=USERNAME, api_key=API_KEY)

accountService = client['SoftLayer_Account']
objectMask = "mask[id, modifyDate, createDate, amount, payment, typeCode, statusCode, purchaseOrderNumber]"

    result = accountService.getInvoices(mask=objectMask)
    print(json.dumps(result, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to list the invoices. "
          % (e.faultCode, e.faultString))


We would love to hear it
Open an issue