Tuesday 15 June 2010

intuit partner platform - How to add new account in Quickbooks -



intuit partner platform - How to add new account in Quickbooks -

below code using seek add together new business relationship quickbooks online. getting (400) bad request. can help me this.

httpwebrequest httpwebrequest = webrequest.create("https://sandbox-quickbooks.api.intuit.com/v3/company/xxxxxxxxxxx/account") httpwebrequest; httpwebrequest.method = "post"; httpwebrequest.headers.add("authorization", getdevdefinedoauthheader(httpwebrequest, consumerkeyqb, consumersecqb, accesskey, accesssec)); httpwebrequest.contenttype = "application/json"; httpwebrequest.accept = "application/xml"; string json = "{\"accounttype\":\"accounts receivable\",\"name\":\"mysampleaccount\"}"; byte[] bytes = encoding.utf8.getbytes(json); httpwebrequest.contentlength = bytes.length; using (stream putstream = httpwebrequest.getrequeststream()) { putstream.write(bytes, 0, bytes.length); } httpwebresponse httpwebresponse = null; seek { httpwebresponse = httpwebrequest.getresponse() httpwebresponse; } grab (exception e) { //return null; var x = "stop"; }

thanks

400 response suggests api request payload not correct.

you can seek phone call using ipp provided .net devkit.

https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0150_ipp_.net_devkit_3.0/0002_synchronous_calls/0001_data_service_apis

using dev-defined lib( sample phone call ) - https://gist.github.com/intuitdeveloperrelations/0913b4c224de758fde0a

thanks

intuit-partner-platform

No comments:

Post a Comment