Home - MealsMadeEasy/Backend GitHub Wiki
API Overview
This is the private API for MealsMadeEasy. Both mobile apps use this backend which integrates with Firebase and other third parties to deliver all information throughout the app.
Getting started
All API calls are standard REST calls, so GET, POST, PUT and other related verbs are your friends with this API. When you're ready to integrate an endpoint into the application, check out the documentation for that particular endpoint in that sidebar. There are also a few pages that will apply to several references (like authorization), so check those out too if they're relevant.
API Keys
To prevent unauthorized access, every API request needs to be validated by sending an API key. There are two fields you need to send on every API request: ApplicationID
and ApiKey
. These are unique per application and can be found by asking someone politely. These fields should be sent as HTTP headers. If you push either value into a public repo, you will be shamed in Slack.
If your application does not specify either an ApplicationID
or ApiKey
, the server will return a 400 BAD REQUEST
response. If either the ApplicationID
or ApiKey
are invalid, the server will return a 401 UNAUTHORIZED
response.
Recent changes
- Jan 20, '18 – User profile endpoints are now available
- Feb 9, '18 – Suggested meal endpoint is now available
- Feb 23, '18 – Meal plan endpoints are now available
- March 14, '18 – Adds a (currently optional) API token header for all requests. This will become mandatory soon.
- March 16, '18 – Recipe endpoint is now available
- March 28, '18 – Search endpoint is now available
- March 28, '18 – The API token header requirement is now enforced for all requests.
- March 30, '18 – The
/user/plan
endpoint has been modified to prevent timezone related issues. In particular, all times sent must be at midnight in UTC. Additionally, this endpoint now sends meals that were scheduled yesterday, and allows the meal plan to be modified up to one day in the past. Note that "yesterday" here is relative to UTC, so this is intended to fix an issue where a user couldn't update their meal plan for the current day if UTC passes midnight before the user's timezone. - April 10, '18 – The
/user/groceries
endpoint is now available - April 13, '18 – The
/user/groceries/purchased
endpoint is now available to mark groceries as purchased.