Persistent 500 Error calling Customer Billing Service with Python SDK for MS Advertising

Sam Green 1 Reputation point
2022-07-26T06:40:50.813+00:00

When I call the Customer Billing Service, with the code below:

billing_service = ServiceClient(  
    'CustomerBillingService',  
    authorization_data=authorization_data,  
    environment=ENVIRONMENT,  
    version=13,  
)  
  
predicates = {'Predicate': [{'Field': 'AccountId', 'Operator': 'Equals', 'Value': XXXXXXX}]}  
ordering = {'OrderBy': [{'Field': 'Id', 'Order': 'Ascending'}]}  
  
result = billing_service.SearchInsertionOrders(  
    Predicates=predicates,  
    PageInfo={'Index': 0, 'Size': 1000},  
    Ordering=ordering  
)  

I get an 500: Internal Server Error - my auth data is ok, as a call to the Customer Management Service is successful with the same data. Am I missing something?

Thanks in advance!

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
388 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sam Green 1 Reputation point
    2022-07-27T10:19:12.257+00:00

    Trial and error has informed me that the PageInfo Size was set above the allowable limit (100). Sadly the basic error messaging that would feed this back is not in place. Oh well.

    0 comments No comments