EN
Español
English
Português
    Publishing a Company

    Petition Details

    • URL Base: {host}/ASMSAPI/
    • URI: api/v9/company/{id}
    • Guy: PUT
    • Required headings:

    • content-type: application/json
    • X-Authorization: Bearer {token}

    URL Description

    • {host}: It represents the domain of the environment in which the API is located.
    • ASMSAPI/: Fixed API prefix.
    • URI: Specific endpoint for the request.


    EXAMPLE URL:

    https://{host}/ASMSAPI/api/v9/company/{id}
    


    Parameters

    Name Data type Obligatory Description
    Address1 Text No First Address Field
    Address2 Text No Second Address Field
    Address3 Text No Third Address Field
    CityId Number No City Identifier
    CityName Text No Descriptive name of the city
    Contact Text No Main contact of the company
    CountryId Number No Country identifier
    CountryName Text Yes Descriptive name of the country
    Description Text No Understanding Corrective Actions
    Email Text No Primary Contact Email
    Ext Text No Primary Contact Phone Extension
    FaxNumber Text No Fax number of the primary contact
    Id Number Yes Company Identifier
    isActive Boolean No True if the company is active
    Location Text No Location
    Mobil Text No Primary contact’s mobile phone number
    Name Text Yes Friendly name of the company
    Nit Text Yes NIT (Tax Identification Number)
    Phone1 Text No The company’s first phone
    Phone2 Text Yes Second phone of the company
    Phone3 Text No Third phone of the company
    StatusId Number Yes State ID
    WebSiteURL Number Yes Website URL
    ProjectId Number Yes Project ID
    ConsoleType Number Yes Identifier of the console originating the request
    RegisterType Number Yes Type of record to be created


    ListAdditionalField}

    Name Data type Obligatory Description
    boolValue Boolean No Boolean value of the additional field
    Description Text No Description of the additional field
    enable Boolean Yes Determines if the additional field is active
    order Number No Order in the list of additional fields
    dateValue Date No Date value of the additional field
    fieldId Number Yes Additional field identifier
    fieldType Number Yes Field Type
    floatValue Number No Decimal value of the additional field
    identifier Text No Additional field identifier
    itemId Stream No Byte value of the file for the additional field
    intValue Number No Value in number for the additional field
    stringValue Text No Text value of the additional field
    mandatory Boolean Yes Whether the additional field is required or not
    Name Text Yes Identifying name of the field
    visible Boolean Yes The additional field must be visible or not on forms
    type Number No Type of object that represents the parent object

    Body of the petition

    {
        "Address1": "Calle 14 # 45 -12",
        "Address2": "Edificio Guia",
        "Address3": "",
        "CityId": 4,
        "CityName": "Cali",
        "Contact": "Servicio al cliente",
        "CountryId": 2,
        "CountryName": "Colombia",
        "Description": "Empresa Guia",
        "Email": "correo@empresaguia.com",
        "Ext": "",
        "FaxNumber": "",
        "Id": "1",
        "isActive": true,
        "Location": "",
        "Mobil": "3111111111",
        "Name": "Guia",
        "Nit": "80090000909",
        "Phone1": "6022002020",
        "Phone2": "6023003030",
        "Phone3": "",
        "StatusId": "1",
        "WebSiteURL": "http://www.empresaguia.com",
        "ProjectId": "25",
        "ConsoleType": 3,
        "RegisterType": 38,
        "listAdditionalField": [
            {
                "boolValue": null,
                "catalogId": null,
                "dateValue": null,
                "fieldId": 977,
                "fieldType": 3,
                "floatValue": null,
                "identifier": "A001",
                "inputStream": null,
                "intValue": 118,
                "stringValue": "Aranda Data Safe",
                "mandatory": true
            }
        ]
    }
    

    Answer

    {
        "Result": true
    }
    

    Response Parameters

    Name Data type Description
    result Boolean Result of the operation

    Error Messages

    Code HTTP status Error Message
    400 BadRequest Parameter Name: Id
    400 BadRequest Parameter Name: ConsoleType
    400 BadRequest Parameter Name: Name
    400 BadRequest Parameter Name: RegisterType
    400 BadRequest InvalidProjectId
    400 BadRequest StateIdIsEmpty
    400 BadRequest InvalidRegisterType
    400 BadRequest InvalidConsole
    403 Forbidden DoNotHavePermissionForThisAction
    500 InternalServerError FailureUpdateCompany