I guess it would have to go in the Application/Domain layer because that's where the interface for my third party API client would also be.
A third party API is, by definition, not part of your current application domain. It is an external service, after all.
Hmmm...I guess they could be considered entities. An entity is a model that represents the data in the database and I guess the third party API could also be considered a database of sorts...
I am sidestepping your "what should I call it?" question because naming isn't quite the main thing to focus on here, but your comment does hit a nail on the head here: external apis are functionally indistinguishable from a database.
In essence, whether you connect to a database server or a web backend which serves data is an irrelevant distinction in terms of how to categorize this logic in your codebase.
As it stands right now, the code calling the API belongs in Infrastructure, just like where your database logic resides.
That being said, depending on size and complexity, you may want to start subdividing the Infrastructure project into separate projects, if that makes more sense to you. In software development, it's always possible that a particular use case may warrant being broken down into smaller parts further.
However, that only established where you put the services that call the API. But where do you put the models for the in/output of your service?
It somewhat depends on whether you are using inverted dependencies or not. If you aren't, then the models can live together with the service in the Infrastructure layer, since your Application will depend on Infrastructure and have access to all of its services and models at the same time.
However, if you're using inverted dependencies, that means that the Application (or Domain) layer defines the service's interface, which needs access to the in/output models, which means that you can't just plop those models in Infrastructure. In this case, they belong to the service's contract, and should be kept closeby to where you store the service interface itself. I personally would put them in the same directory, since they tend to uniquely belong to each other.
That being said, when working on professional (enterprise-grade) projects, I would strongly urge you to separate the interface models from the actual external service models, as a matter of keeping the external service sufficiently abstracted. This ensures that any changes made to the external service (and thus needing to be made to the external service models) don't necessarily have to cause you to change your interface contract itself, as long as you can simply update the mapping between the external and internal models to remain compatible.
Which means:
- For normal dependencies:
- One internal (i.e. assembly-private) model in Infrastructure for the service logic
- One public model in Infrastructure to be consumed by its dependents (i.e. Application)
- The service class in Infrastructure will map from one to the other as it needs it.
- For inverted dependencies:
- One model with the service interface in Application (just like before)
- One internal (i.e. assembly-private) model in Infrastructure for the service logic
- The service class in Infrastructure will map from one to the other as it needs it.