Creating locations with API

Can locations be created via API POST? This documentaiton says location APIs are read only. Is that the case?


Hi @Anteneh

Yes, that's right. Bulk location changes can be managed by importing an Excel spreadsheet.

Thanks @Norman_Hooper for your reply.
We have been using the excel import. But that is not enough now, as we want to integrate Commcare with our other system (Master facility list) and automatically push new locations through the Commcare API, so that the API creates them on Commcare.

Hi @Anteneh

My mistake! I have been corrected.

From API version v0.6 you can create a new location using a POST request to the URL[domain]/api/v0.6/location/

And you can update an existing location using a PUT request to the URL[domain]/api/v0.6/location/[location_id]

I will update the Location API documentation to make this clearer.