REST versus SOAP

Magento supports both SOAP (short for Simple Object Access Protocol) and REST (short for Representational State Transfer) types of communication with the Web API. Authentication methods themselves are not really bound to any of them. We can use the same authentication method and Web API method calls with both SOAP and REST.

Some of the REST specifics we might outline as follows:

  • We run REST Web API calls through cURL commands or a REST client.
  • Requests support HTTP verbs: GET, POST, PUT, or DELETE.
  • A HTTP header requires an authorization parameter, specifying the authentication token with the Bearer HTTP authorization scheme, Authorization: Bearer <TOKEN>. <TOKEN> is the authentication token returned by the Magento token service. ...

Get Magento 2 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.