Update an Account

The Update an Account method allows to update an Account information.

PUT /api/vendor/v1/accounts/{account_id}.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

account_id

path

integer

RequiredAccount ID
api_tokenquerystringRequiredAPI token of the manager who performs the operation (see API Token Authentication)
account_class_id

form

integer

Optional

Account class ID (see Account classes)

primary_name

form

string

Optional

Account primary name (a company name, if the customer is a legal entity)

first_name

form

string

Optional

The first name of the contract person

middle_name

form

string

Optional

The middle name of the contract person

last_name

form

string

Optional

The last name of the contract person

country

form

string

Optional

Contact information: a two-letter ISO code ISO 3166-1 alpha-2 of the country

region

form

string

Optional

Contact information: Region

city

form

string

Optional

Contact information: City

street

form

string

Optional

Contact information: Street

building

form

string

Optional

Contact information: Building

office

form

string

Optional

Contact information: Office

zip

form

string

Optional

Contact information: Zip-code

phone

form

string

Optional

Contact information: Phone number:

  • + < country code > < city code or network code > < phone number >
  • 00 < country code > < city code or network code > < phone number >

email

form

string

Optional

Email of the contract person

account_type_id

form

integer

Optional

Account type ID

manager_id

form

integer

Optional

ID of the manager who is linked with the Account

financial_blocking_threshold_use_systemformboolOptional

Shows whether the Account uses the default Financial blocking threshold value that is set in the Account class:

  • true – the Account uses the Financial blocking threshold value that is set in the Account class.
  • false – the Account uses the Financial blocking threshold value that is redefined on the Account level.
financial_blocking_thresholdformfloatOptionalThe value of the Financial blocking threshold for the Account that is redefined on the Account level (for financial_blocking_threshold_use_system = false)
subscription_credit_limit_use_systemformboolOptional

Shows whether the Account uses the default Subscription credit limit value that is set in the Account class:

  • true – the Account uses the Subscription credit limit value that is set in the Account class.
  • false – the Account uses the Subscription credit limit value that is redefined on the Account level.
subscription_credit_limitformfloatOptionalThe value of the Subscription credit limit for the Account that is redefined on the Account level (for subscription_credit_limit_use_system = false)
custom_attributesformarray of objectsOptionalA list of additional attributes (see Managing attributes)

key

form

string

Depends on the Account typeThe key that is used to determine the element via API (see Creating an attribute)

value

form

Depends on the Account typeDepends on the Account type

A value of the attribute

Response model

Name

Data type

Description

idintegerAccount ID
namestringAccount name
account_class_idintegerAccount class ID (see Account classes)
account_classstring

Account class name (see Account classes)

primary_namestringAccount primary name (a company name, if the customer is a legal entity)
first_namestringThe first name of the contract person
middle_namestringThe middle name of the contract person
last_namestringThe last name of the contract person
countrystringContact information: a two-letter ISO code ISO 3166-1 alpha-2 of the country
regionstringContact information: Region
citystringContact information: City
streetstringContact information: Street
buildingstringContact information: Building
officestringContact information: Office
zipstringContact information: Zip-code
phonestring

Contact information: Phone number:

  • + < country code > < city code or network code > < phone number >
  • 00 < country code > < city code or network code > < phone number >
emailstring

Email of the contract person

statusstring

Account status:

  • active – the Account is available for any possible operation.

  • administrative hold – the Account was blocked by the manager (see Moving an account to the administrative hold).

  • credit hold – the Account was blocked automatically due to the debt on the account balance (see Credit Hold of the Account). You can set the parameters of moving an account to the credit hold in the Account class, to which the account relates (see Account classes).

  • deleted – the Account was deleted by manger (see Deleting an account).

balancefloatA current value of the Account balance (see Viewing the list of charges)
account_type_idinteger

Account type ID

account_typestringAccount type name

default_payment_model

string

Default payment model from the Account class:

  • prepay 
  • postpay

current_debt

float

Current debt of the Account for all postpaid Subscriptions

financial_blocking_threshold_use_system

bool

Shows whether the Account uses the default Financial blocking threshold value that is set in the Account class:

  • true – the Account uses the Financial blocking threshold value that is set in the Account class.
  • false – the Account uses the Financial blocking threshold value that is redefined on the Account level.

financial_blocking_threshold

floatThe value of the Financial blocking threshold for the Account that is set in the Account class or redefined on the Account level

subscription_credit_limit_use_system

bool

Shows whether the Account uses the default Subscription credit limit value that is set in the Account class or redefined on the Account level:

  • true – the Account uses the Subscription credit limit value that is set in the Account class.
  • false – the Account uses the Subscription credit limit value that is redefined on the Account level.

subscription_credit_limit

floatThe value of the Subscription credit limit for the Account that is set in the Account class or redefined on the Account level
manager_idinteger

ID of the manager who is linked with the Account

owner_idinteger

ID of the User who is granted the Owner access rights in the Customer Control Panel

tech_user_idintegerID of the user, which is responsible for the technical matters
bill_user_idintegerID of the user, which is responsible for the financial matters
custom_attributesarray

A list of additional attributes (see Managing attributes)


namestringAttribute name

valueDepends on the attributeAttribute value
created_atdateDate and time of the Account creation
updated_atdateDate and time, when the Account information was updated

Request example

PUT /api/vendor/v1/accounts/505.json?api_token=vY5fwetestK3gJXZH5uHCw
{
    "id": 550,
    "account_class_id": 1,
    "primary_name": "ACME",
    "first_name": "Marcelo",
    "middle_name": "",
    "last_name": "Ivanou",
    "country": "BY",
    "region": "5",
    "city": "Minsk",
    "street": "Lenina",
    "building": "1",
    "office": "",
    "zip": "220007",
    "phone": "+375295555555",
    "email": "test@example.com",
    "account_type_id": 1,
    "manager_id": 50,
    "financial_blocking_threshold_use_system": true,
    "subscription_credit_limit_use_system": false,
    "subscription_credit_limit": 11000,
        "custom_attributes": [
        {
            "key": "personal_number",
            "value": "A4411111BB1199"
        }
    ]
}

Response example

{
    "id": 505,
    "name": "Marcelo  Ivanou",
    "account_class_id": 1,
    "account_class": "Default",
    "primary_name": "ACME",
    "first_name": "Marcelo",
    "middle_name": "",
    "last_name": "Ivanou",
    "country": "BY",
    "region": "5",
    "city": "Minsk",
    "street": "Lenina",
    "building": "1",
    "office": "",
    "zip": "220007",
    "phone": "+375295555555",
    "email": "test@example.com",
    "status": "active",
    "balance": "0.0",
    "account_type_id": 1,
    "account_type": "Personal BLR",
    "default_payment_model": "prepay",
    "current_debt": 0.0,
    "financial_blocking_threshold_use_system": true,
    "financial_blocking_threshold": 100.0,
    "subscription_credit_limit_use_system": false,
    "subscription_credit_limit": 11000.0,
    "manager_id": 50,
    "owner_id": 874,
    "new_owner_first_name": null,
    "new_owner_last_name": null,
    "new_owner_middle_name": null,
    "new_owner_email": null,
    "tech_user_id": 874,
    "bill_user_id": 874,
        "custom_attributes": [
        {
            "key": "personal_number",
            "value": "A4411111BB1199"
        }
    ],
    "created_at": "2019-10-15T13:08:36.440+03:00",
    "updated_at": "2019-10-18T15:52:57.884+03:00"
}