WEIGHING TECHNOLOGY · IN-HOUSE DEVELOPMENT · SUPPORT
+386 2 320 33 46info@preciz.si
PRECIZWeighing technology.
Connected to your process.

This page is not yet available in Slovenščina. The English version is shown.

USER MANUAL · v1.4 · ENGLISH

Scale Monitor REST API

Operating instructions and configuration

1. Introduction

The Scale Monitor REST API enables seamless integration between Scale Monitor and your systems, offering flexible options to suit your data exchange needs. Whether you’re looking to retrieve data from Scale Monitor or receive weighing data directly into your system, we’ve got you covered.

1.1. Integration options

Your System Calls the Scale Monitor API

  • Retrieve real-time or historical weighing data directly from Scale Monitor’s platform. • Access fully customized weighing data tailored to your operational requirements. • Leverage Scale Monitor’s robust data processing and storage capabilities to simplify your workflows.

Scale Monitor Sends Weighing Data to Your REST API

  • Configure Scale Monitor to push real-time weighing data directly to your web service. • Customize data triggers and delivery formats to seamlessly integrate into your existing systems. • Maintain complete control over how data is received and processed within your infrastructure.

Your system stores weighings in ScaleMonitor via REST API

  • Enables storing weighings in the ScaleMonitor cloud from your system.

1.2. Key benefits

  • Flexibility: Choose the integration method that best fits your operational model. • Real-Time Communication: Enable instant data sharing between Scale Monitor and your systems. • Customization: Tailor data formats, triggers, and workflows to suit your business processes. • Cross-Compatibility: Works with any scale or weighing device, regardless of the manufacturer.

1.3. Use cases • Automatically synchronize weighing data with ERP, WMS, or LIMS systems. • Receive notifications and data updates in real-time for precise monitoring. • Simplify complex workflows with automated data sharing and synchronization.

View original page 3 — diagrams and layoutScale Monitor REST API: original manual page 3
Scale Monitor REST API — illustration, page 4
View original page 4 — diagrams and layoutScale Monitor REST API: original manual page 4
Scale Monitor REST API — illustration, page 5
View original page 5 — diagrams and layoutScale Monitor REST API: original manual page 5
Scale Monitor REST API — illustration, page 6
View original page 6 — diagrams and layoutScale Monitor REST API: original manual page 6
CodeCause
200 - SuccessSuccessful response
400 - Bad requestInvalid parameters or error
401 - UnauthorizedInvalid authentication credentials
403 - ForbiddenInvalid permissions
404 - Not foundEndpoint does not exist

4. API Tokens

ScaleMonitor REST API uses standard JWT tokens which are provided upon request. The token must be sent with the request via an Authorization header of type Bearer.

5. API methods 5.1. Get weighings

Endpoint

POST /Api/ScaleMonitor/ScaleMonitorApi/getWeighings/

Description

Retrieves a list of scale monitor weighings based on the provided filters.

Request

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR ACCESS TOKEN

POST parameters (JSON BODY)

ParameterTypeDescription
dateTimeFromstring (YYYY-MM-DD HH:mm:ss)Start date filter for weighings
dateTimeTostring (YYYY-MM-DD HH:mm:ss)End date filter for weighings
weighingNumberintSpecific weighing number
weighingNumberFromintStart range for weighing numbers
weighingNumberTointEnd range for weighing numbers
scaleInventoryNumberstringInventory number of the scale
scaleTitlestringSearches scale titles for this
substring
scaleUuidstringUnique identifier of the scale
scaleIdintID of the scale
View original page 7 — diagrams and layoutScale Monitor REST API: original manual page 7

{ "dateTimeFrom": "2025-03-01", "dateTimeTo": "2025-03-25", "scaleId": 123 }

Response

Success response ( 200 OK )

{ "data": { "numberOfWeighings": 1, "weighings": [ { "weighingNumber": 1432, "weighingDateTime": "2025-03-22 11:39:58", "gross": "1600 kg", "net": "0 kg", "tare": "0 kg", "stability": 0, "scaleData": { "title": "Ranger 3000", "inventoryNumber": "D23541", "uuid": "db33e782-45a3-11ef-9aad-f9b59ffd187f", "id": 123 }, "additionalParameters": [ { "parameterName": "Material", "value": "Nail", "uuid": "99703ee3-f8fe-11ef-8d03-00155de9e731" }, { "parameterName": "Material ID", "value": "SN94735", "uuid": "96703ee3-f8fe-11ef-8d03-00155de9e731" } ] } ] }, "error": 0 }

Error response ( 400 Bad Request or 500 Internal Server Error )

{ "error": 1, "errorMessage": "Failed getting weighings: Internal server error" }

View original page 8 — diagrams and layoutScale Monitor REST API: original manual page 8

Endpoint

POST /Api/ScaleMonitor/ScaleMonitorApi/saveWeighing/

Description

Save weighing in the ScaleMonitor database.

Request

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR ACCESS TOKEN

POST parameters (JSON BODY)

ParameterTypeDescription
scaleIdintID of the scale
checkForDuplicatesintIs it checked before saving whether
the weighing with the given data
already exists?
constantForDuplicatestringConstant that is checked to see if
the weighing exists.
duplicateValueCheckstringValue that is checked to see if the
weighing exists.
parametersListA list of parameters with a constant
and value.

Example request

{ "scaleId": "123", "checkForDuplicates":false, "constantForDuplicate":"", "duplicateValueCheck":"", "parameters":[

{"constantName":"lot","value":"20250326001"}, {"constantName":"articleCode","value":"AB2025-16"}, {"constantName":"grossWeight","value":"12.4"}, {"constantName":"netWeight","value":"12.4"}, {"constantName":"tareWeight","value":"0"}, {"constantName":"unit","value":"g"} ] }

View original page 9 — diagrams and layoutScale Monitor REST API: original manual page 9

Success response ( 200 OK )

{ "data": { "text": "Weighing saved successfully", "weighingNumber": 253, "duplicateValueCheck": "", "weighingAdded": true }, "error": 0 }

Error response ( 400 Bad Request or 500 Internal Server Error )

{ "error": 1, "errorMessage": "Failed while saving weighing: E:Error while retrieving ScaleMonitor data }

Constants for the API are set in ScaleMonitor under the 'API settings' tab. In the table itself, you have the option to enter an API constant, which represents the name of the constant you send to the API. In the 'parameter' column, select the parameter that this constant will represent. Parameters can be static (e.g., gross weight, net weight...) or dynamic, such as additional parameters (e.g. LOT, Article code) that you define yourself.

Scale Monitor REST API — illustration, page 10
View original page 10 — diagrams and layoutScale Monitor REST API: original manual page 10

5.3. Importing database entries with API Endpoint

POST /Api/DynamicEntityList/DynamicEntityListApi/insertDatabaseValue/

Description

Imports database rows into the desired database.

Request

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR ACCESS TOKEN

POST parameters (JSON BODY)

A JSON object, where the title is the code of the database, inside of the object is an array of database rows, each row has the parameter code as the title and the value as the body.

There is no limit to the number of rows and databases that can be inserted into at once.

Example request

{ "Products": [ { "ID": "2025001", "Title": "Screw" }, { "ID": "2025002", "Title": "Bolt" } ] }

Response

Success response

{ "msg": "Database values have been inserted successfully!", "error": 0 }

View original page 11 — diagrams and layoutScale Monitor REST API: original manual page 11

{ "error": 1 "errorMessage": "Error inserting database values: Attribute has not been found!Internal server error" }

6. How to get scale ID

Scale IDs are written on every ScaleMonitor application for their respective scales. The drop down menu with the scale ID can be accessed by clicking on the info button (circle with “i”).

Scale Monitor REST API — illustration, page 12

7. Testing API

For testing it is recommended to use a software like ARC (Advanced rest client).

Testing can be done by entering the url, header information, authorization and body.

Scale Monitor REST API — illustration, page 12
Scale Monitor REST API — illustration, page 12
View original page 12 — diagrams and layoutScale Monitor REST API: original manual page 12
Scale Monitor REST API — illustration, page 13
Scale Monitor REST API — illustration, page 13

After all the required information is entered the data can be sent and a response will be received, where the user can confirm the validity of the response/data.

Scale Monitor REST API — illustration, page 13
View original page 13 — diagrams and layoutScale Monitor REST API: original manual page 13

START WITH YOUR PROCESS

What do you want to weigh,
connect or improve?

Tell us about your project.
Let's define the next step together.

Let's talk