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. The key parameter defines the company ID (CompanyId).
-
Companies are retrieved based on the given project, irrespective of the discipline filter.
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(‘DEMO’)/Disciplines(‘PIPING’)/Nls(‘English’)/Companies(5000)
Success Response
Status: 200 OK
Content:
{
"@odata.context": "https://in-smatapisp.ingrnet.com/ServicePack/SMAT/V1/$metadata#Projects('DEMO')/Disciplines('PIPING')/Nls('English')/Companies",
"value": [
{
"CompanyId": 5000,
"CompanyCode": "MARIAN",
"ParentCompanyId": null,
"CompanyName": "Intergraph",
"SymbolId": 5021,
"Telephone": null,
"ProjectContext": null,
"KeyWord": null,
"BusinessRegistration": null,
"CountryId": null,
"SdbInfo": null
}]
}
Element |
Description |
Type |
---|---|---|
CompanyId |
Unique ID of the retrieved company |
Integer |
CompanyCode |
Unique code of the company |
String |
CompanyName |
Name of the company |
String |
ParentCompanyId |
Unique ID of the parent company of the retrieved company |
Integer |
SymbolId |
Unique ID of the company logo or symbol |
Integer |
Telephone |
Contact number of the company |
String |
ProjectContext |
Used as a filter, for example for reporting purposes |
String |
KeyWord |
Key word for a company that can be helpful in searching the company |
String |
BusinessRegistration |
Federal ID (for United States)/Business registration (for other countries) of the company |
String |
CountryId |
Unique ID of the country where the company is registered |
Integer |
SdbInfo |
String |