Web services are XML-centred data exchange systems that use the internet for A2A (application-to- application) communication and interfacing. The processes involve programs, messages, documents, and/or objects.
An application programming interface (API) is a computing interface which defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. There are two types of API – REST and SOAP.