Catalogue: Difference between revisions

From SimplyBook.me
No edit summary
No edit summary
Line 9: Line 9:
</translate>
</translate>


<translate>
==General Information==
==General Information==


Line 23: Line 24:
* <code>error</code> - A specified error code if there was an error invoking the method, otherwise null.
* <code>error</code> - A specified error code if there was an error invoking the method, otherwise null.
* <code>id</code> - The id of the request it is responding to.
* <code>id</code> - The id of the request it is responding to.
</translate>


<translate>
Example
Example


Line 64: Line 67:


* <code>X-Token</code> an authentication token. See [[#Authentication|authentication]] section.
* <code>X-Token</code> an authentication token. See [[#Authentication|authentication]] section.
</translate>


<translate>
===Endpoint===
===Endpoint===


Line 83: Line 88:


Get lsit of ALL categories
Get lsit of ALL categories
 
</translate>


----
----
 
<translate>
=== getCities ===
=== getCities ===


Line 98: Line 103:


Returns city list as Array order by name
Returns city list as Array order by name
 
</translate>


----
----
 
<translate>
=== getCompanyCount ===
=== getCompanyCount ===


Line 131: Line 136:
</pre>
</pre>
Use tag_ids OR tags
Use tag_ids OR tags
 
</translate>


----
----
 
<translate>
=== getCompanyInfo ===
=== getCompanyInfo ===


Line 147: Line 152:
Returns company information by company login
Returns company information by company login


 
</translate>
----
----
 
<translate>
=== getCompanyList ===
=== getCompanyList ===


Line 181: Line 186:
</pre>
</pre>
Use tag_ids OR tags
Use tag_ids OR tags
 
</translate>


----
----
 
<translate>
=== getCompanyMarkers ===
=== getCompanyMarkers ===


Line 218: Line 223:
Use tag_ids OR tags
Use tag_ids OR tags


 
</translate>
----
----
 
<translate>
=== getCompanyReviews ===
=== getCompanyReviews ===


Line 234: Line 239:




</translate>
----
----
<translate>


=== getCountries ===
=== getCountries ===
Line 246: Line 253:




</translate>
----
----
<translate>


=== getFeedbackList ===
=== getFeedbackList ===
Line 258: Line 267:




</translate>
----
----
<translate>


=== getPromotionCount ===
=== getPromotionCount ===
Line 291: Line 302:




</translate>
----
----
<translate>


=== getPromotionInfo ===
=== getPromotionInfo ===
Line 308: Line 321:




</translate>
----
----
<translate>


=== getPromotionList ===
=== getPromotionList ===
Line 342: Line 357:
Use tag_ids OR tags
Use tag_ids OR tags


 
</translate>
----
----
<translate>


=== getPromotionListByIds ===
=== getPromotionListByIds ===
Line 357: Line 373:
Returns active promotion list
Returns active promotion list


 
</translate>
----
----
<translate>


=== getPromotionReviews ===
=== getPromotionReviews ===
Line 372: Line 389:
Returns promotion reviews list
Returns promotion reviews list


 
</translate>
----
----
<translate>


=== getRecentCompanies ===
=== getRecentCompanies ===
Line 387: Line 405:
Returns list of companies ordered by date DESC
Returns list of companies ordered by date DESC


 
</translate>
----
----
<translate>


=== getRecentFeedbacks ===
=== getRecentFeedbacks ===
Line 402: Line 421:
Returns list of feedbacs ordered by date DESC
Returns list of feedbacs ordered by date DESC


 
</translate>
----
----
<translate>


=== getRecentPromotions ===
=== getRecentPromotions ===
Line 417: Line 437:
Returns list of promotions ordered by date DESC
Returns list of promotions ordered by date DESC


 
</translate>
----
----
<translate>


=== getRelatedPromotions ===
=== getRelatedPromotions ===
Line 433: Line 454:
Returns related promotions by given promotion id
Returns related promotions by given promotion id


 
</translate>
----
----
<translate>


=== getTags ===
=== getTags ===
Line 455: Line 477:
Use tag_ids OR tags
Use tag_ids OR tags


 
</translate>
----
----
<translate>


=== getTopCities ===
=== getTopCities ===
Line 467: Line 490:
Returns city list as Array order by company count in city
Returns city list as Array order by company count in city


 
</translate>
----
----
<translate>


=== getTopCountries ===
=== getTopCountries ===
Line 478: Line 502:


Returns country list as Array order by company count in country
Returns country list as Array order by company count in country
 
</translate>
 
----

Revision as of 13:14, 15 May 2025

General Information

SimplyBook.me API service build on JSON-RPC remote procedure call protocol. A remote method is invoked by sending a request to a remote service using HTTPS. All transfer types are single objects, serialized using JSON. A request is a call to a specific method provided by a remote system. It must contain three certain properties:

  • jsonrpc - a version of JSON-RPC protocol. Always "2.0"
  • method - A String with the name of the method to be invoked.
  • params - An Array of objects to be passed as parameters to the defined method.
  • id - A value of any type, which is used to match the response with the request that it is replying to.

The receiver of the request must reply with a valid response to all received requests. A response must contain the properties mentioned below.

  • result - The data returned by the invoked method. If an error occurred while invoking the method, this value must be null.
  • error - A specified error code if there was an error invoking the method, otherwise null.
  • id - The id of the request it is responding to.

Example

  Request
  {
    "jsonrpc": "2.0",
    "method": "getEventList",
    "params":[],
    "id":1
  }
  
  Response
  {
    "result": {
        "1": {
            "id": "1",
            "name": "Часовая фотосесcия",
            "duration": "60",
            "hide_duration": "0",
            "description": "<p>Если Вы хотите попробовать себя в роли модели, но не определились с образом. <br /> 5-7 отретушированных и готовых к печати фотографий + отснятый материал на диске</p>",
            "picture": "a200edab10b669225e22d2b3803a38b5.jpg",
            "is_public": "1",
            "is_active": "1",
            "position": "0",
            "is_recurring": "0",
            "picture_path": "/uploads/mib/event__picture/small/a200edab10b669225e22d2b3803a38b5.jpg",
            "price": "300.0000",
            "currency": "UAH",
            "categories": ["1"]
        },
        ...
    },
    "id": "1",
    "jsonrpc": "2.0"
  }

All calls of public service methods should have additional HTTP header:

Endpoint

Use URL https://user-api.simplybook.me/catalogue for all service API calls listed in methods section.

Authentication

Using Simplybook API methods require an authentification. To authorize in Simplybook API you need to get an access key — access-token. In order to get this access-token you should call the JSON-RPC method getUserToken or getToken API methods on https://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Custom Features' link and select API Custom Feature 'Settings'.

Methods

getCategories

getCategories()

No arguments. Returns Array.

Get lsit of ALL categories


getCities

getCities($country)

Parameters:

  • $country String

Returns Array.

Returns city list as Array order by name


getCompanyCount

getCompanyCount($filter)

Parameters:

  • $filter Object - filter object

Returns array.

Returns total companies count with specified filter$filter filter params. Object that contains following params

'search_string': String,
'service_name': String,
'company_name': String,
'company_address': String,
'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String,
'nearby': {
    'radius': Integer,
    'center': {
       'lat': Number,
       'lng': NUmber
    }
}

Use tag_ids OR tags


getCompanyInfo

getCompanyInfo($login)

Parameters:

  • $login String

Returns Object.

Returns company information by company login


getCompanyList

getCompanyList($filter, $from, $limit)

Parameters:

  • $filter Object - filter object
  • $from Integer - from position
  • $limit Integer - rows limit

Returns array.

Returns companies list$filter filter params. Object that contains following params

'search_string': String,
'service_name': String,
'company_name': String,
'company_address': String,
'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String,
'nearby': {
    'radius': Integer,
    'center': {
       'lat': Number,
       'lng': NUmber
    }
}

Use tag_ids OR tags


getCompanyMarkers

getCompanyMarkers($filter, $bounds, $zoom, $clustering)

Parameters:

  • $filter Object - filter object
  • $bounds
  • $zoom
  • $clustering

Returns array.

Returns company markers$filter filter params. Object that contains following params

'search_string': String,
'service_name': String,
'company_name': String,
'company_address': String,
'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String,
'nearby': {
    'radius': Integer,
    'center': {
       'lat': Number,
       'lng': NUmber
    }
}

Use tag_ids OR tags


getCompanyReviews

getCompanyReviews($login)

Parameters:

  • $login String

Returns Object.

Returns company reviews list



getCountries

getCountries()

No arguments. Returns Array.

Returns country list as Array order by name



getFeedbackList

getFeedbackList()

No arguments. Returns Array.

Get lsit of ALL simplybook feedbacks



getPromotionCount

getPromotionCount($filter)

Parameters:

  • $filter Object - filter object

Returns array.

Returns total active promotions count with specified filter$filter filter params. Object that contains following params

'search_string': String,
'service_name': String,
'company_name': String,
'company_address': String,
'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String,
'nearby': {
    'radius': Integer,
    'center': {
       'lat': Number,
       'lng': NUmber
    }
}

Use tag_ids OR tags



getPromotionInfo

getPromotionInfo($id, $feedbackFrom, $feedbackCount)

Parameters:

  • $id Integer
  • $feedbackFrom Integer = 0
  • $feedbackCount Integer = 100

Returns Object.

Returns promotion information by id



getPromotionList

getPromotionList($filter, $from, $limit)

Parameters:

  • $filter Object - filter object
  • $from Integer - from position
  • $limit Integer - rows limit

Returns array.

Returns active promotion list$filter filter params. Object that contains following params

'search_string': String,
'service_name': String,
'company_name': String,
'company_address': String,
'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String,
'nearby': {
    'radius': Integer,
    'center': {
       'lat': Number,
       'lng': NUmber
    }
}

Use tag_ids OR tags


getPromotionListByIds

getPromotionListByIds($ids)

Parameters:

  • $ids

Returns array.

Returns active promotion list


getPromotionReviews

getPromotionReviews($promotionId)

Parameters:

  • $promotionId Integer

Returns Object.

Returns promotion reviews list


getRecentCompanies

getRecentCompanies($count)

Parameters:

  • $count Integer

Returns Array.

Returns list of companies ordered by date DESC


getRecentFeedbacks

getRecentFeedbacks($count)

Parameters:

  • $count Integer

Returns Array.

Returns list of feedbacs ordered by date DESC


getRecentPromotions

getRecentPromotions($count)

Parameters:

  • $count Integer

Returns Array.

Returns list of promotions ordered by date DESC


getRelatedPromotions

getRelatedPromotions($id, $count)

Parameters:

  • $id Integer
  • $count Integer = 10

Returns Array.

Returns related promotions by given promotion id


getTags

getTags($filter)

Parameters:

  • $filter Object - filter object

Returns Array.

Returns tags list$filter filter params. Object that contains following params

'tag_ids': [Integer, Integer, ...],
'tags': String,
'country_id': String,
'city_id': String

Use tag_ids OR tags


getTopCities

getTopCities()

No arguments. Returns Array.

Returns city list as Array order by company count in city


getTopCountries

getTopCountries()

No arguments. Returns Array.

Returns country list as Array order by company count in country