Based on your question I'm assuming:
- You want to know the distinction between web services, APIs, as well as REST and SOAP
- Whether the technical implementation of these matter to you when it comes to testing in a black box capacity
So lets start with some definitions:
Web services and APIs:
I always like the W3C description of a web service:
'A Web service is a software system designed to support interoperable
machine-to-machine interaction over a network.'
To me this means a Web service is a system somewhere on a network (either internal or on the web) that provides resources or actions to other systems such as a mobile app, a web browser or another Web service.
The API is a means to access the web service. Much like, for example, selenium-webdriver has bunch of methods that form an API to trigger your browser events.
REST and SOAP
So with the above in mind, REST and SOAP are architectural approaches in how a Web Service and it's API is created and how it communicates with other Web Services. I'm not going to go into the differences here, but you can find details on each style here:
Crudely put you can see the differences in REST and SOAP in the requests you make, specifically in the payloads.
So in answer to your second question:
Yes it does matter in a black box capacity. The choice of REST or SOAP architecture matter to you because they determine how you would generate your requests for the service. For example, sending a SOAP request to a REST service will probably result in the web service rejecting it.
Additionally, what tests you design would be determined by what the Web service does and what the API allows. So if it's a tax calculator service you will be interested in how the service crunches numbers whereas if it's a database service you will be interested in how it stores and retrieves data.
I would recommend that although you might not know the code inside and be able to test in a White box capacity it's worth finding out what the service's responsibility is and how it has been implemented to ensure you run effective and relevant testing.