Otiima API Documentation

Overview

This documentation provides details on the available API endpoints for the Otiima API. You can find the following endpoints for development at https://api.otiima.com/dev/bim/ and production at https://api.otiima.com/prod/bim/.

Profiles API

Endpoint: profiles.php

Profile Data API

This API retrieves the accessories, machinations, and detailed profile information including measurement units associated with a specific profile based on the provided system, series, and profile position. The profile must be mapped to both the system and the series, and the accessories/machinations depend on the profile's position. The endpoint will return an error if the combination of profile, system, series, and position is not valid.

Endpoint

URL: https://api.otiima.com/dev/bim/profile_data.php

Method: GET

Required Parameters

Accepted Profile Positions [PositionCode]

Example Request

GET: /profile_data.php?SystemCode=CLASSIC&SerieCode=38&ProfileCode=L65001&PositionCode=SUP

URL Example: https://api.otiima.com/dev/bim/profile_data.php?SystemCode=CLASSIC&SerieCode=38&ProfileCode=L65001&PositionCode=POS01

Example Response


{
    "ProfileInfo": {
        "ProfileCode": "L65001",
        "ProfileDescription": "ARO 1R",
        "TheoryWeight": 1.551,
        "TheoryWeightUnit": "kg",
        "AreaPerLinearMeter": 0.473,
        "AreaPerLinearMeterUnit": "m²",
        "Width": 1200,
        "WidthUnit": "mm",
        "Height": 2100,
        "HeightUnit": "mm"
    },
    "ProfileParameters": [
        {
            "ParameterCode": "P01",
            "ParameterName": "Parameter 1",
            "Formula": "width * height",
            "Value": "..."
        }
    ],
    "Accessories": [
        {
            "AccessoryCode": "ACC01",
            "AccessoryDescription": "Accessory 1",
            "AccessoryQuantity": 2,
            "Parameters": [
                {
                    "ParameterCode": "A01",
                    "ParameterName": "Parameter 1",
                    "Formula": "quantity * factor",
                    "Value": "..."
                }
            ]
        }
    ],
    "Machinations": [
        {
            "MachinationCode": "M01",
            "MachinationDescription": "Machination 1",
            "Parameters": [
                {
                    "ParameterCode": "M01P",
                    "ParameterName": "Machination Param 1",
                    "Formula": "width / factor",
                    "Value": "..."
                }
            ]
        }
    ]
}
    

Error Handling

Notes

This endpoint validates that the combination of profile, system, series, and position is correct before returning any data. It returns the list of accessories and machinations related to the profile and position if the combination is valid. Additionally, the profile information includes the measurement units for key attributes.

Profiles Combined API

Endpoint: profiles_combined.php

Example Response:

[
    {
        "ProfileInfo": {
            "ProfileCode": "L65001",
            "ProfileDescription": "ARO 1R",
            "TheoryWeight": 1.551,
            "AreaPerLinearMeter": 0.473,
            "isActive": 1
        },
        "Machinations": [
            {
                "MachinationCode": "DRN",
                "MachinationDescription": "Drenagens STD"
            }
        ]
    },
    {
        "ProfileInfo": {
            "ProfileCode": "L65002",
            "ProfileDescription": "ARO 2R",
            "TheoryWeight": 2.0,
            "AreaPerLinearMeter": 0.670,
            "isActive": 1
        },
        "Machinations": [
            {
                "MachinationCode": "ES01",
                "MachinationDescription": "Esquadros STD"
            }
        ]
    },
    {
        "CombinedAccessories": [
            {
                "AccessoryCode": "ACC003",
                "AccessoryDescription": "Combination Accessory 1",
                "CombinationProfiles": "L65001,L65002",
                "isActive": 1
            }
        ]
    }
]

Accessories API

Endpoint: accessories.php

Example Response:

[
    {
        "AccessoryCode": "ACC001",
        "AccessoryDescription": "Standard Accessory 1",
        "Destination": "Production",
        "isActive": 1,
        "AccessoryType": "Standard"
    },
    {
        "AccessoryCode": "ACC002",
        "AccessoryDescription": "Combination Accessory 1",
        "Destination": "On-site",
        "isActive": 1,
        "CombinationProfiles": "L65001,L65002",
        "AccessoryType": "Combination"
    }
]

Series API

Endpoint: series.php

Example Response:

{
    "SerieCode": "38",
    "SystemCode": "CLASSIC",
    "Description": "Series 38",
    "isActive": 1
}

Systems API

Endpoint: systems.php

Example Response:

[
    {
        "SystemCode": "CLASSIC",
        "Description": "Classic System",
        "isActive": 1
    },
    {
        "SystemCode": "FUSION",
        "Description": "Fusion 1.0 System",
        "isActive": 1
    }
]

Windows API

This API allows you to retrieve detailed information about windows, including related descriptions for various codes such as BrandCode, SystemCode, SerieCode, and more. You can also create, update, and delete windows in the system. The windows can be queried by their unique WindowCode.

Endpoint

URL: https://api.otiima.com/dev/bim/windows.php

Method: GET, POST, PUT, DELETE

GET Request

Retrieve the details of all windows or a specific window based on the WindowCode. The response includes descriptions of related codes (e.g., system, series, brand).

Required Parameter

Example Request

GET /windows.php?WindowCode=WINDOW001

URL Example:

https://api.otiima.com/dev/bim/windows.php?WindowCode=WINDOW001

Example Response

{
    "WindowCode": "WINDOW001",
    "BrandCode": "BRAND01",
    "BrandName": "Otiima",
    "SystemCode": "SYS001",
    "SystemName": "Classic System",
    "SerieCode": "SER001",
    "SerieName": "Series 38",
    "OpeningTypeCode": "OP01",
    "OpeningTypeName": "Tilt & Turn",
    "InstallationTypeCode": "INST01",
    "InstallationTypeName": "Standard",
    "GeometryCode": "GEOM01",
    "GeometryName": "Rectangular",
    "LeavesCode": "LV01",
    "NumberOfLeaves": 2,
    "SequenceCode": "SEQ01",
    "SequenceDescription": "Sequence A",
    "RailsCode": "RL01",
    "NumberOfRails": 2,
    "WindowTypeCode": "WT01",
    "WindowTypeName": "Casement Window",
    "Comments": "Some comments",
    "IsActive": 1,
    "CreatedDate": "2024-10-24"
}

Error Handling

POST Request

Create a new window with the provided information.

Required Parameters

Example Request

POST /windows.php
{
    "WindowCode": "WINDOW001",
    "BrandCode": "BRAND01",
    "SystemCode": "SYS001",
    "SerieCode": "SER001",
    "OpeningTypeCode": "OP01",
    "InstallationTypeCode": "INST01",
    "GeometryCode": "GEOM01",
    "LeavesCode": "LV01",
    "SequenceCode": "SEQ01",
    "RailsCode": "RL01",
    "WindowTypeCode": "WT01",
    "Comments": "Some comments",
    "IsActive": 1,
    "CreatedDate": "2024-10-24"
}

Example Response

{
    "message": "Window created successfully"
}

PUT Request

Update an existing window by providing the updated details. The WindowCode must be provided to identify the window to be updated.

Example Request

PUT /windows.php
{
    "WindowCode": "WINDOW001",
    "BrandCode": "BRAND01",
    "SystemCode": "SYS001",
    "SerieCode": "SER001",
    "OpeningTypeCode": "OP02",
    "InstallationTypeCode": "INST02",
    "GeometryCode": "GEOM02",
    "LeavesCode": "LV02",
    "SequenceCode": "SEQ02",
    "RailsCode": "RL02",
    "WindowTypeCode": "WT02",
    "Comments": "Updated comments",
    "IsActive": 1,
    "CreatedDate": "2024-10-24"
}

Example Response

{
    "message": "Window updated successfully"
}

DELETE Request

Delete an existing window by specifying the WindowCode of the window to be deleted.

Required Parameter

Example Request

DELETE /windows.php?WindowCode=WINDOW001

Example Response

{
    "message": "Window deleted successfully"
}

Error Handling