{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"70cb71dd-7171-4f8e-8ebc-ba60f5395813","name":"GBooking API for Online Appointment Scheduling","description":"GBooking API is a standard json-rpc2 API supporting multiple transactions for managing business, clients, providing stats, booking time, and many more. It checks user acl roles for each request using the following parameters: ```` \"cred\": {\"user\": \"...\", \"token\": \"...\"} ````. \n\nThe present documentation offers examples of requests for a test environment. You can run them for development purposes.\n\nExample of request:\n````\n{\n   \"jsonrpc\":\"2.0\",\n   \"id\":1,\n   \"method\":\"business.get_top_services\",\n   \"params\":{\n      \"business\":{\n         \"id\":\"4000000001992\"\n      }\n   },\n   \"cred\":{\n      \"token\":\"...\",\n      \"user\":\"...\"\n   }\n}\n````\n\n* __jsonrpc__ &mdash; protocol version (2.0)\n* __id__ &mdash; numeric value identifying the request at the server\n* __method__ &mdash; name of requested method\n* __params__ &mdash; array of parameters for requested method\n* __cred__ &mdash; set of data for identification and authorization\n\n\nExample of successful response:\n````\n{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"result\": {\n        \"status\": true,\n        \"services\": []\n    }\n}\n````\n\nExample of error response:\n````\n{\n   \"jsonrpc\":\"2.0\",\n   \"id\":1,\n   \"error\":{\n      \"code\":-10200,\n      \"message\":\"Failed to retrieve business\",\n      \"data\":\"\"\n   }\n}\n````\n\nBy access level, all the requests are classified into several basic roles:\n* __guest__ &mdash; public request without specifying access parameters\n* __client__ &mdash; request providing and managing the data of a specific client\n* __admin__ &mdash; request with access to the data pertaining to a business or a set of businesses\n\nFor each request, there is a description including its access role. There can be multiple access roles. In such a case, the request can return different results.\n\nFor online booking, public methods* with the _guest_ role are used.\n\n----\n_* except for the method of showcase booking. The easiest way to get authorized in this case is to obtain a long live token in the showcase's back office._\n\n\n## Glossary\n\nBelow are the basic concepts of the _GBooking API for Online Appointment Scheduling_:\n* A __Business__ contains complete data about a business:\n\t* list of employees\n\t* list of services\n\t* settings of GBooking Widget's display\n\t* settings of GBooking BackOffice display\n\t* business information (name, address, phone number, working schedule)\n\t* list of other branches in the network\n* __Business Branch__ or __Branch__ stand for one branch, subsidiary, shop, salon, etc. \n* __Business Showcase__ or __Showcase__ provides access to the data of a random group of branch businesses\n* __Branch Network__ means a set of branches united into one. The GBooking Widget allows the user to switch between branches or to obtain data for all the branches. In the BackOffice, an administrator with sufficient access rights can switch between branches. The client data is shared throughout the branch network.\n\n* An __Employee__ contains information about the employee:\n\t* full name\n\t* list of services provided by them\n\t* per-service performance speed\n\t* branch\n\t* phone number and email\n\t* additional textual information, including profession and further information about the employee\n* __Service__, __Taxonomy__ &mdash; service or class of services that can be signed up for. Contains name, description, duration (optional for every employee), price, and discounts.\n* __Timetable slot__ &mdash; a period available for making appointments\n* __Appointment__ &mdash; an element of the timetable containing the following information: _client_, _employee_, _starting date_, _total duration_, _list of services_, _whether the client has paid_, and so on. \n* __Reserve__, __Reserve appointment__ &mdash; provisionary appointment that reserves the required time for a short period\n* __Client__ contains data about a client of one business or a branch network\n\nFor detailed information about the data schema, please refer to repository: https://github.com/GbookingLTD/corev2-schemata/tree/master/docs.\n\nData schemata in the json-schema format are contained here: https://github.com/GbookingLTD/corev2-schemata/tree/master/schemas.\n\nError codes:\n* [full list of errors](https://github.com/GbookingLTD/corev2-schemata/blob/master/schemas/errors.md)\n* [authorization errors](https://github.com/GbookingLTD/corev2-schemata/blob/master/schemas/common/partials/authErrorCodes.yaml)\n* [errors from external systems](https://github.com/GbookingLTD/corev2-schemata/blob/master/schemas/misErrors.md)\n* There are lists of possible errors for every method to be used.\n\nAs of 02.10.2018, the request-response format has been described for the following methods:\n* Getting Business Data (business.get_profile_by_id)\n* Adding a Client (client.add_client)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"608267","team":138673,"collectionId":"70cb71dd-7171-4f8e-8ebc-ba60f5395813","publishedId":"SVSGPWCZ","public":true,"publicUrl":"https://documenter-api.postman.tech/view/608267/SVSGPWCZ","privateUrl":"https://go.postman.co/documentation/608267-70cb71dd-7171-4f8e-8ebc-ba60f5395813","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2019-07-11T14:18:02.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Showcase_Prod_6304_Demo","id":"f68d9ddb-e52a-463e-a1bd-f99ecb6d5a7d","owner":"608267","values":[{"key":"BusinessID","value":"4000000006304","enabled":true},{"key":"RPC_URL","value":"https://apiv2.gbooking.ru/rpc","enabled":true},{"key":"OAUTH_URL","value":"https://oauth2.gbooking.ru/rpc","enabled":true},{"key":"Token","value":"8e7d61be4f200e39ea29b1231006a248de108d9a","enabled":true},{"key":"UserID","value":"5b1035dcaff15607133b523f","enabled":true},{"key":"NetworkID","value":"315","enabled":true},{"key":"CRAC_SLOTS_URL","value":"https://cracslots.gbooking.ru/rpc","enabled":true},{"key":"CRAC_URL","value":"https://crac-prod3.gbooking.ru/rpc","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/71eac86d48ca81c6842a8bacd3d06d3de0f694cec7eb4cdf85b7692d3053a586","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Showcase_Prod_6304_Demo","value":"608267-f68d9ddb-e52a-463e-a1bd-f99ecb6d5a7d"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/SVSGPWCZ"}