{"_id":"55bf80af19dd820d0008a006","editedParams":true,"version":{"_id":"5505581f728deb23005ec0f4","forked_from":"54ad7b1d9219922100751799","project":"54ad7b1d9219922100751796","__v":4,"createdAt":"2015-03-15T09:59:59.748Z","releaseDate":"2015-03-15T09:59:59.748Z","categories":["55055820728deb23005ec0f5","55055820728deb23005ec0f6","554213dacbc48d0d001544ef","55421a598aeff51700a20db6","55a64fe680c8a30d00b325e0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"editedParams2":true,"user":"55a38410912a6e2300882b88","__v":1,"category":{"_id":"55a64fe680c8a30d00b325e0","version":"5505581f728deb23005ec0f4","pages":["55a652b680c8a30d00b325ec","55a65a4251457325000e4d40","55a6705b80c8a30d00b32686","55a772393efe0c2f0074c8fe","55a7ae383efe0c2f0074caaf","55ae2ba22723e51900898fa0","55ae32628576b92300291cb3","55b0b0bbe7abe62300f9a8bb","55b0c6def202b12100cda2e7","55bf80af19dd820d0008a006","55c06be7344dc40d00f55859","55c06ccb37298d0d00088c72","561d098a09e6540d002ff602"],"project":"54ad7b1d9219922100751796","__v":13,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-15T12:19:50.489Z","from_sync":false,"order":1,"slug":"rest-api-coming-soon","title":"REST API"},"project":"54ad7b1d9219922100751796","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-03T14:54:39.292Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"require 'net/http'\nrequire 'json'\n\nparameters = {\n  :client_id => 'y9baibr3tmmvuwjp',\n  :interaction_type => 'business_location',\n  :start_time => '2016-08-03 14:47:40 UTC',\n  :duration => '90',\n  :title => 'Some Other Title',\n  :interaction_details => '212-383-2828'\n}\n\nuri = URI(\"https://api2.vcita.com/v2/appointments\")\nres = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|\n  req = Net::HTTP::Post.new(uri)\n  req[\"Authorization\"] = \"Token YOUR_TOKEN\"\n  req.set_form_data(parameters)\n  http.request(req)\nend\n\np res.body\n","language":"ruby"},{"code":"import urllib\nimport urllib2\nimport json\n\nurl = 'https://api2.vcita.com/v2/appointments'\nheaders = { 'Authorization' : 'Token YOUR_TOKEN' }\n\nvalues = {\n  'client_id':'y9baibr3tmmvuwjp',\n  'interaction_type':'business_location',\n  'start_time':'2016-08-03 14:47:40 UTC',\n  'duration':'90',\n  'title':'Some Other Title',\n  'interaction_details':'212-383-2828'\n}\n\ndata = urllib.urlencode(values)\nrequest = urllib2.Request(url, data, headers)\nresponse = urllib2.urlopen(request)\n\nparsed_data = json.loads(response.read())\n\nprint parsed_data","language":"python"}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  'currency': 'ILS', \n  'invoices': [], \n  'staff_id': 'bba1df8708c113f1', \n  'interaction_details': '212-383-2828', \n  'payment_id': None, \n  'title': 'Some Other Title', \n  'conversation_id': 'tfinbzwlqj7fuzev', \n  'notes': None, \n  'state': 'scheduled', \n  'interaction_type': 'business_location', \n  'price': '0.0', \n  'duration': 90, \n  'calendar_start_time': '2016-08-03T14:47:40.000+03:00', \n  'depth': 'deep', \n  'client_id': 'y9baibr3tmmvuwjp', \n  'id': 'fhk1lt9jihgtede0', \n  'service_id': None, \n  'type': 'appointment', \n  'start_time': '2016-08-03T14:47:40.000+03:00'\n}","name":""},{"name":"","status":400,"language":"json","code":"{\n  \"status\"=>\"failure\", \n  \"message\"=>\"401 Unauthorized\"\n}"}]},"settings":"","auth":"required","params":[{"_id":"55bf80af19dd820d0008a00a","ref":"","in":"body","required":false,"desc":"vCita ID of the client with whom to schedule an appointment (required)","default":"","type":"string","name":"client_id"},{"_id":"55bf80af19dd820d0008a009","ref":"","in":"body","required":false,"desc":"One of the following: business_location, client_location, business_phone, client_phone (required)","default":"","type":"string","name":"interaction_type"},{"_id":"55bf80af19dd820d0008a008","ref":"","in":"body","required":false,"desc":"Start time of the appointment. format: \"2015-08-03 14:47:40 UTC\" (required)","default":"","type":"string","name":"start_time"},{"_id":"55bf80af19dd820d0008a007","ref":"","in":"body","required":false,"desc":"Duration of appointment, in minutes. (required)","default":"","type":"string","name":"duration"},{"_id":"55c06a8d9459770d0003816f","ref":"","in":"body","required":false,"desc":"Title of the appointment (required)","default":"","type":"string","name":"title"},{"_id":"55c06a8d9459770d0003816e","ref":"","in":"body","required":false,"desc":"Description of the appointment details - address to go to, phone number to call, etc..","default":"","type":"string","name":"interaction_details"}],"url":"/v2/appointments"},"isReference":false,"order":7,"body":"","excerpt":"POSTing to /v2/appointments creates a new appointment. The response is in JSON format and includes the uid of the newly-created appointment in the vCita system.","slug":"v2appointments-1","type":"endpoint","title":"/v2/appointments"}

post/v2/appointments

POSTing to /v2/appointments creates a new appointment. The response is in JSON format and includes the uid of the newly-created appointment in the vCita system.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

client_id:
string
vCita ID of the client with whom to schedule an appointment (required)
interaction_type:
string
One of the following: business_location, client_location, business_phone, client_phone (required)
start_time:
string
Start time of the appointment. format: "2015-08-03 14:47:40 UTC" (required)
duration:
string
Duration of appointment, in minutes. (required)
title:
string
Title of the appointment (required)
interaction_details:
string
Description of the appointment details - address to go to, phone number to call, etc..

Examples


Result Format


User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}