EN
Español
English
Português
    Company Management

    This section describes the operations related to the management of companies (creation, edition).

    Add a Company

    Petition Details

    • URI: api/v8.6/company/add/{projectId}/type/{type}
    • Type: POST
    • Required headings:

    • content-type: application/json
    • Authorization: TOKEN

    Parameters

    Name Data type Obligatory Description
    projectId Number Yes Id of the project in which the company will be created.
    type Number Yes 1 = Company, 2 = Supplier
    ALIAS Text Yes Company aliases.
    LATITUDE Number No Latitude location company.
    LENGTH Number No Length location company
    GOOGLEADDRES Text No Address saved on the map
    (geolocation)      
    NIT Text Yes Company identifier.
    WEBSITE Text No Website
    EMAIL Text No Email
    DESCRIPTION Text No Company description.
    CONTACT Text No Contact name.
    COMPANYNAME Text Yes Company name.
    COUNTRYID Number No country id.
    CITYID Number No City ID.
    ADDRESS Text No Address 1.
    ADDRESS2 Text No Address 2.
    ADDRESS3 Text No Address 3.
    ADDITIONALFIELD1 Text No Additional field.
    ADDITIONALFIELD2 Text No Additional field.
    ADDITIONALFIELD3 Text No Additional field.
    ADDITIONALFIELD4 Text No Additional field.
    ADDITIONALFIELD5 Text No Additional field.
    ADDITIONALFIELD6 Text No Additional field.
    ADDITIONALFIELD7 Text No Additional field.
    ADDITIONALFIELD8 Text No Additional field.
    ADDITIONALFIELD9 Text No Additional field.
    ADDITIONALFIELD10 Text No Additional field.
    STATEID Number No Status ID. The value 1..

    Body of the petition

    In Field, you can use the parameters described above, except for the URI (projectId, type). The minimum values for creation are as follows.

    [
        {
            "Field": "ALIAS",
            "Value": "Aranda test"
        },
        {
            "Field": "NIT",
            "Value": "9052646"
        },
        {
            "Field": "COMPANYNAME",
            "Value": "Aranda test"
        },
        {
            "Field": "STATEID",
            "Value": "1"
        }
    ]
    

    Answer

    The service will return an integer which is the id of the created company, example: 10091

    Error messages

    Code HTTP status Error Message
    400 BadRequest InvalidProjectId
    400 BadRequest InvalidType
    400 BadRequest InvalidCompany
    400 BadRequest InvalidCompanyAlias
    400 BadRequest InvalidCompanyId


    Edit a Company

    Petition Details

    • URI: api/v8.6/company/update/{projectId}/{id}
    • Type: POST
    • Required headings:

    • content-type: application/json
    • Authorization: TOKEN

    Parameters

    Name Data type Obligatory Description
    projectId Number Yes Id of the project to which the company belongs.
    Id Number Yes Company ID
    LATITUDE Number No Latitude location company.
    LENGTH Number No Length location company
    GOOGLEADDRES Text No  
    NIT Text Yes Company identifier.
    WEBSITE Text No Website
    EMAIL Text No Email
    DESCRIPTION Text No Company description.
    CONTACT Text No Contact name.
    COMPANYNAME Text Yes Company name.
    COUNTRYID Number No country id.
    CITYID Number No City ID.
    ADDRESS Text No Address 1.
    ADDRESS2 Text No Address 2.
    ADDRESS3 Text No Address 3.
    ADDITIONALFIELD1 Text No Additional field.
    ADDITIONALFIELD2 Text No Additional field.
    ADDITIONALFIELD3 Text No Additional field.
    ADDITIONALFIELD4 Text No Additional field.
    ADDITIONALFIELD5 Text No Additional field.
    ADDITIONALFIELD6 Text No Additional field.
    ADDITIONALFIELD7 Text No Additional field.
    ADDITIONALFIELD8 Text No Additional field.
    ADDITIONALFIELD9 Text No Additional field.
    ADDITIONALFIELD10 Text No Additional field.
    STATEID Number No Status ID. The value 1..

    Body of the petition

    In Field, you can use the parameters described above, except for the URI (projectId, id).

    [
        {
        "Field": "COMPANYNAME",
        "Value": "Aranda edit"
        }
       ]
    

    Answer

    The service will return a boolean indicating whether the operation has been carried out. Example: true indicates that the edition was successful.

    Error messages

    Code HTTP status Error Message
    400 BadRequest InvalidProjectId
    400 BadRequest InvalidCompanyId
    500 InternalServerError FailureUpdateCompany