{ "swagger": "2.0", "info": { "description": "Our HTTP [REST API](https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer) allows you to manage vital details of your account and services in client portal. [JSON](http:\/\/www.json.org\/) is used for all API returns.", "version": "4.20210914", "title": "Time4VPS User API" }, "host": "billing.time4vps.com", "basePath": "\/api", "tags": [ { "name": "Clientarea" }, { "name": "Billing" }, { "name": "Services" }, { "name": "Cart" }, { "name": "DNS" }, { "name": "SSL Certificates" }, { "name": "Server Management" }, { "name": "Init Script Management" }, { "name": "VPN Management" } ], "schemes": [ "https" ], "paths": { "\/token": { "post": { "tags": [ "Clientarea" ], "summary": "Refresh Token", "description": "Generate new authorization token using refresh token", "operationId": "refreshToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "refresh_token", "type": "string", "in": "query", "description": "Refresh token previously obtained from `POST \/login`" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/revoke": { "post": { "tags": [ "Clientarea" ], "summary": "Revoke Token", "description": "Invalidate authorization and refresh token.\nPass refresh token or call this method with valid access token", "operationId": "revokeToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "refresh_token", "type": "string", "in": "query" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/details": { "get": { "tags": [ "Clientarea" ], "summary": "User Details", "description": "Return registration details for my account", "operationId": "getDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"client\": {\n \"id\": \"26\",\n \"email\": \"api@example.com\",\n \"lastlogin\": \"2016-12-30 12:24:28\",\n \"ip\": \"172.100.2.1\",\n \"host\": \"hostname\",\n \"firstname\": \"Joe\",\n \"lastname\": \"Doe\",\n \"companyname\": \"\",\n \"address1\": \"Pretty View Lane\",\n \"address2\": \"3294\",\n \"city\": \"Santa Rosa\",\n \"state\": \"California\",\n \"postcode\": \"95401\",\n \"country\": \"US\",\n \"phonenumber\": \"+1.24123123\"\n }\n}" } } }, "put": { "tags": [ "Clientarea" ], "summary": "Update User Details", "description": "Update registration details under my account", "operationId": "postDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "type", "type": "string", "in": "query", "description": "Account Type", "enum": [ "Private", "Company" ] }, { "name": "companyname", "type": "string", "in": "query", "description": "Organization" }, { "name": "companyregistrationnumber", "type": "string", "in": "query", "description": "Organization Registration Number" }, { "name": "vateu", "type": "string", "in": "query", "description": "VAT Number - If you have valid VAT-EU registered number please provide it here" }, { "name": "email", "type": "string", "in": "query", "description": "Email Address" }, { "name": "firstname", "type": "string", "in": "query", "description": "First Name" }, { "name": "lastname", "type": "string", "in": "query", "description": "Last Name" }, { "name": "country", "type": "string", "in": "query", "description": "Country" }, { "name": "address1", "type": "string", "in": "query", "description": "Address 1" }, { "name": "city", "type": "string", "in": "query", "description": "City" }, { "name": "state", "type": "string", "in": "query", "description": "State - Maximum 20 characters." }, { "name": "postcode", "type": "string", "in": "query", "description": "Post code" }, { "name": "phonenumber", "type": "string", "in": "query", "description": "Phone" }, { "name": "emarketing", "type": "array", "in": "query", "description": "News and Updates - You will be subscribed to our newsletter list and will receive updates and news regarding Time4VPS services.", "items": { "type": "string" }, "enum": [ "Subscribed" ] } ], "responses": { "200": { "description": "`Success`" } } } }, "\/signup": { "post": { "tags": [ "Clientarea" ], "summary": "Sign up", "description": "Create new account", "operationId": "postSignup", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "type", "type": "string", "in": "query", "description": "Account Type", "enum": [ "Private", "Company" ] }, { "name": "companyname", "type": "string", "in": "query", "description": "Organization" }, { "name": "companyregistrationnumber", "type": "string", "in": "query", "description": "Organization Registration Number" }, { "name": "vateu", "type": "string", "in": "query", "description": "VAT Number - If you have valid VAT-EU registered number please provide it here" }, { "name": "email", "type": "string", "in": "query", "description": "Email Address" }, { "name": "password", "type": "string", "in": "query", "description": "Password - Password should consist of minimum 12 characters and at least one number and one uppercase character." }, { "name": "firstname", "type": "string", "in": "query", "description": "First Name" }, { "name": "lastname", "type": "string", "in": "query", "description": "Last Name" }, { "name": "country", "type": "string", "in": "query", "description": "Country" }, { "name": "address1", "type": "string", "in": "query", "description": "Address 1" }, { "name": "city", "type": "string", "in": "query", "description": "City" }, { "name": "emarketing", "type": "array", "in": "query", "description": "News and Updates - You will be subscribed to our newsletter list and will receive updates and news regarding Time4VPS services.", "items": { "type": "string" }, "enum": [ "Subscribed" ] }, { "name": "2faenable", "type": "array", "in": "query", "description": "Two-Factor Authentication", "items": { "type": "string" }, "enum": [ "Enable" ] }, { "name": "2fasecret", "type": "string", "in": "query", "description": "Two-Factor Secret - If Two-Factor is enabled, enter 16-chars (letters\/digits) secret code to use in Google Authenticator App." }, { "name": "currency", "type": "string", "in": "query", "description": "Currency", "enum": [ "EUR" ] } ], "responses": { "200": { "description": "`Success`" } } } }, "\/passwordreset": { "post": { "tags": [ "Clientarea" ], "summary": "Password Reset", "description": "Request password reset email for account", "operationId": "postReminder", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "email", "type": "string", "in": "query", "description": "EMail address" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/contact": { "get": { "tags": [ "Clientarea" ], "summary": "List contacts", "description": "Return a list of contacts on this account", "operationId": "profiles", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"contacts\": [\n {\n \"email\": \"mary@example.com\",\n \"id\": \"49\",\n \"firstname\": \"Mary\",\n \"lastname\": \"Sue\",\n \"companyname\": \"\",\n \"company\": \"0\",\n \"lastlogin\": \"0000-00-00 00:00:00\"\n }\n ]\n}" } } }, "post": { "tags": [ "Clientarea" ], "summary": "Add contact", "description": "Create new contact account, if password is provided you\ncan use provided email addres to login as that contact.", "operationId": "profiles_add", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "password", "type": "string", "in": "query", "description": "Optional, allows you to login as contact" }, { "name": "privileges", "type": "array", "in": "query", "description": "Array with privileges that you want to enable. Formatted the same way as output from GET \/contact\/privileges<\/code>", "items": { "type": "string" } }, { "name": "type", "type": "string", "in": "query", "description": "Account Type", "enum": [ "Private", "Company" ] }, { "name": "companyname", "type": "string", "in": "query", "description": "Organization" }, { "name": "companyregistrationnumber", "type": "string", "in": "query", "description": "Organization Registration Number" }, { "name": "vateu", "type": "string", "in": "query", "description": "VAT Number - If you have valid VAT-EU registered number please provide it here" }, { "name": "email", "type": "string", "in": "query", "description": "Email Address" }, { "name": "firstname", "type": "string", "in": "query", "description": "First Name" }, { "name": "lastname", "type": "string", "in": "query", "description": "Last Name" }, { "name": "country", "type": "string", "in": "query", "description": "Country" }, { "name": "address1", "type": "string", "in": "query", "description": "Address 1" }, { "name": "city", "type": "string", "in": "query", "description": "City" }, { "name": "state", "type": "string", "in": "query", "description": "State - Maximum 20 characters." }, { "name": "postcode", "type": "string", "in": "query", "description": "Post code" }, { "name": "phonenumber", "type": "string", "in": "query", "description": "Phone" }, { "name": "emarketing", "type": "array", "in": "query", "description": "News and Updates - You will be subscribed to our newsletter list and will receive updates and news regarding Time4VPS services.", "items": { "type": "string" }, "enum": [ "Subscribed" ] } ], "responses": { "200": { "description": "`Success`" } } } }, "\/contact\/privileges": { "get": { "tags": [ "Clientarea" ], "summary": "Contact privileges", "description": "List possible contact privileges.\nEach domain and service may list additional privileges, depending on available features.
", "operationId": "profile_privs", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"privileges\": {\n \"billing\": [\n \"emails\", \/\/ Receive billing notifications\n \"payinvoice\", \/\/ Allow to view\/pay invoices\n \"orders\", \/\/ Allow to place new orders\n \"balance\", \/\/ View account balance\n \"addfunds\", \/\/ Add account funds\n \"creditcard\" \/\/ Edit Credit Card details\n ],\n \"support\": [\n \"newticket\", \/\/ Open new tickets\n \"tickets\", \/\/ View all tickets\n \"closeticket\", \/\/ Close tickets\n \"emails\" \/\/ Receive email notifications from support\n ],\n \"misc\": [\n \"editmain\", \/\/ Modify main profile details\n \"emails\", \/\/ View emails history\n \"editipaccess\", \/\/ Edit allowed IP access\n \"manageprofiles\", \/\/ Add \/ Edit contacts\n \"affiliates\" \/\/ Access affiliates section\n ],\n \"services\": {\n \"full\": 1, \/\/ Full control over services\n \"332\": [\n \"basic\", \/\/ View basic details\n \"billing\", \/\/ View billing info\n \"cancelation\", \/\/ Request cancellation\n \"upgrade\", \/\/ Upgrade \/ Downgrade\n \"notify\", \/\/ Receive related email notifications\t\n (...)\n \"logindetails\"\n ]\n },\n \"domains\": {\n \"full\": 1, \/\/ Full control over domains\n \"523\": [\n \"basic\", \/\/ View basic details\n \"renew\", \/\/ Renew domain\n \"notify\", \/\/ Receive related email notifications\t\n \"contactinfo\", \/\/ Contact Information\n (...)\n \"nameservers\" \/\/ Manage Nameservers\n ]\n }\n }\n}" } } } }, "\/contact\/@id": { "get": { "tags": [ "Clientarea" ], "summary": "Get contacts details", "description": "Return array with contact details", "operationId": "profile_data", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Contact ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"contact\": {\n \"id\": \"49\",\n \"email\": \"mary@example.com\",\n \"firstname\": \"Mary\",\n \"lastname\": \"Sue\",\n \"companyname\": \"\",\n \"address1\": \"Pretty View Lane\",\n \"address2\": \"3194\",\n \"city\": \"Santa Rosa\",\n \"state\": \"California\",\n \"postcode\": \"95401\",\n \"country\": \"US\",\n \"phonenumber\": \"+1.24123123\",\n \"type\": \"Private\",\n \"privileges\" : {\n \"support\" : [\"tickets\", \"newticket\"]\n }\n }\n}" } } }, "put": { "tags": [ "Clientarea" ], "summary": "Edit contact", "description": "Change contact details`", "operationId": "profile_edit", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "required": true }, { "name": "privileges", "type": "array", "in": "query", "description": "Array with privileges that you want to enable. Formatted the same way as output from GET \/contact\/privileges<\/code>", "items": { "type": "string" } }, { "name": "type", "type": "string", "in": "query", "description": "Account Type", "enum": [ "Private", "Company" ] }, { "name": "companyname", "type": "string", "in": "query", "description": "Organization" }, { "name": "companyregistrationnumber", "type": "string", "in": "query", "description": "Organization Registration Number" }, { "name": "vateu", "type": "string", "in": "query", "description": "VAT Number - If you have valid VAT-EU registered number please provide it here" }, { "name": "email", "type": "string", "in": "query", "description": "Email Address" }, { "name": "firstname", "type": "string", "in": "query", "description": "First Name" }, { "name": "lastname", "type": "string", "in": "query", "description": "Last Name" }, { "name": "country", "type": "string", "in": "query", "description": "Country" }, { "name": "address1", "type": "string", "in": "query", "description": "Address 1" }, { "name": "city", "type": "string", "in": "query", "description": "City" }, { "name": "state", "type": "string", "in": "query", "description": "State - Maximum 20 characters." }, { "name": "postcode", "type": "string", "in": "query", "description": "Post code" }, { "name": "phonenumber", "type": "string", "in": "query", "description": "Phone" }, { "name": "emarketing", "type": "array", "in": "query", "description": "News and Updates - You will be subscribed to our newsletter list and will receive updates and news regarding Time4VPS services.", "items": { "type": "string" }, "enum": [ "Subscribed" ] } ], "responses": { "200": { "description": "`Success`" } } } }, "\/notifications": { "get": { "tags": [ "Clientarea" ], "summary": "List all portal notifications", "description": "Return a list of all portal notifications.", "operationId": "notifications", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "rel_type", "type": "string", "in": "query", "description": "Optional, return only by relation type" }, { "name": "rel_id", "type": "string", "in": "query", "description": "Optional, return only by relation id" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/notifications\/new": { "get": { "tags": [ "Clientarea" ], "summary": "List new portal notifications", "description": "Return only new portal notifications.", "operationId": "notifications_new", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "rel_type", "type": "string", "in": "query", "description": "Optional, return only by relation type" }, { "name": "rel_id", "type": "string", "in": "query", "description": "Optional, return only by relation id" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/notifications\/@id\/ack": { "put": { "tags": [ "Clientarea" ], "summary": "Acknowledge notification", "description": "Marks the notification as read", "operationId": "notifications_set_seen", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/balance": { "get": { "tags": [ "Billing" ], "summary": "Account balance", "description": "Get current account balance(unpaid invoices total), account credit", "operationId": "getBalance", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n {\n \"success\": true,\n \"details\": {\n \"currency\": \"USD\",\n \"acc_balance\": \"123456.55\",\n \"acc_credit\": \"0.00\"\n }\n }\n}" } } } }, "\/invoice": { "get": { "tags": [ "Billing" ], "summary": "List Invoices", "description": "List all invoices under my account", "operationId": "getInvoices", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"invoices\": [\n {\n \"id\": \"308976\",\n \"date\": \"2016-12-30\",\n \"dateorig\": \"2016-12-30\",\n \"duedate\": \"2017-01-06\",\n \"paybefore\": \"2017-01-06\",\n \"total\": \"19.65\",\n \"datepaid\": \"2016-12-30 12:40:47\",\n \"status\": \"Paid\",\n \"merge_id\": null,\n \"number\": \"2016\\\/12\\\/1\",\n \"currency\": \"USD\"\n }\n ]\n}" } } } }, "\/invoice\/@id": { "get": { "tags": [ "Billing" ], "summary": "Invoice Details", "description": "Get invoice details", "operationId": "getInvoiceDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"invoice\": {\n \"id\": \"308976\",\n \"status\": \"Paid\",\n \"date\": \"2016-12-30\",\n \"duedate\": \"2017-01-06\",\n \"paybefore\": \"2017-01-06\",\n \"datepaid\": \"2016-12-30 12:40:47\",\n \"subtotal\": 16.24,\n \"credit\": 0,\n \"tax\": 3.41,\n \"taxrate\": 21,\n \"tax2\": 0,\n \"taxrate2\": 0,\n \"taxexempt\": \"0\",\n \"total\": 19.65,\n \"rate\": 1,\n \"rate2\": 0,\n \"rate3\": 1,\n \"notes\": \"\",\n \"items\": [\n {\n \"id\": \"12305\",\n \"invoice_id\": \"308976\",\n \"type\": \"Other\",\n \"item_id\": \"0\",\n \"description\": \"Example Service\",\n \"amount\": \"15.00\",\n \"taxed\": \"1\",\n \"qty\": \"1.00\",\n \"linetotal\": \"15.00\"\n },\n {\n \"id\": \"12309\",\n \"invoice_id\": \"308976\",\n \"type\": \"Other\",\n \"item_id\": \"-2\",\n \"description\": \"PayPal Payment Fee\",\n \"amount\": \"1.24\",\n \"taxed\": \"1\",\n \"qty\": \"1.00\",\n \"linetotal\": \"1.24\"\n }\n ],\n \"client\": {\n \"id\": \"26\",\n \"email\": \"api@example.com\",\n \"firstname\": \"Joe\",\n \"lastname\": \"Doe\",\n \"companyname\": \"\",\n \"address1\": \"Pretty View Lane\",\n \"address2\": \"3194\",\n \"city\": \"Santa Rosa\",\n \"state\": \"California\",\n \"postcode\": \"95401\",\n \"country\": \"US\",\n \"phonenumber\": \"+1.24123123\"\n },\n \"number\": \"2016\\\/12\\\/1\",\n \"currency\": \"USD\"\n }\n}" } } } }, "\/payment": { "get": { "tags": [ "Billing" ], "summary": "Payment Methods", "description": "List available payment methods", "operationId": "paymethod", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"payments\": {\n \"10\": \"BankTransfer\",\n \"9\": \"PayPal\"\n }\n}" } } } }, "\/payment\/fees": { "get": { "tags": [ "Billing" ], "summary": "Payment Methods Fees", "description": "List available payment methods with fees", "operationId": "paymethod_fee", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"payments\": [\n {\n \"id\": 1,\n \"name\": \"Bank Transfer\",\n \"fixed_fee\": \"0.0\",\n \"percent_fee\": \"0.0\",\n },\n {\n \"id\": 2,\n \"name\": \"Stripe\",\n \"fixed_fee\": \"0.5\",\n \"percent_fee\": \"2.9\",\n },\n {\n \"id\": 4,\n \"name\": \"Credit Card\",\n \"fixed_fee\": \"0.1\",\n \"percent_fee\": \"2.4\"\n },\n {\n \"id\": 5,\n \"name\": \"PayPal\",\n \"fixed_fee\": \"0.3\",\n \"percent_fee\": \"2.9\"\n }\n ]\n}" } } } }, "\/service": { "get": { "tags": [ "Services" ], "summary": "List services", "description": "List all services under your account", "operationId": "service", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"services\": [\n {\n \"id\": \"301\",\n \"domain\": \"examplename.com\",\n \"total\": \"9.99\",\n \"status\": \"Pending\",\n \"billingcycle\": \"Monthly\",\n \"next_due\": \"2017-12-30\",\n \"category\": \"Hosting\",\n \"category_url\": \"hosting\",\n \"name\": \"Starter Hosting\"\n }\n ]\n}" } } } }, "\/service\/@id\/methods": { "get": { "tags": [ "Services" ], "summary": "List service methods", "description": "List methods available for service", "operationId": "serviceMethods", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"methods\": [\n {\n \"name\": \"Upgrade Request\",\n \"method\": \"POST\",\n \"route\": \"\\\/service\\\/@id\\\/upgrade\"\n },\n {\n \"name\": \"Upgrade Options\",\n \"method\": \"GET\",\n \"route\": \"\\\/service\\\/@id\\\/upgrade\"\n },\n {\n \"name\": \"Change service label\",\n \"method\": \"POST\",\n \"route\": \"\\\/service\\\/@id\\\/label\"\n },\n {\n \"name\": \"Service label\",\n \"method\": \"GET\",\n \"route\": \"\\\/service\\\/@id\\\/label\"\n },\n {\n \"name\": \"Cancel Service\",\n \"method\": \"POST\",\n \"route\": \"\\\/service\\\/@id\\\/cancel\"\n }\n ]\n}" } } } }, "\/service\/@id\/upgrade": { "get": { "tags": [ "Services" ], "summary": "Upgrade Options", "description": "List upgrade options", "operationId": "upgrade", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"resources\": [\n {\n \"id\": 1557,\n \"name\": \"Bandwidth\",\n \"type\": \"select\",\n \"items\": [\n {\n \"id\": \"9953\",\n \"name\": \"100 GB\",\n \"price\": 1,\n \"setup_price\": 0,\n \"selected\": true\n },\n {\n \"id\": \"10103\",\n \"name\": \"500 GB\",\n \"price\": 5,\n \"setup_price\": 0,\n \"selected\": false\n },\n {\n \"id\": \"10104\",\n \"name\": \"1 TB\",\n \"price\": 10,\n \"setup_price\": 0,\n \"selected\": false\n }\n ]\n }\n ],\n \"package\": []\n}" } } }, "post": { "tags": [ "Services" ], "summary": "Upgrade Request", "description": "Estimate or request upgrade\r\n\r\n```json\r\n\/\/ Format of ''resources'' paremeter\r\n{\r\n \"resource_id\" : \"qty_value\", \/\/ sliders & qty fields\r\n \"resource_id\" : \"item_id\", \/\/ dropdown & radio fields\r\n \"resource_id\" : {\r\n \"item_id\": \"qty_value\" \/\/ dropdown with qty field\r\n }\r\n}\r\n```", "operationId": "upgrade_test", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true }, { "name": "resources", "type": "array", "in": "query", "description": "array with resource values", "items": { "type": "string" } }, { "name": "package", "type": "integer", "in": "query", "description": "New package id, optonal when upgrading resources" }, { "name": "cycle", "type": "string", "in": "query", "description": "New billing cycle, optonal when upgrading resources" }, { "name": "send", "type": "boolean", "in": "query", "description": "Set to true when you want to send your upgrade request" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@id\/cancel": { "post": { "tags": [ "Services" ], "summary": "Cancel Service", "description": "Request service cancellation", "operationId": "service_cancel", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true }, { "name": "immediate", "type": "string", "in": "query", "description": "set to false<\/code> to terminate service at the end of billing date, true<\/code> - terminate immediately" }, { "name": "reason", "type": "string", "in": "query", "description": "Reason for this request" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@id\/label": { "get": { "tags": [ "Services" ], "summary": "Service label", "description": "Show current service label", "operationId": "service_get_label", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"label\": \"example\"\n}" } } }, "post": { "tags": [ "Services" ], "summary": "Change service label", "description": "Set new custom label to identify this service", "operationId": "service_set_label", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true }, { "name": "label", "type": "string", "in": "query", "description": "New label" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@id": { "get": { "tags": [ "Services" ], "summary": "Service details", "description": "Return details for service `@id`", "operationId": "serviceDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\r\n \"service\": {\r\n \"id\": \"301\",\r\n \"date_created\": \"2016-12-30\",\r\n \"domain\": \"examplename.com\",\r\n \"firstpayment\": \"9.99\",\r\n \"total\": \"9.99\",\r\n \"billingcycle\": \"Monthly\",\r\n \"next_due\": \"2017-12-30\",\r\n \"next_invoice\": \"2017-01-27\",\r\n \"status\": \"Active\",\r\n \"label\": \"\",\r\n \"username\": \"examplen\",\r\n \"name\": \"Starter Hosting\"\r\n }\r\n}" } } } }, "\/service\/order\/@order_num": { "get": { "tags": [ "Services" ], "summary": "Get service ID from Order Number", "description": "", "operationId": "getAccountFromOrder", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "order_num", "type": "integer", "in": "path", "description": "Order Number", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"account_id\": 848\n}" } } } }, "\/category": { "get": { "tags": [ "Cart" ], "summary": "List product categories", "description": "Return a list of product categories.", "operationId": "cart_categories", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"categories\": [\n {\n \"id\": \"10\",\n \"name\": \"Hosting\",\n \"description\": \"\",\n \"slug\": \"hosting\"\n },\n {\n \"id\": \"6\",\n \"name\": \"Domains\",\n \"description\": \"\",\n \"slug\": \"domains\"\n },\n {\n \"id\": \"16\",\n \"name\": \"Dedicated\",\n \"description\": \"\",\n \"slug\": \"dedicated\"\n }\n ]\n}" } } } }, "\/category\/@category_id\/product": { "get": { "tags": [ "Cart" ], "summary": "List products in category", "description": "Return a list of product available for purchase under requested category", "operationId": "cart_products", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "category_id", "type": "integer", "in": "path", "description": "Category ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"products\": [\n {\n \"id\": \"333\",\n \"type\": \"1\",\n \"name\": \"Starter Hosting\",\n \"stock\": false,\n \"paytype\": \"Regular\",\n \"description\": \"Disk:10GB
Memory:2GB
MySql:10 DB
Email:100 Users
\",\n \"qty\": \"0\",\n \"tags\": [\n\n ],\n \"periods\": [\n {\n \"title\": \"m\",\n \"value\": \"m\",\n \"price\": 9.99,\n \"setup\": 0,\n \"selected\": true\n },\n {\n \"title\": \"a\",\n \"value\": \"a\",\n \"price\": 109.89,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"b\",\n \"value\": \"b\",\n \"price\": 199.8,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"t\",\n \"value\": \"t\",\n \"price\": 299.7,\n \"setup\": 0,\n \"selected\": false\n }\n ]\n },\n (...)\n ]\n}" } } } }, "\/order\/@product_id": { "get": { "tags": [ "Cart" ], "summary": "Get product configuration details", "description": "Return product details with form configuration, addons and subproducts if available.", "operationId": "cart_product", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "product_id", "type": "integer", "in": "path", "description": "Product ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"product\": {\n \"id\": \"333\",\n \"category_name\": \"Hosting\",\n \"category_id\": \"49\",\n \"name\": \"Starter Hosting\",\n \"price\": 9.99,\n \"recurring\": \"m\",\n \"setup\": 0,\n \"config\": {\n \"product\": [\n {\n \"type\": \"select\",\n \"title\": \"pickcycle\",\n \"id\": \"cycle\",\n \"name\": \"cycle\",\n \"items\": [\n {\n \"title\": \"m\",\n \"value\": \"m\",\n \"price\": 9.99,\n \"setup\": 0,\n \"selected\": true\n },\n {\n \"title\": \"a\",\n \"value\": \"a\",\n \"price\": 109.89,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"b\",\n \"value\": \"b\",\n \"price\": 199.8,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"t\",\n \"value\": \"t\",\n \"price\": 299.7,\n \"setup\": 0,\n \"selected\": false\n }\n ],\n \"value\": \"m\",\n \"price\": 9.99,\n \"setup\": 0\n },\n {\n \"type\": \"input\",\n \"title\": \"domain\",\n \"id\": \"domain\",\n \"name\": \"domain\",\n \"value\": null\n }\n ],\n \"forms\": [\n {\n \"type\": \"select\",\n \"title\": \"Disk Size\",\n \"id\": \"1618\",\n \"firstItemId\": 10330,\n \"description\": \"\",\n \"name\": \"custom[1618]\",\n \"required\": false,\n \"multiple\": false,\n \"config\": {\n \"conditionals\": []\n },\n \"value\": [],\n \"textvalue\": [],\n \"price\": 0,\n \"recurring_price\": 0,\n \"setup\": 0,\n \"prorata_date\": null,\n \"items\": [\n {\n \"title\": \"512MB\",\n \"value\": 1,\n \"id\": 10330,\n \"price\": 0,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"1GB\",\n \"value\": 1,\n \"id\": 10331,\n \"price\": 0,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"2GB\",\n \"value\": 1,\n \"id\": 10332,\n \"price\": 0,\n \"setup\": 0,\n \"selected\": false\n }\n ]\n },\n (...)\n ],\n \"addons\": [\n {\n \"type\": \"subitem\",\n \"title\": \"Cpanel2: Add Extra IP\",\n \"id\": \"31\",\n \"value\": null,\n \"description\": \"Automatically adds IP address to account\",\n \"config\": [\n {\n \"type\": \"checkbox\",\n \"title\": \"add\",\n \"name\": \"addon[31]\",\n \"checked\": false\n },\n {\n \"type\": \"select\",\n \"title\": \"billingcycle\",\n \"name\": \"addon_cycles[31]\",\n \"items\": [\n {\n \"title\": \"m\",\n \"value\": \"m\",\n \"price\": 5,\n \"setup\": 0,\n \"selected\": true\n },\n {\n \"title\": \"q\",\n \"value\": \"q\",\n \"price\": 20,\n \"setup\": 0,\n \"selected\": false\n },\n {\n \"title\": \"a\",\n \"value\": \"a\",\n \"price\": 50,\n \"setup\": 0,\n \"selected\": false\n }\n ]\n }\n ],\n \"price\": 0,\n \"recurring_price\": 0,\n \"setup\": 0,\n \"prorata_date\": null\n },\n (...)\n ],\n \"subproducts\": []\n },\n \"recurring_price\": 9.99,\n \"prorata_date\": null\n }\n}" } } }, "post": { "tags": [ "Cart" ], "summary": "Order new service", "description": "Create and submit new order for selected product.\r\n\r\nTo get available cycle and configuration options lookup product details\r\nusing `GET \/order\/@product_id`\r\n\r\nFor whitelabel server use 'serverhost.name' for a `domain` parameter.", "operationId": "cart_order", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "product_id", "type": "integer", "in": "path", "description": "Product ID", "required": true }, { "name": "domain", "type": "string", "in": "query", "description": "Domain name, ie. example.com, may be optional" }, { "name": "cycle", "type": "string", "in": "query", "description": "Billing period symbol" }, { "name": "pay_method", "type": "integer", "in": "query", "description": "Payment method ID" }, { "name": "custom", "type": "array", "in": "query", "description": "Additional options data available for sop products", "items": { "type": "string" } }, { "name": "promocode", "type": "string", "in": "query", "description": "Promotion code" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/order": { "post": { "tags": [ "Cart" ], "summary": "Order multiple services", "description": "Create and submit new order for multiple services\n\nEach item in the `items` array needs to include order `type` and parameters used\nby one of the method listed below:\n
• `POST \/order\/$product_id` - use `product` for item type
• `POST \/certificate\/order` - use `certificate` for item type", "operationId": "cart_order_multi", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "pay_method", "type": "integer", "in": "query", "description": "Payment method ID " }, { "name": "items", "type": "array", "in": "query", "description": "list with order items", "items": { "type": "string" } } ], "responses": { "200": { "description": "`Success`" } } } }, "\/quote": { "post": { "tags": [ "Cart" ], "summary": "Get order quote", "description": "Calculate order cost and recuring prices for selected items.\nUse the same parameters as for `POST \/order`", "operationId": "cart_order_quote", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "pay_method", "type": "integer", "in": "query", "description": "Payment method ID" }, { "name": "items", "type": "array", "in": "query", "description": "list with items to order", "items": { "type": "string" } } ], "responses": { "200": { "description": "`Success`" } } } }, "\/category\/available\/vps": { "get": { "tags": [ "Cart" ], "summary": "Get available VPS products", "description": "List all available virtual private server products", "operationId": "getAvailableProducts", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r[\n {\n \"id\": 0,\n \"name\": \"Linux\",\n \"description\": \"
  • CPU: ...<\\\/li><\\\/ul>\",\n \"prices\": [\n \"aaa\"\n ],\n \"components\": [\n \"aaa\"\n ],\n \"addons\": [\n \"aaa\"\n ],\n \"upgrades\": [\n \"70\",\n \"50\",\n \"34\"\n ]\n }\n]" } } } }, "\/service\/@id\/addon": { "post": { "tags": [ "Cart" ], "summary": "Order addon", "description": "Place order for addon to existing service", "operationId": "orderAddon", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true }, { "name": "addon_id", "type": "integer", "in": "query", "description": "Addon id" } ], "responses": { "200": { "description": "`Success`" } } }, "get": { "tags": [ "Cart" ], "summary": "List all addons", "description": "List all ordered addons for existing service", "operationId": "listAddons", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"id\": 60,\n \"name\": \"Additional IP\",\n \"status\": \"Pending\"\n}" } } } }, "\/dns": { "get": { "tags": [ "DNS" ], "summary": "List DNS", "description": "Returns a list of all DNS", "operationId": "dns_get", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"service_ids\": [\n \"10\",\n \"20\"\n ],\n \"zones\": [\n {\n \"domain_id\": \"60\",\n \"name\": \"booble.com\",\n \"service_id\": \"10\"\n },\n {\n \"domain_id\": \"61\",\n \"name\": \"bgg12ooble.com\",\n \"service_id\": \"20\"\n }\n ]\n}" } } } }, "\/service\/@service_id\/dns": { "post": { "tags": [ "DNS" ], "summary": "Add DNS Zone", "description": "Creates a new DNS zone", "operationId": "dns_add_zone", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "name", "type": "string", "in": "query", "description": "Zone name (example: testzone.com)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@service_id\/dns\/@zone_id": { "get": { "tags": [ "DNS" ], "summary": "Get DNS details", "description": "Returns details of the DNS zone", "operationId": "dns_get_zone", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "zone_id", "type": "integer", "in": "path", "description": "Zone ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"service_id\": 10,\n \t\"name\": \"booble.com\",\n \t\"records\": [\n \t\t{\n \t\t\t\"id\":\"10\",\n \t\t\t\"name\":\"qwerty\",\n \t\t\t\"ttl\":1800,\n \t\t\t\"priority\":0,\n \t\t\t\"content\":\"127.0.0.1\"\n \t\t\t\"type\":\"A\"\n \t\t},\n \t\t{\n \t\t\t\"id\":\"11\",\n \t\t\t\"name\":\"qwerty\",\n \t\t\t\"ttl\":1800,\n \t\t\t\"priority\":0,\n \t\t\t\"content\":\"ns1.qwerty.com\"\n \t\t\t\"type\":\"NS\"\n \t\t}\n \t]\n}" } } }, "delete": { "tags": [ "DNS" ], "summary": "Remove DNS zone", "description": "Deletes the selected DNS zone", "operationId": "dns_delete_zone", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "zone_id", "type": "integer", "in": "path", "description": "Zone ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@service_id\/dns\/@zone_id\/records": { "post": { "tags": [ "DNS" ], "summary": "Add DNS Record", "description": "Creates a new record in the DNS zone", "operationId": "dns_add_record", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "zone_id", "type": "integer", "in": "path", "description": "Zone ID", "required": true }, { "name": "name", "type": "string", "in": "query", "description": "Record name" }, { "name": "ttl", "type": "integer", "in": "query", "description": "Record ttl (example: 3600)" }, { "name": "priority", "type": "integer", "in": "query", "description": "Priority of the record" }, { "name": "type", "type": "string", "in": "query", "description": "Record type (example: A)" }, { "name": "content", "type": "string", "in": "query", "description": "Contents of the record (example: 192.168.1.2)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/service\/@service_id\/dns\/@zone_id\/records\/@record_id": { "put": { "tags": [ "DNS" ], "summary": "Edit DNS Record", "description": "Edits the selected DNS zone record", "operationId": "dns_edit_record", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "zone_id", "type": "integer", "in": "path", "description": "Zone ID", "required": true }, { "name": "record_id", "type": "integer", "in": "path", "description": "Record ID", "required": true }, { "name": "name", "type": "string", "in": "query", "description": "Record name" }, { "name": "ttl", "type": "integer", "in": "query", "description": "Record ttl (example: 3600)" }, { "name": "priority", "type": "integer", "in": "query", "description": "Priority of the record" }, { "name": "type", "type": "string", "in": "query", "description": "Record type (example: A)" }, { "name": "content", "type": "string", "in": "query", "description": "Contents of the record (example: 192.168.1.2)" } ], "responses": { "200": { "description": "`Success`" } } }, "delete": { "tags": [ "DNS" ], "summary": "Remove DNS Record", "description": "Removes the selected DNS zone record", "operationId": "dns_delete_record", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true }, { "name": "zone_id", "type": "integer", "in": "path", "description": "Zone ID", "required": true }, { "name": "record_id", "type": "integer", "in": "path", "description": "Record ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/certificate": { "get": { "tags": [ "SSL Certificates" ], "summary": "List SSL Certificates", "description": "List all ssl services under your account", "operationId": "certificate", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\r\n \"sslservices\": [\r\n {\r\n \"id\": \"300\",\r\n \"domain\": \"examplename.com\",\r\n \"total\": \"27.85\",\r\n \"status\": \"Pending\",\r\n \"billingcycle\": \"Annually\",\r\n \"next_due\": \"2017-12-30\",\r\n \"category\": \"GoGetSSL\",\r\n \"category_url\": \"gogetssl\",\r\n \"name\": \"Comodo InstantSSL\",\r\n \"cert_email\": \"admin@example.com\",\r\n \"cert_status\": \"\",\r\n \"cert_expires\": \"2017-12-30 13:43:12\"\r\n }\r\n ]\r\n}" } } } }, "\/certificate\/@id": { "get": { "tags": [ "SSL Certificates" ], "summary": "Certificate details", "description": "Return details for certificate `@id`", "operationId": "certificate_details", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\r\n \"service\": {\r\n \"id\": \"300\",\r\n \"date_created\": \"2016-12-30\",\r\n \"domain\": \"examplename.com\",\r\n \"firstpayment\": \"27.85\",\r\n \"total\": \"27.85\",\r\n \"billingcycle\": \"Annually\",\r\n \"next_due\": \"2017-12-30\",\r\n \"next_invoice\": \"2017-10-31\",\r\n \"status\": \"Pending\",\r\n \"label\": \"\",\r\n \"name\": \"Comodo InstantSSL\",\r\n \"cert_status\": \"\",\r\n \"cert_expires\": \"2017-12-30 13:43:12\",\r\n \"csr\": \"-----BEGIN CERTIFICATE REQUEST----- ...\",\r\n \"contacts\": {\r\n \"admin\": {\r\n \"FName\": \"Mary\",\r\n \"LName\": \"Sue\",\r\n \"City\": \"Santa Rosa\",\r\n \"State\": \"California\",\r\n \"PostalCode\": \"95401\",\r\n \"EmailAddress\": \"mary@example.com\",\r\n \"Country\": \"US\",\r\n \"Address1\": \"Pretty View Lane\",\r\n \"Address2\": \"3194\",\r\n \"Phone\": 24123223,\r\n \"OrgName\": \"n\\\/a\",\r\n \"PreFix\": 1,\r\n \"JobTitle\": \"n\\\/a\"\r\n },\r\n \"billing\": {\r\n (...)\r\n },\r\n \"tech\": {\r\n (...)\r\n }\r\n },\r\n \"organization\": {\r\n \"state\": \"Texas\",\r\n \"country\": \"US\",\r\n \"name\": \"My Org name\",\r\n \"unit\": \"Dev\",\r\n \"locality\": \"SanAntonio\",\r\n \"postalcode\": \"n\\\/a\",\r\n \"address2\": \"n\\\/a\",\r\n \"address1\": \"n\\\/a\",\r\n },\r\n \"cert_email\": \"admin@example.com\",\r\n \"software\": \"1\"\r\n }\r\n}" } } } }, "\/certificate\/@id\/crt": { "get": { "tags": [ "SSL Certificates" ], "summary": "Download certificate", "description": "Return X.509 certificate data", "operationId": "certificate_crt", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service id", "required": true } ], "responses": { "200": { "description": "```json\n\r" } } } }, "\/certificate\/order": { "get": { "tags": [ "SSL Certificates" ], "summary": "List available certificates", "description": "Return a list with certificate available for purchase", "operationId": "certificate_products", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\r\n \"products\": [\r\n {\r\n \"id\": \"25\",\r\n \"name\": \"InstantSSL\",\r\n \"description\": \"\",\r\n \"periods\": [\r\n {\r\n \"years\": 1,\r\n \"price\": 27.85,\r\n \"renew\": 27.85\r\n },\r\n {\r\n \"years\": 2,\r\n \"price\": 48.75,\r\n \"renew\": 48.75\r\n }\r\n ],\r\n \"category\": \"SSL Certificates\",\r\n \"category_url\": \"sslcertificates\"\r\n },\r\n (...)\r\n ]\r\n}" } } }, "post": { "tags": [ "SSL Certificates" ], "summary": "Order new certificates", "description": "Create new order for a certificate", "operationId": "certificate_order", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "product_id", "type": "integer", "in": "query", "description": "Certificate product ID" }, { "name": "csr", "type": "string", "in": "query", "description": "Domain name, ie. example.com" }, { "name": "years", "type": "integer", "in": "query", "description": "Number of years" }, { "name": "pay_method", "type": "integer", "in": "query", "description": "Payment method ID" }, { "name": "approver_email", "type": "string", "in": "query", "description": "Email addres used in domain validation" }, { "name": "admin", "type": "integer", "in": "query", "description": "Admin contact ID" }, { "name": "tech", "type": "integer", "in": "query", "description": "Tech contact ID" }, { "name": "billing", "type": "integer", "in": "query", "description": "Billing contact ID" }, { "name": "organization", "type": "array", "in": "query", "description": "Organization details", "items": { "type": "string" } }, { "name": "software", "type": "integer", "in": "query", "description": "Server\/Software ID" }, { "name": "data", "type": "array", "in": "query", "description": "Addditional data required for some products", "items": { "type": "string" } } ], "responses": { "200": { "description": "`Success`" } } } }, "\/certificate\/order\/@product_id\/software": { "get": { "tags": [ "SSL Certificates" ], "summary": "List server software for certificates", "description": "Return a list with software IDs required or certificate", "operationId": "certificate_software", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "product_id", "type": "integer", "in": "path", "description": "Certificate product ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\r\n \"software\": [\r\n {\r\n \"id\": 0,\r\n \"name\": \"AOL\"\r\n },\r\n {\r\n \"id\": 1,\r\n \"name\": \"Apache-SSL (Ben-SSL, not Stronghold)\"\r\n },\r\n (...)\r\n ]\r\n}" } } } }, "\/server": { "get": { "tags": [ "Server Management" ], "summary": "List All Servers", "description": "Lists all active<\/strong> servers.\nResults includes only the brief information about the server.\n

    Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getServers", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"server_id\": 61,\n \"domain\": \"server.domain.name\",\n \"ip\": \"1.2.3.4\",\n \"date_created\": \"2017-01-31\",\n \"synch_date\": \"2017-01-31 15:35:00\",\n \"label\": \"Data Server\",\n \"type\": \"OpenVZ\"\n}" } } } }, "\/server\/@server_id": { "get": { "tags": [ "Server Management" ], "summary": "Server Details", "description": "Particular server details: configuration, installed OS, resource usage and etc.\n

    Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getServer", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"synch_date\": \"2018-07-18T14:04:34+00:00\",\n \"package_id\": 9,\n \"domain\": \"server.domain.name\",\n \"label\": \"Data Server\",\n \"status\": \"Active\",\n \"cpu_frequency\": 1179,\n \"cpu_cores\": 2,\n \"ram_limit\": 209,\n \"ram_used\": 15,\n \"disk_limit\": 17958,\n \"disk_usage\": 537,\n \"bw_limit\": 6627,\n \"bw_in\": 270,\n \"bw_out\": 288,\n \"os\": \"ubuntu-16.04-x86_64\",\n \"ip\": \"123.123.123.123\",\n \"additional_ip\": [\n \"124.124.124.124\",\n \"125.125.125.125\"\n ],\n \"dns_servers\": null,\n \"components\": [\n {\n \"id\": 123,\n \"name\": \"Daily and weekly backups\",\n \"selected\": false\n }\n ],\n \"active_task\": null,\n \"last_tasks\": null\n}" } } } }, "\/server\/@server_id\/task\/@task_id": { "get": { "tags": [ "Server Management" ], "summary": "Task Result", "description": "Returns task result by given task ID, all dates are in ISO 8601 format:

      \n
    • activated<\/code> date of task initiation<\/li>\n
    • assigned<\/code> date of task assignation for execution (empty string for unassigned task)<\/li>\n
    • completed<\/code> date of task completion (empty string for unassigned and \/ or running task)<\/li>\n
    • results<\/code> is task completion result (empty string for unassigned and \/ or running task)<\/li>\n<\/ul>\n

      Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getTaskResult", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "task_id", "type": "integer", "in": "path", "description": "Task ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"name\": \"server_reboot\",\n \"activated\": \"2018-05-31T10:25:24+00:00\",\n \"assigned\": \"2018-05-31T10:26:24+00:00\",\n \"completed\": \"2018-05-31T10:27:24+00:00\",\n \"results\": \"VM rebooted successfully\"\n}" } } } }, "\/server\/@server_id\/reboot": { "post": { "tags": [ "Server Management" ], "summary": "Reboot", "description": "

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "rebootServer", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/reinstall": { "post": { "tags": [ "Server Management" ], "summary": "Reinstall", "description": "Available OS'es can be obtained with GET \/server\/@server_id\/oses<\/code> call.\n

      All data in the server will be lost! All of backups of your server will be deleted from our storages!<\/strong><\/p>\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "reinstallServer", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "os", "type": "string", "in": "query", "description": "Operating System (required)" }, { "name": "script", "type": "integer", "in": "query", "description": "Init Script ID (optional)" }, { "name": "ssh_key", "type": "string", "in": "query", "description": "SSH Key (optional)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/resetpassword": { "post": { "tags": [ "Server Management" ], "summary": "Reset Password", "description": "Resets privileged user password\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "resetPassword", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/webconsole": { "post": { "tags": [ "Server Management" ], "summary": "Launch Web Console", "description": "Web Console should be used for emergency access only!<\/strong>\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "launchWebConsole", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "timeout", "type": "string", "in": "query", "description": "Timeout in hours (required, valid values: '1h', '3h', '6h', '12h', '24h')" }, { "name": "whitelabel", "type": "boolean", "in": "query", "description": "Should result return white-labeled VNC host (required, valid values: 'true', 'false')" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/rename": { "post": { "tags": [ "Server Management" ], "summary": "Change Hostname", "description": "Changes the hostname of your server. Hostname must pointed to your server main IP address.\n

      Note: Full DNS record propagation can take up to 48 hours.<\/em><\/p>\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "changeHostname", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "hostname", "type": "string", "in": "query", "description": "New hostname (required, must be pointed to server IP)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/changeptr": { "post": { "tags": [ "Server Management" ], "summary": "Change PTR Record", "description": "Changes PTR record for the additional IP (if server has more than one IPv4 address).\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "changePTR", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "ip_address", "type": "string", "in": "query", "description": "IP Address to change PTR (required)" }, { "name": "hostname", "type": "string", "in": "query", "description": "Hostname (required)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/flushfirewall": { "post": { "tags": [ "Server Management" ], "summary": "Flush IPTables \/ Firewall", "description": "Restores to defaults your server`s firewall settings.\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "flushIptables", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/changedns": { "post": { "tags": [ "Server Management" ], "summary": "Change DNS Servers", "description": "Changes the DNS servers for your server.\n

      At least 1 DNS servers muste be provided.<\/p>\n

      Call is asynchronous<\/strong> - task ID is returned.<\/p>", "operationId": "changeDNS", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "ns1", "type": "string", "in": "query", "description": "Nameserver 1 IP address (required)" }, { "name": "ns2", "type": "string", "in": "query", "description": "Nameserver 2 IP address (recommended)" }, { "name": "ns3", "type": "string", "in": "query", "description": "Nameserver 3 IP address (optional)" }, { "name": "ns4", "type": "string", "in": "query", "description": "Nameserver 4 IP address (optional)" } ], "responses": { "200": { "description": "`Success`" } } } }, "\/server\/@server_id\/oses": { "get": { "tags": [ "Server Management" ], "summary": "Available OS List", "description": "List of available OS templates for a server.\n

      Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getOSList", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"os\": \"centos-7-x86_64\",\n \"title\": \"Centos 7\"\n }\n]" } } } }, "\/server\/@server_id\/ips": { "get": { "tags": [ "Server Management" ], "summary": "Get additional IPs", "description": "List of additional IPs\n

      Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getIPv4IPs", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"ips\": [\n \"123.123.123.123\",\n \"124.124.124.124\"\n ]\n }\n]" } } } }, "\/server\/@server_id\/graphs\/@width": { "get": { "tags": [ "Server Management" ], "summary": "Get Usage Graphs", "description": "

      Image link is valid only for short period of time, around 5-10 minutes.<\/p>\n

      Images shows the graphics of the main resource usage (Daily, Weekly, Monthly..)<\/p>\n

      Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getGraphs", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "width", "type": "integer", "in": "path", "description": "Image Width (min 200px, max 768px)", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"type\": \"cpu_daily\",\n \"url\": \"\\\/\\\/...\\\/graph.php?...VrBFovT0mOE0OZFwNrUf\"\n }\n]" } } } }, "\/server\/@server_id\/history": { "get": { "tags": [ "Server Management" ], "summary": "Get Usage History", "description": "Displays the bandwidth usage of a server.\n

      Call is synchronous<\/strong> - result returned immediately.<\/p>", "operationId": "getUsageHistory", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "server_id", "type": "integer", "in": "path", "description": "Server ID", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"year\": 0,\n \"month\": 0,\n \"bw_in\": 30058,\n \"bw_out\": 99183,\n \"quota_usage\": 84975,\n \"quota_limit\": 94167,\n \"inode_usage\": 23690,\n \"inode_limit\": 16349\n }\n]" } } } }, "\/scripts": { "get": { "tags": [ "Init Script Management" ], "summary": "Get available init scripts", "description": "Script content is not included", "operationId": "getInitScripts", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"id\": 490,\n \"name\": \"My Init Script\",\n \"syntax\": \"python\"\n}" } } } }, "\/scripts\/@id": { "get": { "tags": [ "Init Script Management" ], "summary": "Get init script by ID", "description": "Script content is included", "operationId": "getInitScript", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Init Script ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"id\": 989,\n \"name\": \"My Init Script\",\n \"syntax\": \"python\",\n \"content\": \"import os...\"\n}" } } } }, "\/vpn\/servers": { "get": { "tags": [ "VPN Management" ], "summary": "List VPN Servers", "description": "Returns all available (including servers in maintenance) VPN servers.", "operationId": "VPN Management_getServers", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"id\": 2,\n \"name\": \"LT#1\",\n \"city\": \"Vilnius\",\n \"region\": \"Europe\",\n \"ip\": \"1.2.3.4\",\n \"lat\": 56,\n \"lng\": 24,\n \"load\": 7,\n \"available\": true\n}" } } } }, "\/vpn\/clients": { "get": { "tags": [ "VPN Management" ], "summary": "List VPN Clients", "description": "", "operationId": "getClients", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"name\": \"AndroidVPN\",\n \"version\": \"1.0.6\",\n \"url\": \"https:\\\/\\\/downloads.time4vps.com\\\/clients\\\/...\"\n}" } } } }, "\/vpn\/servers\/@id\/config\/@template": { "get": { "tags": [ "VPN Management" ], "summary": "VPN Config template", "description": "Returns base64-encoded config for prefered server.
      \nTemplates available:\n

        \n
      • ovpn_default<\/b> - OpenVPN (UDP 1194)<\/li>\n
      • ovpn_443<\/b> - OpenVPN (TCP 443)<\/li>\n
      • pbk_default<\/b> - PBK File (Windows VPN)<\/li>\n<\/ul>", "operationId": "getServerConfig", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Server ID", "required": true }, { "name": "template", "type": "string", "in": "path", "description": "Template name", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"template\": \"m5hdGVPbkZhaWw9MQ==\"\n}" } } } }, "\/vpn\/@id\/details": { "get": { "tags": [ "VPN Management" ], "summary": "Login details", "description": "Returns login details, such as username, password, pre-shared key.", "operationId": "details", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service ID", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"username\": \"foo12\",\n \"password\": \"qerty982\",\n \"shared_key\": \"my-super-secret-key\"\n}" } } } }, "\/vpn\/@id\/resetpassword": { "post": { "tags": [ "VPN Management" ], "summary": "Reset Password", "description": "Resets VPN user password", "operationId": "VPN Management_resetPassword", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service ID", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "\/vpn\/@id\/history": { "get": { "tags": [ "VPN Management" ], "summary": "Get Usage History", "description": "Displays the bandwidth usage of a VPN service.", "operationId": "VPN Management_getUsageHistory", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service ID", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"period\": \"2020-04-10\",\n \"received\": 21160404,\n \"sent\": 1278291,\n \"quota\": 494261007\n }\n]" } } } }, "\/vpn\/@id\/sessions": { "get": { "tags": [ "VPN Management" ], "summary": "Get active VPN sessions", "description": "", "operationId": "getSessions", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Service ID", "required": true } ], "responses": { "200": { "description": "```json\n\r[\n {\n \"remote_ip\": \"1.2.3.4\",\n \"local_ip\": \"2.3.4.5\",\n \"received\": 64052800,\n \"sent\": 2163593,\n \"duration\": 236,\n \"doomed\": true,\n \"type\": \"OpenVPN\",\n \"serverID\": 2,\n \"serverName\": \"DE#1\",\n \"serverCity\": \"Frankfurt\",\n \"serverRegion\": \"Europe\"\n }\n]" } } } } }, "securityDefinitions": { "http": { "type": "basic" } }, "definitions": { "Clientarea": { "type": "object", "properties": { "refresh_token": { "type": "string" }, "type": { "type": "string", "description": "Account Type" }, "companyname": { "type": "string", "description": "Organization" }, "companyregistrationnumber": { "type": "string", "description": "Organization Registration Number" }, "vateu": { "type": "string", "description": "VAT Number - If you have valid VAT-EU registered number please provide it here" }, "email": { "type": "string", "description": "Email Address" }, "password": { "type": "string", "description": "Optional, allows you to login as contact" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "country": { "type": "string", "description": "Country" }, "address1": { "type": "string", "description": "Address 1" }, "city": { "type": "string", "description": "City" }, "emarketing": { "type": "array", "description": "News and Updates - You will be subscribed to our newsletter list and will receive updates and news regarding Time4VPS services." }, "2faenable": { "type": "array", "description": "Two-Factor Authentication" }, "2fasecret": { "type": "string", "description": "Two-Factor Secret - If Two-Factor is enabled, enter 16-chars (letters\/digits) secret code to use in Google Authenticator App." }, "currency": { "type": "string", "description": "Currency" }, "state": { "type": "string", "description": "State - Maximum 20 characters." }, "postcode": { "type": "string", "description": "Post code" }, "phonenumber": { "type": "string", "description": "Phone" }, "privileges": { "type": "array", "items": { "type": "string" }, "description": "Array with privileges that you want to enable. Formatted the same way as output from GET \/contact\/privileges<\/code>" }, "id": { "type": "integer" }, "rel_type": { "type": "string", "description": "Optional, return only by relation type" }, "rel_id": { "type": "string", "description": "Optional, return only by relation id" } } }, "Billing": { "type": "object", "properties": { "id": { "type": "integer" } } }, "Services": { "type": "object", "properties": { "id": { "type": "integer", "description": "Service id" }, "immediate": { "type": "string", "description": "set to false<\/code> to terminate service at the end of billing date, true<\/code> - terminate immediately" }, "reason": { "type": "string", "description": "Reason for this request" }, "label": { "type": "string", "description": "New label" }, "resources": { "type": "array", "items": { "type": "string" }, "description": "array with resource values" }, "package": { "type": "integer", "description": "New package id, optonal when upgrading resources" }, "cycle": { "type": "string", "description": "New billing cycle, optonal when upgrading resources" }, "send": { "type": "boolean", "description": "Set to true when you want to send your upgrade request" }, "order_num": { "type": "integer", "description": "Order Number" } } }, "Cart": { "type": "object", "properties": { "category_id": { "type": "integer", "description": "Category ID" }, "product_id": { "type": "integer", "description": "Product ID" }, "pay_method": { "type": "integer", "description": "Payment method ID" }, "items": { "type": "array", "items": { "type": "string" }, "description": "list with items to order" }, "domain": { "type": "string", "description": "Domain name, ie. example.com, may be optional" }, "cycle": { "type": "string", "description": "Billing period symbol" }, "custom": { "type": "array", "items": { "type": "string" }, "description": "Additional options data available for sop products" }, "promocode": { "type": "string", "description": "Promotion code" }, "id": { "type": "integer", "description": "Service id" }, "addon_id": { "type": "integer", "description": "Addon id" } } }, "DNS": { "type": "object", "properties": { "service_id": { "type": "integer", "description": "Service ID" }, "name": { "type": "string", "description": "Record name" }, "zone_id": { "type": "integer", "description": "Zone ID" }, "ttl": { "type": "integer", "description": "Record ttl (example: 3600)" }, "priority": { "type": "integer", "description": "Priority of the record" }, "type": { "type": "string", "description": "Record type (example: A)" }, "content": { "type": "string", "description": "Contents of the record (example: 192.168.1.2)" }, "record_id": { "type": "integer", "description": "Record ID" } } }, "SSL Certificates": { "type": "object", "properties": { "id": { "type": "integer", "description": "Service id" }, "product_id": { "type": "integer", "description": "Certificate product ID" }, "csr": { "type": "string", "description": "Domain name, ie. example.com" }, "years": { "type": "integer", "description": "Number of years" }, "pay_method": { "type": "integer", "description": "Payment method ID" }, "approver_email": { "type": "string", "description": "Email addres used in domain validation" }, "admin": { "type": "integer", "description": "Admin contact ID" }, "tech": { "type": "integer", "description": "Tech contact ID" }, "billing": { "type": "integer", "description": "Billing contact ID" }, "organization": { "type": "array", "items": { "type": "string" }, "description": "Organization details" }, "software": { "type": "integer", "description": "Server\/Software ID" }, "data": { "type": "array", "items": { "type": "string" }, "description": "Addditional data required for some products" } } }, "Server Management": { "type": "object", "properties": { "server_id": { "type": "integer", "description": "Server ID" }, "task_id": { "type": "integer", "description": "Task ID" }, "os": { "type": "string", "description": "Operating System (required)" }, "script": { "type": "integer", "description": "Init Script ID (optional)" }, "ssh_key": { "type": "string", "description": "SSH Key (optional)" }, "timeout": { "type": "string", "description": "Timeout in hours (required, valid values: '1h', '3h', '6h', '12h', '24h')" }, "whitelabel": { "type": "boolean", "description": "Should result return white-labeled VNC host (required, valid values: 'true', 'false')" }, "hostname": { "type": "string", "description": "Hostname (required)" }, "ip_address": { "type": "string", "description": "IP Address to change PTR (required)" }, "ns1": { "type": "string", "description": "Nameserver 1 IP address (required)" }, "ns2": { "type": "string", "description": "Nameserver 2 IP address (recommended)" }, "ns3": { "type": "string", "description": "Nameserver 3 IP address (optional)" }, "ns4": { "type": "string", "description": "Nameserver 4 IP address (optional)" }, "width": { "type": "integer", "description": "Image Width (min 200px, max 768px)" } } }, "Init Script Management": { "type": "object", "properties": { "id": { "type": "integer", "description": "Init Script ID" } } }, "VPN Management": { "type": "object", "properties": { "id": { "type": "integer", "description": "Service ID" }, "template": { "type": "string", "description": "Template name" } } } }, "externalDocs": { "description": "Find out more about UserAPI", "url": "https:\/\/billing.time4vps.com\/?cmd=userapi" } }