Update an Account

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

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

Arguments


Name

Parameter Type

Data type

Required/Optional

Description

id

path

integer

RequiredAn account type ID.
api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

manager_id

form

integer

Optional

A manager ID who will be linked with the account.

account_type_id

form

integer

Optional

An account type ID.

account_class_id

form

integer

Optional

An account class ID (see Account classes in the ActivePlatform. Operator Control Panel).

primary_name

form

string

Optional

A company name, if the customer is a legal entity.

first_name

form

string

Optional

The first name for the user the owner access rights.

middle_name

form

string

Optional

The middle name for the user the owner access rights.

last_name

form

string

Optional

The last name for the user the owner access rights.

owner_id

form

integer

Optional

An ID of the existed user who will be granted the owner access rights in the Customer Control Panel.

email

form

string

Optional

A contact email of the account.

credit_limit_use_systemformbooleanOptional

The credit limit:

  • can be set manually ('false');
  • can use system value ('true').

System value of the credit is set for all accounts, which belong to the particular Account Class (see Account classes).

An Account can use funds within the credit limit only if the Pay with negative balance checkbox in the relevant Account Class is selected (see Creating an account class). If the Pay with negative balance checkbox is not selected then credit limit is ignored and Account Balance cannot become negative.

credit_limitformstringOptionalA value of credit limit if the system value of credit limit is not used, the 'credit_limit_use_system' argument is set to 'false'.

country

form

string

Optional

An account address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.

region

form

string

Optional

An account address: a region.

city

form

string

Optional

An account address: a city.

street

form

string

Optional

An account address: a street.

building

form

string

Optional

An account address: building.

office

form

string

Optional

An account address: office.

zip

form

string

Optional

An account address: a zip-code.

phoneformstringOptional

A phone number of the account:

  • + < country code > < city code or network code > < phone number >
  • 00 < country code > < city code or network code > < phone number >
custom_attributes[][key]

form

string

Depends on ID of the account type

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel).

The key that is used to determine the element in API (see Creating an attribute in the ActivePlatform. Operator Control Panel).

custom_attributes[][value]

form

Depends on attributeDepends on ID of the account typeA value of the attribute.

Response model

Name

Data type

Description

idintegerAn account ID.
namestringAn account name.
account_class_idintegerAn account class ID (see Account classes in the ActivePlatform. Operator Control Panel).
account_classstring

A name of the account class (see Account classes in the ActivePlatform. Operator Control Panel).

primary_namestringA company name, if the customer is a legal entity.
first_namestringThe first name for the user the owner access rights.
middle_namestringThe middle name for the user the owner access rights.
last_namestringThe last name for the user the owner access rights.
countrystringAn account address: a two-letter ISO code ISO 3166-1 alpha-2 of the country.
regionstringAn account address: a region.
citystringAn account address: a city.
streetstringAn account address: a street.
buildingstringAn account address: building.
officestringAn account address: office.
zipstringAn account address: a zip-code.
phonestring

A phone number of the account:

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

A contact email of the account.

statusstring

A current account status:

balancefloatA current value of the account balance (see Viewing the List of Charges in the ActivePlatform. Operator Control Panel).
credit_limitfloat

A maximum amount of the credit that a customer can use for ordering services without topping up (the credit limit can be set manually or by default (see Account classes in the ActivePlatform. Operator Control Panel)).

account_type_idinteger

An ID of the account type.

account_typestringA name of the account type.
manager_idinteger

A manager ID who is linked with the account.

owner_idinteger

An ID of the existed user who is granted the owner access rights in the Customer Control Panel.

tech_user_idintegerAn ID of the user, which is responsible for the technical matters.
bill_user_idintegerAn ID of the user, which is responsible for the financial matters.
custom_attributesarray

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel):

  • name - a name of the attribute;

  • value - a value of the attribute.

created_atdateA date and time of the account's creation.
updated_atdateA date and time, when the account information was updated.

Request example

http://billing.activeplatform.com:80/api/vendor/v1/accounts/2000589.json?api_token=654321
{
  "manager_id": null,  
  "account_type_id": 1,
  "first_name": "John",
  "last_name": "Doe",
  "owner_id": 2002990,
  "account_class_id": 1,
  "country": "BY",
  "region": "Minsk",
  "city": "Minsk",
  "street": "Lenina",
  "building": "1",
  "office": "1",
  "zip": "220007",
  "phone": "+375290745930",
  "email": "doe.john@activeplatform.com"
}

Response example

{ 
  "id": 2000589,
  "name": "John Doe",
  "account_class_id": 1,
  "account_class": "Default",
  "primary_name": "",
  "first_name": "John",
  "middle_name": null,
  "last_name": "Doe",
  "country": "BY",
  "region": "Minsk",
  "city": "Minsk",
  "street": "Lenina",
  "building": "1",
  "office": "1",
  "zip": "220007",
  "phone": "+375290745930",
  "email": "doe.john@activeplatform.com",
  "status": "active",
  "balance": 0,
  "credit_limit": 1,
  "account_type_id": 1,
  "account_type": "Personal",
  "manager_id": null,
  "owner_id": 2002990,
  "tech_user_id": 2002990,
  "bill_user_id": 2002990,
  "custom_attributes": [
    {
      "name": "Oasis Account ID",
      "value": ""
    },
    {
      "name": "Trial",
      "value": ""
    },
    {
      "name": "Passport issued by",
      "value": "Goverment"
    },
    {
      "name": "Passport number",
      "value": "112111111111"
    },
    {
      "name": "Birth date",
      "value": "10.08.2016"
    },
    {
      "name": "Personal number",
      "value": "11111111"
    },
    {
      "name": "Passport date of issue",
      "value": "01.07.2016"
    }
  ],
  "created_at": "2016-10-04T03:45:11.720+03:00",
  "updated_at": "2016-10-04T05:03:47.181+03:00"
}