Share API
A straightforward RESTful service designed for developers, enabling seamless integration with the Share platform by Every Software Solutions.
https://sharews.everysws.com/applicationweb/rest_test.nsf/share.xsp
https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp
🔒 Authentication
All requests require Basic Auth. Include Authorization: Basic <credentials> where credentials is Base64-encoded username:password.
upload
Upload a document to Share by sending one or more files. Returns the Share document unique id.
Headers
| Header | Value |
|---|---|
| Content-Type | multipart/form-data; boundary= |
Body — multipart/form-data
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | text | Share panel code |
| fileREQUIRED | file | Multipart form file 1 |
| file2OPTIONAL | file | Multipart form file 2 |
Responses
{
"docid": "5e92eebf_97c0_424a_90fc_3286341a2939",
"wsid": "e2fd0c31-1d54-4104-bc2b-b37a2ef8848f",
"status": "ok",
"type": "<TYPE>",
"description": "loaded success"
}setdocstatus
Set a specific status of a Share document.
Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
Body — application/json
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
| itemREQUIRED | string | Item name to set |
| valueREQUIRED | string | Value to assign |
Request Example
{
"docid": "5e92eebf_97c0_424a_90fc_3286341a2939",
"item": "deliveredchemparser",
"value": "ready"
}Responses
{
"status": "ok",
"type": "edit success",
"description": "loaded success"
}getdocstatus
Get document status (published or not) and additional info with a specific Share document unique id.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
| itemsnameOPTIONAL | string | Semicolon-separated list of item names (e.g. item1;item2;item3) |
Responses
{
"<itemname1>": "<itemvalue1>",
"<itemname2>": "<itemvalue2>",
"status": "ok",
"type": "1",
"description": "loaded success"
}getfilebydocid
Get a base64-encoded file with a specific Share document unique id.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
| formatOPTIONAL | string | Format of requested file (e.g. json) |
Responses
{
"filename": "attach file.pdf",
"base64": "JVBERi0xLjQKJefzz9..."
}getbytesbydocid
Get a binary file with a specific Share document unique id. Returns raw bytes.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
| formatOPTIONAL | string | Format of requested file (e.g. json) |
Responses
getfilebykey
Get a base64-encoded file using a specific key combination.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| key1REQUIRED | string | First key value (e.g. product number) |
| key2OPTIONAL | string | Second key value (e.g. date 20210303) |
Responses
{
"filename": "attach file.pdf",
"base64": "JVBERi0x..."
}getbytesbykey
Get a binary file using a specific key combination. Returns raw bytes.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| key1REQUIRED | string | First key value |
| key2OPTIONAL | string | Second key value |
Responses
getdocdata
Get all document data with a specific Share document unique id. Returns full document details including SDS fields, hazard classifications, risk statuses, and more.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
| languageREQUIRED | string | ISO 639 language code (default: en) |
| content-typeREQUIRED | string | Response format: json or xml |
| timezoneOPTIONAL | string | Time zone identifier (e.g. Europe/Rome) |
Responses
{
"type": "1",
"count": 1,
"props": [],
"docs": [
{
"wsid": "66151081-3E71-...",
"unid": "19B8C8D99E09...",
"docid": "9fe77a8c-4892-...",
"items": {
"NUM": { "value": ["LOCTITE 401"], ... },
"DATE": { "value": ["2015-02-24"], ... },
"FILE": { "value": ["Loctite 401.pdf"], ... },
"SDS_02_2_PICTOGRAMS": { ... },
"SDS_02_2_STATEMENTS_H": { ... },
// ... all SDS fields, risk statuses, etc.
}
}
]
}name, value (array), optionally description and icon arrays.getraltoken
Get a query string token for a specific recipient code. Used for Receipt Area Link (RAL).
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| recipientREQUIRED | string | Recipient code |
Responses
{
"url_params": "guidunread=1-E9L7R4GX&user=ebs001s0000195"
}getwebtoken
Get a variable query string for a specific user. To be used with Share Viewer.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| usertypeREQUIRED | string | Share user typology code |
| userOPTIONAL | string | Client username (for activity tracing) |
| queryOPTIONAL | string | Single additional filter (field=value) |
Responses
{
"url_params": "token=57FSFGHL&db=<db>&type=<panel code>&..."
}gethtmlbykey
Get HTML code to display a specific Share document in a browser. Uses key-based lookup.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| key1REQUIRED | string | First key value |
| key2OPTIONAL | string | Second key value |
Responses
text/html with a JavaScript redirect to the Share Viewer URL.gethtmlbydocid
Get HTML code to display a specific Share document in a browser. Uses document unique id.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| docidREQUIRED | string | Share document unique id |
Responses
text/html with a JavaScript redirect to the Share Viewer URL.getpaneldata
Get the entire content of a Share panel as JSON or XML. Returns all documents with metadata, SDS fields, component details (SEZ03), and more.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| typeREQUIRED | string | Share panel code |
| languageREQUIRED | string | ISO 639 language code (default: en) |
| content-typeREQUIRED | string | Response format: json or xml |
| detailsOPTIONAL | boolean | Include document details (true / false) |
| timezoneOPTIONAL | string | Time zone identifier (e.g. Europe/Rome) |
Responses
{
"type": "1",
"count": 2,
"props": [],
"docs": [
{
"wsid": "93a3e4c2_8509_...",
"docid": "aa5781a9_e646_...",
"items": { /* SDS fields, metadata */ },
"docsref": [
{
"type": "SEZ03",
"count": 1,
"docs": [
{
"items": {
"SDS_03_COMPONENT": { ... },
"SDS_03_CAS": { ... },
"SDS_03_PERC": { ... }
}
}
]
}
]
}
]
}docsref array contains sub-documents grouped by type. SEZ03 = Section 3 component data (CAS, percentage, H/R statements). DETT = detail documents.Viewer Integration
How to embed a Share Panel view into your web application, allowing authenticated users to search and view documents without a dedicated Share user profile.
Overview
The Share Viewer allows you to display a simplified view of a Share Panel inside your own application. Users authenticated on your system can search and browse documents stored in Share — without needing their own Share credentials.
The viewer URL is composed of a fixed base and a dynamic query string obtained via the /getwebtoken API endpoint.
Integration Flow
/getwebtokenurl_params string containing a one-time token (OTP) and all parametersURL Structure
https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?
token=<token>&db=<db>&type=<type>&usertype=<usertype>&user=<user>&<query>
Parameter Reference
| Parameter | Description | Source |
|---|---|---|
| token | One-time password (OTP) generated per call. Ensures data confidentiality by binding the view to the requesting environment. | API response |
| db | Alphanumeric identifier of the environment containing the data/documents to display. | Provided by Every SWS at setup |
| type | Identifier of the Share Panel to display. | Provided by Every SWS at setup |
| usertype | Identifier of the calling user's profile type. | Provided by Every SWS at setup |
| user | Identifier of the calling user. Defined by the caller; Every SWS logs it for tracing. | Defined by caller |
| query | Optional additional filter on a panel field (format: field=value). | Defined by caller |
Example
https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?token=ABCDEF&db=DENSRK&type=VIEWER_EFFETTIVE&usertype=VIEWER&user=USERDEMO
ABCDEF, the documents in the VIEWER_EFFETTIVE panel for environment DENSRK, profiled as user type VIEWER with username USERDEMO.Code Examples
// Step 1: Call /getwebtoken to obtain the dynamic URL part const credentials = btoa('username:password'); const baseApi = 'https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp'; const res = await fetch( `${baseApi}/getwebtoken?type=VIEWER_EFFETTIVE&usertype=VIEWER&user=USERDEMO`, { headers: { 'Authorization': `Basic ${credentials}` } } ); const data = await res.json(); // Step 2: Build the full viewer URL const viewerBase = 'https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?'; const viewerUrl = viewerBase + data.url_params; // Step 3: Redirect or embed window.location.href = viewerUrl; // or use in an iframe: document.getElementById('frame').src = viewerUrl;
import requests # Step 1: Call /getwebtoken base_api = "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp" params = { "type": "VIEWER_EFFETTIVE", "usertype": "VIEWER", "user": "USERDEMO" } res = requests.get( f"{base_api}/getwebtoken", params=params, auth=("username", "password") ) data = res.json() # Step 2: Build viewer URL viewer_base = "https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?" viewer_url = viewer_base + data["url_params"] # Step 3: Use the URL (redirect, embed, etc.) print(viewer_url)
# Step 1: Get the token curl -u username:password \ "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/getwebtoken?type=VIEWER_EFFETTIVE&usertype=VIEWER&user=USERDEMO" # Response: {"url_params": "token=ABCDEF&db=DENSRK&type=VIEWER_EFFETTIVE&..."} # Step 2: Open in browser # https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?token=ABCDEF&db=DENSRK&...
Security Notes
/getwebtoken API call must be made from your backend server. Never expose your Basic Auth credentials in client-side code.ChemParser SDS Digitization
How to digitize SDS documents with ChemParser through Share-SDS Drive, from upload to processing status polling and JSON retrieval.
Overview
Share-SDS Drive can interface with ChemParser to transform SDS PDFs into structured JSON data. The full process is composed of three API steps and uses the same Basic Auth credentials provided during Every SWS integration setup.
Process Flow
/uploaddocid./getdocstatusready./getbytesbydocidjson format using the same docid.Step 1: Send SDS to ChemParser
Use /upload with multipart body.
| Field | Required | Description |
|---|---|---|
| type | Yes | Target Share panel code for SDS digitization (provided by Every SWS). |
| file | Yes | SDS PDF file to be digitized by ChemParser. |
| file2 | No | Optional JSON payload with custom metadata agreed during setup (e.g. site, external SDS code). |
docid identifies the SDS for all following API calls; status must be ok.Step 2: Check ChemParser Processing Status
Use /getdocstatus to read processing status for the uploaded SDS.
| Parameter | Required | Description |
|---|---|---|
| docid | Yes | Unique ID returned by /upload. |
| itemsname | Yes | Field name containing ChemParser status (provided during setup). |
- error - received - in process - processed - quality check - ready
ready. In all other states, repeat Step 2. Recommended interval: around 30 minutes between checks.Step 3: Retrieve Digitized JSON
When status is ready, call /getbytesbydocid to retrieve ChemParser output.
| Parameter | Required | Description |
|---|---|---|
| docid | Yes | Unique SDS identifier received in Step 1. |
| format | Yes | Must be json for this process. |
Quick cURL Example
curl -u username:password -F "type=<PANEL_CODE>" -F "file=@./sds.pdf" \ "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/upload"
curl -u username:password \ "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/getdocstatus?docid=<DOCID>&itemsname=<CHEMPARSER_STATUS_FIELD>"
curl -u username:password \ "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/getbytesbydocid?docid=<DOCID>&format=json"