not getting any address id from Quickbooks Online when I query customers - quickbooks

When I query for customers I get back a customer object with all the info. one of the properties is the Address. this contains the billing and shipping addresses for the customer. however, the id field for each address is always null. I am wondering how I push an update back to QBO without the id? how does QBO know which address I am changing without a key of some kind? my goal is to be able to query QBO and get all the customers and address that have changed since a specified date. I have all this working for the customer but need to do the same for addresses. I am going by the assumption that when an address is changed in QBO that is sets the modified timestamp for that customer record. can anyone tell me how I manage the addresses for a customer and be able to push updates back to QBO?

Try using tag(Billing/Shipping) attribute while updating the address. I've tested the same and it is working fine.
You mentioned earlier that you were getting the id field of address as null. It is becuase, the devkit works with both - QBO and QBD. QBD returns valid element id but QBO doesn't. So for QBO, Devkit shows null in place of element id(in your case - address's id).
You can test all these using api explorer(http://developer.intuit.com/apiexplorer).
Hope it will solve your porb.
Thanks

'the id field for each address is always null' - this line is not very clear to me. Did you mean the id of the customer entity ? Plz explain.
You can check the QBO-Customer object's documentation and sample update request xml, from the following Link - https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0400_QuickBooks_Online/Customer .
For testing you can use the api-explorer. Link - developer.intuit.com/apiexplorer
Thanks
Manas

Related

readMask value to get the display names form new GMB API

I am running this line of code:
location_list = self.service_mbbi_v1.accounts().locations().list(parent=account_name,readMask='name').execute()
And I get the list of the location IDs but I don't manage to get the Location display name, the display name, not just the ID. I wrote google and told them about my issue and they told me they are looking into it but it has been 2 weeks and no response yet. So just wanted o see if someone else had the same issue and if they fpund a solution or a workaround.
The documentation provides only an example, not a list of possible values:
https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations/list
And even when I try the example value of the readMask flag I get an error:
[{'#type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'read_mask', 'description': 'Invalid field mask provided'}]}]">
I found this similar question:
Google Business Profile API readMask
The example they provide work for me but I still can't get the display name value.
I thought of using the google place ID I get from the metadata response and see if I can use another API to find the name but it feels they should be a proper 'readMask' string vale for the display name here and it is not 'displayName'..
Has anyone a hint of what can I do?
Thanks a lot
If you are trying to get the business name data, your readMask should be 'title'.

CNContact unique id between devices

I'm having a bit of a problem with trying to access the same contact between multiple devices. My goal is to have a user select a contact and select a phone number and email address, which will then be stored in a database. If the user opens the app on another device, I would like to have the same contact selected.
I was hoping to use the CNContact.identifier for this case, but it appears that it is a device specific id. I could store the identifier for each device, but that would require the user matching contacts and that doesn't seam ideal.
This doesn't seam like it should be difficult but apparently I'm missing something. Thoughts?
The solution that seams to working for me is, I store the Contact identifiers, Address identifiers, Contact name, and the Address in my database. Then I take a mutli-step appoarch.
Search for Contact:
I attempt to find the contact based on the stored contact.identifiers I have already saved.
If I find 1 contact (identifier matched) => Great! I then attempt to match the found contact to my address.identifiers. Once again, if I find only 1 match, we're great! If not I then go to attempt to find an address (See below)
If I find no contacts (no identifiers matched) => I attempt to find the contact based on the Contact Name I had saved previously. If I do find a match, I then go to attempt to find the matching address (see below).
Search for Address:
Since at this point, I have a CNContact record that I believe matches, I look at each of their postalAddresses and compare it against the Street/city/state/zipcode/country that I have stored in my database.
If we find that perfect match, then I update my identifiers to include the new address/contact identifiers
If we ultimately don't find a match, I give the user an option to manually select the contact/address from their device.

How to get to invoice link in invoices api

I am interested to have a invoice link/pdf from the api which returns the invoice using new freshbooks api endpoint https://api.freshbooks.com/accounting/account/<accountid>/invoices/<invoiceid>
Even including direct_links I am unable to get the link to the invoice. With direct_links it returns json with fields id, contactid, created_date, type, userid, objectid, token.
I currently work at FreshBooks.
Unfortunately these direct link tokens will only work with old FreshBooks, which isn't mentioned in the documentation -- I'll see if we can fix that.
Poking through, it doesn't look like we've has exposed a way to access a PDF version of the invoice through the public API just yet. But I'll pass that on to the appropriate channels and I'll update this answer if that changes.

verifying a single attendee with email

Is there a method to return a specific attendee's information by sending:
1) the attendee's email address
2) my user_key
3) my app_key
I could do this by searching the returned xml from this "event_list_attendees" method, however, I would prefer to only receive the one result (not hundreds for each call).
Note: I work on the platform team at Eventbrite
Currently there is no way to search for a specific attendee with event_list_attendees.
However, you can cut down on the amount of data returned by paging through the results until you have found the attendee or using the modified_after parameter if you know when the user was last updated: http://developer.eventbrite.com/doc/events/event_list_attendees/
I realize this limitation is non-ideal. We're actively working on building a new API which is more RESTful and does not have issues like this.

QuickBooks AccountQuery - FullName doesn't include parent name

I have an app that syncronizes with QuickBooks using qbXml and the Intuit Web Connector.
I've noticed some unusual behavior when querying accounts. According to the spec, an account's FullName should include the names of any of its ancestors, separated by colons. Like "grandparent:parent:account".
In this one particular case, however, I'm getting a return from AccountQuery where the account clearly has a parent but the FullName does not reflect the parent's name. This only happens for one particular user, QB 2012 Pro.
Is there a setting or circumstance that causes QB to shift gears and not include the parent name in the FullName of an account?
Here's an example of an account with a fishy FullName (some info changed for privacy).
<AccountRet>
<ListID>800000BD-1328833123</ListID>
<TimeCreated>2012-02-09T18:20:40-06:00</TimeCreated>
<TimeModified>2013-02-18T10:49:29-06:00</TimeModified>
<EditSequence>1361206169</EditSequence>
<Name>My Account</Name>
<FullName>My Account</FullName>
<IsActive>true</IsActive>
<ParentRef>
<ListID>80000037-1324501345</ListID>
<FullName>Parent Account</FullName>
</ParentRef>
<Sublevel>1</Sublevel>
<AccountType>Income</AccountType>
<AccountNumber>5025.2</AccountNumber>
<Balance>9.99</Balance>
<TotalBalance>9.99</TotalBalance>
<CashFlowClassification>None</CashFlowClassification>
</AccountRet>
This situation is caused by the user having the following Preference turned on in QuickBooks:
Edit > Preferences > Accounting > Company Preferences > Show lowest subaccount only
So you have two choices:
(1) Get the user to turn off that preference, or
(2) Use the ParentRef data to link each AccountRet to its parent Account.
Thanks to Karl Irvin for a heads-up which helped me solve this.

Resources