method /auth

Authenticates a user with the specified domain, login, and password.

Method:

  • HTTP Method: POST

Parameters:

  • domain (string, required): The domain associated with the user.
  • login (string, required): The login username of the user.
  • password (string, required): The password associated with the user account.

Response:

  • Success Response: -- HTTP Status Code: 200 OK -- Response Body: (JSON)
  • Error Response: -- HTTP Status Code: (Other than 200) -- Response Body: (JSON) Error details.

Notes:

  • Ensure that the provided domain, login, and password are valid.
  • A successful authentication returns a status code of 200 and a confirmation message.
  • Method /auth is preferrable in case if you need to call multiple methods in the same session (authenticate once then search multiple chemiccals in a loop). It will authenticate you your session once and keep it alive maintained by a cookie token. In order to make it work you will have to save cookie provided with /auth response and pass it on with the following requests. See below for the details on /auth method.
POST /auth

Example request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "domain": "domain",
  "login": "user",
  "password": "password"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/auth", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "Code": 200,
    "Message": "Authentication is successfully completed"
}

x-api-key

Method with x-qpi-key is easier to implement and may be better for unfrequent interactions with Chemwatch API (check on data updates once a day). All you need to do to achieve this is pass x-api-key provided to you bye Chemwatch IT as a header with every call.

POST /api/v1/json/UpdateVolumes HTTP/1.1 Host: jr.chemwatch.net x-api-key:

This method will authenticate you every time you make an API call. A new session will be created each time.

Note:

  • Keep you API key secure at any time. Do not share API key with unauthorized third parties.

Endpoints

Chemwatch WebService API provides an easy and robust way of intergating Chemwatch data and solutions with other systems, such as ERPs/LIMS/LMS/etc. It exposes a simple to use REST interface that can be implemented in any programming language capable of sending and processing web api requests. It also exposes more a native .NET SOAP interface with WSDL (preferred method for .NET programming).

https://jr.chemwatch.net/api/v1

XML: https://jr.chemwatch.net/api/v1/ JSON: https://jr.chemwatch.net/api/v1/json SOAP: http://jr.chemwatch.net/api/chemwatchservice.svc/soap

WSDL: https://jr.chemwatch.net/api/ChemwatchService.svc?singleWsdl

Methods

Countries

Returns the list of supported country codes.

GET /countries

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/countries", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "Code":"ARG",
        "Id":"81",
        "Name":"Argentina"
    },
    ...
]

Languages

Returns the list of supported country codes.

GET /languages

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/languages", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "Id": "340843",
        "Name": "Afrikaans",
        "Code": "AF"
    },
    ...
]

Datapoints

Retrieves a list of data points.

GET /datapoints

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/datapoints", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "Name": "Ingredients",
        "DataPoints": [
            {
                "Id": 64255,
                "Name": "IngredientProportionGOLD",
                "Description": "Ingredient Proportion GOLD"
            },
            ...
        ]
    },
    ...
]

Materials

Retrieves a list of materials based on specified parameters.

Available means of identification:

  • CAS number - an exact match search by unversal pure chemical number. CAS numbers are only available for pure substances.
  • Material name - a close match search on material name. The results are filtered by relevance threshold.
  • SMILES- string depicting the chemical structure.
GET /materials

Parameters supported:

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/materials?CAS=64742-46-7&own=false", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "PageCount": 1,
    "RowCount": 3,
    "PageNumber": 1,
    "PageSize": 50,
    "Rows": [
        {
            "Id": 3511568,
            "Name": "distillates, petroleum, middle, hydrotreated",
            "CwNo": "25815",
            "Cas": "64742-46-7",
            "IsGold": true,
            "MaterialData": [
                {
                    "Name": "HAS_DOCUMENTS",
                    "Value": "1"
                },
                {
                    "Name": "RATE",
                    "Value": "0"
                },
                {
                    "Name": "CW",
                    "Value": "25815"
                },
                {
                    "Name": "NAME",
                    "Value": "distillates, petroleum, middle, hydrotreated"
                },
                {
                    "Name": "SYNONYM_NAME",
                    "Value": "penreco exl 102,hydrotreated distillate, middle ..c11-25 401f-752f,middle fraction petroleum distillate,distillates (petroleum), hydrotreated, middle fraction,Penreco EXL 102,hydrotreated distillate, middle ..C11-25 401F-752F,middle fraction petroleum distillate,Kermac 600W (mineral seal oil),Pella Oil A,Scriptane PW 26/29 H,generic hydrocarbon,HFP distillate,Isopar V,pella oil a,scriptane pw 26/29 h,generic hydro-carbon,hfp distillate,isoparaffinic hydrocarbon,isoparaffinic hydro-carbon,kermac 600w (mineral seal oil),distillates (petroleum), hydrotreated, middle fraction,isopar v"
                },
                {
                    "Name": "CAS",
                    "Value": "64742-46-7"
                },
                {
                    "Name": "ISCWGOLD",
                    "Value": "True"
                },
                {
                    "Name": "GID"
                },
                {
                    "Name": "VENDOR_NAME",
                    "Value": "Multiple"
                },
                {
                    "Name": "PREFERRED_NAME"
                },
                {
                    "Name": "PREFERRED_NAMES",
                    "Value": ""
                },
                {
                    "Name": "IS_HIDDEN",
                    "Value": "False"
                },
                {
                    "Name": "MSDS_ID",
                    "Value": "317889"
                },
                {
                    "Name": "GOLD_MSDS_ID",
                    "Value": "317889"
                },
                {
                    "Name": "IS_VGD",
                    "Value": "True"
                },
                {
                    "Name": "IS_UGD",
                    "Value": "False"
                },
                {
                    "Name": "IS_PREF_NAME_USED",
                    "Value": "False"
                },
                {
                    "Name": "VGD_COUNT",
                    "Value": "0"
                },
                {
                    "Name": "UGD_COUNT",
                    "Value": "0"
                },
                {
                    "Name": "CAT_NAME"
                },
                {
                    "Name": "IS_ESDS",
                    "Value": "False"
                },
                {
                    "Name": "IS_VENDORLESS",
                    "Value": "False"
                },
                {
                    "Name": "IS_EXACT_MATCH",
                    "Value": "true"
                }
            ]
        },
        ...
    ]
}

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.

Parameters:

GET /vendors

Example request

var myHeaders = new Headers();
myHeaders.append("SOAPAction", "https://chemwatch.net/api/IChemwatchService/GetDocuments");
myHeaders.append("Content-Type", "text/xml; charset=utf-8");
myHeaders.append("x-api-key", "<api-key>");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/vendors?name=Briemar", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "PageCount": 1,
    "RowCount": 2,
    "PageNumber": 1,
    "PageSize": 50,
    "Rows": [
        {
            "Id": 1,
            "VendorGroupId": 53886,
            "Name": "Briemar Nominees",
            "Gid": "BRIEMAR",
            "City": "Roermond",
            "State": "JA",
            "Country": {
                "Id": "118",
                "Name": "Netherlands",
                "Code": "NLD"
            }
        },
        {
            "Id": 9108,
            "VendorGroupId": 53886,
            "Name": "Briemar Nominees",
            "Gid": "BRIEMAR",
            "City": "Koo Wee Rup",
            "State": "VIC",
            "Country": {
                "Id": "82",
                "Name": "Australia",
                "Code": "AUS"
            }
        }
    ]
}

GetDocumentsByPartNumber

This method allows searching Own collection for the documents having a specific User Part Number.

Request parameters:

GET /getDocumentsByPartNumber

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/GetDocumentsByPartNumber?userPartNumber=100211", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "PageCount": 1,
    "RowCount": 15,
    "PageNumber": 1,
    "PageSize": 50,
    "Rows": [
        {
            "MaterialId": "3845726",
            "GroupId": "SIGMA",
            "VendorId": 33777,
            "DocumentType": "ms",
            "CountryCode": "Canada",
            "LanguageCode": "French",
            "IssueDate": "2014-08-05T00:00:00",
            "FileName": "pd12458664.pdf",
            "CWNumber": "49560-3",
            "ExternalUrl": "https://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=3845726&gid=SIGMA&vi=33777&cn=86&ln=340712&fn=pd12458664.pdf&cwn=49560-3&msdsid=197300&ui=226065&di=63560&ts=637625991561753626&v=&hc=ABAE16841437EE57735D4AB8EEA73936ECF81A34BF0E342FC720D02E759A8F92",
            "SourceType": "p",
            "IsCWGold": false,
            "IsWeWrite": false,
            "IsPrivate": false,
            "IsChemwatch": false,
            "IsAvailable": true,
            "IsLatest": true,
            "GroupName": "Sigma-Aldrich",
            "DocNo": "12458664",
            "CountryId": 86,
            "LanguageId": 340712,
            "PreferredVendor": "Sigma-Aldrich (as MiliporeSigma, Merck)",
            "CountryCodeIso": "CAN",
            "LanguageCodeIso": "FR"
        },
        ...
    ]
}

Data methods

These methods facilitate the retrieval of chemical data from Chemwatch, which is sourced from various channels:

  • Gold: Derived from Chemwatch classification (referred to as Gold SDS), these datasets are accessible per Chemwatch Number. Gold data boasts over 500 fields.
  • Vendor (VGD): Extracted from Vendor SDS, this dataset is available per Vendor SDS. Vendor-extracted data contains approximately 70 fields.
  • User (UGD): Data extracted by users through the Chemwatch Data Extraction Tool, this dataset is available per Vendor SDS.
  • Silver: These datasets, provided by Chemwatch Credo or AuthorITe solutions, are accessible per Chemwatch Number.

Notes:

  • A single Chemwatch Number may contain SDS from various vendors, crafted for different countries and languages, establishing a one-to-many relationship between Gold and Vendor data.
  • Certain datapoint values can only be resolved within the context of the Own collection of materials, encompassing forms data and user-assigned tags.
  • Some datapoints may yield "Not applicable" or "Not available," which are valid values, while others may return empty values.

MaterialsData

Returns datasets of either Gold or Silver types. To query information for a chemical, you need to provide one of the following:

  • CAS number: Conducts an exact match search using the universal pure chemical number. Note: CAS number is not available for mixtures, and some pure substances may lack it.
  • Chemwatch Number: Serves as an identifier for a material in the Chemwatch database.

To specify the list of fields to be returned, you can:

  • Pass fields in the dataPoints parameter value (comma-separated). This option is recommended for a limited amount of fields to be downloaded.
  • Create a named "method" (a collection of field names). This option is recommended for large sets of fields.

Examples:

Request parameters:

GET /materialsData

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/materialsdata?ids=1090&entityType=material&countryId=115&languageId=340700&datapoints=PackingGroupGOLD,DGC,UN,HazardCodesAndPhrasesGOLD,GHSHazardsGraphicGOLD,CASNumberGOLD,MaterialNameForRG,SignalWordGOLD,HazardCodesGOLD,PrecautionaryCodesGOLD", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    [
        {
            "Name": "CASNumberGOLD",
            "Value": "67-64-1"
        },
        {
            "Name": "DGC",
            "Value": "3"
        },
        {
            "Name": "GHSHazardsGraphicGOLD",
            "Value": "https://jr.chemwatch.net/Resources/Images/GHSFla.GIF|https://jr.chemwatch.net/Resources/Images/GHSHar.GIF|https://jr.chemwatch.net/Resources/Images/GHSChr.GIF"
        },
        {
            "Name": "HazardCodesAndPhrasesGOLD",
            "Value": "H225 - Highly flammable liquid and vapour.|H303 - May be harmful if swallowed.|H313 - May be harmful in contact with skin.|H333 - May be harmful if inhaled.|H316 - Causes mild skin irritation.|H319 - Causes serious eye irritation.|H336 - May cause drowsiness or dizziness.|H305 - May be harmful if swallowed and enters airways."
        },
        {
            "Name": "HazardCodesGOLD",
            "Value": "H225|H303|H313|H333|H316|H319|H336|H305"
        },
        {
            "Name": "MaterialNameForRG",
            "Value": "acetone"
        },
        {
            "Name": "PackingGroupGOLD",
            "Value": "II"
        },
        {
            "Name": "PrecautionaryCodesGOLD",
            "Value": "P210|P271|P240|P241|P242|P243|P261|P280|P264|P301+P310|P331|P370+P378|P305+P351+P338|P304+P312|P332+P313|P337+P313|P303+P361+P353|P304+P340|P403+P235|P405|P501"
        },
        {
            "Name": "SignalWordGOLD",
            "Value": "Danger"
        },
        {
            "Name": "UN",
            "Value": "1090"
        }
    ]
]

MaterialsVgdData

Provides datasets of either VGD or UGD types. To reference a chemical, you must provide:

  • docNumber: A document number assigned by Chemwatch. Utilize one of the search methods to identify a document number initially.

To specify the list of fields to be returned, you can:

  • Pass fields in the dataPoints parameter value (comma-separated). This option is recommended for a limited number of fields to be downloaded.
  • Create a named "method" (a collection of field names). This option is recommended for larger sets of fields.

Refer to the materialsData description for examples illustrating the usage of the named method.

Request parameters:

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/materialsvgddata?docNumbers=1315576&datapoints=Folders/Stores%20name&own=true", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    [
        {
            "Name": "Folders/Stores name",
            "Value": "/ENTERPRISE/MANIFEST/Pest control"
        }
    ],
    [
        {
            "Name": "Folders/Stores name",
            "Value": "/ENTERPRISE/MANIFEST/111"
        }
    ]
]

Documents (SDS)

Documents

Provides Vendor SDS associated with a Chemwatch Number. Utilize the Folder ID to refine the search to a specific location. Use the Own parameter to search within the Own or Full collection. If language IDs are specified, only documents in the requested languages will be returned.

It's important to note that the method returns an external link to a document, which can serve as a permanent link for an external system. Alternatively, the document content can be downloaded using the provided link.

GET /documents

Request parameters:

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/documents?CwNo=25815&countryIds=140&languageIds=340700&pagesize=1000", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "PageCount": 1,
    "RowCount": 45,
    "PageNumber": 1,
    "PageSize": 1000,
    "Rows": [
        {
            "MaterialId": "3511568",
            "GroupId": "SHELLOIL",
            "VendorId": 6200094172,
            "DocumentType": "ms",
            "CountryCode": "United States",
            "LanguageCode": "English",
            "IssueDate": "1999-01-26T00:00:00",
            "VGDExtractionDate": "2021-02-21T00:00:00",
            "FileName": "pd68782781.pdf",
            "CWNumber": "25815",
            "ExternalUrl": "https://jr.chemwatch.net/cwws/DocumentService.svc/GetDocumentContentByExternalUrl?mi=3511568&gid=SHELLOIL&vi=6200094172&cn=140&ln=340700&fn=pd68782781.pdf&cwn=25815&msdsid=317889&ui=376794&di=77544&ts=637625987493185060&v=&hc=5F879B171414BEF757574D46F8EB1EFEA78223CAD477A9850519F6EF06352BB2",
            "SourceType": "p",
            "IsCWGold": false,
            "IsWeWrite": false,
            "IsPrivate": false,
            "IsChemwatch": false,
            "IsAvailable": true,
            "IsLatest": true,
            "GroupName": "Shell",
            "DocNo": "68782781",
            "CountryId": 140,
            "LanguageId": 340700,
            "PreferredVendor": "Equilon Enterprises (a part of Shell)",
            "CountryCodeIso": "USA",
            "LanguageCodeIso": "EN"
        },
        ...
    ]
}

Report

This method is employed to acquire Chemwatch Documents and reports generated through "Templates." These encompass GOLD SDS, Mini SDS, and Labels. Through this method, the API will provide an HTML document.

Please be aware that the list of available templates can be obtained using the /templates method.

Request parameters:

GET /report

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/report?cwNo=4080-47&template=Msds&languageId=340700&countryId=182", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

<string xmlns="https://schemas.microsoft.com/2003/10/Serialization/">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;&#xD;
&lt;html xmlns="https://www.w3.org/1999/xhtml"&gt;&#xD;
&lt;head&gt;&#xD;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;&#xD;
    &lt;title&gt;Chemwatch - MSDS General Template&lt;/title&gt;&#xD; ...

PdfReport

Provides a byte stream containing the PDF content of a selected type of document in a specified template.

Note: It is highly recommended to store the returned stream of data into a byte array on the receiving side.

Request parameters:

GET /pdfReport

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/pdfreport?cwNo=1090&template=msds", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

Stream<byte>

GetPdfReportRest

Returns a byte stream with a PDF content of a selected type of a documentm, in a selected template.

Note: Labels for certain products may allow users to input printing time information, such as LOT numbers. This data can be transmitted to the backend using this method.

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "TemplateId": 192365,
  "CwNo": "1090",
  "CountryId": 82,
  "LanguageId": 340700,
  "TemplateType": 14,
  "AdditionalData": "{ \"<#PRINT_TIME_INPUT_additional_user_text_0>\": \"value1\", \"<#PRINT_TIME_INPUT_additional_user_text_1>\": \"value2\", \"<#PRINT_TIME_INPUT_additional_user_text_2>\": \"value3\" }"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/GetPdfReportRest", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

Stream<byte>

Document

This method can retrieve a Vendor SDS. To invoke this method, you must be aware of the Document Number. The parameter to be passed is constructed from the Document Number and the file extension (typically PDF), in the following format: "pd" + documentNumber + ".pdf". For instance, if the documentNumber is 11407714, the parameter to pass would be "pd" + "11407714" + ".pdf" = pd11407714.pdf.

GET /document

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/document?fileName=pd12383867.pdf", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

Stream<byte>

Folders

FolderTree

Returns the entire tree of Folders (Locations).

Note: The method has user context. Only part of the tree cicible to a user is returned.

GET /folderTree

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/foldertree", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "children": [],
        "state": "",
        "data": {
            "title": "COLLECTION"
        },
        "attr": {
            "id": "866668",
            "parentType": 2,
            "permission": "3",
            "isSystem": true,
            "hasBuilding": false,
            "hasGoogleMap": false,
            "has360": false,
            "hasArea": false,
            "folderFlags": 1,
            "DatapointGroupOrder": 0,
            "IsStoreMaterialsAllowed": true,
            "IsManifestFacilityArea": false,
            "IsChartable": false
        }
    },
    {
        "children": [
            {
                "children": [],
                "state": "",
                "data": {
                    "title": "CATALOGUE"
                },
                "attr": {
                    "id": "1828797",
                    "parentType": 2,
                    "parentId": "866669",
                    "permission": "3",
                    "isSystem": true,
                    "hasBuilding": false,
                    "hasGoogleMap": false,
                    "has360": false,
                    "hasArea": false,
                    "folderFlags": 1,
                    "DatapointGroupOrder": 0,
                    "IsEmpty": true,
                    "IsStoreMaterialsAllowed": true,
                    "IsManifestFacilityArea": false,
                    "IsChartable": false
                }
            },
            {
                "children": [
                    {
                        "children": [],
                        "state": "",
                        "data": {
                            "title": "1 doc"
                        },
                        "attr": {
                            "id": "868696",
                            "parentType": 2,
                            "parentId": "866671",
                            "permission": "3",
                            "hasBuilding": false,
                            "hasGoogleMap": false,
                            "has360": false,
                            "hasArea": false,
                            "DatapointGroupOrder": 0,
                            "IsStoreMaterialsAllowed": true,
                            "IsManifestFacilityArea": false,
                            "IsChartable": false
                        }
                    },
                    ...
                ]
            },
            ...
        ]
    },
    ...
]

MaterialsInFolder

This method returns materials in a folder.

Request parameters:

GET /materialsInFolder

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/materialsInFolder?folderId=1526313&withSubfolders=true", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "PageCount": 1,
    "RowCount": 1,
    "PageNumber": 1,
    "PageSize": 10,
    "Rows": [
        {
            "PreferredNames": [],
            "VendorName": "",
            "Tags": [
                1567
            ],
            "HasPreferredName": true,
            "HasDocuments": true,
            "HasEsds": false,
            "GeneralNote": "",
            "SdsNote": "",
            "DocumentId": 28916708,
            "InnerGroupingNumber": 0,
            "IsNormalizedProportion": false,
            "IsVgdUgdFromLatestDocument": false,
            "IsSingle": false,
            "IsUnregisteredProduct": false,
            "RegulatoryBurden": 4,
            "QueryDetails": [],
            "IsMolten": false,
            "IsSolution": false,
            "IsInPowderedForm": false,
            "Percentage": 0.0,
            "RootMaterialName": "1234567890",
            "TooltipMaterialName": "Reckitt & Colman Mortein Lure 'n' Kill High Performance",
            "RootMaterialId": 5514994,
            "HasVgd": false,
            "HasUgd": false,
            "IsSubMaterial": false,
            "IsVendorless": true,
            "IsHidden": false,
            "IsCatMaterial": false,
            "Synonym": "Reckitt & Colman Mortein Lure 'n' Kill High Performance Surface Spray Aerosol",
            "HasRedFlag": true,
            "HasContainer": false,
            "MsdsId": 30245,
            "GoldMsdsId": 30245,
            "FolderMaterialId": 119964787,
            "Storage": 1,
            "IsGold": true,
            "IsVgd": false,
            "IsUgd": false,
            "IsExactMatch": true,
            "GridTrackClass": 2,
            "Reasoncode": "",
            "VGDReasoncode": "",
            "FoundBySynonym": "",
            "HasAlternativeSds": false,
            "FoundByPreferredName": "",
            "Pressure": 0,
            "Temperature": 0,
            "SolidForm": 0,
            "SpecificGravity": 0.745,
            "SpecificGravityInitial": 0.745,
            "AvgVolume": 0.0,
            "AvgVolumeSum": 0.0,
            "AvgVolumeInitial": 0.0,
            "AvgVolumeUnit": "L",
            "AvgUnitSystem": 0,
            "LicVolume": 0.0,
            "LicVolumeSum": 0.0,
            "LicVolumeInitial": 0.0,
            "LicVolumeUnit": "L",
            "LicUnitSystem": 0,
            "LicVolumeDate": "0001-01-01T00:00:00",
            "MaxVolume": 0.0,
            "MaxVolumeSum": 0.0,
            "MaxVolumeInitial": 0.0,
            "MaxVolumeUnit": "L",
            "MaxUnitSystem": 0,
            "SumContainersVolume": 0.0,
            "FilterID": 0,
            "CurrentFolderId": 1526313,
            "CwNo": "7519-52",
            "MaterialId": 5514994,
            "MaterialType": 0,
            "DataSetType": 0,
            "HCodes": "AUH044,H222+H229,H304,H315,H317,H336,H340,H350,H361f,H373,H410",
            "RCodes": "R12,R38,R43,R44,R45,R46(2),R48/20,R51/53,R62,R67",
            "CAS": "",
            "FilteredIngredients": [],
            "Name": "1234567890",
            "Id": 5514994,
            "Rn": 0,
            "TotalRows": 1,
            "Dgc": "2.1",
            "Dgs1": "None",
            "Dgs2": "None",
            "Pkg": "None",
            "Un": "1950",
            "IsApproved": 0,
            "ApprovedAgent": "",
            "ApprovalRequestDate": "0001-01-01T00:00:00",
            "ApprovalAddDate": "0001-01-01T00:00:00",
            "ApprovalStartDate": "0001-01-01T00:00:00",
            "ApprovalEndDate": "0001-01-01T00:00:00",
            "ApprovalUseBy": 0,
            "ApprovalUse": 0,
            "IsRiskAssessed": 0,
            "IsEditable": true,
            "FolderId": 1526313,
            "State": 2,
            "HazardRating": 4,
            "HasGold": true,
            "CatalogName": "1234567890",
            "IssueDate": "2019-11-01T00:00:00",
            "ExtractionDate": "0001-01-01T00:00:00",
            "Country": "",
            "Language": ""
        }
    ]
}

Data Updates

UpdatesForDocuments

Returns the delta of changes in Vendor SDS and Vendor Extracted Data for a selected location.

Request parameters:

POST /updatesForDocuments

Example request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<api-key>");

var raw = JSON.stringify({
  "DateFrom": "03:20:2018 00:00:00",
  "DateTo": "04:02:2018 00:00:00",
  "FolderId": 866669,
  "PageSize": 500,
  "PageNumber": 1
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/UpdatesForDocuments", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "DocumentNumber": "13185934",
        "HasVgd": true,
        "PartNumber": [
            ""
        ],
        "IssueDate": "2014-11-17T00:00:00",
        "VgdUploadDate": "2017-10-24T00:00:00",
        "VendorId": 38013,
        "Name": "Copper(II) nitrate, trihydrate",
        "ReferenceId": ""
    },
    ...
]

Delta

Returns the delta of changes in Vendor SDS and Vendor Extracted Data for a selected location.

Request parameters:

POST /delta

Example request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<api-key>");

var raw = JSON.stringify({
  "DateFrom": "03:20:2018 00:00:00",
  "DateTo": "04:02:2018 00:00:00",
  "FolderId": 866669,
  "PageSize": 500,
  "PageNumber": 1
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/delta", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

[
    {
        "DocumentNumber": "13185934",
        "HasVgd": true,
        "PartNumber": [
            ""
        ],
        "IssueDate": "2014-11-17T00:00:00",
        "VgdUploadDate": "2017-10-24T00:00:00",
        "VendorId": 38013,
        "Name": "Copper(II) nitrate, trihydrate",
        "ReferenceId": ""
    },
    ...
]

MsdsRequest

Enables the submission of an SDS upload request to the Registration team. The provided information will be utilized by the registration team to search the Chemwatch database for potential matches. If a match is identified, it will be added to the client's Own database. In case of no match, either a new chemical will be created and saved into Own, or an online search will be conducted for a product and an SDS.

Request parameters:

POST /msdsRequest

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");
myHeaders.append("Content-Type", "application/json");

var raw = "{\r\n    \"ProductName\": \"test product 1\",\r\n    \"ProductNumber\": \"123-XYZ\",\r\n    \"Vendor\": \"test vendor 123\",\r\n    \"ReferenceId\": \"some internal ID\"\r\n}";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/msdsrequest", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

true

UpdateVolumes

Enables the update of Manifest volumes in a specific location for a product, which can be identified using either the User Part Number (preferred method) or the combination of Name, CAS, and Vendor.

Method Logic:

  • If a product is located in a specified location, the volume will be updated.
  • If a product is not found in the specified location but is found in the entire folders tree, it will be created in the specified location with the designated volume.
  • If a product is not found anywhere in the tree, a Registration request will be initiated.

Request parameters:

POST /updateVolumes

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "ProductName": "Buffer Solution pH 7.00",
  "Supplier": "Merck",
  "Location": "/ENTERPRISE/MANIFEST/id2529533/id489939/id489947",
  "Volume": 10,
  "VolumeUnit": "l"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/json/UpdateVolumes", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

{
    "Code": 200,
    "Message": "Updated material [11145758] in folder [489947]. New volume is [10 l]."
}

Move Product Endpoint

Moves a product from one folder to another within the system.

Method

  • HTTP Method: GET

Parameters

  • sourceFolderId (string, required): The identifier of the source folder from which the product will be moved.
  • destinationFolderId (string, required): The identifier of the destination folder to which the product will be moved.
  • docNumber (string, required): The document number associated with the product.

Response Success Response:

  • true. Error Response:
  • false.
GET /MoveProduct

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/MoveProduct?sourceFolderId=123&destinationFolderId=456&docNumber=789", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

true

Copy Product Endpoint

Copies a product from one folder to another within the system.

Method

  • HTTP Method: GET

Parameters

  • sourceFolderId (string, required): The identifier of the source folder from which the product will be copied.
  • destinationFolderId (string, required): The identifier of the destination folder to which the product will be copied.
  • docNumber (string, required): The document number associated with the product.

Response Success Response:

  • true. Error Response:
  • false.
GET /CopyProduct

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/CopyProduct?sourceFolderId=123&destinationFolderId=456&docNumber=789", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

true

Add Product Endpoint

Adds a new product to a folder within the system.

Method

  • HTTP Method: GET

Parameters

  • destinationFolderId (string, required): The identifier of the destination folder to which the product will be added.
  • docNumber (string, required): The document number associated with the product.

Response Success Response:

  • true. Error Response:
  • false.
GET /AddProduct

Example request

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<api-key>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://jr.chemwatch.net/api/v1/AddProduct?destinationFolderId=456&docNumber=789", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Example response

true