{ "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.\n\n## Authentication\n\n## JSON Web Token Authentication\n\n```bash\ncurl 'https:\/\/my.balvps.com\/api\/login' \\\n -d username=\"username\"\\\n -d password=\"password\"\n\n# grab authentication token from the response and pass it in Authorization header\ncurl 'https:\/\/my.balvps.com\/api\/details' \\\n -H \"Authorization: Bearer $token\"\n```\n\n```php\n$resp = $client->post('login', [\n 'form_params' => [\n 'username' => 'username',\n 'password' => 'password'\n ]\n]);\n\n$token = $resp->json()['token'];\n\n$resp = $client->get('details', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $token\n ]\n]);\n\necho $resp->getBody();\n```\n\n> Make sure to replace `username` and `password` with your client area details.\n\nTo authenticate, you need to send a [JSON Web Token (JWT)](https:\/\/jwt.io\/) in the authorization header of the HTTP request.\n\nTo obtain the authorization `token` you need to submit a request with your username and password to `POST https:\/\/my.balvps.com\/api\/login` API method.\n\nAll API calls that require authentication expect HTTP header in the form of `Authorization: Bearer `.\n\nFor example: `Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw...`\n\n## Basic Authentication\n\n```bash\n# pass the correct header with each request (-u option)\ncurl 'https:\/\/my.balvps.com\/api\/details' \\\n -u \"username:password\"\n```\n\n```php\nuse GuzzleHttp\\Client;\n\n$client = new Client([\n 'base_uri' => 'https:\/\/my.balvps.com\/api\/',\n 'auth' => ['username', 'password']\n]);\n\n$resp = $client->get('details');\n```\n\n> Make sure to replace `username` and `password` with your client area details.\n\nThis authentication method requires that you send your client area username (email address) and password with each request.\n\nAPI calls that require authentication expect a header in the form of `Authorization: Basic `, where credentials is the Base64 encoding of username and password joined by a single colon `:`.\n\nFor example: `Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`\n\nYou can find more info on this authentication method here: [Basic HTTP Authentication](https:\/\/en.wikipedia.org\/wiki\/Basic_access_authentication)\n\n> You must replace `QWxhZGRpbjpvcGVuIHNlc2FtZQ==` with base64 encoded version of your access details.\n\n> For security, we highly recommend to issue API calls over [HTTPS](http:\/\/en.wikipedia.org\/wiki\/HTTP_Secure)\n\n", "version": "4.20260401", "title": "BRAINOZA OU User API" }, "host": "my.balvps.com", "basePath": "\/api", "tags": [ { "name": "Clientarea" }, { "name": "Billing" }, { "name": "Support" }, { "name": "DNS" } ], "schemes": [ "https" ], "paths": { "\/login": { "post": { "tags": [ "Clientarea" ], "summary": "Login", "description": "Generate new authorization token", "operationId": "getToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "username": { "type": "string", "description": "Your acount email address ", "example": "user@example.com" }, "password": { "type": "string", "description": "Account password ", "example": "secret" } }, "example": { "username": "user@example.com", "password": "secret" } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w", "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I" } }, "schema": { "type": "object", "example": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w", "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I" } } } } } }, "\/logout": { "post": { "tags": [ "Clientarea" ], "summary": "Logout", "description": "Invalidate authorization token", "operationId": "dropToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "status": true } }, "schema": { "type": "object", "example": { "status": true } } } } } }, "\/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": "body", "in": "body", "schema": { "type": "object", "properties": { "refresh_token": { "type": "string", "description": "Refresh token previously obtained from `POST \/login`", "example": "refresh_tokenValue" } }, "example": { "refresh_token": "refresh_tokenValue" } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY", "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw" } }, "schema": { "type": "object", "example": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY", "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw" } } } } } }, "\/revoke": { "post": { "tags": [ "Clientarea" ], "summary": "Revoke Token", "description": "Invalidate authorization and refresh token.\r\nPass refresh token or call this method with valid access token", "operationId": "revokeToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "refresh_token": { "type": "string", "example": "refresh_tokenValue" } }, "example": { "refresh_token": "refresh_tokenValue" } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "status": true } }, "schema": { "type": "object", "example": { "status": true } } } } } }, "\/signup": { "post": { "tags": [ "Clientarea" ], "summary": "Sign up", "description": "Create new account", "operationId": "postSignup", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email Address" }, "password": { "type": "string", "description": "Password" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "companyname": { "type": "string", "description": "Organization" }, "address1": { "type": "string", "description": "Address 1" }, "address2": { "type": "string", "description": "Address 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "postcode": { "type": "string", "description": "Post code" }, "country": { "type": "string", "description": "Country" }, "phonenumber": { "type": "string", "description": "Phone" }, "type": { "type": "string", "description": "Account Type", "enum": [ "Private", "Company" ] }, "vatnumber": { "type": "string", "description": "VAT number" }, "mobilephone": { "type": "string", "description": "Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1" }, "currency": { "type": "string", "description": "Currency", "enum": [ "EUR", "USD" ] } } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "info": [ "client_registered" ] } }, "schema": { "type": "object", "example": { "info": [ "client_registered" ] } } } } } }, "\/passwordreset": { "post": { "tags": [ "Clientarea" ], "summary": "Password Reset", "description": "Request password reset email for account", "operationId": "postReminder", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "EMail address", "example": "emailValue" } }, "example": { "email": "emailValue" } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "info": [ "generated_reset_request" ] } }, "schema": { "type": "object", "example": { "info": [ "generated_reset_request" ] } } } } } }, "\/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": "`Success`", "examples": { "application\/json": { "client": { "id": "26", "email": "api@example.com", "lastlogin": "2016-12-30 12:24:28", "ip": "172.100.2.1", "host": "hostname", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3294", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" } } }, "schema": { "type": "object", "example": { "client": { "id": "26", "email": "api@example.com", "lastlogin": "2016-12-30 12:24:28", "ip": "172.100.2.1", "host": "hostname", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3294", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" } } } } } }, "put": { "tags": [ "Clientarea" ], "summary": "Update User Details", "description": "Update registration details under my account", "operationId": "postDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email Address" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "companyname": { "type": "string", "description": "Organization" }, "address1": { "type": "string", "description": "Address 1" }, "address2": { "type": "string", "description": "Address 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "postcode": { "type": "string", "description": "Post code" }, "country": { "type": "string", "description": "Country" }, "phonenumber": { "type": "string", "description": "Phone" }, "type": { "type": "string", "description": "Account Type", "enum": [ "Private", "Company" ] }, "telegramnotifications": { "type": "string", "description": "Telegram notifications", "enum": [ "Yes" ] }, "vatnumber": { "type": "string", "description": "VAT number" }, "mobilephone": { "type": "string", "description": "Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1" } } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "client": { "id": "26", "email": "api@example.com", "lastlogin": "2016-12-30 12:34:20", "ip": "172.100.2.1", "host": "hostname", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" }, "info": [ "client_info_updated" ] } }, "schema": { "type": "object", "example": { "client": { "id": "26", "email": "api@example.com", "lastlogin": "2016-12-30 12:34:20", "ip": "172.100.2.1", "host": "hostname", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" }, "info": [ "client_info_updated" ] } } } } } }, "\/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": "`Success`", "examples": { "application\/json": { "contacts": [ { "email": "mary@example.com", "id": "49", "firstname": "Mary", "lastname": "Sue", "companyname": "", "company": "0", "lastlogin": "0000-00-00 00:00:00" } ] } }, "schema": { "type": "object", "example": { "contacts": [ { "email": "mary@example.com", "id": "49", "firstname": "Mary", "lastname": "Sue", "companyname": "", "company": "0", "lastlogin": "0000-00-00 00:00:00" } ] } } } } }, "post": { "tags": [ "Clientarea" ], "summary": "Add contact", "description": "Create new contact account, if password is provided you\r\ncan use provided email addres to login as that contact.", "operationId": "profiles_add", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "password": { "type": "string", "description": "Optional, allows you to login as contact", "example": "passwordValue" }, "privileges": { "type": "array", "description": "Array with privileges that you want to enable. Formatted the same way as output from GET \/contact\/privileges<\/code>", "items": { "type": "string" }, "example": "privilegesValue" }, "email": { "type": "string", "description": "Email Address" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "companyname": { "type": "string", "description": "Organization" }, "address1": { "type": "string", "description": "Address 1" }, "address2": { "type": "string", "description": "Address 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "postcode": { "type": "string", "description": "Post code" }, "country": { "type": "string", "description": "Country" }, "phonenumber": { "type": "string", "description": "Phone" }, "type": { "type": "string", "description": "Account Type", "enum": [ "Private", "Company" ] }, "telegramnotifications": { "type": "string", "description": "Telegram notifications", "enum": [ "Yes" ] }, "vatnumber": { "type": "string", "description": "VAT number" }, "mobilephone": { "type": "string", "description": "Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1" } }, "example": { "password": "passwordValue", "privileges": "privilegesValue" } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "contact_id": "1", "info": [ "profile_added" ] } }, "schema": { "type": "object", "example": { "contact_id": "1", "info": [ "profile_added" ] } } } } } }, "\/contact\/privileges": { "get": { "tags": [ "Clientarea" ], "summary": "Contact privileges", "description": "List possible contact privileges.\r\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": "`Success`" } } } }, "\/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": "`Success`", "examples": { "application\/json": { "contact": { "id": "49", "email": "mary@example.com", "firstname": "Mary", "lastname": "Sue", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123", "type": "Private", "privileges": { "support": [ "tickets", "newticket" ] } } } }, "schema": { "type": "object", "example": { "contact": { "id": "49", "email": "mary@example.com", "firstname": "Mary", "lastname": "Sue", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123", "type": "Private", "privileges": { "support": [ "tickets", "newticket" ] } } } } } } }, "put": { "tags": [ "Clientarea" ], "summary": "Edit contact", "description": "Change contact details`", "operationId": "profile_edit", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "id": { "type": "integer", "description": "Contact ID", "example": "idValue" }, "privileges": { "type": "array", "description": "Array with privileges that you want to enable. Formatted the same way as output from GET \/contact\/privileges<\/code>", "items": { "type": "string" }, "example": "privilegesValue" }, "email": { "type": "string", "description": "Email Address" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "companyname": { "type": "string", "description": "Organization" }, "address1": { "type": "string", "description": "Address 1" }, "address2": { "type": "string", "description": "Address 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "postcode": { "type": "string", "description": "Post code" }, "country": { "type": "string", "description": "Country" }, "phonenumber": { "type": "string", "description": "Phone" }, "type": { "type": "string", "description": "Account Type", "enum": [ "Private", "Company" ] }, "telegramnotifications": { "type": "string", "description": "Telegram notifications", "enum": [ "Yes" ] }, "vatnumber": { "type": "string", "description": "VAT number" }, "mobilephone": { "type": "string", "description": "Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1" } }, "example": { "id": "idValue", "privileges": "privilegesValue" } } }, { "name": "id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "info": [ "profile_updated" ] } }, "schema": { "type": "object", "example": { "info": [ "profile_updated" ] } } } } } }, "\/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": "`Success`" } } } }, "\/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": "`Success`", "examples": { "application\/json": { "invoices": [ { "id": "308976", "date": "2016-12-30", "dateorig": "2016-12-30", "duedate": "2017-01-06", "paybefore": "2017-01-06", "total": "19.65", "datepaid": "2016-12-30 12:40:47", "status": "Paid", "merge_id": null, "number": "2016\/12\/1", "currency": "USD" } ] } }, "schema": { "type": "object", "example": { "invoices": [ { "id": "308976", "date": "2016-12-30", "dateorig": "2016-12-30", "duedate": "2017-01-06", "paybefore": "2017-01-06", "total": "19.65", "datepaid": "2016-12-30 12:40:47", "status": "Paid", "merge_id": null, "number": "2016\/12\/1", "currency": "USD" } ] } } } } } }, "\/invoice\/{id}": { "get": { "tags": [ "Billing" ], "summary": "Invoice Details", "description": "Get invoice details", "operationId": "getInvoiceDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "invoice": { "id": "308976", "status": "Paid", "date": "2016-12-30", "duedate": "2017-01-06", "paybefore": "2017-01-06", "datepaid": "2016-12-30 12:40:47", "subtotal": 16.24, "credit": 0, "tax": 3.41, "taxrate": 21, "tax2": 0, "taxrate2": 0, "taxexempt": "0", "total": 19.65, "rate": 1, "rate2": 0, "rate3": 1, "notes": "", "items": [ { "id": "12305", "invoice_id": "308976", "type": "Other", "item_id": "0", "description": "Example Service", "amount": "15.00", "taxed": "1", "qty": "1.00", "linetotal": "15.00" }, { "id": "12309", "invoice_id": "308976", "type": "Other", "item_id": "-2", "description": "PayPal Payment Fee", "amount": "1.24", "taxed": "1", "qty": "1.00", "linetotal": "1.24" } ], "client": { "id": "26", "email": "api@example.com", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" }, "number": "2016\/12\/1", "currency": "USD" } } }, "schema": { "type": "object", "example": { "invoice": { "id": "308976", "status": "Paid", "date": "2016-12-30", "duedate": "2017-01-06", "paybefore": "2017-01-06", "datepaid": "2016-12-30 12:40:47", "subtotal": 16.24, "credit": 0, "tax": 3.41, "taxrate": 21, "tax2": 0, "taxrate2": 0, "taxexempt": "0", "total": 19.65, "rate": 1, "rate2": 0, "rate3": 1, "notes": "", "items": [ { "id": "12305", "invoice_id": "308976", "type": "Other", "item_id": "0", "description": "Example Service", "amount": "15.00", "taxed": "1", "qty": "1.00", "linetotal": "15.00" }, { "id": "12309", "invoice_id": "308976", "type": "Other", "item_id": "-2", "description": "PayPal Payment Fee", "amount": "1.24", "taxed": "1", "qty": "1.00", "linetotal": "1.24" } ], "client": { "id": "26", "email": "api@example.com", "firstname": "Joe", "lastname": "Doe", "companyname": "", "address1": "Pretty View Lane", "address2": "3194", "city": "Santa Rosa", "state": "California", "postcode": "95401", "country": "US", "phonenumber": "+1.24123123" }, "number": "2016\/12\/1", "currency": "USD" } } } } } } }, "\/invoice\/{id}\/credit": { "post": { "tags": [ "Billing" ], "summary": "Apply credit", "description": "Apply account credit to invoice", "operationId": "applyCreditToInvoice", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "amount": { "type": "number", "description": "Optional credit amount, when no value is specified maximum amount to fully pay the invoice will be used", "example": "amountValue" } }, "example": { "amount": "amountValue" } } }, { "name": "id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "success": true, "invoice_status": "Paid", "applied": 2.1 } }, "schema": { "type": "object", "example": { "success": true, "invoice_status": "Paid", "applied": 2.1 } } } } } }, "\/tickets": { "get": { "tags": [ "Support" ], "summary": "List Tickets", "description": "List support tickets under my account", "operationId": "getTickets", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "tickets": [ { "client_read": "1", "ticket_number": "736633", "date": "2016-12-30 12:48:13", "deptname": "Billing", "subject": "Lore Ipsum", "status": "Open", "lastreply": "2020-09-12 11:10:03" } ] } }, "schema": { "type": "object", "example": { "tickets": [ { "client_read": "1", "ticket_number": "736633", "date": "2016-12-30 12:48:13", "deptname": "Billing", "subject": "Lore Ipsum", "status": "Open", "lastreply": "2020-09-12 11:10:03" } ] } } } } }, "post": { "tags": [ "Support" ], "summary": "Create Ticket", "description": "Submit new ticket", "operationId": "createTicket", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "dept_id": { "type": "integer", "description": "Department id ", "example": 1 }, "subject": { "type": "string", "description": "Ticket subject ", "example": "Subject" }, "body": { "type": "string", "description": "Ticket message ", "example": "Message ..." } }, "example": { "dept_id": 1, "subject": "Subject", "body": "Message ..." } } } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "ticket": 865650 } }, "schema": { "type": "object", "example": { "ticket": 865650 } } } } } }, "\/tickets\/{number}": { "get": { "tags": [ "Support" ], "summary": "Ticket details", "description": "Get ticket details, including all replies", "operationId": "getTicketDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "number", "type": "integer", "in": "path", "description": "Ticket number", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "ticket": { "date": "2016-12-30 12:48:13", "ticket_number": "736633", "name": "Joe Doe", "email": "api@example.com", "subject": "Lore Ipsum", "body": "Donec sollicitudin molestie malesuada. \r\nSed porttitor lectus nibh. Vivamus magna justo, \r\nlacinia eget consectetur sed, convallis at tellus.", "status": "Answered", "client_read": "1", "deptname": "Billing" }, "replies": [ { "id": "929", "name": "Suppport Staff", "date": "2016-12-30 12:51:04", "body": "Vestibulum ac diam sit amet quam \r\nvehicula elementum sed sit amet dui. \r\nPraesent sapien massa\r\n\r\n-- Maecenas efficitur elit est --", "status": "Sent", "type": "Admin" } ] } }, "schema": { "type": "object", "example": { "ticket": { "date": "2016-12-30 12:48:13", "ticket_number": "736633", "name": "Joe Doe", "email": "api@example.com", "subject": "Lore Ipsum", "body": "Donec sollicitudin molestie malesuada. \r\nSed porttitor lectus nibh. Vivamus magna justo, \r\nlacinia eget consectetur sed, convallis at tellus.", "status": "Answered", "client_read": "1", "deptname": "Billing" }, "replies": [ { "id": "929", "name": "Suppport Staff", "date": "2016-12-30 12:51:04", "body": "Vestibulum ac diam sit amet quam \r\nvehicula elementum sed sit amet dui. \r\nPraesent sapien massa\r\n\r\n-- Maecenas efficitur elit est --", "status": "Sent", "type": "Admin" } ] } } } } }, "post": { "tags": [ "Support" ], "summary": "Create Reply", "description": "Reply to ticket", "operationId": "createTicketReply", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "number": { "type": "integer", "description": "Ticket number", "example": "numberValue" }, "body": { "type": "string", "description": "Reply message ", "example": "reply text .." } }, "example": { "number": "numberValue", "body": "reply text .." } } }, { "name": "number", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "info": [ "reply_added" ] } }, "schema": { "type": "object", "example": { "info": [ "reply_added" ] } } } } } }, "\/tickets\/{number}\/open": { "put": { "tags": [ "Support" ], "summary": "Re-open ticket", "description": "Try to re-open closed ticket", "operationId": "reopenTicket", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "number": { "type": "integer", "description": "Ticket number", "example": "numberValue" } }, "example": { "number": "numberValue" } } }, { "name": "number", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "status": true } }, "schema": { "type": "object", "example": { "status": true } } } } } }, "\/tickets\/{number}\/close": { "put": { "tags": [ "Support" ], "summary": "Close ticket", "description": "Send request to close a ticket", "operationId": "closeTicket", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "number": { "type": "integer", "description": "Ticket number", "example": "numberValue" } }, "example": { "number": "numberValue" } } }, { "name": "number", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "status": true } }, "schema": { "type": "object", "example": { "status": true } } } } } }, "\/ticket\/departments": { "get": { "tags": [ "Support" ], "summary": "List ticket departments", "description": "Get the list of ticket departments", "operationId": "listTicketDepartments", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "`Success`" } } } }, "\/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": "`Success`", "examples": { "application\/json": { "service_ids": [ "10", "20" ], "zones": [ { "domain_id": "60", "name": "qwerty.com", "service_id": "10" }, { "domain_id": "61", "name": "bgg12ooble.com", "service_id": "20" } ] } }, "schema": { "type": "object", "example": { "service_ids": [ "10", "20" ], "zones": [ { "domain_id": "60", "name": "qwerty.com", "service_id": "10" }, { "domain_id": "61", "name": "bgg12ooble.com", "service_id": "20" } ] } } } } } }, "\/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": "body", "in": "body", "schema": { "type": "object", "properties": { "service_id": { "type": "integer", "description": "Service ID", "example": "service_idValue" }, "name": { "type": "string", "description": "Zone name ", "example": "testzone.com" } }, "example": { "service_id": "service_idValue", "name": "testzone.com" } } }, { "name": "service_id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "info": [ "Domain zone testzone.com was created successfully." ] } }, "schema": { "type": "object", "example": { "info": [ "Domain zone testzone.com was created successfully." ] } } } } }, "get": { "tags": [ "DNS" ], "summary": "List DNS for service", "description": "Returns a list of DNS zones under the service", "operationId": "dns_list_zones", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "service_id", "type": "integer", "in": "path", "description": "Service ID", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "error": [ "invalid method" ] } }, "schema": { "type": "object", "example": { "error": [ "invalid method" ] } } } } } }, "\/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": "`Success`", "examples": { "application\/json": { "service_id": 10, "name": "qwerty.com", "records": [ { "id": "10", "name": "qwerty", "ttl": 1800, "priority": 0, "content": "127.0.0.1", "type": "A" }, { "id": "11", "name": "qwerty", "ttl": 1800, "priority": 0, "content": "ns1.qwerty.com", "type": "NS" } ] } }, "schema": { "type": "object", "example": { "service_id": 10, "name": "qwerty.com", "records": [ { "id": "10", "name": "qwerty", "ttl": 1800, "priority": 0, "content": "127.0.0.1", "type": "A" }, { "id": "11", "name": "qwerty", "ttl": 1800, "priority": 0, "content": "ns1.qwerty.com", "type": "NS" } ] } } } } }, "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`", "examples": { "application\/json": { "info": [ "Domain zone testzone.com was deleted successfully." ] } }, "schema": { "type": "object", "example": { "info": [ "Domain zone testzone.com was deleted successfully." ] } } } } } }, "\/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": "body", "in": "body", "schema": { "type": "object", "properties": { "service_id": { "type": "integer", "description": "Service ID", "example": "service_idValue" }, "zone_id": { "type": "integer", "description": "Zone ID", "example": "zone_idValue" }, "name": { "type": "string", "description": "Record name ", "example": "example.com" }, "ttl": { "type": "integer", "description": "Record ttl ", "example": 3600 }, "priority": { "type": "integer", "description": "Priority of the record ", "example": 10 }, "type": { "type": "string", "description": "Record type ", "example": "A" }, "content": { "type": "string", "description": "Contents of the record ", "example": "192.168.1.2" } }, "example": { "service_id": "service_idValue", "zone_id": "zone_idValue", "name": "example.com", "ttl": 3600, "priority": 10, "type": "A", "content": "192.168.1.2" } } }, { "name": "service_id", "type": "string", "in": "path", "required": true }, { "name": "zone_id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "record": { "name": "_sip._tcp.example.com", "type": "SRV", "ttl": "3600", "priority": "10", "content": [ 10, 5060, "vc01.example.com" ] }, "info": [ "dnsnewrecordadded", "SRV" ] } }, "schema": { "type": "object", "example": { "record": { "name": "_sip._tcp.example.com", "type": "SRV", "ttl": "3600", "priority": "10", "content": [ 10, 5060, "vc01.example.com" ] }, "info": [ "dnsnewrecordadded", "SRV" ] } } } } } }, "\/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": "body", "in": "body", "schema": { "type": "object", "properties": { "service_id": { "type": "integer", "description": "Service ID", "example": "service_idValue" }, "zone_id": { "type": "integer", "description": "Zone ID", "example": "zone_idValue" }, "record_id": { "type": "integer", "description": "Record ID", "example": "record_idValue" }, "name": { "type": "string", "description": "Record name ", "example": "example.com" }, "ttl": { "type": "integer", "description": "Record ttl ", "example": 3600 }, "priority": { "type": "integer", "description": "Priority of the record ", "example": 10 }, "type": { "type": "string", "description": "Record type ", "example": "A" }, "content": { "type": "string", "description": "Contents of the record ", "example": "192.168.1.2" } }, "example": { "service_id": "service_idValue", "zone_id": "zone_idValue", "record_id": "record_idValue", "name": "example.com", "ttl": 3600, "priority": 10, "type": "A", "content": "192.168.1.2" } } }, { "name": "service_id", "type": "string", "in": "path", "required": true }, { "name": "zone_id", "type": "string", "in": "path", "required": true }, { "name": "record_id", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`", "examples": { "application\/json": { "record": { "id": "55", "type": "A", "ttl": "3600", "name": "test", "priority": 0, "content": "192.168.1.2" }, "info": [ "The record was updated successfully." ] } }, "schema": { "type": "object", "example": { "record": { "id": "55", "type": "A", "ttl": "3600", "name": "test", "priority": 0, "content": "192.168.1.2" }, "info": [ "The record was updated successfully." ] } } } } }, "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`" } } } } }, "securityDefinitions": { "basicAuth": { "type": "basic" }, "bearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "Enter: Bearer {token}" } }, "security": [ { "basicAuth": [] }, { "bearerAuth": [] } ], "definitions": { "Clientarea": { "type": "object", "properties": { "username": { "type": "string", "description": "Your acount email address " }, "password": { "type": "string", "description": "Optional, allows you to login as contact" }, "refresh_token": { "type": "string" }, "email": { "type": "string", "description": "Email Address" }, "firstname": { "type": "string", "description": "First Name" }, "lastname": { "type": "string", "description": "Last Name" }, "companyname": { "type": "string", "description": "Organization" }, "address1": { "type": "string", "description": "Address 1" }, "address2": { "type": "string", "description": "Address 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "postcode": { "type": "string", "description": "Post code" }, "country": { "type": "string", "description": "Country" }, "phonenumber": { "type": "string", "description": "Phone" }, "type": { "type": "string", "description": "Account Type" }, "vatnumber": { "type": "string", "description": "VAT number" }, "mobilephone": { "type": "string", "description": "Mobile phone number - To receive SMS notifications about your services with us please provide your mobile phone number, starting with country code prefix, ie. +1" }, "currency": { "type": "string", "description": "Currency" }, "telegramnotifications": { "type": "string", "description": "Telegram notifications" }, "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", "description": "Contact ID" } } }, "Billing": { "type": "object", "properties": { "amount": { "type": "number", "description": "Optional credit amount, when no value is specified maximum amount to fully pay the invoice will be used" } } }, "Support": { "type": "object", "properties": { "number": { "type": "integer", "description": "Ticket number" }, "dept_id": { "type": "integer", "description": "Department id " }, "subject": { "type": "string", "description": "Ticket subject " }, "body": { "type": "string", "description": "Reply message " } } }, "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 " }, "priority": { "type": "integer", "description": "Priority of the record " }, "type": { "type": "string", "description": "Record type " }, "content": { "type": "string", "description": "Contents of the record " }, "record_id": { "type": "integer", "description": "Record ID" } } } }, "externalDocs": { "description": "Find out more about UserAPI", "url": "https:\/\/my.balvps.com\/?cmd=userapi" } }