Locations does not contain GetByExternalId

Hello again,

I have another hole in the API, the Location does not expose GetByExternalId. I can get a list and iterate over them but these calls are expensive. Calling get business list takes 7 seconds with 6 businesses. I am trying to test payruns we have with hundreds of sites. Getting a list of this number will be costly.

Also it is not possible to delete a “root” site in your UI. Our desire is to create a root site of the business itself and then have all sites as sub sites. If I run my test and create 500 sub sites I will have to delete all by hand. I can code it but the UI could do with this functionality.



Hi Scott

The Location endpoint provides OData filtering so you can use that functionality to filter by ExternalId (though its not very well documented - as the property under the covers is actually ExternalReferenceId).

So something like the following should get you out of trouble:
/api/v2/business/{your business id}/location?$filter=ExternalReferenceId eq ‘{location external id}’

As for deleting root sites - that is by design. If we have a button that deletes 500 child sites no matter how many “Are you sure” confirmation messages you have to click through you can bet someone will still “accidentally” click it and then ask for all 500 to be reinstated.

Hope this helps!!