This method updates accounts receivable.  Single accounts receivable can be updated by each call. Fields which are not specified are not updated at all. Fields which are specified as null will be set as null.

Resource URL

http://host_name/crmapi/rest/$version/accounts_receivable/update

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Account Receivable Identifier

The identifier of the account receivable to be updated. The allowed account receivable identifier fields are the following:

name

(optional)

String

The name of the account receivable

description

(optional)

StringThe description of the retrieved accounts receivable

notes

(optional)

StringThe notes of the retrieved accounts receivable

vat_number

(optional)

String

The VAT number of the retrieved accounts receivable

credit_limit

(optional)

Number

Is the maximum amount of credit that can be provided to the specific accounts receivable, or in other words the maximum balance that the accounts receivable can ever reach.

Deprecated from CRM.COM R11.0.0


credit_period 

(optional)

Number

Credit period is the length of time for which a customer is allowed to settle any given debit

Deprecated from CRM.COM R14.0.0


classification_identifier

(optional)
Accounts Receivable Classification Identifier

 The accounts receivable classification identifier. The allowed classification identifier fields are the following:

credit_rating_identifier

(optional)

Credit rating identifier

 The accounts receivable credit rating identifier. The allowed credit rating identifier fields are the following:

owned_by_group_identifier

(optional)

Group identifier

The group owning the accounts receivable. The allowed group identifier fields are the following:

privacy_level_identifier

(optional)

Privacy level identifier

The privacy level of the accounts receivable. The allowed privacy level identifier fields are the following:

account_manager

(optional)

User Identifier

The identifier of the user that should be set as the Account Manager. The allowed user identifier fields are the following:

Assigning an Account Manager is only applicable for Accounts Receivables that are owned by a COMPANY

Available from CRM.COM R14.0.0


is_tax_exempt

(optional)

Boolean

Defines whether the account owner is Tax Exempt or not

Available from CRM.COM R17.0.0


udf_string_1 

(optional)

String

User Defined Field of type String

udf_string_2 

(optional)

String

User Defined Field of type String

udf_string_3 

(optional)

String

User Defined Field of type String

udf_string_4 

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6 

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1 

(optional)

Date

User Defined Field of type Date

udf_date_2 

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

custom_field_set

(optional)

Set of Custom Fields

The custom fields that are associated with the accounts receivable

If no records are specified in the set then nothing will be updated. To add or update a value on a custom field use the custom field name as configured in CRM.COM along with the respective value. To remove a value from a custom field use the custom field name as configured in CRM.COM along with an empty value

"set": [
	"field_name_1" : "value_1",
	"field_name_2" : "value_2"
]


Available from CRM.COM R16.2.0


billing_address

(mandatory)

Billing address object

 The accounts receivable billing address.

From CRM.COM R14.3.0, billing_address is mandatory based on the accounts receivable definitions' billing address rules


wallet_top_up_rules

(optional)

Wallet Top Up Rules Object

The accounts receivable wallet top up rules. Applicable only if the account owner owns a wallet and has opt in to recurring payments through payment preferences.

Available from CRM.COM R14.2.0


presentment_preferences_set 

(optional)

Set of accounts receivable presentment preferences objects           

The presentment preferences of the retrieved accounts receivable.

payment_preferences_set

(optional)

Set of accounts receivable payment preferences objects

The payment preferences of the retrieved accounts receivable

access_tokens_set

(mandatory on conditions)

Set of Access Token Objects

The access tokens that will be associated with the accounts receivable. This information is mandatory if the active access token definition is set up to require at least one access token for each accounts receivable

If no records are specified in the set then nothing will be updated. To remove a record use action:"remove". To add a record use action:"add_existing" or "add_new". Different actions can be used within the same set. For example:

"set": [
	   		{
            	"action": "add_existing",
            	...........
        	},
			{
            	"action": "remove",
            	...........
			},
			{
            	"action": "add_new",
            	...........
			}
		]


Available from CRM.COM R8.0.0


Referred Parameter Objects Data

Restrictions

Response Data

Examples

HTTP Method: POST


Request:

http://cyn1lnx004:9080/crmapi/rest/v2/accounts_receivable/update

Body:

{
  "token":"1A2C10CE446847C6BDD71FB816D95A0D",
"accounts_receivable_identifier":{"number":"ACR001027"},
"name":"Lukia Papapavlou",
"description":"premium account",
"notes": "test notes"
}


Response:

{
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {
    "notes": "Marios Lannister\t17/5/2016 11:33:35\tthere are currently no notes\tMarios Lannister\t17/5/2016 11:38:10\ttest notes",
    "udf_float_1": 10,
    "udf_float_2": 20,
    "credit_period": 2,
    "udf_float_3": 30,
    "udf_float_4": 40,
    "number": "ACR001027",
    "name": "Lukia Papapavlou",
    "udf_string_1": "udf string 1",
    "udf_string_2": "udf string 2",
    "privacy_level": null,
    "contact_information": {
      "last_name": "Tomas2",
      "middle_name": null,
      "life_cycle_state": "FINANCIAL",
      "company_profile": null,
      "title": null,
      "first_name": "Andrew",
      "type": "PERSON",
      "id": "786E6D78AC764BECB616D34D2D61F053",
      "name": "Tomas2 Andrew",
      "company_name": null,
      "demographics": {
        "gender": null,
        "passport_issued_by_country": null,
        "social_security_number": null,
        "passport_number": null,
        "industry_sector": null,
        "country_of_residence": {
          "three_character_code": "CYP",
          "two_character_code": "CY",
          "id": "181",
          "name": "CYPRUS",
          "alternative_code": null
        },
        "name_day": {
          "month": null,
          "day": null
        },
        "date_of_birth": {
          "month": null,
          "day": null,
          "year": null
        },
        "id_number": null,
        "industry": null,
        "id_issued_by_country": null
      }
    },
    "udf_string_3": "udf string 3",
    "udf_string_4": "udf string 4",
    "udf_string_5": "udf string 5",
    "udf_string_6": "udf string 6",
    "udf_string_7": "udf string 7",
    "udf_string_8": "udf string 8",
    "id": "0C6F60B6DE7D4853A6E41E5FE537EDEC",
    "credit_period_operator": "PLUS",
    "balance": 0,
    "outstanding_amount": 0,
    "payment_preferences_set": [
      {
        "default": true,
        "payment_preference": {
          "type": "OTHER",
          "id": "0135CB827A97DC1ECDA7EEA993A8ED09",
          "name": "Bank Transfer Payment",
          "description": null,
          "alternative_code": "BTP"
        },
        "bank_branch": {
          "id": "7559D997AD2DA661F2FC3AFE90257F79",
          "name": " BOC 1",
          "alternative_code": "B1"
        },
        "cards_set": [],
        "id": "4FEEB97864804D57BDF86D4459E887DB",
        "bank": {
          "id": "A5B487FA26F43959188DB9584D2522D5",
          "name": "Bank of Cyprus",
          "alternative_code": "BOC"
        },
        "use_for_recurring_payments": null,
        "account_holder": "Lucia Papapavlou",
        "bank_account_number": "001002003",
        "default_card": null,
        "bank_account_type": {
          "id": "249CEEE1901507788DF83C8758E4716E",
          "name": "Savings Account",
          "alternative_code": null
        }
      }
    ],
    "credit_rating": {
      "name": "key_aaa_-_subject_to_minimal_credit_risk",
      "code": "AAA"
    },
    "classification": {
      "id": "DE3DC5FD43B51C09F7E0573B845ABE08",
      "name": "Standard Customer",
      "alternative_code": "SA"
    },
    "udf_date_1": "2014-05-05T15:49:59",
    "udf_date_2": "2014-06-05T15:49:59",
    "udf_date_3": "2014-07-05T15:49:59",
    "accounting_period": null,
    "udf_date_4": "2014-08-05T15:49:59",
    "billing_address": {
      "udf_string_10": null,
      "street_number": null,
      "care_of": null,
      "udf_string_11": null,
      "udf_float_1": null,
      "street_name": "Thomas V",
      "udf_string_12": null,
      "udf_float_2": null,
      "udf_string_13": null,
      "udf_float_3": null,
      "udf_string_14": null,
      "udf_float_4": null,
      "udf_string_15": null,
      "udf_string_16": null,
      "po_box": null,
      "udf_string_1": null,
      "floor": null,
      "udf_string_2": null,
      "area": null,
      "udf_string_3": null,
      "district": null,
      "udf_string_4": null,
      "udf_string_5": null,
      "udf_string_6": null,
      "udf_string_7": null,
      "state": "Active",
      "udf_string_8": null,
      "udf_string_9": null,
      "country": {
        "three_character_code": "CYP",
        "two_character_code": "CY",
        "id": "181",
        "name": "CYPRUS",
        "alternative_code": null
      },
      "id": "78C14BFC8BB248FFB6A86EC91464E666",
      "postal_code": null,
      "udf_date_1": null,
      "udf_date_2": null,
      "udf_date_3": null,
      "udf_date_4": null,
      "po_box_postal_code": null,
      "apartment_number": null,
      "town_city": null,
      "type": "HOME",
      "municipality": null
    },
    "primary_account": true,
    "owned_by_group": {
      "community_name": "Internal Community",
      "id": "84F33366CB592BAAE7E2044D93611C6A",
      "name": "Main Group",
      "description": "Main Group",
      "alternative_code": "MG1"
    },
    "log_information": {
      "updated_date": "2016-05-17T11:38:10",
      "created_date": "2016-05-17T11:33:35",
      "created_by_unit": {
        "community_name": "Internal Community",
        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
        "name": "Admin Unit",
        "group_name": "Main Group",
        "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",
        "alternative_code": "MG"
      },
      "updated_by_unit": {
        "community_name": "Internal Community",
        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
        "name": "Admin Unit",
        "group_name": "Main Group",
        "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",
        "alternative_code": "MG"
      },
      "created_by_user": {
        "person_name": "MPAdministrator",
        "username": "MPAdministrator",
        "id": "1",
        "email": "sakkascy1986@hotmail.com"
      },
      "updated_by_user": {
        "person_name": "Marios Lannister",
        "username": "MPAdministrator",
        "id": "1"
      }
    },
    "presentment_preferences_set": [
      {
        "state": "ACTIVE",
        "presentment_method": {
          "state": "ACTIVE",
          "type": "EMAIL",
          "id": "06A57761BCC28FA9687C57321F2BEB28",
          "name": "By Email",
          "description": null,
          "contact_information": {
            "last_name": "Spector",
            "middle_name": null,
            "life_cycle_state": "FINANCIAL",
            "company_profile": null,
            "title": null,
            "first_name": "Mathew",
            "type": "PERSON",
            "id": "95548C3522A249E6B452D20C700BA95C",
            "name": "Spector Mathew",
            "company_name": null,
            "demographics": {
              "gender": null,
              "passport_issued_by_country": null,
              "social_security_number": "1245",
              "passport_number": null,
              "industry_sector": null,
              "country_of_residence": {
                "three_character_code": "USA",
                "two_character_code": "US",
                "id": "127",
                "name": "UNITED STATES",
                "alternative_code": null
              },
              "name_day": {
                "month": null,
                "day": null
              },
              "date_of_birth": {
                "month": null,
                "day": null,
                "year": null
              },
              "id_number": "454545",
              "industry": null,
              "id_issued_by_country": null
            }
          },
          "alternative_code": "BE"
        },
        "id": "7528AC290B9D4034907531E495752CBE",
        "email": {
          "notes": null,
          "udf_float_1": null,
          "udf_float_2": null,
          "udf_date_1": null,
          "udf_float_3": null,
          "udf_date_2": null,
          "udf_float_4": null,
          "udf_date_3": null,
          "udf_date_4": null,
          "udf_string_1": null,
          "udf_string_2": null,
          "udf_string_3": null,
          "udf_string_4": null,
          "udf_string_5": null,
          "udf_string_6": null,
          "state": "Active",
          "udf_string_7": null,
          "udf_string_8": null,
          "type": "key_business",
          "id": "66980E70BF9742C9A9A2E0D8EE23CED3",
          "email": "test@gmail.com"
        },
        "phone": null
      }
    ],
    "credit_limit": 10,
    "opening_balance": null,
    "life_cycle_state": "ACTIVE",
    "access_tokens_set": [],
    "opening_balance_date": null,
    "type": "CUSTOMER",
    "credit_limit_status": "NOT_EXCEEDED",
    "description": "premium account"
  }
}



HTTP Method: POST


Request:

http://cyn1lnx004:9080/crmapi/rest/v2/accounts_receivable/update

Body:

{
    "token":"{{token}}",
    "accounts_receivable_identifier":{"number":"ACR0000000269"},
    "name":"Mike 2 Tyson",
    "description":"premium account",
    "notes": "test notes"
}


Response:

{
  "data": {
    "notes": "CRM COM\t5/7/2016 10:01:24\tthere are currently no notes\tCRM COM\t5/7/2016 10:06:41\ttest notes",
    "log_information": {
      "created_by_unit": {
        "alternative_code": "adminunit",
        "group_name": "Main Group",
        "community_name": "Community",
        "name": "Admin Unit",
        "description": "admin unit",
        "id": "1"
      },
      "updated_by_unit": {
        "alternative_code": "adminunit",
        "group_name": "Main Group",
        "community_name": "Community",
        "name": "Admin Unit",
        "description": "admin unit",
        "id": "1"
      },
      "created_date": "2016-07-05T07:01:24",
      "updated_date": "2016-07-05T07:06:41",
      "updated_by_user": {
        "person_name": "CRM COM",
        "id": "1",
        "username": "MPAdministrator"
      },
      "created_by_user": {
        "person_name": "MPAdministrator",
        "id": "1",
        "email": "dev@crm.com",
        "username": "MPAdministrator"
      }
    },
    "payment_preferences_set": [],
    "owned_by_group": {
      "alternative_code": "MG",
      "community_name": "Community",
      "name": "Main Group",
      "description": "Main Group",
      "id": "1"
    },
    "description": "premium account",
    "contact_information": {
      "company_profile": null,
      "company_name": null,
      "name": "Mohammed Tyson J.",
      "last_name": "Tyson J.",
      "id": "79379F71BA344F1387F65709822B9FB1",
      "life_cycle_state": "FINANCIAL",
      "middle_name": null,
      "title": null,
      "type": "PERSON",
      "first_name": "Mohammed",
      "demographics": {
        "name_day": {
          "month": null,
          "day": null
        },
        "id_number": null,
        "gender": null,
        "country_of_residence": {
          "alternative_code": "CYP",
          "three_character_code": "CYP",
          "name": "CYPRUS",
          "id": "181",
          "two_character_code": "CY"
        },
        "date_of_birth": {
          "month": null,
          "year": null,
          "day": null
        },
        "industry_sector": null,
        "passport_number": null,
        "industry": null,
        "social_security_number": null,
        "id_issued_by_country": null,
        "passport_issued_by_country": null
      }
    },
    "billing_address": {
      "apartment_number": null,
      "care_of": null,
      "country": {
        "alternative_code": "CYP",
        "three_character_code": "CYP",
        "name": "CYPRUS",
        "id": "181",
        "two_character_code": "CY"
      },
      "municipality": null,
      "type": "HOME",
      "udf_date_2": null,
      "udf_date_1": null,
      "street_name": "Thomas V",
      "udf_date_4": null,
      "udf_date_3": null,
      "udf_float_3": null,
      "udf_float_4": null,
      "po_box_postal_code": null,
      "udf_string_15": null,
      "udf_string_16": null,
      "udf_string_13": null,
      "udf_string_14": null,
      "udf_string_11": null,
      "udf_string_12": null,
      "id": "43D57FD689A14E7FAE917A94EB273289",
      "state": "Active",
      "udf_string_10": null,
      "floor": null,
      "udf_float_1": null,
      "udf_float_2": null,
      "area": null,
      "udf_string_2": null,
      "udf_string_3": null,
      "udf_string_4": null,
      "udf_string_5": null,
      "udf_string_1": null,
      "po_box": null,
      "town_city": null,
      "district": null,
      "street_number": null,
      "postal_code": null,
      "udf_string_6": null,
      "udf_string_7": null,
      "udf_string_8": null,
      "udf_string_9": null
    },
    "primary_account": true,
    "type": "CUSTOMER",
    "udf_date_2": null,
    "udf_date_1": null,
    "udf_date_4": null,
    "udf_date_3": null,
    "number": "ACR0000000269",
    "udf_float_3": null,
    "udf_float_4": null,
    "balance": 0,
    "credit_period_operator": "PLUS",
    "credit_limit": 10,
    "credit_period": 2,
    "currency": {
      "suffix_symbol": null,
      "prefix_symbol": "€",
      "decimal_part_name": null,
      "code": "EUR",
      "integer_part_name": null,
      "id": "2"
    },
    "id": "0AEDF6606C3243F983471998FB940DEA",
    "opening_balance": 0,
    "udf_float_1": null,
    "udf_float_2": null,
    "udf_string_2": null,
    "opening_balance_date": null,
    "udf_string_3": null,
    "udf_string_4": null,
    "udf_string_5": null,
    "privacy_level": null,
    "presentment_preferences_set": [
      {
        "phone": null,
        "presentment_method": {
          "alternative_code": "E",
          "name": "Email",
          "description": null,
          "contact_information": {
            "company_profile": null,
            "company_name": null,
            "name": "michael may",
            "last_name": "may",
            "id": "7F1D15F4735C4461A2E033FD960DDB10",
            "life_cycle_state": "MARKETING",
            "middle_name": null,
            "title": null,
            "type": "PERSON",
            "first_name": "michael",
            "demographics": {
              "name_day": {
                "month": null,
                "day": null
              },
              "id_number": null,
              "gender": null,
              "country_of_residence": {
                "alternative_code": "IRN",
                "three_character_code": null,
                "name": "IRAN (ISLAMIC REPUBLIC OF)",
                "id": "231",
                "two_character_code": null
              },
              "date_of_birth": {
                "month": null,
                "year": null,
                "day": null
              },
              "industry_sector": null,
              "passport_number": null,
              "industry": null,
              "social_security_number": null,
              "id_issued_by_country": null,
              "passport_issued_by_country": null
            }
          },
          "id": "67EC7B4252DA209B59733125FB248CED",
          "state": "ACTIVE",
          "type": "EMAIL"
        },
        "id": "1115B2672884425D8CF356F68BD19262",
        "state": "ACTIVE",
        "email": {
          "udf_string_2": null,
          "udf_string_3": null,
          "udf_string_4": null,
          "notes": null,
          "udf_string_5": null,
          "udf_string_1": null,
          "type": "BUSINESS",
          "udf_date_2": null,
          "udf_date_1": null,
          "udf_date_4": null,
          "udf_date_3": null,
          "udf_float_3": null,
          "udf_float_4": null,
          "id": "EFCC3C7B76C8406580DA21700BC7FC09",
          "state": "Active",
          "udf_string_6": null,
          "udf_float_1": null,
          "udf_string_7": null,
          "udf_float_2": null,
          "email": "test2@gmail.com",
          "udf_string_8": null
        }
      }
    ],
    "udf_string_1": null,
    "life_cycle_state": "ACTIVE",
    "classification": {
      "alternative_code": "VC",
      "name": "VIP Customer",
      "id": "F36179059928D40AC42DF66A67364021"
    },
    "credit_limit_status": "NOT_EXCEEDED",
    "credit_rating": {
      "code": "AAA",
      "name": "key_aaa_-_subject_to_minimal_credit_risk"
    },
    "name": "Mike 2 Tyson",
    "outstanding_amount": 0,
    "udf_string_6": null,
    "udf_string_7": null,
    "accounting_period": null,
    "access_tokens_set": [],
    "udf_string_8": null
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}