{"__v":9,"_id":"55ae32628576b92300291cb3","category":{"__v":13,"_id":"55a64fe680c8a30d00b325e0","pages":["55a652b680c8a30d00b325ec","55a65a4251457325000e4d40","55a6705b80c8a30d00b32686","55a772393efe0c2f0074c8fe","55a7ae383efe0c2f0074caaf","55ae2ba22723e51900898fa0","55ae32628576b92300291cb3","55b0b0bbe7abe62300f9a8bb","55b0c6def202b12100cda2e7","55bf80af19dd820d0008a006","55c06be7344dc40d00f55859","55c06ccb37298d0d00088c72","561d098a09e6540d002ff602"],"project":"54ad7b1d9219922100751796","version":"5505581f728deb23005ec0f4","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","user":"55a38410912a6e2300882b88","version":{"__v":4,"_id":"5505581f728deb23005ec0f4","forked_from":"54ad7b1d9219922100751799","project":"54ad7b1d9219922100751796","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-21T11:52:02.214Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"curl --data \"first_name=Test&last_name=Client&email=test_client%40vcita.com&phone=347-306-9638\" -H \"Authorization: Token 2a5b13c446baa7107620aa64e4dcfd57\" https://api2.vcita.com/v2/clients","language":"shell"},{"language":"ruby","code":"require 'net/http'\nrequire 'json'\n\nparameters = {\n  :first_name => 'Test',\n  :last_name => 'Client',\n  :email => 'test_client:::at:::vcita.com',\n  :phone => '347-306-9638'\n}\n\nuri = URI('https://api2.vcita.com/v2/clients')\nrequest = Net::HTTP::Post.new(uri)\nrequest[\"Authorization\"] = \"Token 2a5b13c446baa7107620aa64e4dcfd57\"\nrequest.set_form_data(parameters)\n\nres = Net::HTTP.start(uri.hostname, uri.port) {|http|\n  http.request(request)\n}\n\nparsed_body = JSON.parse(res.body)"},{"language":"python","code":"import urllib\nimport urllib2\nimport json\n\nurl = 'https://api2.vcita.com/v2/clients'\nheaders = { 'Authorization' : 'Token 2a5b13c446baa7107620aa64e4dcfd57' }\n\nvalues = { 'first_name' : 'Testo', 'last_name' : 'Client', 'email' : 'test_clienta@vcita.com', 'phone' : '347-306-9638' }\n\ndata = urllib.urlencode(values)\nrequest = urllib2.Request(url, data, headers)\nresponse = urllib2.urlopen(request)\n\nparsed_data = json.loads(response.read())"}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"[{\n  \"id\": \"brc6d8osuqar0xfx\",\n  \"source\": \"\",\n  \"created_at\": \"2015-07-21T14:49:07.184+03:00\",\n  \"full_name\": \"Test Client\",\n  \"photo_path\": null,\n  \"facebook_profile\": null,\n  \"twitter_profile\": null,\n  \"linkedin_profile\": null,\n  \"google_plus_profile\": null,\n  \"assigned_to\": null,\n  \"first_name\": \"Test\",\n  \"last_name\": \"Client\",\n  \"email\": \"test_client@vcita.com\",\n  \"time_zone\": \"Central Time (US & Canada)\",\n  \"phone\": \"347-306-9638\",\n  \"country_name\": null,\n  \"address\": null,\n  \"identifier\": null,\n  \"custom_fields\": null,\n}]","name":""},{"status":400,"language":"json","code":"{\n  \"status\"=>\"failure\", \n  \"message\"=>\"401 Unauthorized\"\n}","name":""}]},"settings":"","auth":"required","params":[],"url":"/v2/clients"},"isReference":false,"order":4,"body":"","excerpt":"POSTing to /v2/clients creates a new client. The response is in JSON format and includes the .","slug":"v2clients-1","type":"endpoint","title":"/v2/clients"}

post/v2/clients

POSTing to /v2/clients creates a new client. The response is in JSON format and includes the .

Definition

{{ api_url }}{{ page_api_url }}

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 }}