The following macros are not currently supported in the header:
- style
PUT /companies/:id
Resource URL
Update a company object.
PUT /companies/:id POST /companies/:id?_method=put
Parameters
Table of allowed parameters.
website | string | The new company's website |
---|---|---|
phone | string | The new company's phone number. |
fax | string | The new company's fax. |
notes | string | Notes to be stored against the new company. |
forced_status_id | unsigned integer | Changing a company status is subject to progressions, which when requires user interactions can be quite complex to achieve through a restful api. To work around this we do allow you to forcefully update an id, which bypasses all progressions. Please do not this argument if you want progressions to be respected in your changes. Feature restricted Currently this parameter is feature restricted and experimental. If you would like to use, please contact support and we can switch the feature on for you. Please reference this documentation and the feature "allow_forced_status_id". |
_fields | partial string | Allows you to specify optional fields and linked objects to include in the response. |
Handling the response
Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields
 parameter; see included examples. Underlined values are default.
id | unsigned int | |
---|---|---|
name | string | |
website | string | |
standing | string | |
status | unsigned int or object | |
phone | string | |
fax | string | |
date_created | unsigned int | |
date_modified | unsigned int | |
comments | string | |
contact | unsigned int or object |
Sample Response
PUT /companies/4.json?phone=123456789&_fields=phone
{ "response" : {Â "name" : "BobsHouse", "id" : "4", "phone": "123456789" }, "meta" : { "status" : "ok", "message" : "Everything executed as expected." } }