Skip to content

Weight Measures

When trucks cross a weighbridge, the ticket data usually lives in the scale vendor’s system — while the project’s mass balance lives in Ditio. The External Weight Measure API connects the two: your scale system pushes each measurement into Ditio, where it enters the verification → approval → invoicing workflow alongside the mass-transport data registered in the field.

  • You operate a weighbridge or mobile scale and want tickets to appear in Ditio automatically
  • You’re a scale-system vendor building a standard Ditio connector
  • You need weight data verified and approved in one place before invoicing
  • API credentials with the masstransportapiv1 scope — see Authentication
  • Company and project identifiers in Ditio, plus the Mass Transport API base URL — both provided by your Ditio contact during onboarding
MethodRouteDescription
POSTapi/external-weight-measureRegister a weight measurement
POSTapi/external-weight-measure/querySearch weight data
POSTapi/external-weight-measure/exportExport as CSV
PUTapi/external-weight-measure/mark-verifiedMark records as verified
PUTapi/external-weight-measure/mark-approvedMark records as approved
PUTapi/external-weight-measure/mark-invoicedMark records as invoiced

Weight measurements move through a pipeline:

  1. Register — your scale system pushes the measurement
  2. Verify — the data is reviewed and marked as verified
  3. Approve — an authorized user approves it for invoicing
  4. Invoice — records are marked as invoiced

Each mark-* endpoint advances records one step, so both Ditio users and your system always agree on where a ticket stands.

Terminal window
# Test (default) — production: https://identity.ditio.app
export DITIO_IDENTITY_BASE="https://identity.ditio.dev"
TOKEN=$(curl -s -X POST "$DITIO_IDENTITY_BASE/connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=masstransportapiv1" | jq -r '.access_token')
Terminal window
# DITIO_MASSTRANSPORT_BASE is provided during onboarding
curl -X POST "$DITIO_MASSTRANSPORT_BASE/api/external-weight-measure" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }' # measurement payload — see the interactive reference

For the full request and response schemas, use the interactive API reference or the endpoint page: External Weight Measures.

IssueCauseFix
401 UnauthorizedToken missing/expired, or missing the masstransportapiv1 scopeRequest the scope explicitly; refresh expired tokens
403 ForbiddenClient not enabled for mass-transport writesContact your Ditio contact to enable the integration
Records stuck as unverifiedVerification step not wiredCall mark-verified from your side, or agree with the site who verifies