Account Management Service

GET accounts /v1/api/accounts 

Input Parameters

 #ParameterParameter TypeData TypeMandatoryDescription/Valid ValuesAdditional Information
1 parentPartnerID query string Optional

Filter by parent Partner ID

2 userName query string Optional Filter by account user name
3 planName query string Optional Filter by plan name * Name of the valid plan. To get the list of valid plans use GET /v1/api/accounts/{customerID}/plans link to 3.2.1.GET /v1/api/accounts/{customerID}/plans
4 skip query integer Optional Pagination: Number of items to skip
5 take query integer Optional Pagination: Number of items to take

Output Parameters

PageV1Model [AccountGetV1Model

Expand for details -PageV1Model[AccountGetV1Model]

PageV1Model[AccountGetV1Model] { count (integer, optional): Pagination: Number of items retrieved, total (integer, optional): Pagination: Total number of items, items (Array[AccountGetV1Model], optional): An array of items }
AccountGetV1Model { programs (Array[string]): The account programs = ['partner', 'account'], customerID (string, optional): The customer id, userName (string, optional): The user name, purchaseDate (string, optional): The purchase date, parentPartnerID (string, optional): The parent parent id, planName (string, optional): The account plan name Required only for {Programs} == {Account}
}

Response Class (Status 200)

Retrieves an array of Partners or accounts, filtered by the specified criteria. If no criteria is specified, retrieves all accounts.

Response example

Displaying accounts filtered by specified userName:

  { "count": 1, "total": 1, "items": [ { "programs": [ "account" ], "customerID": "78717cfafd164deea943cc53d43c2f35", "userName": "my-test-partner-account", "purchaseDate": "2017-04-13T09:42:59.777+00:00", "parentPartnerID": "b29279dec0744bd689c0e9f786c3d01f", "planName": "Sharepoint" } ] }

Possible error response messages

Specific error response messages are not returned.

POST /v1/api/accounts  

The method creates a Partner or an account.

Input Parameters

 #ParameterParameter TypeData Type

Mandatory

Description/Valid ValuesAdditional Information
1 customer body AccountCreateV1Model  Required

A detailed description of a Partner or an account to create

  • The customer.programs property must be set to partner for Partners, or account for accounts.
  • The payment.type property must be set to creditCard* or paperCheck.
  • * A Partner can use credit card in his requests, if payment processing is enabled for him (see the linkto https://faq.intermedia.net/Article/2778?query=payment+process).
  • Please, use paperCheck to bill to the parent account.
  • The planName property must be set to a valid billing plan name.
    To get the list of valid plans use GET /v1/api/accounts/{customerID}/plans link to 3.2.1 GET /v1/api/accounts/{customerID}/plans

Output Parameters

AccountGetV1Model  

 Expand for details - AccountGetV1Model

AccountGetV1Model { programs (Array[string]): The account programs = ['partner', 'account'], customerID (string, optional): The customer id, userName (string, optional): The user name, purchaseDate (string, optional): The purchase date, parentPartnerID (string, optional): The parent parent id, planName (string, optional): The account plan name Required only for {Programs} == {Account} }

Response Class (Status 201)

Responds with a brief description of created Partner or account.

Request and response examples

Request

Description of the account that should be created for the specific Partner:

  Request Body example { "programs": [ "account" ], "general": { "userName": "test-partner-account", "login": "test-partner-account", "password": "qwerty123!!!2133333", "parentPartnerID": "b29279dec0744bd689c0e9f786c3d01f", "name": "Test User", "email": "test-user1@test.com" }, "company": { "name": "Company name", "phone": "123456789", "address": { "country": "United States", "state": "California", "city": "Anaheim", "street": "104 South Anaheim Boulevard", "zip": "92805-6010" } }, "payment": { "name": " Company name ", "phone": "12365458789", "address": { "country": "United States", "state": "California", "city": "Anaheim", "street": "104 South Anaheim Boulevard", "zip": "92805-6010" }, "creditCard": { "type": "VISA", "cardNumber": "4111111111111111", "expirationDate": "04/18", "securityCode": "111" }, "type": "creditCard" }, "planName": "Sharepoint" }

Response

Brief description of the created account:

Response Body example { "programs": [ "account" ], "customerID": "50b24ca9f75946958de104eb2ee219b7", "userName": "test-partner-account", "purchaseDate": "2017-04-20T09:50:26.203+00:00", "parentPartnerID": "b29279dec0744bd689c0e9f786c3d01f", "planName": "Sharepoint" }

Possible error response messages

HEAD /v1/api/accounts/{customerUserName}

This method checks whether a Partner or an account userName with the specified identity is available or not.

Input Parameters

 #ParameterParameter TypeData Type

Mandatory

Description/Valid Values
1 customerUserName path string Required

The userName of a Partner or an account to check

Output Parameters

Inline Model {}

Response Class (Status 200)

The specified userName is not available for a new Partner or account.

Response Class (Status 404)

The specified userName is available for a new Partner or account.

GET /v1/api/accounts/{customerID}

This method retrieves a Partner or an account by the specified identity.

Input Parameters

 #ParameterParameter TypeData Type

Mandatory

Description/Valid Values
1 customerID path string Required

The identity of a Partner or an account to retrieve

Output Parameters

AccountGetV1Model 

 Expand for details - AccountGetV1Model AccountGetV1Model { programs (Array[string]): The account programs = ['partner', 'account'], customerID (string, optional): The customer id, userName (string, optional): The user name, purchaseDate (string, optional): The purchase date, parentPartnerID (string, optional): The parent parent id, planName (string, optional): The account plan name Required only for {Programs} == {Account} }

Response Class (Status 200)

The Partner or account was successfully found. Returns a brief representation of the account.

Response example

The information about the specified Partner is displayed:

 Response Body example { "programs": [ "partner" ], "customerID": "b29279dec0744bd689c0e9f786c3d01f", "userName": "my-test-partner-account", "purchaseDate": "2016-12-13T16:40:32.273+00:00", "parentPartnerID": "a92d86e73033400b9a619d97420600eb" }

Possible error response messages

DELETE /v1/api/accounts/{accountID}

The method deletes an account.

Note: Please use with care. This is irreversible operation (all customer data will be lost after account deletion).

Input Parameters

#ParameterParameter TypeData TypeMandatoryDescription/Valid Values
1 accountID path string Required

The ID of an account to delete

2 reason query string Required

A reason for deleting the account, in free-form text format (i.e. non-payment, business ceased operations, etc.)

3 comments query string Optional A comment in free-form text format (customer feedback, or customer service representative note)

Output Parameters

Inline Model {}

Response Class (Status 204)

Account was successfully deleted.

Possible error response messages