Service

Name Get Owner News
Description Get the news related to the owner
Method GET
URL /owner/news[?page=1][&per_page=18][&unread={0|1}]
Example /api/owner/news?page=1&per_page=5&unread=0
Access OWNER, MANAGER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
page number no It can be used to paginate the result. By default 0 returns all.
per_page number no It can be used to limit the result. By default 10 items per page. If page = 0, this field doesn't apply.
unread number no By default 0 return all, 1 only return unread

Response

            
                {
                    "items_total": 2,
                    "items": [
                        {
                         "id": 31,
                         "title": "HomeEscape Introduces New Options for Holding the Security Deposit",
                         "text": "<p>Dear Owners,</p><p>If you chose to have HomeEscape ...",
                         "date_created": "2017-02-01T13:52:05-0500",
                         "date_posted": "2017-02-01T13:52:05-0500",
                         "unread": "0"
                        },
                        {
                         "id": 30,
                         "title": "‘My Account’ Features",
                         "text": "<p>You can now easily add your profile image and story to make ...",
                         "date_created": "2017-01-30T14:31:24-0500",
                         "date_posted": "2017-01-30T14:31:24-0500"
                         "unread": "1"
                        }
                    ]
                }
            
            

Response Codes

Code Message Cause Possible Frontend Message [Behavior]
EC000 Internal error in API Internal error connecting the database "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC001 User not found Token user id doesn't match our records "Sorry, We couldn't find your information!"
EC004 Not found result There are problems finding the data in our database "No Record Found"
SC006 User no authorization The token role is not valid for using the API services "You have been logged out." - [Take the user to the login screen]
SC014 Expired token The token has expired "You have been logged out." - [Take the user to the login screen]
VID110 Invalid input for page Page is not a number [Call the API again using a valid value for page]
VID111 Invalid input for per_page Per_page is not a number [Call the API again using a valid value for per_page]
VID222 Invalid input for unread Unread is not in [0,1] [Call the API again using a valid value for unread]