Chemwatch Web API 2.0 - Developer Guide
Check out the neww version of the Chemwatch API documentation here: https://www.chemwatch-docs.net/.
Â
- 1 Overview
- 2 Authentication
- 3 REST
- 3.1 Service URL
- 3.2 Requests
- 3.3 Responses
- 3.4 Error Details
- 3.4.1 XML Error Sample
- 3.4.2 JSON Error Sample
- 4 Operations
- 4.1 Authentication
- 4.1.1 Method "authenticate"
- 4.1.1.1 XML Response Sample
- 4.1.1.2 JSON Response Sample
- 4.1.2 Method "auth"
- 4.1.2.1 XML Request body
- 4.1.2.2 JSON Request body
- 4.1.2.3 XML Response Sample
- 4.1.2.4 JSON Response Sample
- 4.1.3 Method: Get Countries - "countries"
- 4.1.3.1 XML Response Sample
- 4.1.3.2 JSON Response Sample
- 4.1.4 Method: Get Languages - "languages"
- 4.1.4.1 XML Response Sample
- 4.1.4.2 JSON Response Sample
- 4.1.1 Method "authenticate"
- 4.2 Search
- 4.2.1 Method: Search Materials - "materials"
- 4.2.1.1 XML Response Sample
- 4.2.2 Method: Get Own Materials - "ownmaterials"
- 4.2.2.1 XML Response Sample
- 4.2.2.2 JSON Response Sample
- 4.2.3 Method: Get CwNumbers by Cas - "cwnumbers"
- 4.2.3.1 XML Response Sample
- 4.2.3.2 JSON Response Sample
- 4.2.1 Method: Search Materials - "materials"
- 4.3 Material Data Requests
- 4.3.1 Method (GET): Get Material Data - "materialsdata"
- 4.3.1.1 XML Response Sample
- 4.3.1.2 JSON Response Sample
- 4.3.2 Method: Get material data-points - "datapoints"
- 4.3.2.1 XML Response Sample
- 4.3.2.2 JSON Response Sample
- 4.3.3 Method (GET): Get Material VGD Data - "materialsvgddata"
- 4.3.3.1 XML Response Sample
- 4.3.3.2 JSON Response Sample
- 4.3.4 Method: Search Vendors - "vendors"
- 4.3.4.1 XML Response Sample
- 4.3.4.2 JSON Response Sample
- 4.3.1 Method (GET): Get Material Data - "materialsdata"
- 4.4 Document Requests
- 4.4.1 Get Documents - method "documents"
- 4.4.1.1 XML Response Sample
- 4.4.1.2 JSON Response Sample
- 4.4.2 Get Documents by Part Number - method "GetDocumentsByPartNumber"
- 4.4.2.1 XML Response Sample
- 4.4.2.2 JSON Response Sample
- 4.4.3 Get report / document in HTMLÂ - "report"
- 4.4.3.1 XML Response Sample
- 4.4.3.2 JSON Response Sample
- 4.4.4 Get report / document in PDF - method pdfreport
- 4.4.5 Get Templates - method "templates"
- 4.4.5.1 XML Response Sample
- 4.4.5.2 JSON Response Sample
- 4.4.6 Get Vendor SDS - method document
- 4.4.1 Get Documents - method "documents"
- 4.5 Msds Request
- 4.5.1 Send Msds Request - method "MsdsRequest"
- 4.5.1.1 XML Request body
- 4.5.1.2 XML Response Sample
- 4.5.1.3 JSON Request body
- 4.5.1.4 JSON Response Sample
- 4.5.1 Send Msds Request - method "MsdsRequest"
- 4.1 Authentication
- 5 Folder Node Methods
- 6 SOAP
Overview
Chemwatch WebService API provides an easy and robust way of getting data from Chemwatch based on parameters selected in a request. It exposes a simple to use REST interface that can be implemented in any programming language capable of working with Web. It also exposes more sophisticated native .NET SOAP interface with WSDL (preferred method for .NET programming).
Chemwatch WebService API has all the required functions to do the following operations:
Search Chemicals by Name, Synonym, CAS or internal ID (Chemwatch Number: CW No)
Retrieve (M)SDS data-points on a selected chemical (Between 30 and 500 (M)SDS end-points available, depending on the type of record)
Retrieve Regulatory data-points on a selected chemical (up to 6,000 end-points available, depending on the chemical)
Retrieve documents in PDF format (one of many selected types of documents including SDS, Label(s), MINI-Reports, etc.).
Chemwatch API is the most efficient method of integrating extensive chemical data and documents into ERP systems, laboratory systems, websites, online stores, and custom software platforms with minimal effort.
Authentication
There are two ways of authenticating to use the servcies:
The recommended approach is to set up and use API secret (can be requested from it@chemwatch.net). Please note that the secret is user-dependend. All user settings will apply to the output. The header that has to be set to the secret is named "x-api-key". Simply pass it within a call to a method and the service will authenticate you automatically.
Manual handling of session cookie by calling auth() or authentication() methods. The cookie should then be passwed in subsequent calls to identify the session. This approach wil be good when you need to authenticate once and them make a big number of calls (like calls to update many documents or data sets).
REST
Service URL
Base Service URL |
---|
Note: For SOAP and WSDL please check further.
Requests
The Chemwatch Web API is based on REST principles: data resources are accessed via standard HTTP requests to an API endpoint.
All requests to the API require authentication. Authentication request, if completed successfully, provide a session cookie that should be attached to all subsequent requests (for more information see below).
Responses
All data is received as XML or JSON object.
Response HTTP Status Codes
Status Code | Description |
---|---|
200 | SUCCESS: The request has succeeded. The client can read the result of the request in the body of the response. |
400 | Bad Request. The request could not be understood by the server due to malformed syntax. The message body will contain more information. |
401 | Unauthorized - The request requires user authentication. |
429 | Limit is exceeded - |
500 | Internal Server Error. |
Error Details
Unsuccessful responses return information about the error as an XML (or JSON) object containing the following information:
Key | Value Type | Value Description |
---|---|---|
Code | integer | Error code |
Message | string | A short description of the cause/description of the error. |
EXAMPLE 1:
XML Error Sample
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Length: 50
Content-Type: application/xml
<Error xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>401</Code>
<Message>User is not authenticated</Message>
</Error>
EXAMPLE 2:
JSON Error Sample
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Length: 50
Content-Type: application/json
{
"Code":401,
"Message":"User is not authenticated"
}
Operations
Authentication
Please note that in most cases you simply need to pass a secret code via header "x-api-key". The service will authenticate the user associated with the secret for you.
Headers | |
Content-Type | application/json |
x-api-key | <secret key> |
Method "authenticate"
Used to authenticate the "User" and obtain the session cookie to be attached to all subsequent requests.Â
URL:
XML | GETÂ /api/v1/authenticate |
JSON | GET /api/v1/json/authenticate |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
domain | string | yes | domain name |
login | string | yes | user login |
password | string | yes | password |
Request Sample
GETÂ Â /api/v1/authenticate?domain=xxx&login=xxx&password=xxx |
All requests to the API require authentication. Authentication requests, if completed successfully, provides a session cookie that should be attached to all subsequent requests.
Response Format:
On success, the response body contains AuthResponse object in XML (JSON) format. Also the response contains cookie with a security token.
XML Response Sample
HTTP/1.1 200 OK
Content-Length: 65
Set-Cookie: Login=FB6615F554E168CE8ED0750B4E39735EE34FF7CE; expires=Sat, 11-Jul-2015 12:39:38 GMT; path=/
Content-Type: application/xml; charset=utf-8
<AuthResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>200</Code>
<Message>Authentication is successfully completed</Message>
</AuthResponse>
JSON Response Sample
HTTP/1.1 200 OK
Content-Length: 65
Set-Cookie: Login=FB6615F554E168CE8ED0750B4E39735EE34FF7CE; expires=Sat, 11-Jul-2015 12:39:38 GMT; path=/
Content-Type: application/json; charset=utf-8
{
"Code":200,
"Message":"Authentication is successfully completed"
}
Following codes are possible (for AuthResponse object):
Code | Message |
---|---|
200 | Authentication is successfully completed |
241 | There is no such user |
242 | Password is incorrect |
243 | User is locked |
244 | Subscription has expired |
245 | User password has expired |
Method "auth"
Used to authenticate the "User" and obtain the session cookie to be attached to all subsequent requests.Â
URL:
XML | POST /api/v1/auth | Http header:Â Content-Type: application/xml; charset=utf-8 |
JSON | POST /api/v1/json/auth | Http header: Content-Type: application/json; charset=utf-8 |
Request Sample
POST Â Â /api/v1/auth Content-Type: application/xml; charset=utf-8 |
Request body
XML Request body
<AuthRequest>
<Domain>xxx</Domain>
<Login>xxx</Login>
<Password>xxx</Password>
</AuthRequest>
Request JSON Sample
POST Â Â /api/v1/json/auth Content-Type: application/json; charset=utf-8 |
Request body
JSON Request body
{
"domain": "xxx",
"login": "xxx",
"password": "xxx"
}
All requests to the API require authentication. Authentication requests, if completed successfully, provides a session cookie that should be attached to all subsequent requests.
Response Format:
On success, the response body contains AuthResponse object in XML (JSON) format. Also the response contains cookie with a security token.
XML Response Sample
HTTP/1.1 200 OK
Content-Length: 65
Set-Cookie: Login=FB6615F554E168CE8ED0750B4E39735EE34FF7CE; expires=Sat, 11-Jul-2015 12:39:38 GMT; path=/
Content-Type: application/xml; charset=utf-8
<AuthResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>200</Code>
<Message>Authentication is successfully completed</Message>
</AuthResponse>
JSON Response Sample
HTTP/1.1 200 OK
Content-Length: 65
Set-Cookie: Login=FB6615F554E168CE8ED0750B4E39735EE34FF7CE; expires=Sat, 11-Jul-2015 12:39:38 GMT; path=/
Content-Type: application/json; charset=utf-8
{
"Code":200,
"Message":"Authentication is successfully completed"
}
Method: Get Countries - "countries"
Used to obtain the list of "country" parameters.
"Country" value needs to be provided with requests for Data and Documents to ensure the correct regulatory information, or, Document Format is provided.
URL:
XML | GETÂ /api/v1/countries |
JSON | GET /api/v1/json/countries |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
msdsOnly | bool | no | If true - returns only MSDS countries |
Request Sample
GET /api/v1/countries GET  /api/v1/countries?msdsOnly=true |
Response Format:
Response body contains an array of Country objects in XML (or JSON) format
XML Response Sample
<ArrayOfCountry xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Country>
<Code>ARG</Code>
<Id>81</Id>
<Name>Argentina</Name>
</Country>
...
</ArrayOfCountry>
JSON Response Sample
[
{
"Code":"ARG",
"Id":"81",
"Name":"Argentina"
},
...
]
Method: Get Languages - "languages"
Used to obtain the list of "Language" parameters.
"Language" value needs to be provided with requests for Data and Documents to ensure that the document(s) or data requested is "served" in the right language.Â
URL:
XML | GETÂ /api/v1/languages |
JSON | GET /api/v1/json/languages |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
msdsOnly | bool | no | If true - returns only MSDS countries |
Request Sample
GET  /api/v1/languages GET  /api/v1/languages?msdsOnly=true |
Response Format:
Response body contains an array of Language objects in XML (or JSON) format
XML Response Sample
<ArrayOfLanguage xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Language>
<Code>AR</Code>
<Id>340719</Id>
<Name>Arabic</Name>
</Language>
...
</ArrayOfLanguage>
JSON Response Sample
[
{
"Code":"AR",
"Id":"340719",
"Name":"Arabic"
},
...
]
Search
Method: Search Materials - "materials"
Used to search the Chemwatch database Materials/Chemicals. Various search parameters supported.
Note: UserPartNo can be used for search.
URL:
XML | GETÂ /api/v1/materials |
JSON | GET /api/v1/json/materials |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
name | string | no | Material name search parameter |
languageId | integer | no | Language |
cas | string | no | CAS search parameter |
cwNo | string | no | CwNumber search parameter |
gid | string | no | GID search parameter |
userPartNumber | string | no | User's Part Number parameter |
folderId | integer | no | Folder |
own | bool | no | Searched Own collection is set to true. If set to false searched in Full database. |
sortField | string | no | Sorting by field: "soursetype" - source tyoe cane be primary or secondary, "name" - default value |
sortDirection | string | no | Possible values: asc  - sorting by ascending desc - sorting by descending |
pageNumber | integer | no | indicates page number |
pageSize | integer | no | indicates count of items per page |
Request Sample
GETÂ Â /api/v1/materials?name=acetone&pageNumber=1&pageSize=15 |
Own search will be performed if own parameter is not specified
'Search in full DB' privilege is required if Full search is performed
Response Format:
Response body contains ListResult of Material object in XML (or JSON) format
XML Response Sample
<ListResultOfMaterial xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PageCount>1</PageCount>
<PageNumber>1</PageNumber>
<PageSize>15</PageSize>
<RowCount>3</RowCount>
<Rows>
<Material>
<Cas>67-64-1</Cas>
<CwNo>1090</CwNo>
<Id>4200280</Id>
<IsGold>false</IsGold>
<MaterialData>
<Field>
<Name>CW</Name>
<Value>1090</Value>
</Field>
<Field>
<Name>NAME</Name>
<Value>acetone</Value>
</Field>
...
</MaterialData>
<Name>acetone</Name>
</Material>
...
</Rows>
</ListResultOfMaterial>
{
"PageCount":1,
"PageNumber":1,
"PageSize":15,
"RowCount":3,
"Rows":[
{
"Cas":"67-64-1",
"CwNo":"1090",
"Id":4200280,
"IsGold":false,
"MaterialData":[
{"Name":"CW", "Value":"1090"},
{"Name":"NAME","Value":"acetone"},
...
],
"Name":"acetone"
},
...
]
}
{
"pageCount": 2,
"rowCount": 18,
"pageNumber": 1,
"pageSize": 10,
"rows": [
{
"materialId": "4200280",
"groupId": "CW",
"vendorId": -1,
"documentType": "ms",
"countryCode": "ANY",
"languageCode": "ANY",
"issueDate": "2016-02-25T00:00:00",
"fileName": "",
"cwNumber": "1090",
"externalUrl": "http://jr.chemwatch.net/cwws/MaterialService.svc/GetMsdsByExternalUrl?mi=4200280&cn=ANY&ln=ANY&fn=&cwn=1090&ui=72190&di=17548&ts=636437314781062845&v=&hc=69FEFE23A5009E59239400E1C27E1A07",
"sourceType": "p",
"isCWGold": true,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": true,
"isAvailable": true,
"isLatest": true,
"groupName": "ChemWatch",
"docNo": "a1090",
"countryId": 0,
"languageId": 0,
"preferredVendor": "ChemWatch"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 4200002922,
"documentType": "ms",
"countryCode": "Netherlands",
"languageCode": "Dutch",
"issueDate": "2007-02-15T00:00:00",
"fileName": "pd6192754.txt.gz",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=118&ln=340711&fn=pd6192754.txt.gz&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=C59678AEC87755438BB856AA1F45E089",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "6192754",
"countryId": 118,
"languageId": 340711,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 5591,
"documentType": "ms",
"countryCode": "United States",
"languageCode": "English",
"issueDate": "2014-07-01T00:00:00",
"fileName": "pd12515147.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=140&ln=340700&fn=pd12515147.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=FC5425874B20A8B00C9BA9BE1486164D",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12515147",
"countryId": 140,
"languageId": 340700,
"preferredVendor": "Sigma Aldrich (as MiliporeSigma, Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 5594,
"documentType": "ms",
"countryCode": "Germany",
"languageCode": "English",
"issueDate": "2012-12-04T00:00:00",
"fileName": "pd12897617.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=96&ln=340700&fn=pd12897617.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=08E8E8F2F75CA9E1169835F0074F7479",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12897617",
"countryId": 96,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 5607,
"documentType": "ms",
"countryCode": "Australia",
"languageCode": "English",
"issueDate": "2013-04-15T00:00:00",
"fileName": "pd12685675.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=82&ln=340700&fn=pd12685675.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=E72303F2B250C12A13129AA266B43978",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12685675",
"countryId": 82,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 30763,
"documentType": "ms",
"countryCode": "Spain",
"languageCode": "English",
"issueDate": "2012-12-04T00:00:00",
"fileName": "pd12897609.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=133&ln=340700&fn=pd12897609.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=2A425D4F47449D64C698611AECBFCAD4",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12897609",
"countryId": 133,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 18671,
"documentType": "ms",
"countryCode": "Switzerland",
"languageCode": "English",
"issueDate": "2012-12-04T00:00:00",
"fileName": "pd12897618.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=135&ln=340700&fn=pd12897618.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=9CEA46130EF05D6F902370895420D4E3",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": false,
"groupName": "Sigma-Aldrich",
"docNo": "12897618",
"countryId": 135,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 33777,
"documentType": "ms",
"countryCode": "Canada",
"languageCode": "English",
"issueDate": "2014-08-18T00:00:00",
"fileName": "pd12897611.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=86&ln=340700&fn=pd12897611.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=46A5014E6D9E0FFEF52238F9C6375370",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12897611",
"countryId": 86,
"languageId": 340700,
"preferredVendor": "Sigma Aldrich (as MiliporeSigma, Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 24961,
"documentType": "ms",
"countryCode": "Italy",
"languageCode": "English",
"issueDate": "2012-12-04T00:00:00",
"fileName": "pd12897620.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=105&ln=340700&fn=pd12897620.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=C23E439D40143B76892356AE07FB7544",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12897620",
"countryId": 105,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
},
{
"materialId": "4897766",
"groupId": "SIGMA",
"vendorId": 25489,
"documentType": "ms",
"countryCode": "Norway",
"languageCode": "English",
"issueDate": "2012-12-04T00:00:00",
"fileName": "pd12897621.pdf",
"cwNumber": "31257-5",
"externalUrl": "http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=284&ln=340700&fn=pd12897621.pdf&cwn=31257-5&ui=72190&di=17548&ts=636437314781218843&v=&hc=72146D842EBC61E768BBFC5FE8F6E0D8",
"sourceType": "p",
"isCWGold": false,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": false,
"isAvailable": true,
"isLatest": true,
"groupName": "Sigma-Aldrich",
"docNo": "12897621",
"countryId": 284,
"languageId": 340700,
"preferredVendor": "Sigma-Aldrich (Merck)"
}
]
}
Method: Get Own Materials - "ownmaterials"
Used to get own Materials. Page & Sort parameters supported.
URL:
XML | GETÂ /api/v1/ownmaterials |
JSON | GET /api/v1/json/ownmaterials |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
viewType | string | no | Possible values: material   - MaterialName mode, preferred - PreferredName mode, catalog    - CatName mode |
sortField | string | no | Sorting by field: "soursetype" - source tyoe cane be primary or secondary, "name" - default value |
sortDirection | string | no | Possible values: asc  - sorting by ascending desc - sorting by descending |
pageNumber | integer | no | indicates page number |
pageSize | integer | no | indicates count of items per page |
Request Sample
GETÂ Â /api/v1/ownmaterials?pageNumber=1&pageSize=15 |
Response Format:
Response body contains ListResult of Material object in XML (or JSON) format
XML Response Sample
<ListResultOfMaterial xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PageCount>1</PageCount>
<PageNumber>1</PageNumber>
<PageSize>15</PageSize>
<RowCount>3</RowCount>
<Rows>
<Material>
<Cas>67-64-1</Cas>
<CwNo>1090</CwNo>
<Id>4200280</Id>
<IsGold>false</IsGold>
<MaterialData>
<Field>
<Name>CW</Name>
<Value>1090</Value>
</Field>
<Field>
<Name>NAME</Name>
<Value>acetone</Value>
</Field>
...
</MaterialData>
<Name>acetone</Name>
</Material>
...
</Rows>
</ListResultOfMaterial>
JSON Response Sample
{
"PageCount":1,
"PageNumber":1,
"PageSize":15,
"RowCount":3,
"Rows":[
{
"Cas":"67-64-1",
"CwNo":"1090",
"Id":4200280,
"IsGold":false,
"MaterialData":[
{"Name":"CW", "Value":"1090"},
{"Name":"NAME","Value":"acetone"},
...
],
"Name":"acetone"
},
...
]
}
Method: Get CwNumbers by Cas - "cwnumbers"
In most cases, CAS Number (Chemical Abstracts Service  Number) is the "official" identifier for Pure Chemicals.
In most cases, Chemwatch Number (Chemwatch Chemical ID Number) corresponds to CAS one-to-one.
This Method provides the functionality to "get" the Chemwatch Number by passing a CAS number.
URL:
XML | GETÂ /api/v1/cwnumbers |
JSON | GET /api/v1/json/cwnumbers |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
cas | string | yes | Cas number |
showOwn | bool | no | show cw numbers, which user has |
Request Sample
GETÂ Â /api/v1/cwnumbers?cas=67-64-1Â |
GET  /api/v1/cwnumbers?cas=67-64-1&showOwn=true |
Response Format:
Response body contains an array of strings
XML Response Sample
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<string>1090</string>
<string>7122729</string>
<string>4896-40</string>
</ArrayOfstring>
JSON Response Sample
[
"1090",
"7122729",
"4896-40"
]
Material Data Requests
Method (GET): Get Material Data - "materialsdata"
This Method is used to obtain a predefined collection of data-points using a single request. This means the method is good to obtain data resolved by Chemwatch number, and not appropriate for Vendor Extracted Data (another method called materialsvgddata should be used in this case).
Data Methods can be created and managed in the Chemwatch Method Builder (separate URL and instructions available).Â
This Method is recommended where:
Large Collection of data points are required per request
Consistent collection of DP is required on an ongoing basis (e.g. GHS Label Data Method will return 15 end points required to populate a "label")
URL:
XML | GETÂ /api/v1/materialsdata |
JSON | GET /api/v1/json/materialsdata |
CSV | GET /api/v1/csv/materialsdata |
XLS | GET /api/v1/xls/materialsdata |
HTML | GET /api/v1/html/materialsdata |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
ids | string | yes | Comma separated CwNumbers (if parameter entityType is material) or CAS number (if parameter entityType is cas) |
entityType | string | yes | Determines the type of previous parameter 'ids'. Possible values: material - means that 'ids' are CwNumbers cas     - means that 'ids' are Cas Numbers Galleria data fields will only respond to entitytype = CAS. They will appear as empty when called on entitytype = material. |
methodName | string | yes (if dataPoints is missing) | UserMethod name. |
dataPoints | string | yes (if methodName is missing) | Comma separated DataPoint's names. |
languageId | integer | no | Language |
countryId | integer | no | Country |
saveTags | bool | no | |
separator | string | no | |
downloadImages | bool | no | Allows to download images |
folderId | integer | no | Folder |
msdsFormat | string | no | Msds Format. Possible values: reach, local or ghs |
Request Sample
GETÂ Â Â /api/v1/materialsdata?ids=123,67-64-1&entityType=cas&methodName=Material_Name |
GETÂ Â Â /api/v1/materialsdata?ids=1114&entityType=Material&dataPoints=MaterialName,CWNumber |
Response Format:
Response body contains an array of MaterialData objects in XML (JSON) format
XML Response Sample
<ArrayOfMaterialData xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<MaterialData>
<Field>
<Name>MaterialName</Name>
<Value>ROCHELLE - PURE CHEM TEST</Value>
</Field>
</MaterialData>
...
</ArrayOfMaterialData>
JSON Response Sample
[
[
{
"Name":"MaterialName",
"Value":"ROCHELLE - PURE CHEM TEST"
}
],
...
]
Important! Following values should be sent as integer
Possible values of MsdsFormat: None = 0, Reach = 1, Local = 2, Ghs =3
Possible values of EntityType: Material = 1, Cas = 2
Method: Get material data-points - "datapoints"
This Method is typically used for instant requests for single or a few data points (AD-HOC requests).Â
URL:
XML | GETÂ /api/v1/datapoints |
JSON | GET /api/v1/json/datapoints |
Request Parameters: no
Request Sample
 GET /api/v1/datapoints |
Response Format:
Response body contains an array of DataPoinCategory objects in XML (JSON) format (field SubCategories is object of type DataPoinCategory)
XML Response Sample
<ArrayOfDataPointCategory xmlns="http://schemas.datacontract.org/2004/07/Chemwatch.API.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<DataPointCategory>
<DataPoints>
<DataPoint xmlns="">
<Description>Ingredient 1</Description>
<Id>307</Id>
<Name>Ingredient1</Name>
</DataPoint>
...
</DataPoints>
<Name>Ingredients</Name>
<SubCategories/>
</DataPointCategory>
...
</ArrayOfMaterialData>
JSON Response Sample
[
{
"DataPoints":[
{
"Description":"Ingredient 1",
"Id":307,
"Name":"Ingredient1"
},
 ...
]
"Name":"Ingredients",
"SubCategories":[]
}
...
]
Method (GET): Get Material VGD Data - "materialsvgddata"
This Method is used to obtain a predefined collection of VGD using a single request.
Data Methods can be created and managed in the Chemwatch Method Builder (separate URL and instructions available).
Right now "materialsvgddata" method is reporting only the documents, which are in the user's folders
URL:
XML | GETÂ /api/v1/materialsvgddata |
JSON | GET /api/v1/json/materialsvgddata |
CSV | GET /api/v1/csv/materialsvgddata |
XLS | GET /api/v1/xls/materialsvgddata |
HTML | GET /api/v1/html/materialsvgddata |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
docNumbers | string | yes | Comma separated Document Numbers |
methodName | string | yes (if dataPoints is missing) | UserMethod name. |
dataPoints | string | yes (if methodName is missing) | Comma separated DataPoint's names. |
saveTags | bool | no | |
separator | string | no | |
downloadImages | bool | no | Allows to download images |
msdsFormat | string | no | Msds Format. Possible values: reach, local or ghs |
Request Sample
GETÂ Â Â /api/v1/materialsvgddata?docnumbers=11133975&methodName=Material_Name |
Response Format:
Response body contains an array of MaterialData objects in XML (JSON) format
XML Response Sample
<ArrayOfMaterialData xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<MaterialData>
<Field>
<Name>MaterialName</Name>
<Value>ROCHELLE - PURE CHEM TEST</Value>
</Field>
</MaterialData>
...
</ArrayOfMaterialData>
JSON Response Sample
[
[
{
"Name":"MaterialName",
"Value":"ROCHELLE - PURE CHEM TEST"
}
],
...
]
Method: Search Vendors - "vendors"
This method allow searching Vendors and Vendor Ids available in the system. Sometimes vendor ID can be used in the subsequent calls for data.
URL:
XML | GETÂ /api/v1/vendors |
JSON | GET /api/v1/json/vendors |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
name | string | yes | Vendor name |
sortField | string | no | Sorting by field: "soursetype" - source tyoe cane be primary or secondary, "name" - default value |
sortDirection | string | no | Possible values: asc  - sorting by ascending desc - sorting by descending |
pageNumber | integer | no | indicates page number |
pageSize | integer | no | indicates count of items per page |
Request Sample
GETÂ Â Â /api/v1/vendors?name=merc |
Response Format:
Response body contains ListResult of Vendor object in XML (JSON) format
XML Response Sample
<ListResultOfVendor xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PageCount>32</PageCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RowCount>319</RowCount>
<Rows>
<Vendor>
<City>Cabo PE</City>
<Country>
<Code>BRA</Code>
<Id>85</Id>
<Name>Brazil</Name>
</Country>
<Gid>PETROFLE</Gid>
<Id>1785</Id>
<Name>Petroflex Industria E Comercio</Name>
<State/>
<VendorGroupId>45360</VendorGroupId>
</Vendor>
...
</Rows>
</ListResultOfVendor>
JSON Response Sample
{
"PageCount":32,
"PageNumber":1,
"PageSize":10,
"RowCount":319,
"Rows":[
{
"City":"Cabo PE",
"Country":{"Code":"BRA","Id":"85","Name":"Brazil"},
"Gid":"PETROFLE",
"Id":1785,
"Name":"Petroflex Industria E Comercio",
"State":"",
"VendorGroupId":45360
},
...
]
}
Document Requests
Get Documents - method "documents"
This Method is used to obtain a Vendor SDS from the Chemwatch Database.
URL:
XML | GETÂ /api/v1/documents |
JSON | GETÂ /api/v1/json/documents |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
cwNo | string | yes | Cw Number |
gid | string | no | GID search parameter |
folderId | integer | no | Folder |
languageIds | integer (comma separated) | no | Comma separated Languges Ids |
countryIds | integer (comma separated) | no | Comma separated Countries Ids |
own | bool | no | Searched Own collection is set to true. If set to false searched in Full database |
sortField | string | no | Sorting by field: "soursetype" - source tyoe cane be primary or secondary, "name" - default value |
sortDirection | string | no | Possible values: asc  - sorting by ascending desc - sorting by descending |
pageNumber | integer | no | indicates page number |
pageSize | integer | no | indicates count of items per page |
Request Sample
GETÂ /api/v1/documents?cwNo=1090 |
Response Format:
Response body contains ListResult of Document object in XML (JSON) format
XML Response Sample
<ListResultOfDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PageCount>194</PageCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RowCount>1936</RowCount>
<Rows>
<Document>
<CWNumber>10019</CWNumber>
<CountryCode>United States</CountryCode>
<CountryId>140</CountryId>
<DocNo>4624274</DocNo>
<DocumentType>ms</DocumentType>
<ExternalUrl>http://dev.chemwatch.net/CWWS.M3/DocumentService.svc/GetDocumentContentByExternalUrl...</ExternalUrl>
<FileName>pd4624274.htm.gz</FileName>
<FolderId i:nil="true"/>
<GroupId>ALCANAL</GroupId>
<GroupName>Alcan</GroupName>
<IsAvailable>true</IsAvailable>
<IsCWGold>false</IsCWGold>
<IsChemwatch>false</IsChemwatch>
<IsLatest>false</IsLatest>
<IsPrivate>false</IsPrivate>
<IsWeWrite>false</IsWeWrite>
<IssueDate>1992-07-27T00:00:00</IssueDate>
<LanguageCode>English</LanguageCode>
<LanguageId>340700</LanguageId>
<MaterialId>5566246</MaterialId>
<PreferredVendor>Alcan</PreferredVendor>
<SourceType>p</SourceType>
<VendorId>4200000272</VendorId>
</Document>
...
</Rows>
</ListResultOfDocument>
JSON Response Sample
{
"PageCount":194,
"PageNumber":1,
"PageSize":10,
"RowCount":1936,
"Rows":[
{
"CWNumber":"10019",
"CountryCode":"United States",
"CountryId":140,
"DocNo":"4624274",
"DocumentType":"ms",
"ExternalUrl":"http:\/\/dev.chemwatch.net\/CWWS.M3\/DocumentService.svc...",
"FileName":"pd4624274.htm.gz",
"FolderId":null,
"GroupId":"ALCANAL",
"GroupName":"Alcan",
"IsAvailable":true,
"IsCWGold":false,
"IsChemwatch":false,
"IsLatest":false,
"IsPrivate":false,
"IsWeWrite":false,
"IssueDate":"\/Date(712159200000+1000)\/",
"LanguageCode":"English",
"LanguageId":340700,
"MaterialId":"5566246",
"PreferredVendor":"Alcan",
"SourceType":"p",
"VendorId":4200000272
},
...
]
}
Get Documents by Part Number - method "GetDocumentsByPartNumber"
This Method is used to obtain a Vendor SDS from the Chemwatch Database using Part Number.
URL:
XML | GETÂ /api/v1/GetDocumentsByPartNumber |
JSON | GETÂ /api/v1/json/GetDocumentsByPartNumber |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
userPartNumber | string | yes | Part Number |
gid | string | no | GID search parameter |
folderId | integer | no | Folder |
languageIds | integer (comma separated) | no | Comma separated Languges Ids |
countryIds | integer (comma separated) | no | Comma separated Countries Ids |
own | bool | no | Searched Own collection is set to true. If set to false searched in Full database |
sortField | string | no | Sorting by field: "soursetype" - source tyoe cane be primary or secondary, "name" - default value |
sortDirection | string | no | Possible values: asc  - sorting by ascending desc - sorting by descending |
pageNumber | integer | no | indicates page number |
pageSize | integer | no | indicates count of items per page |
Request Sample
GETÂ /api/v1/GetDocumentsByPartNumber?userPartNumber=123 |
Response Format:
Response body contains ListResult of Document object in XML (JSON) format
XML Response Sample
<ListResultOfDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><PageCount>2</PageCount><PageNumber>1</PageNumber><PageSize>10</PageSize><RowCount>18</RowCount> <Rows> <Document><CWNumber>1090</CWNumber><CountryCode>ANY</CountryCode><CountryId>0</CountryId><DocNo>a1090</DocNo><DocumentType>ms</DocumentType> <ExternalUrl>http://jr.chemwatch.net/cwws/MaterialService.svc/GetMsdsByExternalUrl?mi=4200280&cn=ANY&ln=ANY&fn=&cwn=1090&ui=72190&di=17548&ts=636437315161229971&v=&hc=946C8C579E77CF57471DB8763C8F56E7</ExternalUrl><FileName/><FolderId i:nil="true"/><GroupId>CW</GroupId><GroupName>ChemWatch</GroupName><IsAvailable>true</IsAvailable><IsCWGold>true</IsCWGold><IsChemwatch>true</IsChemwatch><IsLatest>true</IsLatest><IsPrivate>false</IsPrivate><IsWeWrite>false</IsWeWrite><IssueDate>2016-02-25T00:00:00</IssueDate><LanguageCode>ANY</LanguageCode><LanguageId>0</LanguageId><MaterialId>4200280</MaterialId><PreferredVendor>ChemWatch</PreferredVendor><SourceType>p</SourceType><VendorId>-1</VendorId></Document> <Document><CWNumber>31257-5</CWNumber><CountryCode>Netherlands</CountryCode><CountryId>118</CountryId><DocNo>6192754</DocNo><DocumentType>ms</DocumentType> <ExternalUrl>http://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=4897766&gid=SIGMA&cn=118&ln=340711&fn=pd6192754.txt.gz&cwn=31257-5&ui=72190&di=17548&ts=636437315161229971&v=&hc=7CEE0BE193FE0FC70B5E6AC7E7C81380</ExternalUrl><FileName>pd6192754.txt.gz</FileName><FolderId i:nil="true"/><GroupId>SIGMA</GroupId><GroupName>Sigma-Aldrich</GroupName><IsAvailable>true</IsAvailable><IsCWGold>false</IsCWGold><IsChemwatch>false</IsChemwatch><IsLatest>true</IsLatest><IsPrivate>false</IsPrivate><IsWeWrite>false</IsWeWrite><IssueDate>2007-02-15T00:00:00</IssueDate><LanguageCode>Dutch</LanguageCode><LanguageId>340711</LanguageId><MaterialId>4897766</MaterialId><PreferredVendor>Sigma-Aldrich (Merck)</PreferredVendor><SourceType>p</SourceType><VendorId>4200002922</VendorId></Document> ...
</Rows>
</ListResultOfDocument>
JSON Response Sample
{
"pageCount": 2,
"rowCount": 18,
"pageNumber": 1,
"pageSize": 10,
"rows": [
{
"materialId": "4200280",
"groupId": "CW",
"vendorId": -1,
"documentType": "ms",
"countryCode": "ANY",
"languageCode": "ANY",
"issueDate": "2016-02-25T00:00:00",
"fileName": "",
"cwNumber": "1090",
"externalUrl": "http://jr.chemwatch.net/cwws/MaterialService.svc/GetMsdsByExternalUrl?mi=4200280&cn=ANY&ln=ANY&fn=&cwn=1090&ui=72190&di=17548&ts=636437315544361059&v=&hc=EEB831CCF61D46F07542D09A53A21985",
"sourceType": "p",
"isCWGold": true,
"isWeWrite": false,
"isPrivate": false,
"isChemwatch": true,
"isAvailable": true,
"isLatest": true,
"groupName": "ChemWatch",
"docNo": "a1090",
"countryId": 0,
"languageId": 0,
"preferredVendor": "ChemWatch"
},
...
]
}
Get report / document in HTMLÂ - "report"
This Method is used to obtain Chemwatch Documents and reports generated using "Templates".Â
These include GOLD SDS, Mini SDS, Labels, etc.
With this "method" the API will "serve" a HTML document.
Note: The list of available Templates can be obtained using Templates method.
URL:
XML | GETÂ /api/v1/report |
JSON | GETÂ /api/v1/json/report |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
template | string | yes (see Get Templates) | Template name |
templateId | int | yes (only if CustomTemplate is selected) | Report's template |
cwNo | string | yes | Cw Number |
materialId | integer | no | Material Id |
userPartNumber | string | no | User's PartNumber |
vendorId | long | no | Vendor Id (use for WeWrites) |
countryId | integer | no | Indicates country of report |
languageId | integer | no | Indicates language of report |
Request Sample
GETÂ Â Â /api/v1/report?template=spills&cwNo=1090 |
Response Format:
Response body contains string with html report
XML Response Sample
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...
</string>
JSON Response Sample
"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional..."
Get report / document in PDF - method pdfreport
This Method is used to obtain Chemwatch Documents and reports generated using "Templates". These include GOLD SDS, Mini SDS, Labels, etc.
With this "method" the API will "serve" a PDF document.
Note: The list of available Templates can be obtained using Templates method
URL:
XML | GETÂ /api/v1/pdfreport |
JSON | GETÂ /api/v1/json/pdfreport |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
template | string | yes (see Get Templates) | Template name |
templateId | int | yes (only if CustomTemplate is selected) | Report's template |
cwNo | string | yes | Cw Number |
materialId | integer | no | Material Id |
userPartNumber | string | no | User's PartNumber |
vendorId | long | no | Vendor Id (use for WeWrites) |
countryId | integer | no | Indicates country of report |
languageId | integer | no | Indicates language of report |
Request Sample
GETÂ Â Â /api/v1/pdfreport?template=mini&cwNo=1090 |
Response Format:
Response contains stream of pdf file. (You can see pdf report in browser directly)
Get Templates - method "templates"
URL:
XML | GETÂ /api/v1/templates |
JSON | GETÂ /api/v1/json/templates |
Request Parameters: no
Request Sample
GETÂ Â Â /api/v1/templates |
Response Format:
Response body contains an array of TemplateSummary objects in XML (JSON) format
XML Response Sample
<ArrayOfTemplateSummary xmlns="http://schemas.datacontract.org/2004/07/Chemwatch.API.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<TemplateSummary>
<Description>Custom template or Label</Description>
<Template>CustomTemplate</Template>
</TemplateSummary>
<TemplateSummary>
<Description>Standard operating procedure</Description>
<Template>Sop</Template>
</TemplateSummary>
...
</ArrayOfTemplateSummary>
JSON Response Sample
[
{
"Description":"Custom template or Label",
"Template":"CustomTemplate"
},
{
"Description":"Standard operating procedure",
"Template":"Sop"
},
...
]
Template types:
Template | Description |
---|---|
CustomTemplate | Chose this type to specify template by IDs. Should be used for all labels. |
Msds | Chemwatch SDS. |
Mini | Chemwatch Mini SDS. |
FireFighting | Fire fighting report, |
FirstAid | First aid advice. |
Spills | Spills control report. |
China | CHINA report. |
AdviceToDoctor | Advice to doctor. |
Environmental | Environment report. |
Ppe | Personal protection means. |
Sop | Standard operating procedure. |
Toxicological | Toxicological report. |
Epg | EPG report. |
Trec | TREC reprot. |
Get Vendor SDS - method document
This Method is used to obtain Vendor SDS documentÂ
With this "method" the API will "serve" document with extension provided in request
Note: The list of available document names can be obtained usingÂ
URL:
XML | GETÂ /api/v1/document |
JSON | GETÂ /api/v1/json/document |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
fileName | string | yes | Document name |
Request Sample
GETÂ Â Â /api/v1/document?fileName=pd11407714.pdf |
Response Format:
Response contains stream of file with extension provided in fileName parameter . (Vendor SDS is downloaded automatically)
Msds Request
Send Msds Request - method "MsdsRequest"
This method sends Msds Request
URL:
XML | POSTÂ /api/v1/msdsrequest | additional http header:Â Content-Type: application/xml; charset=utf-8 |
JSON | POSTÂ /api/v1/json/msdsrequest | additional http header: Content-Type: application/json; charset=utf-8 |
Request Sample
POST Â Â /api/v1/msdsrequest Content-Type: application/xml; charset=utf-8 |
Request body
XML Request body
<MsdsRequestEntity>
<ProductName>test xml</ProductName>
<ProductNumber>test xml</ProductNumber>
<Vendor>test xml</Vendor>
<ReferenceID>reference</ReferenceID>
<FileName>abc.pdf</FileName>
<File>base64 encoded file</File>
</MsdsRequestEntity>
Response Format:
Response body contains a boolean value
XML Response Sample
<boolean>true</boolean>
JSON Request Sample
POST Â Â /api/v1/json/msdsrequest Content-Type: application/json; charset=utf-8 |
Request body
JSON Request body
{"ProductName":"test", "ProductNumber": "test", "Vendor": "test"}
Response Format:
Response body contains a boolean value
JSON Response Sample
true
Folder Node Methods
Method "FolderTree"
This method is used to obtain folder tree for the current domain.
URL:
XML | GETÂ /api/v1/folderTree |
JSON | GETÂ /api/v1/json/folderTree |
Request Parameters:
None.
Request Sample
GETÂ Â Â /api/v1/json/foldertree |
Response Format:
XML Response Sample
JSON Response Sample
Method "MaterialsInFolder"
This method ican be used to return all materials from a specified folder.
URL:
XML | GETÂ /api/v1/materialsInFolder |
JSON | GETÂ /api/v1/json/materialsInFolder |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
folderId | string | yes | Full folder path |
withSubfolders | boolean | no | Whether to return materials from subfolders too. |
pageSize | int | no | Size of the page. |
page | int | no | Page number. |
Request Sample
GETÂ Â Â /api/v1json/materialsInFolder?folderId=343613&withSubfolders=true |
Response Format:
Method returns an array of objects.
XML Response Sample
JSON Response Sample
Get Folder Id By Full Path - method "folderIdByFullPath"
This method is used to obtain folder ID by full path provided as a parameter. It helps in the subsequent calls which allow restricting results by a sub-tree (folder ID passed in become a root folder for the sub-tree). Only results belonging to the specified folder and all its children will be returned.
URL:
XML | GETÂ /api/v1/folderIdByFullPath |
JSON | GET /api/v1/json/folderIdByFullPath |
Request Parameters:
Query parameter | Data Type | Required | Description |
---|---|---|---|
path | string | yes | Full folder path |
Request Sample
GETÂ Â Â /api/v1/FolderIdByFullPath?path=ENTERPRISE/FOLDERS/benz |
Response Format:
Response body contains just integer folder Id
XML Response Sample
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1012072</int>
JSON Response Sample
1012072
Get Root Folder Id - method RootFolderId
This method is used to obtain Root Folder ID. Folder ID may be useful in subsequent queries.
URL:
XML | GETÂ /api/v1/RootFolderId |
JSON | GET /api/v1/json/RootFolderId |
Request Parameters:
None
Request Sample
 GET /api/v1/RootFolderId |
Response Format:
Response body contains just integer folder Id
XML Response Sample
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">997557</int>
JSON Response Sample
997557
SOAP
Endpoint
http://jr.chemwatch.net/api/chemwatchservice.svc/soap |
WSDL
SOAP endpoint is useful for generating client code to access a web service.
e.g. svcutil.exe (https://msdn.microsoft.com/en-us/library/aa347733%28v=vs.110%29.aspx)
Possible values of MsdsFormat: None = 0, Reach = 1, Local = 2, Ghs =3
Possible values of EntityType: Material = 1, Cas = 2
Parameter | Type | Description |
---|---|---|
casNumber | string | CAS Number. |
productName | string | Name of a product. |
userPartNumber | string | Part number given to the product by user. |
supplier | string | Supplier name. |
location | string | Location of a chemical, i.e. /ENTERPRISE/MANIFEST/Site1/BuildingA/Room05. |
folderId | int | Location folder ID. |
volume | double | Volume in real numbers, i.e. 10.5. |
volumeUnit | string | Unit, i.e. “l”, “kg”, “g”, etc. |
preferredName | string | Preferred name to be stored in Own and displayed in Web Application. |
language | string | Country code in ISO, i.e. AUS or USA. |
country | string | Laguage code in ISO, i.e. ENG, GER, FRA. |
catalogueNumber | string | Catalogue number of a product. |
msdsFile | string | Base64 encoded file content. |
maximumVolume | double | Maximum volume of a chemical in a location. |
maximumVolumeUnit | string | Unit. |
referenceId | string | An Id to be used later for addressing updates on a product (sds or data). |
Â
Parameter | Type | Description |
---|---|---|
folderId | string | ID of a folder to check for Updates. |
folderPath | string | Name of a product. |
dateFrom | string | The date to check from. |
dateTo | string | The date to check to. |
pageSize | string | Number of results per page. |
pageNumber | string | Page number. |
Â
Parameter | Type | Description |
---|---|---|
productName | string | Name of a product. |
productNumber | string | Product number or catalogue number. |
vendor | string | Vendor name. |
file | string | Base64 encoded content of the file. |
fileName | string | Name of the file. |
requestedBy | string | Name of a person or solution placing the request. |
contactEmail | string | Contact email of the requestor. |
cwNumber | string | Chemwatch Number. |
referenceId | string | An Id to be used later for addressing updates on a product (sds or data). |
commentsAndDetails | string | Comments. |
organization | string | Organization name. |
sdsCountry | string | ISO country code of the country of SDS requested, i.e. AUS, USA. |
country | string | ISO country code of the country of SDS requested, i.e. AUS, USA. |
smilesCode | string | SMILES code, if any, |