API to create WebAPI Keys

⌘K
  1. Home
  2. Docs
  3. API to create WebAPI Keys
  4. Documentation

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

  1. Validation of the Authorization Bearer
  2. Check if all required body data is included
  3. Validation of UserName. If exists and is an active RSO user
  4. Check if there is an existing API key for the given IP and the Agency linked to that username
  5. Create Web API key on Version 6.
    1. Create 4 predefined filters
  6. 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 codeError numberError descriptionReasonSolution
401401Not valid authentication tokenThe header “Authentication Bearer” is missing or not valid.Review your request headers and verify includes the correct token
400101(xx) is mandatory.Mandatory data is missing.Verify all mandatory parameters are included on the body request in a JSON format.
400102(xx) is not a valid IP address.The parsed IP is not well formed.Verify the parsed serverIP is correct.
400103UserName does not existThe parsed UserName is not a valid RSO user.Confirm the userName with the Real Estate Agent
400104The 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.
200110There is an existing API key for the server IP: xx.xx.xx.xxThe Real Estate Agency have already an API key for the parset serverIPAsk RSO IT support.
500/501501Server errorAsk RSO IT support.

How can we help?