{ "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.20240711", "title": "PrimeXM DMCC User API" }, "host": "hosting.primexm.com", "basePath": "\/api", "tags": [ { "name": "Clientarea" }, { "name": "Billing" }, { "name": "Services" } ], "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`" } } } }, "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}" } } } } }, "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" }, "status": { "type": "string" }, "id": { "type": "integer" } } }, "Billing": { "type": "object", "properties": { "id": { "type": "integer" } } }, "Services": { "type": "object", "properties": { "id": { "type": "integer", "description": "Service id" } } } }, "externalDocs": { "description": "Find out more about UserAPI", "url": "https:\/\/hosting.primexm.com\/?cmd=userapi" } }