API 409 error "No locations"

For the 409 error the first thing to check is the locations parameter, of which only the value should be JSON encoded. See also: Testing API POST does not work