Invoice retrieval

672 views
Skip to first unread message

Aner

unread,
Feb 6, 2020, 4:14:03 AM2/6/20
to AdWords API and Google Ads API Forum
Hello,

We are trying to retrieve invoice data of a Google Ads account. As we understand it, the pdf url of an invoice can be retrieved by InvoiceService here:

Generally, we prefer using the Google API library (PHP in our case), however it seems like that service is kind of a new thing, and it's not yet implemented.
If that is the case, we'll just have to make the curl request vanilla style.

We find it difficult to begin. What is the URL of the request?
We know that we have to make a POST request with our OAuth2 access token and developer token that goes in the header, as well as the data that should be formatted as json, but what is the exact URL to address?

Thanks.

Google Ads API Forum Advisor Prod

unread,
Feb 6, 2020, 3:27:21 PM2/6/20
to droxi...@gmail.com, adwor...@googlegroups.com
Hi Aner,

Thank you for reaching out. Please see here for the curl request URL you need to use.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UV05Sh:ref

Aner

unread,
Feb 9, 2020, 2:39:32 AM2/9/20
to AdWords API and Google Ads API Forum
Hi, thank you for your reply.

Looks like the link you've provided shows another option of retrieving an invoice (getting the binaries of the pdf as a string that can then be written into a local file), however, this can only come after the step we're still trying to figure out:
Look at your proposed solution, before you get to make that request, you have to go through step 1 which is exactly what I was asking originally: "Retrieving invoices"
Following any of the many links in that page, I can see all the parameters I'm required to submit but the actual target, the URL to point those parameter to is nowhere to be found.

So ListInvoicesRequest for that matter, the 4 parameters (customer_id, billing_setup, issue_year, issue_month) where do I send them to?

Hope I'm making myself clear.
Thanks.

Google Ads API Forum Advisor Prod

unread,
Feb 10, 2020, 11:22:10 AM2/10/20
to droxi...@gmail.com, adwor...@googlegroups.com
Hi Aner,

Thank you for clarifying the issue. You can follow this guide for constructing the URL. It should look like: https://googleads.googleapis.com/v2/customers/{customer_id}/invoices:{operation}.

Alex Visa

unread,
Nov 16, 2020, 5:05:33 AM11/16/20
to AdWords API and Google Ads API Forum
hi All,

i see it is well defined in the documentation on the methodology to get the pdf version of the invoice, however in the UI - there is a pdf version and a csv version. 
Is there a way to get the CSV version of the invoice?

My objective is to get a list of all campaigns and the amount that will show on the invoice, as usually this amount is +/- 1% vs. the report in the UI. 

Thanks,
Alex

Google Ads API Forum Advisor Prod

unread,
Nov 16, 2020, 3:53:20 PM11/16/20
to alex...@groupm.com, adwor...@googlegroups.com
Hi Alex,

Unfortunately, there is no setting to download the invoices in a csv format.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5001UV05Sh:ref

Alex Visa

unread,
Nov 17, 2020, 2:46:04 AM11/17/20
to AdWords API and Google Ads API Forum
Thanks Anthony. 
I was somehow expecting this answer. 

In this case - is there a way to extract via API  a list of all campaigns and the amount for each campaign that will show on the invoice.
In the reporting UI there's a metric called "billed cost" What is a way to extract that amount via API?
What about the credits (eg. Invalid Activity)?

Thanks,
Alex

Google Ads API Forum Advisor Prod

unread,
Nov 17, 2020, 9:25:23 PM11/17/20
to alex...@groupm.com, adwor...@googlegroups.com

Hi Alex,

I work with Anthony and let me provide support to your concern.

Could you confirm if this document is what you are referring to billed cost? If yes, then this is currently not supported in Google Ads API as well.

I am afraid also that the credits (Invalid Activity) is not supported.

With this let me raise a feature request to my about getting the billed cost, getting the credit (invalid activity) and download the invoices in a CSV format. Please note that these features are subject for review.

For the meantime, please follow our blog as we will post there any updates and new release about Google Ads API / AdWords API.

Regards,

Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5001UV05Sh:ref

Multiplier

unread,
Mar 5, 2022, 1:59:28 AM3/5/22
to Google Ads API and AdWords API Forum
Hi Emie,

Thank you for the response on this thread.

Can you please guide me on how I can fetch the invoice amount via API? I am able to fetch amount spent via AWQL but because of adjustments it doesnt match with the invoice amount.

I want to fetch the invoice amount programmatically. I have been struggling since weeks now, please guide me through.

Google Ads API Forum Advisor

unread,
Mar 7, 2022, 5:29:41 AM3/7/22
to moh...@multipliersolutions.com, adwor...@googlegroups.com

Hi Aner,

Invoice amount is not available in AWQL since the Invoice feature is only supported in the Google Ads API. In order for you to utilize the said invoice features and retrieve the said invoice values, you will first need to ensure that you have met the prerequisites .

In addition, the invoice details also cannot be retrieved via a GAQL as this can only be retrieved using the InvoiceService.listInvoices method.

Let me know if you have further questions.

Best regards,

Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5001UV05Sh:ref
Reply all
Reply to author
Forward
0 new messages