Skip to main content

Evaluating REST APIs for a Snack Distributor

Premium
Written by Pulkit MathurSenior Solutions Architect, Salesforce

Our client is a large multinational that sells fast-moving consumer goods (FMCG) products, such as non-perishable snacks in the US market via a B2B (business-to-business) model. For example, retail chains stock the client’s products directly on their shelves. All external communication with retailers and internal communication with IT systems uses SOAP APIs designed in the 2000s.

With the changes effected by COVID-19, the client wants to start selling B2C too - selling directly to consumers through their own website.

The client wants to create a website and effectively expose their IT systems to handle B2C sales. At a later stage, the client also wants to roll out mobile apps for consumers.

Should the client opt for REST APIs?

Remember to define both functional and non-functional requirements before you begin.

Do mobile devices need to operate on lower bandwidth/less stable connections compared to desktop/laptop devices?

Which format, REST or SOAP, enables the same amount of information to be sent in fewer characters?

What kind of API has more flexibility, for example, sending JSON, XML or HTTP data?

Among REST and SOAP APIs, which type of APIs are easier to start with?

Among REST and SOAP APIs, which type of APIs correspond closely with the HTTP protocol, which almost all developers are generally familiar with?

How would the amount of network traffic sent between consumers and the client’s server influence your choice between a SOAP or REST API?

Does the client have the skills to build complex APIs or will they have to outsource API creation / maintenance?

Say the client wants a composable architecture (they want to separate the client logic from the server, and keep the application as stateless as possible.) This would enable them to be flexible and scale easily. Among REST and SOAP APIs, which type of APIs are most suited to this requirement?