Product catalog APIs

APIDescription
GET api/productdbs/{id}/products

Get products from product catalog

POST api/productdbs/{id}/products

Create/Update/Delete the products in product catalog.
It is allowed to only pass the attribute values of the product that need to be updated
Notes:
1. If you want to clear all existing old product datas in the product catalog, set OverWrite to true, otherwise, it's best to set it to false.
2. Update_Keep_Existing is best to set it to true, so it will keep the estimation values which may be updated in M8. otherwise, the product will be updated with default estimation value if you do not transfer estimation properties.
3. If Update_Del_Existing is set to true, it will delete existing products that are not in the passed updated product list, so it's best to set it to false.

DELETE api/productdbs/{id}/products

Delete some products in product catalog

GET api/productdbs?m2Id={m2Id}

Get the user's product catalogs

POST api/productdbs?m2Id={m2Id}&name={name}

Create empty product catalog

DELETE api/productdbs?id={id}&m2Id={m2Id}

Delete the whole product catalog

Project APIs

APIDescription
GET api/{m2Id}/projects?search={search}&isArchived={isArchived}&applicationType={applicationType}&showTags={showTags}

Get the projects by MeasureSquare ID
The return projects are sorted by last updated date. Max return count is 100.

GET api/{m2Id}/projects/count?search={search}&isArchived={isArchived}&applicationType={applicationType}

Get the project count by MeasureSquare ID

GET api/{m2Id}/projects/length/{pageLength}/page/{pageIndex}?search={search}&orderby={orderby}&isArchived={isArchived}&applicationType={applicationType}&showTags={showTags}

Get the paging projects by MeasureSquare ID.

GET api/{m2Id}/projects/date/{updatedTime}/number/{number}?isArchived={isArchived}&applicationType={applicationType}&showTags={showTags}

Get the new/updated projects based on time stamp by MeasureSquare ID
It is the best way that you remember the LastUpdatedOn value of the last project,
and pass this value while invoking this API next time, to prevent from missing projects.

GET api/projects/count?search={search}&distinct={distinct}&isArchived={isArchived}&applicationType={applicationType}

Get total project count in group

GET api/projects/length/{pageLength}/page/{pageIndex}?search={search}&distinct={distinct}&orderby={orderby}&isArchived={isArchived}&applicationType={applicationType}

Get paging projects in group

GET api/projects/date/{updatedTime}/number/{number}?isArchived={isArchived}&applicationType={applicationType}

Get the new/updated projects based on time stamp
It is the best way that you remember the LastUpdatedOn value of the last project,
and pass this value while invoking this API next time, to prevent from missing projects.

GET api/projects/{projectId}/accessToken?readOnly={readOnly}

Get project access token

GET api/projects/{projectId}?getProductInfo={getProductInfo}

Get project info, inclue Customer Info/Job Site Contact and Address/Management/Project products

GET api/projects/{projectId}/layers

Get layer info, include Rooms(Wall/Window/Door/Elevation) and Stairs

GET api/projects/{projectId}/layerAssignment

get product assignment info of each Room and Stair

GET api/projects/{projectId}/worksheets

Get project worksheets

GET api/projects/{projectId}/estimation?withCutImage={withCutImage}

Get project estimation

GET api/projects/{projectId}/report?sections={sections}

Get project report

GET api/projects/{projectId}/download?revision={revision}

Get project file (application/fez)

GET api/projects/{projectId}/images?width={width}&height={height}

Get a zip file include all layer images (application/zip)

GET api/projects/{projectId}/layers/{layerIndex}/image?width={width}&height={height}

Get layer image (image/png)

GET api/projects/{projectId}/pdf?printProfileId={printProfileId}

Get project pdf (application/pdf)
PrintProfileId is an optional parameter, in most case, you don't need to pass it.
Cannot call repeatedly within 1 second. And a maximum of 10 calls can be made within 1 minute.

GET api/projects/{projectId}/fsde

Get project fsde file (text/xml)

GET api/projects/{projectId}/dxf

Get project dxf file (application/dxf)

GET api/projects/{projectId}/webviewer?showQty={showQty}&showAreaPerimeter={showAreaPerimeter}&showDimensions={showDimensions}&showBluePrint={showBluePrint}&showEmptyTakeoff={showEmptyTakeoff}

Get project viewer url

GET api/projects/{projectId}/sharedusers

Get project shared users list

GET api/projects/{projectId}/url?revision={revision}

Get project file url

POST api/{m2Id}/projects

Create or update project for MeasureSquare ID

POST api/{m2Id}/projects/{projectId}/clone

Clone one project from designated project

POST api/{m2Id}/projects/{projectId}/archive

Archive project

POST api/{m2Id}/projects/{projectId}/unarchive

Unarchive project