November 23, 2017
Get standard prices

This script retrieves standard prices for an package

Important manual pages:
@Author: SoftLayer Technologies, Inc. <>

# So we can talk to the SoftLayer API:
import SoftLayer
import json

# Your SoftLayer API username and key.
API_USERNAME = 'set me'
API_KEY = 'set me'
# Declare the package id
packageId = 265
# Create a client instance
client = SoftLayer.Client(username=API_USERNAME, api_key=API_KEY)
# Declare an object filter to get standard item prices
objectFilter = {'itemPrices': {'locationGroupId': {'operation': 'is null'}}}
    standardPrices = client['SoftLayer_Product_Package'].getItemPrices(id=packageId, filter=objectFilter)
    print(json.dumps(standardPrices, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to get standard item prices faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))