Share API

A straightforward RESTful service designed for developers, enabling seamless integration with the Share platform by Every Software Solutions.

Test Environment
https://sharews.everysws.com/applicationweb/rest_test.nsf/share.xsp
Production Environment
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.

POST

upload

/upload

Upload a document to Share by sending one or more files. Returns the Share document unique id.

Headers

HeaderValue
Content-Typemultipart/form-data; boundary=

Body — multipart/form-data

ParameterTypeDescription
typeREQUIREDtextShare panel code
fileREQUIREDfileMultipart form file 1
file2OPTIONALfileMultipart form file 2

Responses

200 OK
Response — JSON200
{
  "docid": "5e92eebf_97c0_424a_90fc_3286341a2939",
  "wsid": "e2fd0c31-1d54-4104-bc2b-b37a2ef8848f",
  "status": "ok",
  "type": "<TYPE>",
  "description": "loaded success"
}
POST

setdocstatus

/setdocstatus

Set a specific status of a Share document.

Headers

HeaderValue
Content-Typeapplication/json
Acceptapplication/json

Body — application/json

ParameterTypeDescription
docidREQUIREDstringShare document unique id
itemREQUIREDstringItem name to set
valueREQUIREDstringValue to assign

Request Example

Request Body
{
  "docid": "5e92eebf_97c0_424a_90fc_3286341a2939",
  "item": "deliveredchemparser",
  "value": "ready"
}

Responses

200 OK
Response — JSON200
{
  "status": "ok",
  "type": "edit success",
  "description": "loaded success"
}
GET

getdocstatus

/getdocstatus?docid=&itemsname=

Get document status (published or not) and additional info with a specific Share document unique id.

Query Parameters

ParameterTypeDescription
docidREQUIREDstringShare document unique id
itemsnameOPTIONALstringSemicolon-separated list of item names (e.g. item1;item2;item3)

Responses

200 OK406 Already Exists404 Not Found
Response — JSON200
{
  "<itemname1>": "<itemvalue1>",
  "<itemname2>": "<itemvalue2>",
  "status": "ok",
  "type": "1",
  "description": "loaded success"
}
GET

getfilebydocid

/getfilebydocid?docid=&format=

Get a base64-encoded file with a specific Share document unique id.

Query Parameters

ParameterTypeDescription
docidREQUIREDstringShare document unique id
formatOPTIONALstringFormat of requested file (e.g. json)

Responses

200 OK204 No Content404 Not Found
Response — JSON200
{
  "filename": "attach file.pdf",
  "base64": "JVBERi0xLjQKJefzz9..."
}
GET

getbytesbydocid

/getbytesbydocid?docid=&format=

Get a binary file with a specific Share document unique id. Returns raw bytes.

Query Parameters

ParameterTypeDescription
docidREQUIREDstringShare document unique id
formatOPTIONALstringFormat of requested file (e.g. json)

Responses

200 OK204 No Content404 Not Found
Note: Response body is the raw binary content of the file.
GET

getfilebykey

/getfilebykey?type=&key1=&key2=

Get a base64-encoded file using a specific key combination.

Query Parameters

ParameterTypeDescription
typeREQUIREDstringShare panel code
key1REQUIREDstringFirst key value (e.g. product number)
key2OPTIONALstringSecond key value (e.g. date 20210303)

Responses

200 OK
Response — JSON200
{
  "filename": "attach file.pdf",
  "base64": "JVBERi0x..."
}
GET

getbytesbykey

/getbytesbykey?type=&key1=&key2=

Get a binary file using a specific key combination. Returns raw bytes.

Query Parameters

ParameterTypeDescription
typeREQUIREDstringShare panel code
key1REQUIREDstringFirst key value
key2OPTIONALstringSecond key value

Responses

200 OK
Note: Response body is the raw binary content of the file.
GET

getdocdata

/getdocdata?docid=&language=&content-type=&timezone=

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

ParameterTypeDescription
docidREQUIREDstringShare document unique id
languageREQUIREDstringISO 639 language code (default: en)
content-typeREQUIREDstringResponse format: json or xml
timezoneOPTIONALstringTime zone identifier (e.g. Europe/Rome)

Responses

200 OK
Response — JSON (simplified)200
{
  "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.
      }
    }
  ]
}
Note: Each item contains name, value (array), optionally description and icon arrays.
GET

getraltoken

/getraltoken?type=&recipient=

Get a query string token for a specific recipient code. Used for Receipt Area Link (RAL).

Query Parameters

ParameterTypeDescription
typeREQUIREDstringShare panel code
recipientREQUIREDstringRecipient code

Responses

200 OK
Response — JSON200
{
  "url_params": "guidunread=1-E9L7R4GX&user=ebs001s0000195"
}
GET

getwebtoken

/getwebtoken?type=&usertype=&user=&query=

Get a variable query string for a specific user. To be used with Share Viewer.

Query Parameters

ParameterTypeDescription
typeREQUIREDstringShare panel code
usertypeREQUIREDstringShare user typology code
userOPTIONALstringClient username (for activity tracing)
queryOPTIONALstringSingle additional filter (field=value)

Responses

200 OK
Response — JSON200
{
  "url_params": "token=57FSFGHL&db=<db>&type=<panel code>&..."
}
GET

gethtmlbykey

/gethtmlbykey?type=&key1=&key2=

Get HTML code to display a specific Share document in a browser. Uses key-based lookup.

Query Parameters

ParameterTypeDescription
typeREQUIREDstringShare panel code
key1REQUIREDstringFirst key value
key2OPTIONALstringSecond key value

Responses

200 OK
Note: Returns text/html with a JavaScript redirect to the Share Viewer URL.
GET

gethtmlbydocid

/gethtmlbydocid?docid=

Get HTML code to display a specific Share document in a browser. Uses document unique id.

Query Parameters

ParameterTypeDescription
docidREQUIREDstringShare document unique id

Responses

200 OK
Note: Returns text/html with a JavaScript redirect to the Share Viewer URL.
GET

getpaneldata

/getpaneldata?type=&language=&content-type=&details=&timezone=

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

ParameterTypeDescription
typeREQUIREDstringShare panel code
languageREQUIREDstringISO 639 language code (default: en)
content-typeREQUIREDstringResponse format: json or xml
detailsOPTIONALbooleanInclude document details (true / false)
timezoneOPTIONALstringTime zone identifier (e.g. Europe/Rome)

Responses

200 OK
Response — JSON (simplified)200
{
  "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": { ... }
              }
            }
          ]
        }
      ]
    }
  ]
}
Note: The docsref array contains sub-documents grouped by type. SEZ03 = Section 3 component data (CAS, percentage, H/R statements). DETT = detail documents.
GUIDE

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

1
Your Application
User authenticates on your system and requests to view a Share panel
→
2
API Call — /getwebtoken
Your backend calls the Share API with Basic Auth, passing panel code, user type, user name and optional query filter
→
3
Receive Token
The API returns a url_params string containing a one-time token (OTP) and all parameters
→
4
Build URL & Redirect
Concatenate the fixed base URL with the received parameters and redirect the user's browser

URL Structure

Fixed Base URL
https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?
Dynamic Part (from /getwebtoken response)
token=<token>&db=<db>&type=<type>&usertype=<usertype>&user=<user>&<query>

Parameter Reference

ParameterDescriptionSource
tokenOne-time password (OTP) generated per call. Ensures data confidentiality by binding the view to the requesting environment.API response
dbAlphanumeric identifier of the environment containing the data/documents to display.Provided by Every SWS at setup
typeIdentifier of the Share Panel to display.Provided by Every SWS at setup
usertypeIdentifier of the calling user's profile type.Provided by Every SWS at setup
userIdentifier of the calling user. Defined by the caller; Every SWS logs it for tracing.Defined by caller
queryOptional additional filter on a panel field (format: field=value).Defined by caller

Example

Complete Viewer URL
https://www.everysws.com/applicationweb/sdpquery.nsf/index.xsp?token=ABCDEF&db=DENSRK&type=VIEWER_EFFETTIVE&usertype=VIEWER&user=USERDEMO
This URL would open a browser page displaying, with token ABCDEF, the documents in the VIEWER_EFFETTIVE panel for environment DENSRK, profiled as user type VIEWER with username USERDEMO.

Code Examples

JavaScript / Node.js
// 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;
Python
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)
cURL
# 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

OTP Token: Each token is a one-time password generated per API call. It binds the viewer session to the requesting environment, ensuring that data cannot be accessed by unauthorized parties.
Backend Only: The /getwebtoken API call must be made from your backend server. Never expose your Basic Auth credentials in client-side code.
Credentials: API credentials for the integration are provided by Every SWS during the setup phase. Contact info@everysws.com for setup assistance.
GUIDE

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.

Result: once processing is completed, the SDS is published in the configured "SDS Digitized by ChemParser" panel with expected metadata, and can then be queried or routed into your workflow.

Process Flow

1
Upload SDS — /upload
Send the SDS PDF (and optional metadata JSON) to the target Share panel and store returned docid.
→
2
Poll Status — /getdocstatus
Check ChemParser processing state until it reaches ready.
→
3
Get JSON — /getbytesbydocid
Request the digitized output in json format using the same docid.

Step 1: Send SDS to ChemParser

Use /upload with multipart body.

FieldRequiredDescription
typeYesTarget Share panel code for SDS digitization (provided by Every SWS).
fileYesSDS PDF file to be digitized by ChemParser.
file2NoOptional JSON payload with custom metadata agreed during setup (e.g. site, external SDS code).
Store these values: response 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.

ParameterRequiredDescription
docidYesUnique ID returned by /upload.
itemsnameYesField name containing ChemParser status (provided during setup).
Possible status values
- error
- received
- in process
- processed
- quality check
- ready
Polling rule: proceed to Step 3 only when status is 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.

ParameterRequiredDescription
docidYesUnique SDS identifier received in Step 1.
formatYesMust be json for this process.
Response: raw content of the JSON file produced by ChemParser with extracted SDS data.

Quick cURL Example

1) Upload SDS
curl -u username:password -F "type=<PANEL_CODE>" -F "file=@./sds.pdf" \
  "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/upload"
2) Poll status
curl -u username:password \
  "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/getdocstatus?docid=<DOCID>&itemsname=<CHEMPARSER_STATUS_FIELD>"
3) Download JSON
curl -u username:password \
  "https://sharews.everysws.com/applicationweb/rest.nsf/share.xsp/getbytesbydocid?docid=<DOCID>&format=json"