Add or Update Company

MT
Last updated 4 months ago

post
Add or Update Company

[PlatformAddress]/api/1.0/contact?action=addOrUpdateCompany
Add or update company details
Request
Response
Path Parameters
id
required
integer
The company's identifier. (Leave empty to add the company to the system)
externalId
optional
string
Optionally a unique identifier of the company that is managed by an external application
businessName
optional
string
The company's business name. (Mandatory if adding a new company)
tradingName
optional
string
The company's trading name
businessNumber
optional
string
The company's registration number
phone
optional
string
The company's phone number
fax
optional
string
The company's fax number
website
optional
string
The company's website
email
optional
string
The company's email address
address
required
string
The company's address. This is an object with the keys stateCode, postalCode and countryCode are required when adding a new Company.
200: OK
Adding a company
{
"success": true,
"id": 1618
}
‚Äč
Updating a company
{
"id": 1618
}

Example Request: Adding a company

{
"businessName": "New Company",
"tradingName": "ABC",
"email": "company@test.com",
"address": {
"line1": "address line 1",
"line2": "address line 2",
"stateCode": "QLD",
"postalCode": "4227",
"countryCode": "AU"
}
}

Example Request: Updating a Company

{
"id": 1618,
"businessName": "Updated Company name",
"address": {
"line1": "address line 11",
"line2": "address line 22",
"stateCode": "QLD",
"postalCode": "4227",
"countryCode": "AU"
}
}

Keys

keys

line1

line2

line3

line4

city

stateCode (e.g: QLD)

countryCode (e.g: AU)

postalCode

Returns

Property

Description

success

If the company was successfully added or updated

id

The unique identifier for the company

message

Message of the failure (if success was false)

This call takes values for a company, and either

  1. Updates the values for that company (after you have provided an id in the parameters), or

  2. Adds the company to the system (if the id parameter is missing)

The result of this call will contain the status of the result (either true or false) and the company identifier of the updated or newly created company.

The properties of the company currently supported are:

  • businessName

  • externalId

  • tradingName

  • businessNumber

  • phone

  • fax

  • website

  • email

  • address

    • This is an object