What is the difference between SOAP and REST APIs. Can someone please explain with the scenarios which one I need to pick for which type of scenarios?

2 Answers 2


First and foremost difference is the protocol that both APIs use. Then it mostly depends on your use cases in general and your Integration sources. Many times you will need to use SOAP over RESTful and vice-versa. E.g., if you want to build quicker integrations for web/mobile with smaller learning curve, REST may be your option. But if you are looking for more enterprise wide distributed integrations, SOAP may be your option.

However to get more details on the APIs available with the platform, take a look at the documentation here, you will get the details you need. Below are excerpt from the link, refer the link for more details.


Use SOAP API to create, retrieve, update or delete records, such as accounts, leads, and custom objects. With more than 20 different calls, SOAP API also allows you to maintain passwords, perform searches, and much more. Use SOAP API in any language that supports Web services.


REST API provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it’s an excellent choice of technology for use with mobile applications and web projects. For certain projects, you may want to use REST API with other Salesforce REST APIs. (more on documentation)

Here’s another link that you can refer for more details on the differences between these two APIs

  • Thanks Jayant.. may I know for implementing single sign on, which option is better for me and why? Can you please explain me in detail..
    – user5558
    Dec 12, 2018 at 14:28
  • 1
    Single Sign On is not implemented using APIs, it has a different protocol. Further, your question classifies as a different question than what was asked here. And in this forum, we try to keep the questions specific to one topic so that new questions/discussions are not lost in comments.
    – Jayant Das
    Dec 12, 2018 at 14:37

SOAP is a standard communication protocol system that permits processes using different operating systems like Linux and Windows to communicate via HTTP and its XML.SOAP API has an official standard because it is a protocol.

REST is basically an architectural style of the web services that work as a channel of communication between different computers or systems on the internet. REST API has no has no official standard at all because it is an architectural style.REST was designed specifically for working with components such as media components, files, or even objects on a particular hardware device.

When to use REST and when to use SOAP

REST services should be used in the following instances:

  • Limited resources and bandwidth

  • Statelessness

  • Caching

  • Ease of coding

SOAP should be used in the following instances

  • Asynchronous processing and subsequent invocation
  • A Formal means of communication
  • Stateful operations
  • Thanks Dhanik... For implementing single sign on which type of service I need to use and why ? When I explained like above, this is the next question they have asked me. Can you please explain me the answer. Thanks for your time and help.
    – user5558
    Dec 12, 2018 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .