This API retrieves the companies of a project from Smart Materials. You can either retrieve a single company using company Id or all the companies of a project.
Required Privilege: API_READONLY
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
URL Format: GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Companies({key})
Specify values for the project, discipline, language, and key parameter in the URL. The project, discipline, and language together, define the project environment and the key parameter defines the company Id (CompanyId).
-
Companies are retrieved based on the given project, irrespective of the discipline filter.
-
If Project Default in Site, ZC_PROJSUB is set to Y, then only those companies that are in Project Subcontractors screen are retrieved. If it is N, then the companies whose company type is Subcontractor are retrieved.
To retrieve all the companies of a project, use the following URL:
GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Companies
Sample Code
GET https://{host}/Smat/V1/Projects(‘RS’)/Disciplines(‘PIPING’)/Nls(‘English’)/Companies(5265)
Success Response
Status: 200 OK
Content:
{
"@odata.context": "https://{host}/Smat/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/Companies",
"value": [
{
"CompanyId":5265,
"CompanyCode":"UMM OGOVOX",
"CompanyName":"UMM OBDGOVOX"
}]
}
Element |
Description |
Type |
---|---|---|
CompanyId |
Unique ID of the retrieved company |
Integer |
CompanyCode |
Unique code of the company |
String |
CompanyName |
Name of the company |
String |