📘 HTTP Status Codes HTTP Status codes are heavily used on the platform to denote the status of requests All HTTP requests are to be in JSON except in some cases of multi-part form data(Uploading files).
👍 Successful Responses (2XX) Success ResponseThe base structure should be the data layer, this should be consistent for all the 2xx response on the platform.
📘 Paginated Response Paginated requests are to come with the page(current page the user wants to see) and the limit(maximum amount of data to return). The default page number should be 1 and the default limit should is 50. The paginated response contains 4 base properties
- page: This is the current page the user is. default is 1
- pages: This is the total pages to be shown which are gotten from ‘ceil(total count of data/limit)’
- total: total count of data. An example is the result of ‘select count (*) from `tableName’
- data: this is the data gotten from the data source