PATCH/desk/api/v2/companies/{id}.json

Update a company.

Update all the given properties for this resource. Any omitted properties will be unchanged. Customers can be added to a company via the 'includes: customers' field. Customers can be removed by specifying 'delete: true' on the customers: [] relationship.

Path Params

  • Name
    id
    Type
    integer
    required
    Description

Body Params

CompanyAPIBody is the request/response format for the API

    • Name
      company
      Type
      object
      Description
      A Company is a group of customers.
    • Name
      createInProjects
      Type
      boolean
      Description
      CreateInProjects is a flag that indicates wether or not we should create a client for this company in Teamwork Projects
    • Name
      included
      Type
      object
      Description
      Included allows adding referenced objects on the API response. The included keys should map to the `types` in the Relationship slices/objects.

    Responses

    • Code
      200
      Type
      object
      Schema
      Description
      200 OK
      CompanyAPIBody is the request/response format for the API
    • Code
      400
      Type
      object
      Schema
      Description
      400 Bad Request
      Validator hold the validation errors. Typically you shouldn't create this directly but use the New() function.

    Examples

    200 OK

    CompanyAPIBody
    {  "company": {    "address": {      "delete": true,      "id": 0,      "meta": {},      "type": 0    },    "avatarPath": "string",    "createdAt": "2024-07-26T20:26:10.533Z",    "createdBy": {      "delete": true,      "id": 0,      "meta": {},      "type": 0    },    "customers": [      {