You should not try to create a REST API directly against your domain model. There are a number of responsibilities for this interface that can ruin your domain model. For instance. transaction management, security, input verification - these are things that you probably need, but that do not belong to the domain model.
That's what application services are for.
Create a thin layer around your domain model that contains application services (often called service levels). Application services are direct clients of a domain model. They are usually organized around the use of cases, rather than aggregates. Your REST API is now a direct client of application services instead of a domain model.
The two classes you mentioned will also fit in well with the service level.
Edit:
Please note that when using the hexagonal architecture (which is suitable for DDD), the service level does not match the storage level. The service level uses the save level to load and save aggregates in the database.
source share