Developer Resources

API / (PUT) Update Company

This API call updates an existing company and returns it.
HTTP-, API- or Beetil-specific errors will be returned otherwise.

API URL
https://youraccount.beetil.com/external_api/v1/companies/:id.format
HTTP Method
PUT




URL parameters

ParameterFormatDefaultMandatory
idintegerYes




PUT parameters

ParameterFormatDefaultMandatory
namestringYes
emailstringNo
office_phonestringNo
mobile_phonestringNo
other_phonestringNo
faxstringNo
websitestringNo
addressstringNo
notesstringNo


These parameters are encapsulated into a 'company' parameter. See the examples below.





Example PUT
{
  "company": {
    "address": "",
    "other_phone": "",
    "name": "foo bar",
    "office_phone": "",
    "notes": "",
    "website": "",
    "fax": "",
    "mobile_phone": "",
    "email": "foo@bar.com"
  }
}




Example PUT Response
{
  "result": {
    "company": "JSON string similar to GET companies/:id"
  },
  "version": "1.0",
  "status": "Success"
}




Example Error
{
  "errors": [
    {
      "error": "[E400] name can't be blank"
    }
  ],
  "version": "1.0",
  "status": "Failed"
}




Last updated 31 January 2011