Return location status in API calls
M
Martin Towers
in API1.0 you can get a list of all accounts, would be great to be able to see which of those accounts are paused and which ones aren't in the response.
Log In
I
Inayet Hadi
Hi Martin Towers, I think you can do via v2 get locations endpoint
M
Martin Towers
Inayet Hadi: no, the response doesn’t return this. Doesn’t even return whether it’s in SaaS mode or not
I
Inayet Hadi
Martin Towers: Hi Martin, before I responded, I wanted to make sure that I was right, and I am right that you can get all the sub accounts within your agency, however, you want to use the search locations get endpoint with Company as userType.
I
Inayet Hadi
Martin Towers: This is what you get for each subaccount/locations within your agency, now there is no status field that tells you whether the location is active, paused, cancelled and so on.
In my agency account I have 30 accounts total, however, most of them were test accounts I had created.
When an account is retired, cancelled, or on-hold, prior to deleting the account, perform a put to prepend the name of the location eg "Cancelled - Mark Shoes" or "Closed - Mark Shoes" so that when you perform the get search locations you can perform operations on the prepend against those accounts.
{
"locations": [
{
"id": "ve9EPM428h8vShlRW1KT",
"name": "Mark Shoes",
"phone": "+1410039940",
"email": "john.doe@mail.com",
"address": "4th fleet street",
"city": "New York",
"state": "Illinois",
"country": "US",
"postalCode": "567654",
"website": "https://yourwebsite.com",
"timezone": "US/Central",
"settings": {
"allowDuplicateContact": false,
"allowDuplicateOpportunity": false,
"allowFacebookNameMerge": false,
"disableContactTimezone": false
},
"social": {
"facebookUrl": "https://www.facebook.com/",
"googlePlus": "https://www.googleplus.com/",
"linkedIn": "https://www.linkedIn.com/",
"foursquare": "https://www.foursquare.com/",
"twitter": "https://www.foutwitterrsquare.com/",
"yelp": "https://www.yelp.com/",
"instagram": "https://www.instagram.com/",
"youtube": "https://www.youtube.com/",
"pinterest": "https://www.pinterest.com/",
"blogRss": "https://www.blogRss.com/",
"googlePlacesId": "ChIJJGPdVbQTrjsRGUkefteUeFk"
}
}
]
}
M
Martin Towers
Inayet Hadi: I'm not exactly sure what you want me to say? you've confirmed what I already knew, that it's NOT POSSIBLE.
Whilst I thank you for your good intentions, it makes no sense.
Firstly, If I have to go in and pause an account, I would just change the name manually at that stage. There's no need to do a PUT request to do so, in fact there should be an end point to pause accounts in the API.
Secondly, your solution is a work around, which is not what the purpose of this post is for, the very purpose of this GHL ideas board is to submit idea's for new features and fixes, not to discuss work arounds.
And thirdly, whilst your idea's might work for 30 accounts, I have over 500 so it's not really feasible.
Thanks anyway.
I
Inayet Hadi
Martin Towers: You made excellent points, thank you for explaining and sharing.
Fyi, those 30 accounts are or were test accounts, so you with 500 accounts you are on a different field that I have very little experience with.