Company administration service methods: Difference between revisions
No edit summary |
No edit summary |
||
| Line 23: | Line 23: | ||
* <code>params</code> - An Array of objects to be passed as parameters to the defined method. | * <code>params</code> - An Array of objects to be passed as parameters to the defined method. | ||
* <code>id</code> - A value of any type, which is used to match the response with the request that it is replying to. | * <code>id</code> - A value of any type, which is used to match the response with the request that it is replying to. | ||
</translate> | </translate> | ||
<translate> | <translate> | ||
The receiver of the request must reply with a valid response to all received requests. A response must contain the properties mentioned below. | The receiver of the request must reply with a valid response to all received requests. A response must contain the properties mentioned below. | ||
| Line 33: | Line 31: | ||
* <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> | ||
<translate> | <translate> | ||
Example | Example | ||
| Line 74: | Line 70: | ||
} | } | ||
</pre> | </pre> | ||
</translate> | </translate> | ||
<translate> | <translate> | ||
Example of request with error response: | Example of request with error response: | ||
| Line 100: | Line 94: | ||
} | } | ||
</pre> | </pre> | ||
</translate> | </translate> | ||
<translate> | <translate> | ||
All calls of public service methods should have additional HTTP header: | All calls of public service methods should have additional HTTP header: | ||
| Line 116: | Line 108: | ||
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 <code>[[Authentication#getUserToken|getUserToken]]</code> API method 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 [[Custom_Features#API|API Custom Feature]] 'Settings'. | 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 <code>[[Authentication#getUserToken|getUserToken]]</code> API method 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 [[Custom_Features#API|API Custom Feature]] 'Settings'. | ||
== Methods == | == Methods == | ||
| Line 158: | Line 148: | ||
zip: 3872 | zip: 3872 | ||
} | } | ||
</translate> | </translate> | ||
<translate> | <translate> | ||
---- | ---- | ||