Companies
-
Update a company
PUT /api/1/companies/:uuid.jsonFormats
json jsonpUpdate an existing company. Requires a valid company object to be posted. Missing attributes from the object will be merged with the existing company.
Errors
- 401 Unauthorized
- 403 Update Denied - if the user is not allowed to update this company
- 404 Record Not Found - returned if an company with the specified UUID is not found
- 422 Invalid Record - if the company fails validation. An error message will be returned, declaring the error.
Example
PUT /api/1/companies/2226923c-f1f4-428b-8667-3a08999ccc44 { "company": { "name": "Kautzer, Skiles and Hills" } } 200
Parameters
-
company
An company JSON object.
Required-
uuid
A UUID to identify the company. If null, one will be generated
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
name
Name of the company
Required Must be String -
visibility
Sets the visibility of the company. Public companies will be added to all staff; Private companies will only be available to the owner; Custom companies are only available to users in the user_uuids array
Optional Must be one of: public, private, custom. -
contact_salutation
Salutation of the contact at the company
Optional Must be String -
contact_first_name
First name of the contact at the company
Optional Must be String -
contact_last_name
Last name of the contact at the company
Optional Must be String -
contact_email_address
Email address of the contact at the company
Optional Must be String -
contact_position
The position of the contact at the company
Optional Must be String -
contact_home_phone
Home phone number of the contact at the company
Optional Must be String -
contact_mobile_phone
Mobile phone number of the contact at the company
Optional Must be String -
website
Web address of the company
Optional Must be String -
main_phone
Phone number of the company
Optional Must be String -
fax_phone
Fax number of the company
Optional Must be String -
main_address
Street address of the company
Optional Must be String -
main_city
City the company resides in
Optional Must be String -
main_state
State the company resides in
Optional Must be String -
main_postcode
Postcode of the company
Optional Must be String -
main_country
Country the company resides in
Optional Must be String -
notes
Notes associated with the company
Optional Must be String -
user_uuids
Array of User UUIDs that can see the company. Requires visibility to be set to ‘custom’
Optional Must be Array -
longitude
Longitude of the company. If blank, we’ll try to guess from the address (Requires all address fields to be complete).
Optional Must be Float -
latitude
Latitude of the company. If blank, we’ll try to guess from the address (Requires all address fields to be complete).s
Optional Must be Float
-