{ "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.20241112", "title": "PrimeXM DMCC User API" }, "host": "hosting.primexm.com", "basePath": "\/api", "tags": [ { "name": "Clientarea" }, { "name": "Billing" }, { "name": "Services" }, { "name": "Support" } ], "schemes": [ "https" ], "paths": { "login": { "post": { "tags": [ "Clientarea" ], "summary": "Login", "description": "Generate new authorization token", "operationId": "getToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "username", "type": "string", "in": "query", "description": "Your acount email address " }, { "name": "password", "type": "string", "in": "query", "description": "Account password " } ], "responses": { "200": { "description": "`Success`" } } } }, "logout": { "post": { "tags": [ "Clientarea" ], "summary": "Logout", "description": "Invalidate authorization token", "operationId": "dropToken", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "`Success`" } } } }, "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`" } } } }, "logs": { "get": { "tags": [ "Clientarea" ], "summary": "User Logs", "description": "Returns logs from history", "operationId": "getLogs", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "`Success`" } } } }, "news": { "get": { "tags": [ "Clientarea" ], "summary": "Get all news", "description": "Return a list of all news.", "operationId": "getNews", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"news\": [\n {\n \"id\": \"1\",\n \"title\": \"Example title\",\n \"date\": \"2010-01-01\",\n \"language_id\": \"1\",\n \"slug\": \"example-slug\"\n }\n ]\n}" } } } }, "news\/@id": { "get": { "tags": [ "Clientarea" ], "summary": "Get news item", "description": "Return a single news item.", "operationId": "getNewsItem", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "News id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"annoucement\": {\n \"id\": \"1\",\n \"title\": \"Example title\",\n \"content\": \"Example content\",\n \"date\": \"2010-01-01\",\n \"language_id\": \"1\",\n \"slug\": \"example-slug\"\n }\n}" } } } }, "statuses": { "get": { "tags": [ "Clientarea" ], "summary": "Returns a list of all statuses with specific status", "description": "", "operationId": "status_updates_specific", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "status", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "`Success`" } } } }, "statuses\/@id": { "put": { "tags": [ "Clientarea" ], "summary": "Returns details of status", "description": "", "operationId": "status_updates_details", "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}" } } } }, "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": { "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{\n \"service\": {\n \"id\": \"301\",\n \"date_created\": \"2016-12-30\",\n \"domain\": \"examplename.com\",\n \"firstpayment\": \"9.99\",\n \"total\": \"9.99\",\n \"billingcycle\": \"Monthly\",\n \"next_due\": \"2017-12-30\",\n \"next_invoice\": \"2017-01-27\",\n \"status\": \"Active\",\n \"label\": \"\",\n \"username\": \"examplen\",\n \"password\": \"pdtzc\",\n \"name\": \"Starter Hosting\"\n }\n}" } } } }, "knowledgebase": { "get": { "tags": [ "Support" ], "summary": "Get all knowledgebase categories", "description": "Return a list of all knowledgebase categories.", "operationId": "getKnowledgebaseCategories", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [], "responses": { "200": { "description": "```json\n\r{\n \"categories\": [\n {\n \"id\": \"1\",\n \"parent_cat\": \"0\",\n \"name\": \"Example name\",\n \"description\": \"Example description\",\n \"slug\": \"example-slug\",\n \"elements\": \"2\"\n }\n ]\n}" } } } }, "knowledgebase\/@id": { "get": { "tags": [ "Support" ], "summary": "Get knowledgebase category items", "description": "Return subcategories and articles of a single category.", "operationId": "getKnowledgebaseCategoryDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Category id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"subcategories\": [\n {\n \"id\": \"1\",\n \"parent_cat\": \"1\",\n \"name\": \"Example name\",\n \"description\": \"Example description\",\n \"slug\": \"example-slug\",\n \"elements\": \"1\"\n }\n ],\n \"articles\": [\n {\n \"id\": \"1\",\n \"language_id\": \"1\",\n \"cat_id\": \"1\",\n \"title\": \"Example title\",\n \"body\": \"Example body\",\n \"views\": \"1\",\n \"slug\": \"example-slug\",\n \"upvotes\": \"1\",\n \"downvotes\": \"1\",\n \"tag_title\": \"Example title\",\n \"tag_body\": \"Example body\"\n }\n ]\n}" } } } }, "knowledgebase\/article\/@id": { "get": { "tags": [ "Support" ], "summary": "Get knowledgebase article", "description": "Return an article details.", "operationId": "getKnowledgebaseArticleDetails", "consumes": [ "application\/json" ], "produces": [ "application\/json" ], "parameters": [ { "name": "id", "type": "integer", "in": "path", "description": "Article id", "required": true } ], "responses": { "200": { "description": "```json\n\r{\n \"article\": {\n \"id\": \"1\",\n \"language_id\": \"1\",\n \"cat_id\": \"1\",\n \"title\": \"Example title\",\n \"body\": \"Example body\",\n \"views\": \"1\",\n \"slug\": \"example-slug\",\n \"upvotes\": \"1\",\n \"downvotes\": \"1\",\n \"tag_title\": \"Example title\",\n \"tag_body\": \"Example body\"\n }\n}" } } } } }, "securityDefinitions": { "http": { "type": "basic" } }, "definitions": { "Clientarea": { "type": "object", "properties": { "username": { "type": "string", "description": "Your acount email address " }, "password": { "type": "string", "description": "Account password " }, "refresh_token": { "type": "string" }, "id": { "type": "integer" }, "status": { "type": "string" } } }, "Billing": { "type": "object", "properties": { "id": { "type": "integer" } } }, "Services": { "type": "object", "properties": { "id": { "type": "integer", "description": "Service id" } } }, "Support": { "type": "object", "properties": { "id": { "type": "integer", "description": "Article id" } } } }, "externalDocs": { "description": "Find out more about UserAPI", "url": "https:\/\/hosting.primexm.com\/?cmd=userapi" } }