0

I am building a set of rest APIs for a mobile app as well as set of them which can be consumed by merchants ( for an app or web ) . The two sets of APIs have common properties, for example

For a product creation API and For mobile: For mobile, I will be giving product likes, comments, etc back to the app. But to the merchant i will only be giving back the product related details and not the user likes, comments and other app specific details.

Do I have to create set of APIS, one for mobile apps and one set for merchants and maintain a single library where all common functionalities are written?

Please give some suggestions.

1 Answer 1

2

If possible, don't create separate APIs for both(mobile,web). Just add an extra field to your request that says, From which platform the request is from (i.e mobile or web) and handle the functionalities depends on.

Sign up to request clarification or add additional context in comments.

1 Comment

Problem is that the apis which im exposing to the app will have some additional or less fields than the web and the authentication for it will be different from that of the merchant apis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.