cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bf4
Level 2

Quickbooks API blows up on deleting bill when passed an Accept header

I was going out of my mind.

 

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#delete-a-bill

 

says

 

POST /v3/company/<realmID>/bill?operation=delete

 

Now, I've already implemented invoice#send which says

 

```

POST (Using email address supplied in Invoice.BillEmail.EmailAddress) /v3/company/<realmID>/invoice/<invoiceId>/send
POST(Specifying an explicit email address) /v3/company/<realmID>/invoice/<invoiceId>/send?sendTo=<emailAddr>

 

Content type: application/octet-stream

```

 

and I specified the Accept header as  'application/json;charset=UTF-8'. Been working for over a year just fine.

 

I was also implementing invoice#void which specified a content type as well

 

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#void-an-invo...

 

```

POST /v3/company/<realmID>/invoice?operation=void

Content type: application/json

```

 

I implemented bill#delete using the same accept header ('application/json;charset=UTF-8'), and even though it didn't specify a content type, I assumed it was like invoice#void which specified application/json, which is what I'm posting per the docs.

 

First I get

 

>"Operation Could not find resource for relative : /v3/company/realmID/bill of full path: https://c10.qbo.intuit.com/qbo10/v3/company/realmID/bill?minorversion=12&operation=delete is not supported.

> ValidationFault

> error code 500

 

Ok, maybe it's being overly strict about the minor version in the url params.  

 

Nope

 

>"Operation Could not find resource for relative : /v3/company/realmID/bill of full path: https://c10.qbo.intuit.com/qbo10/v3/company/realmID/bill?operation=delete is not supported.

> ValidationFault

> error code 500

 

Ah, ok, the docs don't specify headers, let's remove 'em all

 

>"Operation Cannot consume content type is not supported.is not supported.

> ValidationFault

> error code 500

 

Ok, let's just use the 'Content-Type' header and no 'Accept'

 

and.. it worked.

 

So, here are the bugs

1. The bill docs don't specify the content-type header

2. The bill API rejects a valid request when it sees the request 'Accept' has application/json, which is nonsense for so many reasons, and now I'm getting XML back! Maybe you'd prefer a plain old 'Accept: 'application/json''?  I just tested it in the sandbox, and yep, 'Accept: application/json' returns JSON, but not with the charset extension

Solved
Best answer 02-01-2019

Accepted Solutions
QuickBooks Team

Re: Quickbooks API blows up on deleting bill when passed an Accept header

We value your business and your time, @bf4.

 

Let's get you to the right support team who handles API concerns.

 

I recommend seeking help from our other Intuit forum called the Intuit Developer Forum. It's a place where you can ask help about integration and programming and get help from a number of programmers, developers and experienced users like you.

 

Feel free to leave a comment below if you have any questions about QuickBooks Online.

View solution in original post

4 Comments
QuickBooks Team

Re: Quickbooks API blows up on deleting bill when passed an Accept header

We value your business and your time, @bf4.

 

Let's get you to the right support team who handles API concerns.

 

I recommend seeking help from our other Intuit forum called the Intuit Developer Forum. It's a place where you can ask help about integration and programming and get help from a number of programmers, developers and experienced users like you.

 

Feel free to leave a comment below if you have any questions about QuickBooks Online.

View solution in original post

bf4
Level 2

Re: Quickbooks API blows up on deleting bill when passed an Accept header

Level 15

Re: Quickbooks API blows up on deleting bill when passed an Accept header

Cross-posting Developer issues on this QB End User Forum, doesn't get you much help, here. We use the Interface, not the coding.

bf4
Level 2

Re: Quickbooks API blows up on deleting bill when passed an Accept header

Thanks for writing qbteachmt

 

> Cross-posting Developer issues on this QB End User Forum

 

I posted here first. Somehow I didn't know about the dev forum. I copied the post to the dev forum on advice of the first reply

 

> We use the Interface, not the coding.

 

Not sure what you mean by the 'Interface' or 'coding' in this context.  Do you just mean that you use whichever forum someone happens to post in?  

 

Thanks for being such an active helper.

 

 

Need to get in touch?

Contact us