---
# System prepended metadata

title: BIM API

---

# BIM API
## Uniformat
### `GET api/Uniformat/GetUniformatList` 
- get uniformat list of company

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required           | number |
| categoryId    |    | number |
| textSearch    |             | string |
| filterLevel    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId      |             | number |
| uniformatCode  |             | string |
| uniformatLevel  |             | number |
| uniformatName  |             | string |
| uniformatParentId  |             | number |
| uniformatRevitCategory  |             | string |
| formulaId | | number? |
| haveFormula | | boolean|
| subUniformat    |     | UniformatListDto[] |

**UniformatListDto**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId      |             | number |
| uniformatCode  |             | string |
| uniformatLevel  |             | number |
| uniformatName  |             | string |
| uniformatParentId  |             | number |
| uniformatRevitCategory  |             | string |
| formulaId | | number? |
| haveFormula | | boolean|
| subUniformat    |     | UniformatListDto[] |

#### Example Request

api/Uniformat/GetUniformatList?companyId=1&categoryId=0&textSearch=&filterLevel=0

#### Example Response
```json
{
    "data": [
      {
        "uniformatId": 2,
        "uniformatName": "Shells edit uniformat",
        "uniformatCode": "B",
        "uniformatParentId": 0,
        "uniformatLevel": 1,
        "uniformatRevitCategory": "Structural Foundation",
        "subUniformat": [
          {
            "uniformatId": 3,
            "uniformatName": "Building Subdrainage",
            "uniformatCode": "30",
            "uniformatParentId": 2,
            "uniformatLevel": 2,
            "uniformatRevitCategory": "Excavation",
            "subUniformat": [
              {
                "uniformatId": 4,
                "uniformatName": "Radon mitigation",
                "uniformatCode": "10",
                "uniformatParentId": 3,
                "uniformatLevel": 3,
                "uniformatRevitCategory": "Excavation",
                "subUniformat": null
              },
              {
                "uniformatId": 5,
                "uniformatName": "Methane mitigation",
                "uniformatCode": "20",
                "uniformatParentId": 3,
                "uniformatLevel": 3,
                "uniformatRevitCategory": "Excavation",
                "subUniformat": null
              }
            ]
          }
        ]
      }
]
  "status": 200,
  "message": "success"
}
```
Template UnitPrice 
https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template_UnitPrice.xlsx



### `GET api/Uniformat/GetFormulaDetail` 
- get formula detail of uniformat

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId    | required            | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| formulaItemId      |             | number |
| formulaItemCalcForm  |             | string |
| masterformatId  |             | number |
| masterformatCode  |             | string |
| masterformatName  |             | number |
| formulaParamItemList  |             | FormulaParamItemList[] |

**FormulaParamItemList**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| formulaParamItemId      |             | number |
| formulaParamItemName  |             | string |
| formulaParamItemCalc  |             | string |

#### Example Request
```
api/Uniformat/GetFormulaDetail?uniformatId=1
```
#### Example Response
```json
{
    "data": [
        {
          "formulaItemId": 1,
          "formulaItemCalcForm": "({F-01}+{F-02}) * 100",
          "masterformatId": 1,
          "masterformatCode": "01.00.00",
          "masterformatName": "Masterformat1",
          "formulaParamItemList": 
          {
              "formulaParamItemId" : 1
              "formulaParamItemName" : "Vol. Footing"
              "formulaParamItemCalc" : "{B-01}*{B-02}*{P-01}"
          }
        },
        {
          "formulaItemId": 2,
          "formulaItemCalcForm": "({F-01}+{F-02}) * 100",
          "masterformatId": 1,
          "masterformatCode": "02.00.00",
          "masterformatName": "Masterformat2",
          "formulaParamItemList": 
          {
              "formulaParamItemId" : 1
              "formulaParamItemName" : "Vol. Lean"
              "formulaParamItemCalc" : "{B-01}*{B-02}*{P-01}"
          }
        }
  ]
  "status": 0,
  "message": "string"
}
```
### `GET api/Uniformat/GetUniformatCategoryList` 
- get uniformat category list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required            | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| categoryId      |             | number |
| categoryName |             | string |

#### Example Request
```
api/Uniformat/GetUniformatCategoryList?companyId=1
```
#### Example Response
```json
{
    "data": [
        {
          "categoryId": 1,
          "categoryName": "Category1",
        },
        {
          "categoryId": 2,
          "categoryName": "Category2",
        }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Uniformat/GetUniformatListByCategory` 
- get uniformat list by category

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| categoryId    | required            | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId      |             | number |
| uniformatName |             | string |

#### Example Request
```
api/Uniformat/GetUniformatListByCategory?categoryId=1
```
#### Example Response
```json
{
    "data": [
        {
          "UniformatId": 1,
          "UniformatName": "Uniformat1",
        },
        {
          "uniformatId": 2,
          "uniformatName": "Uniformat2",
        }
  ]
  "status": 0,
  "message": "string"
}
```
### `POST api/Uniformat/CopyFormulaDetail` 
- copy formula detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId    |   required          | number |
| copyUniformatId    | required            | number |
| companyId    | required            | number |
| userId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |
#### Example Request
```json
{
    "uniformatId": 1
    "copyUniformatId": 2,
    "companyId": 1,
    "userId" : 1
}
```
#### Example Response
```json
{
    "data": true
  "status": 200,
  "message": "success"
}
```
### `POST api/Uniformat/EditUniformat` 
- edit uniformat detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId    |   required          | number |
| uniformatName    | required            | string |
| categoryId    | required            | number |
| userId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |
#### Example Request
```json
{
    "uniformatId": 1
    "uniformatName": 2,
    "categoryId": 1,
    "userId" : 1
}
```
#### Example Response
```json
{
    "data": true
  "status": 200,
  "message": "string"
}
```
### `DELETE api/Uniformat/DeleteUniformat` 
- delete uniformat data

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId    | required            | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```
api/Uniformat/DeleteUniformat?uniformatId=1
```

#### Example Response
```json
{
    "data": true
  "status": 200,
  "message": "success"
}
```
### `DELETE api/Uniformat/DeleteFormulaMasterFormat` 
- delete formula item data

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| formulaItemId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```
api/Uniformat/DeleteFormulaMasterFormat?formulaItemId=1
```

#### Example Response
```json
{
    "data": true
  "status": 200,
  "message": "success"
}
```
### `DELETE api/Uniformat/DeleteFormula` 
- delete formula item at add/edit uniformat

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required   | number |
| formulaId    |  required   | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```
api/Uniformat/DeleteFormulaMasterFormat?companyId=1&
```

#### Example Response
```json
{
    "data": true
  "status": 200,
  "message": "success"
}
```
### `POST api/Uniformat/CreateFormula` 
- Create Formula

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId  |             | number |
| uniformatId |             | number|
| createdId |                | number|
| formulaItem |             | list<FormulaItemCreateModel>|

* **FormulaItemCreateModel**

| Parameter | Description | Schema |
| -------- | -------- | -------- |
| formulaItemCalForm | | string     |
| formulaMasterFormat| | list<FormulaMasterFormatModel> |
| formulaParamItems| | list<FormulaParamItemModel> |

* **FormulaMasterFormatModel**

| Parameter            | Description | Schema                         |
| -------------------- | ----------- | ------------------------------ |
| masterformatId       |             | number                         |
| masterformatUnitId| | number |
| masterformatUnitName| | string|
| masterformatValue| | number |

* **FormulaParamItemModel**

| Parameter            | Description | Schema|
| -------------------- | ----------- | ----------- |
| paramItemIndex| | number|
| paramItemName| | string|
| paramItemCalForm| | string |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | bool |

#### Example Request
```json
{    
    "companyId": 1,
    "uniformatId": 2,
    "createdId": 3,
    "formatItem": [
                    {
                        "formulaItemCalForm": "({F-01}+{F-02}) * 100",
                        "formulaMasterFormat": [
                            {
                                "masterformatId": 2,
                                "masterformatUnitId": 1,
                                "masterformatUnitName": "Cum.",
                                "masterformatValue": 0.5
                            }
                        ],
                        "formulaParamItems": [
                        {
                            "paramItemIndex": 1,
                            "paramItemName": "Vol. Footing",
                            "paramItemCalForm": "{B-01}*{B-02}*{P-01}"
                        },
                        {
                            "paramItemIndex": 2,
                            "paramItemName": "Vol. Lean",
                            "paramItemCalForm": "{B-01}*{B-02}*{B-03}"
                        }
                    
                        ]
                    }
                  ]
}
```

#### Example Response
```json
{    
    "data": true,
  "status": 200,
  "message": "success"
}
```

### `POST api/Uniformat/ImportUniformatFile`
- import Uniformat excel file

**Request**
| Parameter | Description | Schema |
| --------- | ----------- | ------ |
| companyId | required    | number |
| importFile | required | IFormFile |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| uniformatData | |List<UniformatFromImportDto>|
| countDuplicateUniformat |             | number|
| countNewUniformat |             | number |

* UniformatFromImportDto

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| uniformatCode  || string |
| uniformatName  |             | string|
| uniformatLevel |             | number|
| uniformatCategoryCode | | string |
| uniformatCategoryName | | string |
| isDuplicate | | bool |
| duplicateUniformatId | | number |


#### Example Request
```
form-data
{
    "companyId": 1,
    "importFile": (binary)
}
```

#### Example Response
``` json
{
    "data": [
        {
          "countNewUniformat": 2,
          "countDuplicateUniformat": 0,
          "uniformatData": [
              {
                  "uniformatCode": "A",
                  "uniformatName": "",
                  "uniformatLevel": 1,
                  "uniformatCategoryCode": "",
                  "uniformatCategoryName": "",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "uniformatCode": "A.1",
                  "uniformatName": "",
                  "uniformatLevel": 2,
                  "uniformatCategoryCode": "",
                  "uniformatCategoryName": "",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
        }
  ]
  "status": 200,
  "message": "success"
}
```

### `POST api/Uniformat/ConfirmImportUniformat`
* confirm Import Uniformat Data

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required            | number |
| importUserId | | number |
| confirmSelected | AddOnlyNewUniformat = 1 AddNewUniformatAndEdit = 2 | number |
| uniformatData | | List<UniformatFromImportDto> |

* UniformatFromImportDto

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| uniformatCode  || string |
| uniformatName  |             | string|
| uniformatLevel |             | number|
| uniformatCategoryCode | | string |
| uniformatCategoryName | | string |
| isDuplicate | | bool |
| duplicateUniformatId | | number |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| importCount | | number|

#### Example Request
``` json
{
    "companyId": 1,
    "importUserId": 1,
    "confirmSelected": 1,
    "uniformatData": : [
              {
                  "uniformatCode": "A",
                  "uniformatName": "",
                  "uniformatLevel": 1,
                  "uniformatCategoryCode": "",
                  "uniformatCategoryName": "",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "uniformatCode": "A.1",
                  "uniformatName": "",
                  "uniformatLevel": 2,
                  "uniformatCategoryCode": "",
                  "uniformatCategoryName": "",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
}
```

#### Example Response
``` json
{
    "data": 2
    "status": 200,
    "message": "success"
}
```

### `Uniformat Template Download Url`
- https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template-Uniformat.xlsx

### `GET api/Uniformat/GetUniformatSelectorList` 
- get uniformat selector list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| uniformatId      |             | number |
| uniformatCode  |             | string |

#### Example Request
```
api/Uniformat/GetUniformatSelectorList?companyId=1
```

#### Example Response
```json
{
    "data": [
        {
          "uniformatId": 1,
          "uniformatCode": ""
        }
  ],
  "status": 200,
  "message": "success"
}
```


## Company
### `GET api/Company/GetCompanyInfoDetail` 
- get a info detail of company

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required            | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId      |             | number |
| companyAddress  |             | string |
| companyLogoUrl  |             | string |
| companyName  |             | string |

#### Example Request
```
api/Company/GetCompanyInfoDetail?companyId=1
```

#### Example Response
```json
{
    "data": [
        {
          "companyId": 1,
          "companyAddress": "Company Address 1",
          "companyLogoUrl": "https://sourcing-platform.s3-ap-southeast-1.amazonaws.com/manual-file/UserManualForVendor.jpeg",
          "companyName": "company_1",
        }
  ],
  "status": 200,
  "message": "success"
}
```
### `POST api/Company/UpdateCompany` 
- edit/update company detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| companyName    |             | string |
| companyBio    |             | string |
| userId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
{
    "companyId" : 1
    "companyName" : "Company 1"
    "companyBio" : "Test"
    "userId" : 1
}
```
#### Example Response
```json
{
    "data": true,
  "status": 200,
  "message": "success"
}
```

### `DELETE api/Project/DeleteProject` 
- delete project

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```
api/Project/DeleteProject?projectId=1
```

#### Example Response
```json
{
  "data": true
  "status": 200,
  "message": "success"
}
```

## Project
### `POST api/Project/CreateProject` 
- create project

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectName   |             | string |
| projectCode   |             | string |
| projectOwner   |             | string |
| projectLocationCode   |             | string |
| projectLocationName   |             | string |
| projectDescription   |             | string |
| userId   |             | number |
| projectStartDate   |             | date |
| projectFinishDate   |             | date |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
{
    "companyId" : 1
    "projectName" : "Project Test 3"
    "projectCode" : "Project Info 0103"
    "projectOwner" : 0
    "projectLocationCode" : "12444545"
    "projectLocationName" : "Sathon 12, Bangkok"
    "projectDescription" : "Post on August 12,2011 by puguhyulianto."
    "userId" : 1
    "projectStartDate" :
    "projectFinishDate" :
}
```
#### Example Response
```json
{
    "data": true,
  "status": 200,
  "message": "success"
}
```

### `POST api/Project/EditProject` 
- edit/update project detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId    |             | number |
| projectName   |             | string |
| projectCode   |             | string |
| projectOwner   |             | string |
| projectLocationCode   |             | string |
| projectLocationName   |             | string |
| projectDescription   |             | string |
| userId   |             | number |
| projectStartDate   |             | date |
| projectFinishDate   |             | date |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
{
    "companyId" : 1
    "projectId" : 3
    "projectName" : "Project Test 3"
    "projectCode" : "Project Info 0103"
    "projectOwner" : 0
    "projectLocationCode" : "12444545"
    "projectLocationName" : "Sathon 12, Bangkok"
    "projectDescription" : "Post on August 12,2011 by puguhyulianto."
    "userId" : 1
    "projectStartDate" :
    "projectFinishDate" :
}
```
#### Example Response
```json
{
    "data": true,
  "status": 200,
  "message": "success"
}

```
### `GET api/Project/GetProjectList` 
- list all project in company

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required           | number |
| textSearch   |             | number |
| filter   |             | ProjectListFilterEnum |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectId      |             | number |
| projectName  |             | string |
| projectLogoUrl  |             | string |
| projectUpdatedTimeStamp  |             | date |
| projectBookmark  |             | boolean |


#### Example Request
```
api/Project/GetProjectList?companyId=1&textSearch=
```
#### Example Response
```json
{
    "data": [
        {
          "projectId": 0,
          "projectName": "pageketName001",
          "projectLogoUrl": "https://sourcing-platform.s3-ap-southeast-1.amazonaws.com/manual-file/UserManualForVendor.jpeg",
          "projectUpdatedTimeStamp": "",
          "projectBookmark": true
        },
        {
          "projectId": 1,
          "projectName": "pageketName002",
          "projectLogoUrl": "https://sourcing-platform.s3-ap-southeast-1.amazonaws.com/manual-file/UserManualForVendor.jpeg",
          "projectUpdatedTimeStamp": "",
          "projectBookmark": true
        }
  ]
  "status": 200,
  "message": "success"
}

```
### `GET api/Project/GetProjectDetail` 
- get a detail project

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectId      |             | number |
| projectCode  |             | string |
| projectDate  |             | string |
| projectDescription  |             | string |
| projectLocationCode  |             | string |
| projectLogoUrl  |             | string |
| projectName  |             | string |
| projectOwner  |             | number |

#### Example Request
```
api/Project/GetProjectDetail?projectId=1
```
#### Example Response
```json
{
    "data": [
        {
          "projectId": 1,
          "projectCode": "Project Info 0101",
          "projectDate": "",
          "projectDescription": "Posted on August 12,2011 by Test1",
          "projectLocationCode": "11223344",
          "projectLogoUrl": "https://sourcing-platform.s3-ap-southeast-1.amazonaws.com/manual-file/UserManualForVendor.jpeg",
          "projectName": "Project A0101",
          "projectOwner": "Test01",
        }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetTakeOffRevCodeList` 
- get project take off rev code list 

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data    |             | List<string> |
#### Example Request
```
api/Project/GetTakeOffRevCodeList?companyId=1&projectid=1
```
#### Example Response
```json
{
    "data": [
              "T.RO1",
              "T.RO2",
              "T.RO3",
              "T.RO4",
              "T.RO5",
              "T.RO6"
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetDepartmentRevisionList` 
- get department revision selector list 

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId    |             | number |
| revCode    |             | string |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId    |             | number |
| departmentName    |             | string |

#### Example Request
```
api/Project/GetDepartmentRevisionList?companyId=1&projectId=1&revCode=T.RO1
```
#### Example Response
```json
{
    "data": [
              {
                "departmentId": 1,
                "departmentName": "stringTest1"
              },
              {
                "departmentId": 2,
                "departmentName": "stringTest2"
              }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetQuantityTakeOffList` 
- get quantity take off list 

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required | number |
| projectId    | required| number |
| takeOffid    | required    | number |
| textSearch    |             | number |
| departmentId    |  | string |
| page    |  required | int |
| itemPerPage    |  required | int |
| sortBy    |departmentName = 0, elementId = 1, elementName = 2, location = 3, uniformatCode = 4, masterformatCode = 5, description = 6, unitName = 7, quantity = 8, quantityPercent = 9, quantityAdjust = 10, finalQuantity = 11 | number |
| isAsc    | required| bool |
| groupBy    | groupByLocation = 0, groupByMasterformat = 1            | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| quantityGroupByValue    |             | string |
| subQuantityList    |             | List<ProjectQuantityListModel> |

ProjectQuantityListModel

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| quantityId    |     | int |
| departmentName    |     | string |
| elementId    |     | string |
| elementName    |     | string |
| quantityLocation    |     | string |
| uniformatCode    |     | string |
| uniformatName    |     | string |
| masterformatCode    |     | string |
| masterformatDescription    |     | string |
| unitName    |     | string |
| quantity    |     | double |
| quantityPercent    |     | stridoubleng |
| quantityAdjust    |     | double |
| finalQuantity    |     | double |

#### Example Request
```
api/Project/GetQuantityTakeOffList?companyId=1&projectId=1&departmentId=1&page=1&itemPerPage=10&sortBy=0&isAsc=true&groupBy=0
```
#### Example Response
```json
{
    "data": [
               {
                "quantityGroupByValue": "1",
                "subQuantityList": [
                  {
                    "quantityId": 1,
                    "departmentName": "stringTest1",
                    "elementId": "1",
                    "elementName": "e1",
                    "quantityLocation": "1",
                    "uniformatCode": "B",
                    "uniformatName": "Shell",
                    "masterformatCode": "02.00.00",
                    "masterformatDescription": "Concrete",
                    "unitName": "Cum.",
                    "quantity": 10,
                    "quantityPercent": 0,
                    "quantityAdjust": 7,
                    "finalQuantity": 7
                  }
                ]
              },
              {
                "quantityGroupByValue": "2",
                "subQuantityList": [
                  {
                    "quantityId": 2,
                    "departmentName": "stringTest1",
                    "elementId": "2",
                    "elementName": "e2",
                    "quantityLocation": "2",
                    "uniformatCode": "C",
                    "uniformatName": "Interiors",
                    "masterformatCode": "02.01.00",
                    "masterformatDescription": "Maintence of concrete",
                    "unitName": "Cum.",
                    "quantity": 12,
                    "quantityPercent": 110,
                    "quantityAdjust": 0,
                    "finalQuantity": 0
                  },
                  {
                    "quantityId": 6,
                    "departmentName": "stringTest1",
                    "elementId": "6",
                    "elementName": "e6",
                    "quantityLocation": "2",
                    "uniformatCode": "20",
                    "uniformatName": "Subgrade Enclosures",
                    "masterformatCode": "02.01.00",
                    "masterformatDescription": "Maintence of concrete",
                    "unitName": "Cum.",
                    "quantity": 20,
                    "quantityPercent": 0,
                    "quantityAdjust": 0,
                    "finalQuantity": 0
                  }
                ]
              },
              {
                "quantityGroupByValue": "3",
                "subQuantityList": [
                  {
                    "quantityId": 3,
                    "departmentName": "stringTest1",
                    "elementId": "3",
                    "elementName": "e3",
                    "quantityLocation": "3",
                    "uniformatCode": "D",
                    "uniformatName": "Services",
                    "masterformatCode": "02.02.00",
                    "masterformatDescription": "Concrete Forming and acesseries",
                    "unitName": "Cum.",
                    "quantity": 1,
                    "quantityPercent": 0,
                    "quantityAdjust": 5,
                    "finalQuantity": 5
                  }
                ]
              },
              {
                "quantityGroupByValue": "4",
                "subQuantityList": [
                  {
                    "quantityId": 4,
                    "departmentName": "stringTest1",
                    "elementId": "4",
                    "elementName": "e4",
                    "quantityLocation": "4",
                    "uniformatCode": "60",
                    "uniformatName": "Water and Gas Mitigation",
                    "masterformatCode": "02.03.00",
                    "masterformatDescription": "Concrete Reinforcing",
                    "unitName": "Cum.",
                    "quantity": 20,
                    "quantityPercent": 70,
                    "quantityAdjust": 0,
                    "finalQuantity": 0
                  }
                ]
              },
              {
                "quantityGroupByValue": "5",
                "subQuantityList": [
                  {
                    "quantityId": 5,
                    "departmentName": "stringTest1",
                    "elementId": "5",
                    "elementName": "e5",
                    "quantityLocation": "5",
                    "uniformatCode": "40",
                    "uniformatName": "Slabs-on-Grade",
                    "masterformatCode": "02.00.00",
                    "masterformatDescription": "Concrete",
                    "unitName": "Cum.",
                    "quantity": 10,
                    "quantityPercent": 0,
                    "quantityAdjust": 0,
                    "finalQuantity": 0
                  },
                  {
                    "quantityId": 7,
                    "departmentName": "stringTest1",
                    "elementId": "7",
                    "elementName": "e7",
                    "quantityLocation": "5",
                    "uniformatCode": "10",
                    "uniformatName": "Foundations",
                    "masterformatCode": "02.02.00",
                    "masterformatDescription": "Concrete Forming and acesseries",
                    "unitName": "Cum.",
                    "quantity": 10,
                    "quantityPercent": 0,
                    "quantityAdjust": 0,
                    "finalQuantity": 0
                  }
                ]
              }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetUniformatSelectorList` 
- get uniformat selector list 

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data    |             | List<string> |

#### Example Request
```
api/Project/GetUniformatSelectorList?companyId=1
```
#### Example Response
```json
{
    "data": [
              "01",
              "02",
              "03",
              "04",
              "05",
              "06",
              "07",
              "08",
              "09",
              "090",
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetLocationList` 
- get location selector list 

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data    |             | List<string> |

#### Example Request
```
api/Project/GetLocationList?companyId=1&projectId=1
```
#### Example Response
```json
{
    "data": [
              "1",
              "2",
              "3",
              "4",
              "5"
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetQuantityTakeOffDetail` 
- get quantity take off detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId    |             | number |
| projectTakeOffId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectTakeOffId    |             | number |
| projectTakeOffName    |             | string |
| masterformatCode    |             | string |
| masterformatDescription    |             | string |
| uniformatCode    |             | string |
| uniformatName    |             | string |
| locationCode    |             | string |
| itemCalcForm    |             | string |
| finalQuantity    |             | double |
| paramCalcForm    |             | List<string> |

#### Example Request
```
api/Project/GetQuantityTakeOffDetail?companyId=1&projectId=1&projectTakeOffId=1
```
#### Example Response
```json
{
    "data": {
              "projectTakeOffId": 1,
              "projectTakeOffName": "test1",
              "masterformatDescription": "Concrete",
              "masterformatCode": "02.00.00",
              "locationCode": "1",
              "uniformatName": "Substructure",
              "uniformatCode": "A",
              "finalQuantity": 0,
              "itemCalcForm": "{P-1}",
              "paramCalcForm": [
                "{B-1} * {B-2} * {B-3}",
                "{A-1} * {A-2} * {A-3}"
              ]
}
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/ExportQuantityTakeOffList` 
- download quantity take off list excel file

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |     | number |
| projectId    |     | number |
| exportUserId    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |


#### Example Request
```
api/Project/ExportQuantityTakeOffList?companyId=1&projectId=1&exportUserId=8
```
#### Example Response
```json
{
    "data": 
  "status": 200,
  "message": "success"
}
```
### `GET api/Project/GetSummaryProject` 
- get summary data of project

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |     | number |
| projectId    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| summaryModel    |             | List<ProjectSummaryRevisionModel> |
| summaryTakeOff    |             | List<ProjectSummaryTakeOffModel> |
| takeOffRevCode    |             | string |
| takeOffDate    |             | date |
| totalTakeOffElement    |             | number |
| totalTakeOffItem    |             | number |
| totalTakeOffList    |             | number |

**ProjectSummaryRevisionModel**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId    |     | number |
| departmentName    |     | string |
| revisionCode    |     | string |
| revisionDate    |     | date |

**ProjectSummaryTakeOffModel**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId    |     | number |
| departmentName    |     | string |
| revisionCode    |     | string |

#### Example Request
```
api/Project/ExportQuantityTakeOffList?companyId=1&projectId=1
```
#### Example Response
```json
{
  "summaryModel": [
    {
      "departmentId": 1,
      "departmentName": "Building",
      "revisionCode": "R01",
      "revisionDate": "2001-01-01T00:00:00+00:00"
    },
    {
      "departmentId": 2,
      "departmentName": "Architect",
      "revisionCode": "R02",
      "revisionDate": "1901-01-01T00:00:00+00:00"
    },
    {
      "departmentId": 3,
      "departmentName": "ME",
      "revisionCode": "R01",
      "revisionDate": "1900-01-01T00:00:00+00:00"
    }
  ],
  "summaryTakeOff": [
    {
      "departmentId": 1,
      "departmentName": "Building",
      "revisionCode": "R01"
    },
    {
      "departmentId": 2,
      "departmentName": "Architect",
      "revisionCode": "R01"
    },
    {
      "departmentId": 3,
      "departmentName": "ME",
      "revisionCode": "R01"
    }
  ],
  "takeOffRevCode": "TR01",
  "takeOffDate": "1903-01-01T00:00:00+00:00",
  "totalTakeOffElement": 0,
  "totalTakeOffItem": 0,
  "totalTakeOffList": 2
}
```

## Parameter
### `GET api/Parameter/GetBimParameterList` 
- get bim parameter list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required           | number |
| textSearch   |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| bimId      |             | number |
| bimName  |             | string |
| bimTypeName  |             | string |
| bimDataTypeId  |             | number |
| bimDataTypeName  |             | string |
| bimParamDescription  |             | string |

#### Example Request
```
api/Parameter/GetBimParameterList?companyId=1&textSearch=
```
#### Example Response
```json
{
    "data": [
        {
          "bimId": 1,
          "bimName": "Volume",
          "bimTypeName": "Length",
          "bimDataTypeId": 1,
          "bimDataTypeName": "demical",
          "bimParamDescription": "1234"
        },
        {
          "bimId": 2,
          "bimName": "Width",
          "bimTypeName": "Area",
          "bimDataTypeId": 2,
          "bimDataTypeName": "Area",
          "bimParamDescription": "1234"
        }
  ]
  "status": 200,
  "message": "success"
}

```
### `GET api/Parameter/GetPreSettingList` 
- get presetting parameter list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required           | number |
| textSearch   |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| presettingId      |             | number |
| presettingName  |             | string |
| presettingTypeName  |             | string |
| presettingDataTypeId  |             | number |
| presettingDataTypeName  |             | string |
| presettingUnitId  |             | number |
| presettingUnitName  |             | string |
| presettingValue  |             | string |

#### Example Request
```
api/Parameter/GetPreSettingList?companyId=1&textSearch=
```
#### Example Response
```json
{
    "data": [
        {
          "presettingId": 1,
          "presettingName": "Thickness",
          "presettingTypeName": "Presetting",
          "presettingDataTypeId": 1,
          "presettingDataTypeName": "Length",
          "presettingUnitId": 1,
          "presettingUnitName": "m",
          "presettingValue": "1234"
        },
        {
          "presettingId": 2,
          "presettingName": "Working Area",
          "presettingTypeName": "Presetting",
          "presettingDataTypeId": 2,
          "presettingDataTypeName": "Length",
          "presettingUnitId": 2,
          "presettingUnitName": "m",
          "presettingValue": "12"
        }
  ]
  "status": 200,
  "message": "success"
}
```

### `POST api/Parameter/CreateBimParameter` 
- create bim parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| bimName  |             | string |
| bimTypeName  |             | string |
| bimDataTypeId  |             | number |
| bimParamDescription  |             | string |
| userId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "bimName": "Lenghth",
    "bimTypeName": "Text",
    "bimDataTypeId": 1,
    "bimParamDescription": "12343564758"
    "userId" : 1,
```
#### Example Response
```json
{
    "data": true,
  "status": 200,
  "message": "success"
}
```
### `POST api/Parameter/CreatePreSettingParameter` 
- create presetting parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| presettingName   |             | string |
| presettingTypeName   |             | string |
| presettingDataTypeId    |             | number |
| presettingUnitId    |             | number |
| presettingValue   |             | string |
| userId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "presettingName" : "Thickness",
    "presettingTypeName" : "Presetting",
    "presettingDataTypeId" : 1,
    "presettingUnitId" : 1,
    "presettingValue" : "13.00",
    "userId" : 1,
```
#### Example Response
```json
{
    "data": true,
    "status": 200,
    "message": "success"
}
```
### `POST api/Parameter/EditBimParameter` 
- edit bim parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| bimId   |             | number |
| bimName  |             | string |
| bimTypeName  |             | string |
| bimDataTypeId  |             | number |
| bimParamDescription  |             | string |
| userId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "bimId" : 1,
    "bimName" : "Lenghth",
    "bimTypeName" : "Text",
    "bimDataTypeId" : 1,
    "bimParamDescription" : "12343564758",
    "userId" : 1,
```
#### Example Response
```json
{
    "data": true,
    "status": 200,
    "message": "success"
}
```
### `POST api/Parameter/EditPreSettingParameter` 
- edit presetting parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| presettingId   |             | number |
| presettingName   |             | string |
| presettingTypeName   |             | string |
| presettingDataTypeId    |             | number |
| presettingValue   |             | string |
| userId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "presettingId" : 1,
    "presettingName" : "Thickness",
    "presettingTypeName" : "Presetting",
    "presettingDataTypeId" : 1,
    "presettingUnitId" : 1,
    "presettingValue" : "13.00",
    "userId" : 1,
```
#### Example Response
```json
{
    "data": true,
    "status": 200,
    "message": "success"
}
```
### `DELETE api/Parameter/DeletePreSettingParameter` 
- delete presetting parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| presettingParamId   |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "presettingParamId" : 1
```
#### Example Response
```json
{
    "data": true,
    "status": 200,
    "message": "success"
}
```
### `DELETE api/Parameter/DeleteBimParameter` 
- delete bim parameter

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| bimParamId   |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |             | boolean |

#### Example Request
```json
    "companyId" : 1,
    "bimParamId" : 1
```
#### Example Response
```json
{
    "data": true,
    "status": 200,
    "message": "success"
}
```
### `Post api/Parameter/ImportPresettingFile`
- import presetting excel file

**Request**
| Parameter | Description | Schema |
| --------- | ----------- | ------ |
| companyId | required    | number |
| importFile | required | IFormFile |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| presettingData | |List<PresettingFromImportDto>|
| countDuplicatePresetting |             | number|
| countNewPresetting |             | number |

* PresettingFromImportDto

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| presettingName  || string |
| presettingDataTypeName |             | string|
| presettingUnitName | | string |
| presettingValue | | string |
| isDuplicate | | bool |
| duplicatePresettingId | | number |


#### Example Request
```
form-data
{
    "companyId": 1,
    "importFile": (binary)
}
```

#### Example Response
``` json
{
    "data": [
        {
          "countNewPresetting": 2,
          "countDuplicatePresetting": 0,
          "presettingData": [
              {
                  "presettingName": "A",
                  "presettingDataTypeName": "Length",
                  "presettingUnitName": "m",
                  "presettingValue": "13.01",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "presettingName": "B",
                  "presettingDataTypeName": "Length",
                  "presettingUnitName": "m",
                  "presettingValue": "12.00",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
        }
  ]
  "status": 200,
  "message": "success"
}
```

### `POST api/Parameter/ConfirmImportPresetting`
* confirm Import Presetting Data

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required            | number |
| importUserId | | number |
| confirmSelected | AddOnlyNewPresetting = 1 AddNewPresettingAndEdit = 2 | number |
| presettingData | | List<PresettingFromImportDto> |

* PresettingFromImportDto

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| presettingName  || string |
| presettingDataTypeName |             | string|
| presettingUnitName | | string |
| presettingValue | | string |
| isDuplicate | | bool |
| duplicateUniformatId | | number |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| importCount | | number|

#### Example Request
``` json
{
    "companyId": 1,
    "importUserId": 1,
    "confirmSelected": 1,
    "presettingData": : [
              {
                  "presettingName": "A",
                  "presettingDataTypeName": "Length",
                  "presettingUnitName": "m",
                  "presettingValue": "13.01",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "presettingName": "B",
                  "presettingDataTypeName": "Length",
                  "presettingUnitName": "m",
                  "presettingValue": "12.00",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
}
```

#### Example Response
``` json
{
    "data": 2
    "status": 200,
    "message": "success"
}
```

### `Presetting Parameter Template Download Url`
- https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template_Presetting_Parameter.xlsx

### `Bim Parameter Template Download Url`
- https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template-BimParameter.xlsx

### `GET api/Parameter/ExportPresettingParameter` 
- download presetting parameter template file

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |     | number |
| userId    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |


#### Example Request
```
api/Parameter/GetDataTypeList?companyId=1&userId=1
```
#### Example Response
```json
{
    "data": 
  "status": 200,
  "message": "success"
}
```

### `GET api/Parameter/GetDataTypeList` 
- get data type list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |     | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| dataTypeId    |     | number |
| dataTypeName    |     | string |


#### Example Request
```
api/Parameter/GetDataTypeList?companyId=1
```
#### Example Response
```json
{
  {
    "dataTypeId": 1,
    "dataTypeName": "string"
  },
  {
    "dataTypeId": 2,
    "dataTypeName": "int"
  },
  {
    "dataTypeId": 3,
    "dataTypeName": "decimal"
  }
}
```


## Masterformat
### `GET api/Masterformat/GetMasterformatList` 
- get masterformat list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required           | number |
| unitId    | required | number |
| filterLevel    |required| number |
| textSearch    |             | string |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId      |             | number |
| masterformatBrand  |             | string |
| masterformatCode  |             | string |
| masterformatDescription  |             | string |
| masterformatLeaf      |             | number |
| masterformatLevel  |             | string |
| masterformatName  |             | string |
| masterformatParentId  |             | string |
| masterformatSize      |             | number |
| masterformatUnitId  |             | string |
| masterformatUnitName  |             | string |

#### Example Request
```
api/Masterformat/GetMasterformatList?companyId=1&unitId=0&filterLevel=0&textSearch=
```
#### Example Response
```json
{
    "data": [
        {
          "masterformatId": 1,
          "masterformatBrand": "Brand1",
          "masterformatCode": "01.00.00",
          "masterformatDescription": "General Requirment",
          "masterformatLeaf": true,
          "masterformatLevel": "01",
          "masterformatName": "Name1",
          "masterformatParentId": 1,
          "masterformatSize": "Size",
          "masterformatUnitId": 1,
          "masterformatUnitName": "Kg"
        },
        {
          "masterformatId": 2,
          "masterformatBrand": "Brand2",
          "masterformatCode": "02.00.00",
          "masterformatDescription": "Concrete",
          "masterformatLeaf": false,
          "masterformatLevel": "02",
          "masterformatName": "Name2",
          "masterformatParentId": 2,
          "masterformatSize": "Size",
          "masterformatUnitId": 2,
          "masterformatUnitName": "Cum."
        }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Masterformat/GetMasterformatGroup` 
- get masterformat group selector

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required   | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId      |             | number |
| masterformatCode  |             | string |
| masterformatName  |             | string |

#### Example Request
```
api/Masterformat/GetMasterformatGroup?companyId=1
```
#### Example Response
```json
{
    "data": [
      {
        "masterformatId": 5,
        "masterformatName": "",
        "masterformatCode": "02.03.00"
      },
      {
        "masterformatId": 6,
        "masterformatName": "",
        "masterformatCode": "02.03.01"
      },
      {
        "masterformatId": 7,
        "masterformatName": "",
        "masterformatCode": "02.03.01.01"
      },
      {
        "masterformatId": 8,
        "masterformatName": "",
        "masterformatCode": "02.03.01.01.01"
      },
      {
        "masterformatId": 9,
        "masterformatName": "",
        "masterformatCode": "02.03.01.01.01.01"
      }
  ]
  "status": 200,
  "message": "success"
}
```
### `GET api/Masterformat/GetMasterfotmatUnitList` 
- get masterformat unit list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |  required   | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| unitId      |             | number |
| unitName  |             | string |

#### Example Request
```
api/Masterformat/GetMasterfotmatUnitList?companyId=1
```
#### Example Response
```json
{
    "data": [
      {
        "unitId": 1,
        "unitName": "Unit1"
      },
      {
        "unitId": 2,
        "unitName": "Unit2"
      },
      {
        "unitId": 3,
        "unitName": "Unit3"
      }
  ]
  "status": 200,
  "message": "success"
}
```
### `DELETE /api/Masterformat/DeleteMasterformat` 
- delete masterformat

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| isActive      |             | boolean |

#### Example Request
```json
api/Masterformat/DeleteMasterformat?masterformatId=1
```

#### Example Response
```json
{
  true
}
```

### `GET /api/Masterformat/GetMasterfotmatListByLevel` 
- delegette masterformat list by level

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |      required       | number |
| unitId    |    required         | number |
| filterLevel    |       required      | number |
| textSearch    |             | string |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId      |             | int |
| masterformatCode      |             | string |
| masterformatDescription      |             | string |
| masterformatLevel      |             | int |
| masterformatUnit      |             | string |
| masterformatSize      |             | string |
| masterformatBrand      |             | string |
| masterformatParentId      |             | int |
| masterformatLeaf      |             | boolean |
| subMasterformat      |             | MasterformatListByLevelDto[] |

**MasterformatListByLevelDto**
| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId      |             | int |
| masterformatCode      |             | string |
| masterformatDescription      |             | string |
| masterformatLevel      |             | int |
| masterformatUnit      |             | string |
| masterformatSize      |             | string |
| masterformatBrand      |             | string |
| masterformatParentId      |             | int |
| masterformatLeaf      |             | boolean |
| subMasterformat      |             | MasterformatListByLevelDto[] |


#### Example Request
```json
api/Masterformat/GetMasterfotmatListByLevel?companyId=1&unitId=1&filterLevel=0
```

#### Example Response
```json
[
  {
    "masterformatId": 3,
    "masterformatCode": "02.01.00",
    "masterformatDescription": "Maintence of concrete",
    "masterformatLevel": 2,
    "masterformatUnitName": "Cum.",
    "masterformatSize": "Size",
    "masterformatBrand": "Brand",
    "masterformatParentId": 2,
    "masterformatLeaf": false,
    "subMasterformat": null
  },
  {
    "masterformatId": 4,
    "masterformatCode": "02.02.00",
    "masterformatDescription": "Concrete Forming and acesseries",
    "masterformatLevel": 2,
    "masterformatUnitName": "Cum.",
    "masterformatSize": "Size",
    "masterformatBrand": "Brand",
    "masterformatParentId": 2,
    "masterformatLeaf": false,
    "subMasterformat": null
  },
  {
    "masterformatId": 5,
    "masterformatCode": "02.03.00",
    "masterformatDescription": "Concrete Reinforcing",
    "masterformatLevel": 2,
    "masterformatUnitName": "Cum.",
    "masterformatSize": "Size",
    "masterformatBrand": "Brand",
    "masterformatParentId": 2,
    "masterformatLeaf": true,
    "subMasterformat": [
      {
        "masterformatId": 6,
        "masterformatCode": "02.03.01",
        "masterformatDescription": "Reinforcment Bars",
        "masterformatLevel": 3,
        "masterformatUnitName": "Kg.",
        "masterformatSize": "Size",
        "masterformatBrand": "Brand",
        "masterformatParentId": 5,
        "masterformatLeaf": true,
        "subMasterformat": [
          {
            "masterformatId": 7,
            "masterformatCode": "02.03.01.01",
            "masterformatDescription": "Plain Steel Reinforcment Bars",
            "masterformatLevel": 4,
            "masterformatUnitName": "Kg.",
            "masterformatSize": "Size",
            "masterformatBrand": "Brand",
            "masterformatParentId": 6,
            "masterformatLeaf": true,
            "subMasterformat": [
              {
                "masterformatId": 8,
                "masterformatCode": "02.03.01.01.01",
                "masterformatDescription": "Steel Bars SR",
                "masterformatLevel": 5,
                "masterformatUnitName": "Kg.",
                "masterformatSize": "Size",
                "masterformatBrand": "Brand",
                "masterformatParentId": 7,
                "masterformatLeaf": true,
                "subMasterformat": [
                  {
                    "masterformatId": 9,
                    "masterformatCode": "02.03.01.01.01.01",
                    "masterformatDescription": "Steel Bars SR-24",
                    "masterformatLevel": 6,
                    "masterformatUnitName": "Kg.",
                    "masterformatSize": "Size",
                    "masterformatBrand": "Brand",
                    "masterformatParentId": 8,
                    "masterformatLeaf": true,
                    "subMasterformat": [
                      {
                        "masterformatId": 10,
                        "masterformatCode": "02.03.01.01.01.01.01",
                        "masterformatDescription": "Steel Bars SR-24 did 6 mm",
                        "masterformatLevel": 7,
                        "masterformatUnitName": "Kg.",
                        "masterformatSize": "Size",
                        "masterformatBrand": "Brand",
                        "masterformatParentId": 9,
                        "masterformatLeaf": false,
                        "subMasterformat": null
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
]
```
### `POST api/Masterformat/ImportMasterformatFile`
- import masterformat excel file

**Request**
| Parameter | Description | Schema |
| --------- | ----------- | ------ |
| companyId | required    | number |
| importFile | required | IFormFile |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| masterformatData | |List<MasterformatFromImportDto>|
| countNewMasterformat |             | number|
| countEditMasterformat |             | number |

**MasterformatFromImportDto**

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| masterformatCode  || string |
| masterformatDescription |             | string|
| masterformatLevel | | int |
| masterformatUnit | | string |
| masterformatSize | | bool |
| masterformatBrand | | number |
| isDuplicate | | bool |
| duplicateMasterformatId | | number |

#### Example Request
```
form-data
{
    "companyId": 1,
    "importFile": (binary)
}
```

#### Example Response
``` json
{
    "data": [
        {
          "countNewMasterformat": 2,
          "countEditMasterformat": 0,
          "masterformatData": [
              {
                  "masterformatCode": "01.00.00",
                  "masterformatDescription": "General Requirment",
                  "masterformatLevel": 1,
                  "masterformatUnit": "Cum.",
                  "masterformatSize": "TestUpdate",
                  "masterformatBrand": "TestUpdate",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "masterformatCode": "02.00.00",
                  "masterformatDescription": "Concrete",
                  "masterformatLevel": 1,
                  "masterformatUnit": "Cum.",
                  "masterformatSize": "Size",
                  "masterformatBrand": "Brand",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
        }
  ]
  "status": 200,
  "message": "success"
}
```
### `POST api/Masterformat/ConfirmImportPresetting`
* confirm Import MMM Data

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    | required            | number |
| importUserId | | number |
| confirmSelected | AddOnlyNewMasterformat = 1 AddNewMasterformatAndEdit = 2 | number |
| masterformatData | | List<MasterformatFromImportDto> |

**MasterformatFromImportDto**

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| masterformatCode  || string |
| masterformatDescription |             | string|
| masterformatLevel | | int |
| masterformatUnit | | string |
| masterformatSize | | bool |
| masterformatBrand | | number |
| isDuplicate | | bool |
| duplicateMasterformatId | | number |

**Response**

| Parameter         | Description | Schema |
| ----------------- | ----------- | ------ |
| importCount | | number|

#### Example Request
``` json
{
    "companyId": 1,
    "importUserId": 8,
    "confirmSelected": 1,
    "masterformatData": : [
              {
                  "masterformatCode": "01.00.00",
                  "masterformatDescription": "General Requirment",
                  "masterformatLevel": 1,
                  "masterformatUnit": "Cum.",
                  "masterformatSize": "TestUpdate",
                  "masterformatBrand": "TestUpdate",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              },
              {
                  "masterformatCode": "02.00.00",
                  "masterformatDescription": "Concrete",
                  "masterformatLevel": 1,
                  "masterformatUnit": "Cum.",
                  "masterformatSize": "Size",
                  "masterformatBrand": "Brand",
                  "isDuplicate": false,
                  "duplicateUniformatId": null
              }
          ]
}
```

#### Example Response
``` json
{
    "data": 2
    "status": 200,
    "message": "success"
}
```
### `Masterformat Template Download Url`
- [https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template_Masterformat.xlsx](https://s3.ap-southeast-1.amazonaws.com/bim.production/import-template/Template_Masterformat.xlsx)

## Department
### `GET api/Department/GetDepartmentList` 
- get department list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId      |             | number |
| departmentName  |             | string |
| companyId  |             | number |
| departmentStatus      |             | number |
| departmentMainRevision  |             | number |
| departmentCreateBy  |             | number |
| departmentCreatedTimeStamp  |             | DateTimeOffset |
| departmentUpdatedBy      |             | number |
| departmentUpdateByTimeStamp  |             | DateTimeOffset |
| isActive  |             | bool |

#### Example Request
```
api/Department/GetDepartmentList?departmentId=1
```
#### Example Response
```json
{
    "data": [
       [
  {
    "departmentId": 1,
    "departmentName": "Testdepartment",
    "companyId": 1,
    "departmentStatus": 1,
    "departmentMainRevision": 1,
    "departmentCreateBy": 1,
    "departmentCreatedTimeStamp": "2021-03-29T08:15:25.2980097+00:00",
    "departmentUpdatedBy": 1,
    "departmentUpdateByTimeStamp":"2021-03-29T08:15:25.2980097+00:00",
    "isActive": false
  }
]
  ]
  "status": 200,
  "message": "success"
}

```
### `DELETE api/Department/DeleteDepartment` 
- delete department

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId    |  required           | number |


**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| isActive      |             | boolean |

#### Example Request
```json
api/Department/GetDepartmentList?departmentId=1
```

#### Example Response
```json
{
  true
}
```

## Revision
### `POST api/Revision/RevisionCreate` 
- create revision

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId || number |
| departmentId || number |
| revisionCode || string |
| revisionDescription || string |
| createdUserId || number |
| revisionDate || DateTimeModel |

* DateTimeModel

| Parameter      | Description | Schema|
| -------------- | ----------- | ------|
| year  | required | number |
| month |      required       | number|
| day | required| number |
| hour | | number |
| minute | | number |
| second | | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| revisionId      | 0 meaning create fail(revisionCode have duplicate) | number |

#### Example Request
``` json
{
    "companyId": 1,
    "projectId": 1,
    "departmentId": 1,
    "revisionCode": "R01",
    "revisionDescription": "Description Text. Posted on August 12, 2011 by puguhyulianto.",
    "createdUserId": 1
    "revisionDate": : {
        "year": 2021,
        "month": 4,
        "day": 20
    }
}
```
### `GET api/Revision/GetRevisionList` 
- get revision list

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |
| projectId || number |

**Respone**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| revisonList    |     | SubRevisionListModel[] |
| takeOffList    |     | SubTakeOffListModel[] |

**SubRevisionListModel**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| departmentId      |             | number |
| departmentName  |             | string |
| subRevisionList  |             | SubRevisionItemListModel[] |

**SubRevisionItemListModel**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| revisionId      |             | number |
| revisionCode  |             | string |
| revisionDate  |             | date |
| revisionDescription      |             | string |
| updatedByUser  |             | string |

**SubTakeOffListModel**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| takeOffId      |             | number |
| takeOffCode  |             | string |
| takeOffDate  |             | date |
| takeOffDescription  |             | string |
| updatedByUser  |             | string |

#### Example Request
```json
api/Revision/GetRevisionList?companyId=1&projectId=1
```

#### Example Respone
``` json
{
  "revisonList": [
    {
      "departmentId": 1,
      "departmentName": "Building",
      "subRevisionList": [
        {
          "revisionId": 1,
          "revisionCode": "R01",
          "revisionDate": "1900-01-01T00:00:00+00:00",
          "revisionDescription": "test",
          "updatedByUser": "Test Jomphol"
        }
      ]
    },
    {
      "departmentId": 2,
      "departmentName": "Architect",
      "subRevisionList": [
        {
          "revisionId": 3,
          "revisionCode": "R01",
          "revisionDate": "2000-01-01T00:00:00+00:00",
          "revisionDescription": "test",
          "updatedByUser": "Test Jomphol"
        }
      ]
    },
    {
      "departmentId": 3,
      "departmentName": "ME",
      "subRevisionList": [
        {
          "revisionId": 4,
          "revisionCode": "R01",
          "revisionDate": "2000-01-01T00:00:00+00:00",
          "revisionDescription": "test",
          "updatedByUser": "Test Jomphol"
        }
      ]
    }
  ],
  "takeOffList": [
    {
      "takeOffId": 1,
      "takeOffCode": "TR01",
      "takeOffDate": "1903-01-01T00:00:00+00:00",
      "takeOffDescription": "test",
      "updatedByUser": "Test Jomphol"
    },
    {
      "takeOffId": 2,
      "takeOffCode": "TR02",
      "takeOffDate": "1902-01-01T00:00:00+00:00",
      "takeOffDescription": "test",
      "updatedByUser": "Test Jomphol"
    }
  ]
}
```

### `GET api/Revision/GetRevisionDetail` 
- get revision detail

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| revisionId    |             | number |
| departmentId || number |
| companyId || number |

**Respone**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| projectName      |             | number |
| departmentName  |             | string |
| revisionCode    |     | string |
| revisionDate  |             | date |
| revisionDescription    |     | string |

#### Example Request
```json
api/Revision/GetRevisionDetail?revisionId=1&departmentId=1&companyId=1
```

#### Example Respone
``` json
{
      "projectName": "ProjectName",
      "departmentName": "stringTest",
      "revisionCode": "test",
      "revisionDate": "1900-01-01T00:00:00+00:00",
      "revisionDescription": "test"
}
```

## UnitPrice
### `GET api/UnitPrice/GetUnitPriceByLocation` 
- get unit price location

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| filterLocation    |             | number |
| startDate || number |
| endDate || number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| unitPriceId      |  | number |
| locationName      |  | string |
| locationDate      |  | date |
| updatedBy      |  | string |

#### Example Request
```json
api/UnitPrice/GetUnitPriceByLocation
```

#### Example Response
``` json
{
  {
    "unitPriceId": 1,
    "locationName": "Bangkok",
    "locationDate": "2021-01-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  },
  {
    "unitPriceId": 2,
    "locationName": "Bangkok",
    "locationDate": "2021-02-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  },
  {
    "unitPriceId": 3,
    "locationName": "Bangkok",
    "locationDate": "2021-03-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  },
  {
    "unitPriceId": 4,
    "locationName": "Chiangmai",
    "locationDate": "2021-01-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  },
  {
    "unitPriceId": 5,
    "locationName": "Chiangmai",
    "locationDate": "2021-02-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  },
  {
    "unitPriceId": 6,
    "locationName": "Chiangmai",
    "locationDate": "2021-03-01T00:00:00+00:00",
    "updatedBy": "Test Jomphol"
  }
}
```

### `GET api/UnitPrice/GetMasterformatGroup` 
- get masterformat name list for selector

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| masterformatId      |  | number |
| masterformatName      |  | string |

#### Example Request
```json
api/UnitPrice/GetMasterformatGroup?companyId=1
```

#### Example Response
``` json
{
  {
    "masterformatId": 1,
    "masterformatName": "General Requirment"
  },
  {
    "masterformatId": 2,
    "masterformatName": "Concrete"
  }
}
```

### `GET api/UnitPrice/GetLocationPriceCode` 
- get location code for unit price

**Request**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| companyId    |             | number |

**Response**

| Parameter    | Description | Schema |
| ------------ | ----------- | ------ |
| data      |  | List<string> |

#### Example Request
```json
api/UnitPrice/GetLocationPriceCode?companyId=1
```

#### Example Response
``` json
{
  "Bangkok",
  "Chiangmai"
}
```

### `UnitPrice Template Download Url`
- https://s3-ap-southeast-1.amazonaws.com/bim.production/import-template/Template_UnitPrice.xlsx