Creates, updates or deletes a company
The company is matched by `ExternalId`. With no match, a new company is created and linked to the external ID, unless `AddRecordIfMatchNotFound` is `false` (it defaults to `true`). With a match, the company's name, legal name, address, phone, fax, web, status, branch, source, record type and mailing flag are all replaced from the request, so an omitted value is saved as empty; the account number is not changed on update, and the address is geocoded again. With a match and `Deleted` `true`, the company is deleted and an empty company object is returned; `Deleted` `false` restores a deleted company. `Status` `Active` is saved as `Account`. `BranchCode` is matched to a branch number, `ProspectSource` to a source name and `RecordType` to a record type name; a value with no match is saved as none. `SalesReps` is currently ignored.
/api/v2/external/companiesAuthentication
Choose one supported method for this request.
Request body
The external ID, the company data and the options described above. `ExternalId` is required.
externalIdstringmodifySourcestringnullableexternalProviderstringnullablebranchCodestringnullableprospectSourcestringnullablerecordTypestringnullabledeletedbooleannullablecategoriesstring[]nullablecompanyNamestringnullablelegalNamestringnullableaccountNostringnullableaddress1stringnullableaddress2stringnullableaddress3stringnullablecitystringnullablestatestringnullablezipstringnullablecountystringnullablecountrystringnullablemailingbooleannullablelatitudenumber · doublenullablelongitudenumber · doublenullablephonestringnullablefaxstringnullablewebstringnullablestatusstringnullableaddRecordIfMatchNotFoundbooleannullable
Responses
Company created, updated or deleted.
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