I can create a new store by uploading a shapefile using REST with the following command
curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"
--data-binary @road1.zip
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/roads/file.shp
However, if I try to add another shapefile to the same store using the same command but only changing the shapefile name (see below), the previous layer (road1) is removed and the new layer (road2) is added to this store.
curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"
--data-binary @road2.zip
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/roads/file.shp
So looks like each time you run this command if the store already exists then GeoServer deletes the layers in it and creates a new store. Therefore the question is, is it possible to keep adding layers one at a time to the same store? And how to do it? Currently it looks like we have to create a new datastore each time you want to add one layer which is not ideal as I would like to group a few layers into one store. Note I do not want to upload a directory of shapefiles in which case it is possible to REST upload a bunch of shapefiles to the same store.
No, it is not possible for a Shapefile datastore to contain more than one Shapefile. So the behaviour you are seeing is correct and expected.
If you need multiple layers in a single store you can use either the directory of shapefiles or one of the database based stores (either JDBC or GeoPackage).