{"__v":8,"_id":"555379d8d402b92300cee2f5","category":{"__v":6,"_id":"554213dacbc48d0d001544ef","pages":["55421a3f6592e60d00027c19","55421a4a6592e60d00027c1b","55421a776592e60d00027c1e","55421e4d6592e60d00027c24","55478a479a48800d00c6e537","555379d8d402b92300cee2f5"],"project":"54ad7b1d9219922100751796","version":"5505581f728deb23005ec0f4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-30T11:36:58.428Z","from_sync":false,"order":2,"slug":"partners-api","title":"Partners API"},"project":"54ad7b1d9219922100751796","user":"55520723953c9c0d00f50645","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-05-13T16:20:40.540Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"vCita partners API allows you to create, manage subscriptions and terminate accounts. \n\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authentication\"\n}\n[/block]\nReporting API requires a token that can be provided to partners and directory admins. \n**To receive a token please contact us at partners:::at:::vcita.com.**\n\nThe token should be added as an HTTP header to every API call, see example below:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl https://api.vcita.com/v1/partners/accounts -H 'Authorization: Token token=\\\"aaaabbbbccccddddeeeeffff11112222\\\"'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Create a new account\"\n}\n[/block]\nCreate a new account under your directory. Most account details are cloned from an existing templates to allow quick setup.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST https://api.vcita.com/v1/partners/accounts\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\naccount attributes:\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"first_name\",\n    \"1-0\": \"last_name\",\n    \"2-0\": \"email\",\n    \"3-0\": \"template_business_id\",\n    \"0-1\": \"Account first name. REQUIRED\",\n    \"1-1\": \"Account last name. REQUIRED\",\n    \"2-1\": \"Account email. REQUIRED\",\n    \"3-1\": \"ID of the template to create the account from. REQUIRED\",\n    \"4-0\": \"**Optional Attributes**\",\n    \"5-0\": \"business_name\",\n    \"6-0\": \"title\",\n    \"7-0\": \"address\",\n    \"8-0\": \"country_name\",\n    \"9-0\": \"phone\",\n    \"10-0\": \"time_zone\",\n    \"5-1\": \"Account business/company name.\\ne.g 'The Tax Advisors'\",\n    \"6-1\": \"Title for the business. \\ne.g 'Tax consulting services'\",\n    \"7-1\": \"Account business address.\",\n    \"8-1\": \"Account country. This is required if the phone parameter is sent.\",\n    \"9-1\": \"Account phone number.\\ne.g 800-286-9513\",\n    \"10-1\": \"Account time zone.\\ne.g Central Time (US & Canada)\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]\nReturn Codes:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"201 OK\",\n    \"0-1\": \"Account was created.\\n{staff_id => staff_id, business_id => business_id, token => access_token}\\n\\nIMPORTANT: The access token cannot be retrieved later. It is only available via the creation process.\",\n    \"1-0\": \"200 OK\",\n    \"1-1\": \"Account already exists. \\n{staff_id => staff_id, business_id => business_id}\",\n    \"3-0\": \"422 Unprocessable Entity\",\n    \"3-1\": \"Bad parameter(s). See content for more information.\",\n    \"2-0\": \"401 Unauthorized\",\n    \"2-1\": \"Operation is not permitted. See content for more information\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Assign a Package to an Account\"\n}\n[/block]\nSet a premium/free package to an existing account under your directory.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET https://api.vcita.com/v1/partners/accounts/b3b4ae3w762f6bbe/change_package?package_name=ultimate\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nparameters:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"package_name\",\n    \"0-1\": \"Options: scheduling, invoicing, lead_gen, ultimate, free, teams\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\nreturn codes:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"200 OK\",\n    \"0-1\": \"Account subscription was updated successfully.\",\n    \"1-0\": \"401 Unauthorized\",\n    \"1-1\": \"Operation is not permitted. See content for more information\",\n    \"2-0\": \"422 Unprocessable Entity\",\n    \"2-1\": \"Bad parameter(s). See content for more information.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"","slug":"account-creation-and-manipulation-1","type":"basic","title":"Account Creation and Manipulation"}

Account Creation and Manipulation


vCita partners API allows you to create, manage subscriptions and terminate accounts. [block:api-header] { "type": "basic", "title": "Authentication" } [/block] Reporting API requires a token that can be provided to partners and directory admins. **To receive a token please contact us at partners@vcita.com.** The token should be added as an HTTP header to every API call, see example below: [block:code] { "codes": [ { "code": "curl https://api.vcita.com/v1/partners/accounts -H 'Authorization: Token token=\"aaaabbbbccccddddeeeeffff11112222\"'", "language": "curl" } ] } [/block] [block:api-header] { "type": "basic", "title": "Create a new account" } [/block] Create a new account under your directory. Most account details are cloned from an existing templates to allow quick setup. [block:code] { "codes": [ { "code": "POST https://api.vcita.com/v1/partners/accounts", "language": "http" } ] } [/block] account attributes: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "first_name", "1-0": "last_name", "2-0": "email", "3-0": "template_business_id", "0-1": "Account first name. REQUIRED", "1-1": "Account last name. REQUIRED", "2-1": "Account email. REQUIRED", "3-1": "ID of the template to create the account from. REQUIRED", "4-0": "**Optional Attributes**", "5-0": "business_name", "6-0": "title", "7-0": "address", "8-0": "country_name", "9-0": "phone", "10-0": "time_zone", "5-1": "Account business/company name.\ne.g 'The Tax Advisors'", "6-1": "Title for the business. \ne.g 'Tax consulting services'", "7-1": "Account business address.", "8-1": "Account country. This is required if the phone parameter is sent.", "9-1": "Account phone number.\ne.g 800-286-9513", "10-1": "Account time zone.\ne.g Central Time (US & Canada)" }, "cols": 2, "rows": 11 } [/block] Return Codes: [block:parameters] { "data": { "0-0": "201 OK", "0-1": "Account was created.\n{staff_id => staff_id, business_id => business_id, token => access_token}\n\nIMPORTANT: The access token cannot be retrieved later. It is only available via the creation process.", "1-0": "200 OK", "1-1": "Account already exists. \n{staff_id => staff_id, business_id => business_id}", "3-0": "422 Unprocessable Entity", "3-1": "Bad parameter(s). See content for more information.", "2-0": "401 Unauthorized", "2-1": "Operation is not permitted. See content for more information" }, "cols": 2, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Assign a Package to an Account" } [/block] Set a premium/free package to an existing account under your directory. [block:code] { "codes": [ { "code": "GET https://api.vcita.com/v1/partners/accounts/b3b4ae3w762f6bbe/change_package?package_name=ultimate", "language": "http" } ] } [/block] parameters: [block:parameters] { "data": { "0-0": "package_name", "0-1": "Options: scheduling, invoicing, lead_gen, ultimate, free, teams" }, "cols": 2, "rows": 1 } [/block] return codes: [block:parameters] { "data": { "0-0": "200 OK", "0-1": "Account subscription was updated successfully.", "1-0": "401 Unauthorized", "1-1": "Operation is not permitted. See content for more information", "2-0": "422 Unprocessable Entity", "2-1": "Bad parameter(s). See content for more information." }, "cols": 2, "rows": 3 } [/block]