AccountEdit(
     object Account 
)

Available since RPM 28.

Modify a Customer Account. It allows changing the account’s name, account group, location, assigned rep, and basic fields.

It does not allow changing an account’s Supplier or moving the account to a different Customer.

Request

Request Data:

  • (object) Account(required)
    • (int) AccountID (required) – ID of the account to modify
    • (string) Name (optional) – Account Name
    • (int) LocationID (optional) – Identify the Location by ID.
    • (string) LocationName (optional) – Identify the Location by Name (it will be ignored if LocationID is provided.
    • (int) AssignedRepID (optional) – Identify the account’s Assigned Rep by ID.
    • (string) AssignedRep (optional) – Identify the account’s Assigned Rep by Name (it will be ignored if AssignedRepID is provided). Must be used along with AssignedRepAgencyID or AssignedRepAgency.
      • (int) AssignedRepAgencyID (optional) – identify the named rep by agency ID (if provided.
      • (string) AssignedRepAgency (optional) – identify the named rep by agency name (it will be ignored if AssignedRepAgencyID is provided).
    • (int) AccountGroupID (optional) – Identify the Account Group by ID.
    • (string) AccountGroupName (optional) – Identify the Account Group by Name (it will be ignored if AccountGroupID is provided
    • (array) Fields (required) – list of custom fields object.
{
    "Account":
    {
        "Name": <string>,
        "LocationID": <int>,
        "LocationName": <string>,
        "AccountGroupID": <int>,
        "AssignedRep": <string>,
        "AssignedRepID": <int>,
        "AccountGroupName": <string>,
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            },
            <... more custom fields>
        ]
    }
}

Response

Same JSON structure as the Account Endpoint

Errors

  • “Permission denied”
    This endpoint requires the user’s role to have “Commissions section” and “Commissions setup”
  • “A unique account number is required”
  • “The location specified is not valid” – When the specified Location does not does not exist for the account’s customer
  • “A valid rep is required” – if the Assigned Rep provided does not exist.
  • “Account group not found” – if the provided Account Group was not found for the account’s supplier.