Partially updates a company
List the names of the company fields to change in `UpdatedFields` (case-insensitive); only those fields are written, and unknown names are ignored. Fields that can be updated this way: `CompanyName`, `LegalName`, `AccountNo`, `Status`, `Address1`, `Address2`, `Address3`, `City`, `State`, `Zip`, `County`, `Country`, `Phone`, `Fax`, `Web`, `RecordTypeId`, `SourceId`, `BranchId`, `ParentId`, `Mailing`, `Longitude` and `Latitude`. The address is geocoded again when an address field changes. Other parts of the body are not controlled by `UpdatedFields`: `Udfs` are saved when sent. `AssignedNationalAccountIds` replaces the company's national accounts when sent (an empty list removes them all), and `SourcewellMemberNo`/`SourcewellMembershipDate` update the Sourcewell membership when sent (an empty member number and no date removes it); leave them out to keep the current values. Unless `UpdatedFields` contains `Address1`, non-empty `AssignedCategories` (by ID) and `AssignedRanks` replace the current ones.
/api/v2/companies/{id}Authentication
Choose one supported method for this request.
Parameters
idpathinteger · int32requiredThe ID of the company to update.
Request body
The fields and values to update, and the list of field names in `UpdatedFields`.
updatedFieldsstring[]requiredsourcewellMemberNostringnullablesourcewellMembershipDatestring · date-timenullableassignedNationalAccountIdsinteger[]nullablemailingbooleanlongitudenumber · doublelatitudenumber · doublecompanyNamestringlegalNamestringnullableaccountNostringstatusstringaddress1stringaddress2stringaddress3stringcitystringstatestringzipstringcountystringcountrystringphonestringfaxstringwebstringrecordTypeIdinteger · int32branchIdinteger · int32parentIdinteger · int32sourceIdinteger · int32assignedRepPrimaryIdinteger · int32assignedRepSecondaryIdsinteger[]
Responses
Company updated successfully.
isSuccessmessageerrorsdataRead the result from data. When isSuccess is false, errors lists what went wrong. Handling errors
companyIdinteger · int32parentIdinteger · int32recordTypeIdinteger · int32branchIdinteger · int32companyNamestringlegalNamestringaccountNostringaddress1stringaddress2stringaddress3stringcitystringstatestringzipstringcountystringcountrystringmailingbooleannullablelatitudenumber · doublelongitudenumber · doublephonestringfaxstringwebstringlinkedbooleansourceIdinteger · int32statusstringenteredstring · date-timelastModifiedstring · date-timecompletebooleanparentNamestringparentAccountNostringassignedRecordTypestringassignedBranchstringassignedNationalAccountsstringassignedNationalAccountIdsstringassignedSourcestringbuyIDstring