The problem of estimation of the rate parameter of a Poisson process when the rate is piecewise constant with unknown number of pieces and changepoint locations is studied. A binary segmentation algorithm in conjunction with a cumulative sum statistic for detection of the changepoints is proposed. The asymptotic distribution of the proposed statistic is derived, its consistency is proved and the limiting distribution of the estimate of the changepoint is ob- tained. Also, inference of the piecewise constant rate parameter is addressed. A Monte Carlo analysis shows the good performance of the proposed cumulative sum approach, which is illustrated with a real data example.