Documentation
Full documentation for developers.
Configuration
End point
Production: https://8kdxv7r3ke.execute-api.eu-central-1.amazonaws.com/prod/createapikey
Development: https://s7xv5kenvf.execute-api.ap-southeast-1.amazonaws.com/dev/createapikey
Token
For this API to work you must have a Token. Request one to our IT team.
Formatting the request
The request must include the authentication and requested data on the body content.
Must be on Json format and only by POST method.
Authentication
The authentication should be done including the header “Authorization:” with the “Bearer token”.
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept:application/json',
'Content-Type:application/json',
'Authorization:Bearer 073ljkaoiufa98793lkja90d87a9sduf3leujeYA'
));
Data
The body request must be in Json format with the following needed data:
- UserName
- serverIp
- source
- webDeveloperEmail (optional)
{
"userName": "agentname@demo",
"serverIP": "15.79.40.86",
"source": "Your company",
"webDeveloperEmail": "webdeveloper@mydomain.com"
}
Flow
Pre-requisites
The Resales-Online userName is unique per user.
The user belongs to a Real Estate Agency.
The user is an active Account Administrator.
Each Real Estate Agency ONLY can have one API key per IP.
Processing
- Validation of the Authorization Bearer
- Check if all required body data is included
- Validation of UserName. If exists and is an active RSO user
- Check if there is an existing API key for the given IP and the Agency linked to that username
- Create Web API key on Version 6.
- Create 4 predefined filters
- Send Web API data on response
Output
The output will contain the request status: error or success
If error. A description of the error will be given. E.g.:
{
"status": "error",
"error": {
"number": 401,
"description": "Not valid authentication token"
},
"data": {
"request_datetime": "2022-11-24 09:11:52"
}
}
If success. The Web API data will be returned. E.g.:
{
"status": "success",
"error": {},
"data": {
"P1": "9858974",
"P2": "a8813b46eccb1dsqed0036fbbd1e5a9027fdc563",
"ServerIP": "15.179.49.86",
"APIVersion": "API V6",
"AgencyName": "DEMO AGENCY",
"request_datetime": "2022-11-23 13:11:27"
}
}
Troubleshooting
Response code | Error number | Error description | Reason | Solution |
---|---|---|---|---|
401 | 401 | Not valid authentication token | The header “Authentication Bearer” is missing or not valid. | Review your request headers and verify includes the correct token |
400 | 101 | (xx) is mandatory. | Mandatory data is missing. | Verify all mandatory parameters are included on the body request in a JSON format. |
400 | 102 | (xx) is not a valid IP address. | The parsed IP is not well formed. | Verify the parsed serverIP is correct. |
400 | 103 | UserName does not exist | The parsed UserName is not a valid RSO user. | Confirm the userName with the Real Estate Agent |
400 | 104 | The given UserName is not an active account administrator. | The parsed UserName is not valid. Because must be an Admin User. | Confirm with the Real Estate Agency if the given userName is an Admin user. |
200 | 110 | There is an existing API key for the server IP: xx.xx.xx.xx | The Real Estate Agency have already an API key for the parset serverIP | Ask RSO IT support. |
500/501 | 501 | Server error | Ask RSO IT support. |