• Services
  • What we do & Sell own
  • Cases
  • We are

Helpdesk

Connecting to API in guest mode

 

PG Real Estate API is used to access site data with the help of RESTful interface. Calling any API method returns data in JSON format. Reference to each API method must contain a unique sequence of characters, called a TOKEN, which serves as an identifier for the session of data transfer. Therefore, the first thing is to get this TOKEN. Otherwise, call to any method returns an error.

Run the following query to get the TOKEN:

/api/get_token

 

In the action is successful, you get the following JSON object:

{"data":{"token":"d84a67f7596a6161159f677b81357a8c"},"errors":"","messages":""}

In other way, ‘errors’ field contains an error message.

 

Connecting to API in user mode

 

It is necessary to specify access details of a registered user in get_token query.

/api/get_token?email=pg.jake@gmail.com&password=123456

 

The response format is the same as in the guest mode

{"data":{"token":"3503aec2b7eb4113dee92dbb6a2db0df"},"errors":"","messages":""}