API reference
All operations
COMPANY

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.

POST/api/v2/external/companies

Authentication

Choose one supported method for this request.

OAuth 2.0 client credentialsAPI key

Request body

application/jsonrequired

The external ID, the company data and the options described above. `ExternalId` is required.

UpdateCompanyExternalIdRequest
  • externalIdstring
  • modifySourcestringnullable
  • externalProviderstringnullable
  • branchCodestringnullable
  • prospectSourcestringnullable
  • recordTypestringnullable
  • deletedbooleannullable
  • categoriesstring[]nullable
  • companyNamestringnullable
  • legalNamestringnullable
  • accountNostringnullable
  • address1stringnullable
  • address2stringnullable
  • address3stringnullable
  • citystringnullable
  • statestringnullable
  • zipstringnullable
  • countystringnullable
  • countrystringnullable
  • mailingbooleannullable
  • latitudenumber · doublenullable
  • longitudenumber · doublenullable
  • phonestringnullable
  • faxstringnullable
  • webstringnullable
  • statusstringnullable
  • addRecordIfMatchNotFoundbooleannullable

Responses

Company created, updated or deleted.

Standard response envelopeisSuccessmessageerrorsdata

Read the result from data. When isSuccess is false, errors lists what went wrong. Handling errors

dataCompanyDto
  • companyIdinteger · int32
  • parentIdinteger · int32
  • recordTypeIdinteger · int32
  • branchIdinteger · int32
  • companyNamestring
  • legalNamestring
  • accountNostring
  • address1string
  • address2string
  • address3string
  • citystring
  • statestring
  • zipstring
  • countystring
  • countrystring
  • mailingbooleannullable
  • latitudenumber · double
  • longitudenumber · double
  • phonestring
  • faxstring
  • webstring
  • linkedboolean
  • sourceIdinteger · int32
  • statusstring
  • enteredstring · date-time
  • lastModifiedstring · date-time
  • completeboolean
  • parentNamestring
  • parentAccountNostring
  • assignedRecordTypestring
  • assignedBranchstring
  • assignedNationalAccountsstring
  • assignedNationalAccountIdsstring
  • assignedSourcestring
  • buyIDstring