New Public API version (v2) introduces new address model to correspond to European addresses formatting and possibility to setup account culture. New version is backward compatible.

Read the Knowledge Base article on Intermedia Partner Public API for more information on Public API v1.

Models:

Methods:

Models

CompanyV2Model

New field Culture has been added. See CompanyV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid Values

CompanyV2Model:

1 Name string Required

The account company name

Max length is 255 symbols
Phone string Required

The account company phone

Max length is 50 symbols
3 Address AddressV2Model Required The account company address See the AddressV2Model items
4

Culture

string Optional The account company culture Standard format, e.g. 'EN-US', EN-GB', 'FR-CA', 'DE-DE', 'IT-IT', 'NL-NL', 'JA-JP', 'EN-AU'
5

VatNumber

string Optional The account company VAT number Max length is 50 symbols

CompanyUpdateV2Model

New field Culture has been added. See CompanyUpdateV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid Values

CompanyUpdateV2Model:

1 Name string Optional

The account company name

Max length is 255 symbols
Phone string Optional

The account company phone

Max length is 50 symbols
3 Address AddressUpdateV2Model Optional The account company address See the AddressUpdateV2Model items
4 Culture string Optional The account company culture Standard format, e.g. 'EN-US', EN-GB', 'FR-CA', 'DE-DE', 'IT-IT', 'NL-NL', 'JA-JP', 'EN-AU'
5

VatNumber

string Optional The account company VAT number Max length is 50 symbols

AddressV2Model

2 additional address lines has been added. See AddressV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

AddressV2Model:

1 Country string Required

Address: country

Max length is 50 symbols

A full name or a code according to ISO 3 166; valid country

State string Optional/Required*

Address: state

Max length is 50 symbols

*Required  for USA, Canada, Netherlands, Italy, Germany

A full name or a code according to ISO 3166; valid state for USA, Canada, Netherlands, Italy, Germany

3 City string Required Address: city Max length is 50 symbols
4

AddressLine1

string Required Address: street (address line 1) Max length is 100 symbols
5 AddressLine2 string Optional Address: address line 2 Max length is 100 symbols
6 AddressLine3 string Optional Address: address line 3 Max length is 100 symbols
7 Zip string Required Address: ZIP Max length is 50 symbols

AddressUpdateV2Model

2 additional address lines has been added. See AddressUpdateV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

AddressUpdateV2Model:

1 Country string Optional

Address: country

Max length is 50 symbols A full name or a code according to ISO 3166; valid country
State string Optional

Address:   state

Max length is 50 symbols

*Required  for USA, Canada, Netherlands, Italy, Germany

A full name or a code according to ISO 3166; valid state for USA, Canada, Netherlands, Italy, Germany

3 City string Optional Address:   city Max length is 50 symbols

4

AddressLine1

string Optional Address:   street Max length is 100 symbols
5 AddressLine2 string Optional Address: address line 2 Max length is 100 symbols
6 AddressLine3 string Optional Address: address line 3 Max length is 100 symbols
7 Zip string Optional Address:   ZIP Max length is 50 symbols

ContactGetV2Model

New field Culture has been added. See ContactGetV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

ContactGetV2Model:

1 ContactID string Optional The account contact id -

Login string Optional The account contact login Max length is 50 symbols
3 Name string Optional

The account contact name

Max length is 50 symbols
4 Email string Optional

The account contact email

Max length is 50 symbols
5 AlternativeEmail string Optional

The account contact alternative email

Max length is 50 symbols
6 Phone string Optional The account contact phone Max length is 100 symbols
7 CellularPhone string Optional The account contact cellular phone Max length is 255 symbols
8 AccessRoleNames Array[string] Optional The access role names Names from the list of roles See the list of available roles here
9

Culture

string Optional The account company culture Standard format, e.g. 'EN-US','EN-GB', 'FR-CA', 'DE-DE', 'IT-IT', 'NL-NL', 'JA-JP', 'EN-AU', 'EN-AU'

ContactCreateV2Model

New field Culture has been added. See ContactCreateV1Model for comparison.

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

ContactCreateV2Model:

1 Password string Required

The account contact password

Depends on password policies

Default: letters and numbers are required

Min length is 6 symbols

Login string Required The account contact login Max length is 50 symbols
3 Name string Required

The account contact name

Max length is 50 symbols
4 Email string Required

The account contact email

Max length is 50 symbols
5 AlternativeEmail string Optional

The account contact alternative email

Max length is 50 symbols
6 Phone string Optional The account contact phone Max length is 100 symbols
7 CellularPhone string Optional The account contact cellular phone Max length is 255 symbols
8 AccessRoleNames Array[string] Required The access role names Names from the list of roles See the list of available roles here
9

Culture

string Optional

The account contact culture

Standard format, e.g. 'EN-US', 'EN-GB', 'FR-CA', 'DE-DE', 'IT-IT', 'NL-NL', 'JA-JP', 'EN-AU'

ContactAssignV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid Values

ContactAssignV2Model:

1 TargetAccountID string Required

The target account id

-
2 AccessRoleNames Array[string] Required The access role names See the list of available roles here  

AccountGetV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

AccountGetV2Model:

1 programs Array[string] Required

The account programs

  • partner
  • account

customerID string Optional

The customer id

-
3 userName string Optional

The user name

-
4 purchaseDate string Optional

The purchase date

Date in the following format:

YYYY-MM-DD

5 parentPartnerID string Optional

The parent partner id

-
6 planName string Optional/Required* The account plan name

Name of the plan, valid for the specified account**

* Required   only for {Programs} = {Account}

** To get the list of valid plans, use GET /v1/api/accounts/{customerID}/plans

AccountCreateV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

AccountCreateV2Model:

1 Programs Array[string] Required

The account programs

  • partner
  • account

General AccountGeneralV2Model  Required

The account general data

-
3 Company CompanyV2Model Required

The account company data

-
4 Payment PaymentV2Model Required The account payment data -
5 PlanName string Optional/Required* The account plan name

Name of the plan, valid for the specified account**

* Required for {Programs} = {Account}

** To get the list of valid plans, use GET /v1/api/accounts/{customerID}/plans

6 PartnerProgram string Optional The partner programs
  • partner
  • advisor

AccountGeneralV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid Values

AccountGeneralV2Model:

1 AccountName string Required The account user name

Max length is 15 symbols

ParentPartnerID string Optional The account parent partner id Valid parent Partner ID
3 Owner AccountOwnerCreateV2Model Required

The account owner data

-

4 Options OptionsV2Model Optional The additional options for creation

PaymentV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

PaymentV2Model:

1 Name string Required The account payment name Max length is 50 symbols

Phone string Required The account payment phone Max length is 100 symbols
3 Address AddressV2Model Required

The account payment address

See AddressV2Model
4 CreditCard PaymentCreditCardV2Model Optional/Required*

The account credit card payment

See PaymentCreditCardV2Model  Required for {Type} = {CreditCard}
5 Type string Required

The account payment type

  • paperCheck
  • creditCard*
* A Partner can use credit card in his requests, if payment processing is enabled for him (see the article).

PaymentCreditCardV2Model

#Field NameType

Mandatory

DescriptionRestrictions/Valid ValuesAdditional information 

PaymentCreditCardV2Model:

1 Type string Required

The credit card type

Max length is 10 symbols

Supported types:

  • AMEX  - American Express
  • DC  - Diner's Club
  • DISCOVER  - Discover
  • MC  - Master Card
  • VISA  - Visa

CardNumber string Required The credit card number Max length is 20 symbols
3 IssueNumber string Optional

The credit card issue number

Max length is 2 symbols Applicable not for all CC types
4 StartDate string Optional/Required* The credit card start date

Max length is 5 symbols

Format: MM/YY

  Required   only for {Type} = 'Maestro'

5 ExpirationDate string Required The credit card expiration date

Max length is 5 symbols

Format:  MM/YY

6 SecurityCode string Required The credit card security code Max length is  4 symbols

OptionsV2Model

Dictionary of additional options for creating. Valid key values: ["ExternalPartnerID", "ExternalReferralID", "PaymentMethodConfirmationRequired"]

Value max length is 255 symbols.

AddressValidationV2Model

 #

Field Name

Type

Mandatory

Description

1 status int Optional Shows whether a model is valid
2 address AddressV2Model Optional

Refined address

3 changes Array[string] Optional

A list of fields that have been refined

4 errors Array[ErrorCode] Optional A list of validation errors

AccountOwnerCreateV2Model

 #

Field Name

Type

Mandatory

Description

Restrictions/Valid Values

1 Password string Required The account owner password Max length is 6 symbols
2 Login string Required

The account contact login

Max length is 50 symbols
3 Name string Required

The account contact name

Max length is 50 symbols
4 Email string Required The account contact email Max length is 50 symbols
5 CellularPhone string Optional The account contact cellular phone Max length is 50 symbols

ContactInfoUpdateV2Model

New field Culture has been added. See ContactInfoUpdateV1Model for comparison.

 #

Field Name

Type

Mandatory

Description

Restrictions/Valid Values

1 Name string Optional The account contact name Max length is 50 symbols
2 Email string Optional

The account contact email

Max length is 50 symbols
3 AlternativeEmail string Optional The account contact alternative email Max length is 50 symbols
4 Phone string Optional

The account contact phone

Max length is 100 symbols
5 CellularPhone string Optional The account contact cellular phone Max length is 50 symbols
6 Culture string Optional The account contact culture Standard format, e.g. 'EN-US', 'EN-GB', 'FR-CA', 'DE-DE', 'IT-IT', 'NL-NL', 'JA-JP', 'EN-AU'

Methods

To use RestAPI v2 in Swagger, select it from the drop-down list at the top of the page and click Explore:

Select v2 from the drop-down list

GET /v2/api/accounts/{customerID}/company

This method retrieves company information.

Input Parameters

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

Partner id or account id to retrieve the company information for

Output Parameters

CompanyV2Model

Response Class (Status 200)

An object describing company information for the specified Partner or account.

Response example

Company information for the specific Partner (CustomerID) is displayed:

PUT /v2/api/accounts/{customerID}/company

The method updates company information.

Input Parameters

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

Identifies the Partner or account to update the company information for

2 Company body Required

An object describing updated company information for the specified account

Output Parameters

CompanyV2Model

Response Class (Status 200)

An object describing company information for the specified Partner or account.

Request and response examples

Request

Company information, that should be updated for the specific Partner (name and phone in this case).

Response

Updated information is displayed.

POST /v2/api/accounts/company/validAddress

Address validation method.

Input Parameters

#ParameterParameter TypeData TypeMandatoryDescription/Valid Values
1 CompanyAddress body AddressV2Model Required

Validation address. See the AddressV2Model items

Output Parameters

AddressValidationV2Model

GET /v2/api/accounts/{customerID}/contacts

The method retrieves information about all contacts linked to an account.

Input Parameters

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

Identifies the Partner or account

2 Skip query

integer

Optional

Pagination: Number of items to skip

3 Take query integer Optional Pagination: Number of items to take

Output Parameters

PageV2Model[ContactGetV2Model]

Response Class (Status 200)

Returns an array of objects representing contacts linked to the specified account, along with the roles.

Response example

Returns information about 1 contact linked to a specific Partner account, starting from the 2nd (1 skipped).

POST /v2/api/accounts/{customerID}/contacts

This method creates a contact and assigns it to the specified account.

Input Parameters

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

Identifies the Partner or account to assign the contact to

2 Contact body Required

A description of contact to create, along with a list of roles linking it to the specified account

Output Parameters

ContactGetV2Model

Response Class (Status 201)

Returns an object representing the newly created contact, along with a list of roles linking it to the account.

Request and response examples

Request

Description of contact, that should be created for the specific account.

Response

Data of the newly created contact are returned.

GET /v2/api/accounts/{customerID}/contacts/{contactID}

The method retrieves information about specific contact linked to an account.

Input Parameters

#ParameterParameter TypeData Type

Mandatory

Description/Valid Values
1 CustomerID path string Required

Identifies the Partner or account

2 ContactID path string Required Identifies the contact

Output Parameters

ContactGetV2Model

Response Class (Status 200)

Returns an object representing a contact, with a list of roles associating it with the specified account.

Response example

Displaying the information about a specific contact.

POST /v2/api/accounts/{customerID}/contacts/{contactID}

This method assigns an existing contact to the account.

Input Parameters

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

Identifies the Partner or the account

2 ContactID path

string

Required

Identifies the contact to assign

3 Assignment body ContactAssignV2Model  Required

An object describing the roles linking contact to the account

Output Parameters

ContactGetV2Model

Response Class (Status 201)

Returns an object representing the contact, along with a list of roles linking it to the account.

Request and response examples

Request

Description of the assignment details (roles for the contact within the account are specified).

Response

The updated contact information is displayed.

POST /v2/api/accounts 

The method creates a Partner or an account.

Input Parameters

 #ParameterParameter TypeData Type

Mandatory

Description/Valid ValuesAdditional Information
1 Customer body AccountCreateV2Model  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 article).
  • 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

Output Parameters

 AccountGetV2Model

Response Class (Status 201)

Responds with a brief description of created Partner or account.

Request and response examples

Request

Response

Brief description of the created account.

Failed Setups

If the data is not valid (credit card is blacklisted, the account has not passed AntiFraud verification), the account will not be created. Data about it will be placed in Failed Setups in the future it can be restored. Response at Failed Setups:

Invalid company address

If the company address was not set correctly, then the account will not be created and Failed Setups will not be created. Data is not saved. Response at invalid company address:

Possible error response messages