Ask a Question
Back to All

Adding location to service


I was looking through your API docs for ways to add locations to existing services.

I've ended up solving this by POST-ing to /v2/services/{serviceId} with the new locationIds. While this works, it requires you to fetch the existing locationIds so you can append new IDs to the list. And while it's unlikely for our use case, this could lead to concurrency issues.

Is there some other way of patching services that I'm not seeing? Can I assign locations to services when creating them, e.g. with assignToServices? I'm having some trouble figuring out what these query params do, and how to use them.

Thanks! :)