API Documentation

Weighing and Measuring Solutions API

Welcome to the Weighing and Measuring Solutions API documentation. Here you'll find information on how to interact with our API, including details on endpoints, request formats, and response structures.

Quick Links

Authentication

Our API requires authentication to access. Include your API key in the API-Key header of each request.

API-Key: YOUR_API_KEY

Access to the vehicles and dockets endpoints are not granted to users by default. Contact our office to request access.

Endpoints

WEBSERVERS

GET /api/wbservers

Description:

Retrieve a list of available web servers.

Required Headers:

  • API-Key: Your API key.

Response:

SITECODES

GET /api/wbsites

Description:

Retrieve a list of sitecodes.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.

Response:

CUSTOMERS

GET /api/customers

Description:

Return a list of customers associated with your account.

The maximum number of records returned is limited to 1000.

If more than 1000 records are available, the field additionalRecordsAvailable indicates how many more there are.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.

Optional Headers:

  • LastIndex: In order to return additional records, specify the index value of the last record which was returned.

Response:

CARRIERS

GET /api/carriers

Description:

Return a list of available carriers.

The maximum number of records returned is limited to 1000.

If more than 1000 records are available, the field additionalRecordsAvailable indicates how many more there are.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.

Optional Headers:

  • LastIndex: In order to return additional records, specify the index value of the last record which was returned.

Response:

TRANSACTIONS

GET /api/transactions

Description:

Return a filtered list of transactions.

Not specifying a value for CustomerID and CarrierID will return all transactions associated with your user account within the specified data range. The relevant customers and carriers will be determined by WMS office staff during the creation of your unique API account and key.

The LinkedToKey field is useful to find a linked trailer record. A positive value is the Index for the corresponding trailer transaction. If this field contains -1 for a truck record, then there is no linked trailer.

The maximum number of records returned is limited to 1000.

If more than 1000 records are available, the field additionalRecordsAvailable indicates how many more there are.

If a value is specified for LastIndex then the first transaction returned will be the one following that value.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.
  • StartDate: Provide the start date in YYYY-MM-DD format (e.g., 2024-12-25).
  • FinishDate: Provide the end date in YYYY-MM-DD format (e.g., 2024-12-25).

Optional Headers:

  • LastIndex: In order to return additional records, specify the index value of the last record which was returned.
  • CarrierID: Provide the CarrierID if known
  • CustomerID: Provide a CustomerID if known
  • MostRecentOnly: Set to "T" to retrieve the most recent two transactions. This is useful when used in conjunction with VehNumberPlate to obtain the most recent transaction for a particular vehicle. If the most recent transaction for a specified vehicle was a split load, then the other transaction returned will be for the trailer. If it was a combined load, then the other transaction will be the previous transaction for the truck.
  • VehNumberPlate: Provide a number plate to search for a specific vehicle.

Response:

VEHICLES

GET /api/vehicles

Description:

The GET Vehicle method has two functions:

  • Searching for a single vehicle by numberplate via the VehNumberPlate header.
  • Retrieving a list of all vehicles via the GetAll header.

Access to vehicles are determined by the Customers and Carriers associated with your unique API account.

If more than 1000 records are available, the field additionalRecordsAvailable in the response indicates how many more there are.

Additional records can be accessed using the LastIndex header to request the next batch of records. Simply set this value to the index of the last record returned.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.
  • VehNumberPlate: The number plate of a single vehicle
  • OR
  • GetAll: Set the parameter of this header to 'Y' to retrive a list of all vehicles

Optional Headers

  • Sitecode: Must only be used with VehNumberPlate. Pass a SiteCode if known. Omitting the SiteCode header will fetch data from a global Vehicles table. Sitecodes can be found using the Sitecodes endpoint.
  • LastIndex: In order to return additional records, pass the index value of the last record which was returned.

Responses:

Searching a vehicle by plate:

Getting all vehicles:

(The next batch can be retrieved by passing the index of the last item (27513), with the LastIndex header)

POST /api/vehicles

Description:

Update vehicle tares for one or more vehicles by number plate.

Tare Update data is sent to the API via the request body.

The VehicleTares array must be present and contain JSON objects representing each vehicle to be updated.

For vehicles without an attached trailer, omit the TrailerPlate and TrailerTare fields from the JSON object.

Access to any given truck or trailer is determined by the Customers and Carriers associated with your unique API account.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.

Optional Headers:

  • Sitecode: Pass a SiteCode. Omitting this header will save data to the global Vehicles table. Sitecodes can be found using the Sitecodes endpoint.

JSON Schema:

Key Data Type Description
TruckPlate String The number plate of a truck
TruckTare Integer Tare value to the nearest kilogram
TrailerPlate String (Optional) Number plate of the attached trailer
TrailerTare Integer (Optional) Tare value of the attached trailer to the nearest kilogram
TareDateTime String Tare Date and Time in ISO8601 format (e.g., "2024-10-23T13:30:58")

Request Body:

Tare Update data for vehicle(s) must be passed in the request body using the following structure:

(Note: The second entry represents a truck with no attached trailer).

Response:

Dockets

GET /api/dockets

Description:

Check if a vehicle has any existing pre-entered dockets.

If a vehicle has an attached trailer, the pre-entered trailer data will be automatically fetched.

Access to any given vehicle is determined by the Customers and Carriers which are associated with your unique API account.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.
  • VehNumberPlate: The numberplate of the vehicle you are searching for.

Response:

POST /api/dockets

Description:

Allows pre-entering dockets for vehicles before they reach the weighbridge.

Docket data is sent to the API via the request body.

The PreEnteredDockets array must be present and contain JSON objects consisting of either a single truck, or a truck with one or two attached trailers.

Access to any given truck or trailer is determined by the Customers and Carriers associated with your unique API account.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.

JSON Schema:

All fields are mandatory unless specified

Key Data Type Description
TruckAndTrailer Boolean Include for Truck objects only. Set to true if the new record is for a truck and trailer combined in a single docket.
CustId String The customer ID associated with the truck/trailer
CarrierId String The carrier ID associated with the truck/trailer
ProdId String Product ID
VehNumberPlate String The number plate of the truck/trailer
Destination String The vehicle's destination
Docket String Bush docket number. Can also be used as a general docket field for non-log loads
Forest String Forest logs were sourced from
Gang String The felling gang
Grade String Grade of the logs
Length Double Length of the logs
NumOfLogs Integer Number of logs
SiteCode String Sitecode of the weighbridge the vehicle will weigh at
ValidFromDateTime String Starting Date and Time for validity period of docket in ISO8601 format (e.g., "2024-10-23T13:30:58"). Defaults to current date and time if no value is provided
ValidUntilDateTime String Expiration Date and Time for docket in ISO8601 format (e.g., "2024-10-23T13:30:58"). Defaults to 48hrs from current date and time if no value is provided
WeighsValidFor Integer Number of weighs the docket is valid for

Request Body Example:

The first entry represents a single truck with no trailer.

The second entry represents a truck and trailer combined in a single docket.

The third entry represents a truck and trailer with seperate dockets.

The fourth entry represents a truck and two trailers with seperate dockets.

Pre-entered data for vehicle(s) must be passed in the request body using the following structure:

Response:

A results object will be returned for each docket:

DELETE /api/dockets

Description:

Delete an existing pre-entered docket by passing the Docket number and VehNumberPlate.

Non-WMS users can only delete dockets which were created using their own API account.

Required Headers:

  • API-Key: Your API key.
  • WBServer: Use TESTSITE for testing purposes.
  • VehNumberPlate: The vehicle number plate for the Pre-entered record.
  • Docket: The docket number for the Pre-entered record.

Response:

Error Handling

When an error occurs, the API returns an error object with a status code and a description of the error.

{
      "status": 401,
      "statusDesc": "API key invalid"   
 }

Screenshots and Examples

Loading your API key

API key authentication in Postman
API Key

GET WBServers

Get a list of all available webservers
Webservers

GET WBSites

Get a list of sites
Sitecodes

GET Customers

View all customers associated with your account
Customers

LastIndex Parameter

Usage of LastIndex parameter to fetch additional records
Last Index

GET Transactions

Get a list of transactions between two dates
Dates

GET Transactions by CarrierID

Filtering transactions by CarrierID
CarrierID

GET Transactions by CustomerID

Filtering transactions by CustomerID
CustomerID

MostRecent Parameter

Using the MostRecent parameter to fetch the two newest transactions
MostRecent

MostRecent with VehNumberPlate

Using the MostRecent parameter in conjuction with a numberplate to fetch the latest transaction associated with that vehicle
NumberPlate

GET Vehicle (by Plate)

Search for a vehicle by its number plate
GetVehicle

GET Vehicle (All)

List all vehicles
GetVehicle

POST Vehicle

Update tares for a list of vehicles
PostVehicle

GET Dockets

Checking if a vehicle has a docket
GetPreEntered

POST Dockets

Creating dockets for a list of trucks and trailers
PostPreEntered

DELETE Dockets

Deleting a docket by number plate and docket number
DeletePreEntered