Company public service methods: Difference between revisions
| Line 1: | Line 1: | ||
==General Information== | ==General Information== | ||
SimplyBook.me API service build on [https://en.wikipedia.org/wiki/JSON-RPC 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: | SimplyBook.me API service build on [https://en.wikipedia.org/wiki/JSON-RPC 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 [http://www.json.org JSON]. A request is a call to a specific method provided by a remote system. It must contain three certain properties: | ||
* <code>jsonrpc</code> - a version of JSON-RPC protocol. Always <code>"2.0"</code> | * <code>jsonrpc</code> - a version of JSON-RPC protocol. Always <code>"2.0"</code> | ||
| Line 14: | Line 14: | ||
* <code>id</code> - The id of the request it is responding to. | * <code>id</code> - The id of the request it is responding to. | ||
Example | Example: | ||
<pre> | <pre> | ||
| Line 48: | Line 48: | ||
"id": "1", | "id": "1", | ||
"jsonrpc": "2.0" | "jsonrpc": "2.0" | ||
} | |||
</pre> | |||
Example of request with error response: | |||
<pre> | |||
Request | |||
{ | |||
"jsonrpc": "2.0", | |||
"method": "someNotExistingMethod", | |||
"params":[], | |||
"id":1 | |||
} | |||
Response | |||
{ | |||
"jsonrpc": "2.0", | |||
"id":1, | |||
"error": { | |||
"code": -32601, | |||
"message": "Method not found" | |||
} | |||
} | } | ||
</pre> | </pre> | ||