Company Update

Update company information

PUT companies/:companyId

Request properties

Property Type Description
extraData Json Array Dynamic Key/Value fields that can be added to company
modules Json Array Module code and status to be updated to the company

Modules properties

Property Type Description
Code String The available modules for the company. Possible values are:
  • Agro
Status String The status of the module for the company. Possible values are:
  • Enabled
  • Disabled

Example request:

{
    "extraData": [{
        "label": "Example",
        "value": "Example"
    }],
    "modules": [{
        "code": "Agro",
        "status": "Enabled"
    }]
}
            

Response

Upon successful update of a transaction in the Basecone system, a 200 http status code will be returned. If something goes wrong, an error message with failure details will be given together with a suitable http error status code.

Example successful response

{
    "companyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}
            

Example error response

{
    "message": "One or more validation errors occurred.",
    "code": "validation_error",
    "_metadata":[
        {
        "field": "companyId",
        "message": "The value 'companyId' is not a valid Guid."
        }
    ],
    "_moreInfo": "http://developers.basecone.com/lookup/validation_error"
}

Possible error responses

Status code Error code Details
400 invalid_request_payload User has no access to manage company
400 validation_error Company Id cannot be empty
400 validation_error Request with invalid company Guid
400 validation_error It is only allowed to have 1 company extra data setting
400 validation_error Labels values should be unique
400 validation_error All the given labels must have a value
400 validation_error Company extra data field must contain a maximum of 20 characters
400 validation_error Module neither supported nor enabled to the Office
400 validation_error Invalid module status
401 unauthorized User doesn't have permissions to update company