i want to pull all the invoice items with recurringFee > 0 and that are associated with invoices of type "NEW" and with createDate between a startDate and endDate and all these new invoices are under a customer account <accountId>. when i tried the below api, i kept getting the error "Object does not exist to execute method on".
https://api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/getItems?
objectFilter={
"items":{
"invoice":{
"accountId":{"operation":"976633"},
"typeCode":{"operation":"NEW"},
"createDate":{"operation":"betweenDate",
"options":[
{"name":"startDate","value": ["01/16/2017 00:00:00"]},
{"name":"endDate","value": ["02/14/2017 23:23:59"]}
]
}
},
"recurringFee":{"operation":"> 0"}
}
}&objectMask=mask[id,recurringFee,invoice[id,createDate,typeCode]]
But when i tried the below query, i am getting too many items (that includes items with recurring = 0 too).
https://api.softlayer.com/rest/v3/SoftLayer_Account/976633/getInvoices?
objectFilter={
"invoices":{
"createDate":{"operation":"betweenDate",
"options":[
{"name":"startDate","value": ["01/16/2017 00:00:00"]},
{"name":"endDate","value": ["02/14/2017 23:23:59"]}
]
},
"typeCode":{"operation":"NEW"}
}
}&objectMask=mask[id,createDate,items[id,recurringFee,recurringTaxAmount,oneTimeFee,oneTimeTaxAmount,description,hostName,domainName,hourlyRecurringFee,laborFee,laborTaxAmount,setupFee,setupTaxAmount,billingItem[id,activeFlag,hourlyFlag,allowCancellationFlag,cancellationDate]]]
Pls help me.
thanks