Scale API
Scale API is a REST web service that provides users with full access to their own load data.
Sample Application Download
Authentication
Scale Api uses OAuth 2.0 Authorization. After registering your organization, users create (or acquire an existing) OAuth token. That token allows users to access their data within a defined scope. You can read a more detailed description under the Authentication section.
Media Types
For most resources this API returns data as a JSON object. Some endpoints can be configured to return a CSV data file.
Errors
The common HTTP Response Status Codes are used.
Versioning
Some resources return a value called VersionNumber. This number can be used to detect when a change has happened between requests. An application could store there last known version number and when returned a value greater than that, pull the necessary resources.
Record Data ¶
Load Records ¶
Load Records are the main source of load data. They include instances where a driver recorded a load without any interference or event. Load records can either be assigned a pickup site at the time of pickup by the driver, or retroactively by way of GeoRoute/GeoFencing.
Get Load RecordsGET/scaleapi/v1/loads{?after,before,product,serviceType,customer,truck,serialNumber,exported,utc,useUploadT,custTitle,showNegative,firstRecord,recordCount,sortDesc}
Example URI
- after
string
(optional) Example: 7-18-2018specifies the beginning of the interval of returned records
- before
string
(optional) Example: 8-20-2018specifies the end of the interval of returned records
- product
string
(optional) Example: "recycle"return only records with the matching product
- serviceType
string
(optional) Example: "8FL"return only records with the matching service type
- customer
string
(optional) Example: "Acme Hardware"return only records for the specified customer
- truck
string
(optional) Example: "209950"return records only for the specified truck
- serialNumber
number
(optional) Example: 92947return records only for the specified meter serial number
- exported
boolean
(optional) Example: false- utc
boolean
(optional) Example: falsebefore/after time entered in UTC time zone
- useUploadT
boolean
(optional) Example: falsebefore/after time entered as the UploadTime instead of the PickupTime
- custTitle
boolean
(optional) Example: falsereturn custom field names for data instead of the default names
- showNegative
boolean
(optional) Example: falseif true, return negative weights, else return zero for negative weights
- firstRecord
int
(optional) Example: 0If provided, indicates the first record in the dataset to be returned for pagination
- recordCount
int
(optional) Example: 10If provided, indicates the number of records after firstRecord to return for pagination
- sortDesc
boolean
(optional) Example: falseIf present and equal true, sorts by PickupTime descending, else ascending
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"MeterSerialNumber": 99586,
"Route": " --unknown-- ",
"GeoRoute": false,
"DateTime": "2022-10-19T14:01:44",
"UploadTime": "2022-12-13T14:22:34",
"Latitude": 39.756598,
"Longitude": -75.566241,
"ServiceLatitde": 39.080733,
"ServiceLongitude": -76.848705,
"Product": "PRODUCT UNKNOWN",
"LoadWeight": 2705,
"NetVehicleWeight": 24668,
"ContainerWeight": 1377,
"RFIDTag": "",
"Driver": " --unspecified-- , --unspecified-- ",
"Truck": "209590",
"SiteName": "10054936660",
"SiteId": "10054936660",
"CustomerName": "Acme Hardware",
"CustomerId": "10054936660",
"ServiceType": "8FL",
"ContainerVolume": 8,
"ZoneId": 1,
"TypeId": 1,
"Address": "12 Main St",
"Address2": "",
"City": "Gotham",
"State": "MD",
"ZipCode": "20770-1021",
"LoadType": "Load",
"Extra1": 0,
"Extra2": 0,
"Extra3": 0,
"Extra4": 0,
"ServiceId": "1"
},
]
Create Load RecordPOST/scaleapi/v1/loads
Example URI
Standard Load Record
A LoadmanAccount of 6291455 tells Load Manager to assign the load by a customer account by matching the pickup location with the service location
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"DateTime": "2018-04-25T00:00:00",
"LoadWeight": 1000,
"ContainerWeight": 500,
"NetVehicleWeight": 12000,
"ProductId": 1,
"Longitude": 12.36689,
"Latitude": 12.312312,
"LoadmanAccount": 12,
"RouteId": 1,
"DriverId": 1,
"MeterSerialNumber": 1234,
"RFIDTag": "123456789012345678901234",
"AssetId": 1,
"Extra1": 0,
"Extra2": 0,
"Extra3": 0,
"Extra4": 0
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber":2968,
"Records":[
{
"MeterSerialNumber":21,
"RouteId":1,
"Route":null,
"GeoRoute":false,
"DateTime":"2023-04-23T12:32:10",
"UploadTime":"0001-01-01T00:00:00",
"Latitude":39.757772,
"Longitude":-75.565144,
"ServiceLatitude":0.0,
"ServiceLongitude":0.0,
"LoadmanAccount":6291455,
"ProductId":1,
"Product":null,
"ServiceTypeId":0,
"ServiceType":null,
"LoadWeight":1000,
"NetVehicleWeight":0,
"ContainerWeight":500,
"ContainerVolume":0,
"RFIDTag":null,
"DriverId":1,
"Driver":null,
"TruckId":0,
"Truck":null,
"SiteName":null,
"SiteId":null,
"CustomerName":null,
"CustomerId":null,
"Exported":false,
"Extra1":0,
"Extra2":0,
"Extra3":0,
"Extra4":0,
"ZoneId":0,
"TypeId":0,
"AssetId":0,
"DataType":0,
"Address":null,
"Address2":null,
"City":null,
"State":null,
"ZipCode":null,
"ServiceId":null,
"Delivery":0,
"AccountDetect":0
},
]
}
]
Create Missed LoadPOST/scaleapi/v1/loads/missed
A missed load is when the fork angle prevents the tare weight from being weighed. Load Manager will take the average of previous tare weights at that location to compute the load weight.
Example URI
Missed Load Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 123456,
"Latitude": 12.312312,
"Longitude": 12.366890,
"DateTime": "2018-04-25T00:00:00",
"RouteId": 1,
"ProductId", 1,
"GrossWeight": 10000,
"NetVehicleWeight": 10000,
"LoadmanAccount": 10
"GeoRoute": false
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"Latitude": 12.312312,
"Longitude": 12.366890,
"DateTime": "2018-04-25T00:00:00",
"RouteId": 1,
"ProductId", 1,
"GrossWeight": 10000,
"NetVehicleWeight": 10000,
"LoadmanAccount": 10
"GeoRoute": false
},
]
}
Create Landfill RecordPOST/scaleapi/v1/loads/landfill
A landfill record allows the driver to enter gross and tare weighs from the scale at the landfill or transfer station
Example URI
Landfill Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"ProductId": 3,
"RouteId": 6,
"TruckId": 7,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"NetVehicleWeight": 1000,
"EmptyWeight": 100,
"LoadmanAccount": 12
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1
}
]
}
Create Confirm Pickup RecordPOST/scaleapi/v1/loads/confirm
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"ProductId": 1,
"Latitude": 12.312312,
"Longitude": 12.36689,
"DateTime": "2019-01-01T15:42:01",
"MeterSerialNumber": 99586,
"RouteId": 2,
"NetVehicleWeight": "3411",
"LoadmanAccount": 1234
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 24,
"Records": [
{
"MeterSerialNumber": 99586,
"RouteId": 2,
"Route": null,
"GeoRoute": false,
"DateTime": "2019-01-01T15:42:01",
"Latitude": 12.312312,
"Longitude": 12.36689,
"LoadmanAccount": 123,
"ProductId": 1,
"RFIDTag": null,
"DriverId": 1,
"TruckId": 3
}
]
}
GPS Records ¶
Get GPS RecordGET/scaleapi/v1/gps{?before,after,truckId,utc}
Example URI
- before
string
(optional) Example: 4-20-2018- after
string
(optional) Example: 1-18-2018- truckId
number
(optional) Example: 2- utc
boolean
(optional) Example: false
Get GPS Records
Headers
Content-Type: application/json
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Latitude": 47.505711,
"Longitude": -122.134928,
"DateTime": "2019-03-10T00:00:06",
"MeterSerialNumber": 124731,
"Truck": "1234",
"TruckId": 2
}
]
Create GPS RecordPOST/scaleapi/v1/gps
Example URI
Create GPS Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"DateTime": "2019-03-09T19:32:02",
"Latitude": "47.50572774371224",
"Longitude": "-122.13505712051482",
"MeterSerialNumber": "124731",
"RouteId": "10",
},
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"DateTime": "2019-03-09T19:32:02",
"Latitude": "47.50572774371224",
"Longitude": "-122.13505712051482",
"MeterSerialNumber": "124731",
"RouteId": "10",
"DriverId": 6
},
]
}
Asset Records ¶
In the event that assets need to be delivered their pickup and delivery can be tracked by creating an asset record. The boolean “Pickup” should be true when recording a pickup, and false when recording a dropoff.
Create Asset RecordPOST/scaleapi/v1/assets/records
Example URI
Create Asset Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"AssetId": 2,
"Pickup": true
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"AssetId": 2,
"Pickup": true,
"DriverId": 6
}
]
}
Event Record ¶
Event Records occur every time an event prohibits a driver from completing a task. At the time of occurance drivers can specify the type of event that is stopping them from completing their task. An event record does not stop a driver from coming back to that task at a later time.
Create Event RecordPOST/scaleapi/v1/events/records
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"ProblemId": 3,
"Image": "dGVzdGluZw==..."
"Capition": "Gate Closed"
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"ProblemId": 3,
"Image": "dGVzdGluZw==..."
"Capition": "Gate Closed",
"DriverId": 6
}
]
}
Get Event RecordsGET/scaleapi/v1/events/records{?before,after,serialNumber,exported,utc}
Example URI
- before
string
(required) Example: '201902-01’ (optional, string)
- after
string
(required) Example: '201901-01’ (optional, string)
- serialNumber
number
(optional) Example: 12345- exported
boolean
(optional) Example: false- utc
boolean
(optional) Example: false
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"MeterSerialNumber": 1000,
"Route": "1",
"DateTime": "2019-04-03T11:10:04",
"Latitude": 0,
"Longitude": 0,
"ServiceLatitude": 47.488341,
"ServiceLongitude": -122.175804,
"Customer": "Renton Collision Center",
"Site": "Renton Collision Cen",
"Product": "PRODUCT UNKNOWN",
"Problem": "GATE LOCKED",
"Driver": " --unspecified-- , --unspecified-- ",
"Truck": "100",
"RFIDTag": ""
}
]
Get Event PhotosGET/scaleapi/v1/events/photos{?dateTime,org,loc,truckid}
Example URI
- dateTime
string
(required) Example: '191008091301'- org
string
(required) Example: 'Demo'- loc
string
(required) Example: 'Renton'- truckid
number
(required) Example: 10
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
"Photo will be downloaded"
Meter Record ¶
Meter records allow the capture of when the truck meter is turned on and off. The boolean “Power” should be set to true when the meter is turned on, and false when turned off.
Create Meter Power RecordPOST/scaleapi/v1/meter/power
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"Power": true
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",,
"Latitude": 12.312312,
"Longitude": 12.366890,
"LoadmanAccount": 12,
"ProductId": 1,
"Power": true,
"DriverId": 6
}
]
}
Create Zero RecordsPOST/scaleapi/v1/meter/zero
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"ProductId": 2,
"RouteId": 2,
"LoadmanAccount": 123,
"MeterSerialNumber": 99586,
"NetVehicleWeight": 1000,
"Latitude": 1,
"Longitude": 1,
"DateTime": "2019-07-03T16:22:01"
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 25,
"Records": [
{
"RouteId": 2,
"ProductId": 2,
"MeterSerialNumber": 99586,
"TruckId": 3,
"Latitude": 1,
"Longitude": 1,
"DateTime": "2019-07-03T16:22:01",
"DriverId": 1,
"NetVehicleWeight": 1000,
"GeoRoute": false,
"AccountDetect": 0
}
]
}
Create Customer Arrival RecordPOST/scaleapi/v1/customers/arrive
Example URI
Body
[
{
"ProductId": 2,
"Latitude": 1,
"Longitude": 1,
"DateTime": "2019-07-02T15:42:04",
"MeterSerialNumber": 99586,
"RouteId": 2,
"LoadmanAccount": 123
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 23,
"Records": [
{
"MeterSerialNumber": 99586,
"RouteId": 2,
"Route": null,
"GeoRoute": false,
"DateTime": "2019-07-02T15:42:04",
"Latitude": 1,
"Longitude": 1,
"LoadmanAccount": 123,
"AccountDetect": 0,
"ProductId": 2,
"RFIDTag": null,
"DriverId": 1,
"TruckId": 3
}
]
}
Create Customer Departure RecordPOST/scaleapi/v1/customers/depart
Example URI
Headers
Authorizaton: Bearer {token}
Body
[
{
"ProductId": 2,
"Latitude": 1,
"Longitude": 1,
"DateTime": "2019-07-02T15:42:04",
"MeterSerialNumber": 99586,
"RouteId": 2,
"LoadmanAccount": 123
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 23,
"Records": [
{
"MeterSerialNumber": 99586,
"RouteId": 2,
"Route": null,
"GeoRoute": false,
"DateTime": "2019-07-02T15:42:04",
"Latitude": 1,
"Longitude": 1,
"LoadmanAccount": 123,
"AccountDetect": 0,
"ProductId": 2,
"RFIDTag": null,
"DriverId": 1,
"TruckId": 3
}
]
}
Learn Location Records ¶
Create Learn Location RecordPOST/scaleapi/v1/services/learn
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Latitude": 38.936031,
"Longitude": -77.042441,
"LoadmanAccount": 123,
"DateTime": "2019-07-03T14:40:00",
"MeterSerialNumber": 99586,
"RouteId": 2,
"ProductId": 3
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 25,
"Records": [
{
"Latitude": 38.936031,
"Longitude": -77.042441,
"DateTime": "2019-07-03T14:40:00",
"MeterSerialNumber": 99586,
"TruckId": 3,
"DriverId": 1,
"RouteId": 2,
"LoadmanAccount": 123,
"ProductId": 3,
"GeoRoute": false
}
]
}
Operational Data ¶
Assets ¶
Assets are items (i.e. containers) that a driver would be responsible for picking up along their route. Assets can be outfitted with RFID and are associated with a particular service.
Get All AssetsGET/scaleapi/v1/assets
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 6291457,
"Name": "F0100",
"AssetType": "FL02",
"AssetTypeId": 2,
"AssetTypeDescription": "2 yard front load bin",
"AssetTypeNotes": "",
"Product": "PRODUCT UNKNOWN",
"ProductId": 1,
"RFID": "",
"Description": "",
"Notes": "",
"LoadmanAccount": 73,
"Customer": "SUBWAY Restaurants",
"Site": "SUBWAY Restaurants",
"Hide": false
}
]
Get a Single AssetGET/scaleapi/v1/asset/{id}
Example URI
- id
string
(required) Example: 6291458
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Id": 6291458,
"Name": "F0101",
"AssetType": "FL04",
"AssetTypeId": 4,
"AssetTypeDescription": "4 yard front load bin",
"AssetTypeNotes": "",
"Product": "PRODUCT UNKNOWN",
"ProductId": 1,
"RFID": "",
"Description": "",
"Notes": "",
"LoadmanAccount": 89,
"Customer": "Walgreens",
"Site": "Rainier",
"Hide": false
}
Customers ¶
Get All CustomersGET/scaleapi/v1/customers
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Id": "100187273007",
"Name": "CHIPOTLE MEXICAN GRILL 1484",
"LoadName": "",
"ContactName": "",
"PhoneNumber": "",
"Address": "2334 WISCONSIN AVE NW",
"State": "DC",
"City": "WASHINGTON",
"Zip": "20007-1843",
"Notes": "",
"ServiceTypeId": 2,
"ServiceType": "2$F"
}
]
Create New CustomerPOST/scaleapi/v1/customers
Example URI
Body
[
{
"Id": "CustomerNew515",
"Name": "New Customer"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": "CustomerNew515",
"Name": "New Customer",
"LoadName": "",
"ContactName": "",
"PhoneNumber": "",
"Address": "5233 N CAPITOL ST NE",
"State": "DC",
"City": "WASHINGTON",
"Zip": "20011-6756",
"Notes": "",
"ServiceTypeId": 3,
"ServiceType": "2FL",
}
]
Modify CustomerPUT/scaleapi/v1/customers
Example URI
Body
[
{
"Id": "CustomerNew515",
"Name": "Changed Customer Name"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": "CustomerNew515",
"Name": "Changed Customer Name",
"LoadName": null,
"ContactName": "",
"PhoneNumber": null,
"Address": "5233 N CAPITOL ST NE",
"State": "DC",
"City": "WASHINGTON",
"Zip": "20011-6756",
"Notes": "",
"ServiceTypeId": 3,
"ServiceType": "2FL"
}
]
Drivers ¶
Get all driversGET/drivers
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"FirstName": "Jim",
"LastName": "Rivers",
"Phone": "555-123-4567",
"Address": "",
"City": "",
"State": "",
"Zip": ""
}
]
Get Driver by NameGET/drivers/firstname/{firstName}/lastname/{lastName}
Example URI
- firstName
string
(required) Example: Jose- lastName
string
(required) Example: Ferman
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"FirstName": "Jose",
"LastName": "Ferman",
"Phone": "",
"Address": " ",
"City": "",
"State": "",
"Zip": ""
}
Events ¶
Events are anything that stops the driver from completing their task. Assets are programmed ahead of time and selected by the driver at the time they occur.
Get all eventsGET/events
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 1,
"Name": "NO PROBLEM",
"LoadmanCode": 8257536
}
]
Get Specific EventGET/events/{id}
Example URI
- id
number
(required) Example: 1
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Id": 1,
"Name": " NO PROBLEM ",
"LoadmanCode": 8257536
}
Products ¶
Products are the type of material being picked up during a load.
Get all productsGET/products {?custTitle}
Example URI
- custTitle
boolean
(optional) Example: false
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"RelProdId": 2,
"Order": 0,
"ProductId": "4",
"LmProdId": 8323076,
"Notes": "",
"Hide": false,
"SyncVersion": 0
}
]
Get Specific ProductGET/products/{productName}{?custTitle}
Example URI
- productName
string
(required) Example: Recycle- custTitle
boolean
(optional) Example: false
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"RelProdId": 2,
"Order": 0,
"ProductId": "4",
"LmProdId": 8323076,
"Notes": "",
"Hide": false,
"SyncVersion": 0
}
]
Routes ¶
Routes are a list of Services. These routes are specified ahead of time and have a set list of services attached to them. Routes returned from this endpoint do not include GeoRoutes.
List all routesGET/routes
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 2,
"Name": "Recycle-1",
"DownloadName": "1",
"Description": "",
"Notes": "",
"Instructions": "",
"MeterSerialNumber": 1000,
"Product": "Recycle",
"ProductId": 1,
"TruckId": 3,
"Truck": "100",
"Driver": "Martin, Bob",
"DriverId": 0,
"Hide": false
}
]
Get Specific RoutesGET/routes/{id}
Example URI
- id
number
(required) Example: 2
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Id": 2,
"Name": "Recycle-1",
"DownloadName": "1",
"Description": "",
"Notes": "",
"Instructions": "",
"MeterSerialNumber": 1000,
"Product": "Recycle",
"ProductId": 1,
"TruckId": 3,
"Truck": "100",
"Driver": "Martin, Bob",
"DriverId": 0,
"Hide": false
}
Create RoutePOST/routes
Example URI
Body
[
{
"Name": "Route 1",
"ProductId": 1,
"TruckId": 3
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Name": "Route 1",
"DownloadName": "Route 1",
"Description": "",
"Notes": "",
"Instructions": "",
"MeterSerialNumber": 1000,
"Product": "Recycle",
"ProductId": 1,
"TruckId": 3,
"Truck": "100",
"Driver": "Martin, Bob",
"Hide": false
}
]
Route Stops ¶
An alternative to the Routes endpoint. Returns a list of stops when the route is known at request time.
Get Route StopsGET/routes/{id}/stops
Example URI
- id
number
(required) Example: 1
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 2,
"Notes": "",
"ServiceNotes": "",
"CustomerName": "Renton Technical College",
"CustomerId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"SiteId": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "Renton",
"City": "WA",
"Zip": "98056",
"Phone": "",
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Hide": false,
"Quantity": 1,
"RouteName": "Recycle-1",
"RouteId": 2,
"RouteOrder": 1,
"Instructions": "",
"ServiceInstructions": "",
"MeterSerialNumber": 1000,
"Truck": "100"
}
]
Add Route Stops to RoutePOST/routes/{id}/stops
Example URI
- id
number
(required) Example: 2
Body
[
{
"LoadmanAccount": 12,
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": 10,
"Product": "Recycle",
"ProductId": 1,
"Latitude": 0,
"Longitude": 0,
"ServiceType": "OCC-4",
"ServiceTypeId": 3,
"Notes": "",
"ServiceNotes": "",
"CustomerName": "Discount Tire",
"CustomerId": "Discount Tire",
"SiteName": "NE 4th",
"SiteId": "NE 4th",
"Address": "3123 NE 4th St",
"State": "Renton",
"City": "WA",
"Zip": "98056",
"Phone": "",
"ContactName": "",
"LoadmanAccount": 10,
"LoadName": "DISCOUNT TIR~B",
"Name": "NE 4th",
"Hide": false,
"Quantity": 1,
"RouteName": "Recycle-1",
"RouteId": 2,
"RouteOrder": 2,
"Instructions": "",
"ServiceInstructions": "",
"MeterSerialNumber": 1000,
"Truck": "100"
}
]
Modify Route StopsPUT/routes/{id}/stops
Example URI
- id
number
(required) Example: 2
Body
[
{
"LoadmanAccount": 10"
"Instructions": "The gate code is 1234"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 0,
"Longitude": 0,
"ServiceType": "OCC-4",
"ServiceTypeId": 3,
"Notes": "",
"ServiceNotes": "",
"CustomerName": "Discount Tire",
"CustomerId": "Discount Tire",
"SiteName": "NE 4th",
"SiteId": "NE 4th",
"Address": "3123 NE 4th St",
"State": "Renton",
"City": "WA",
"Zip": "98056",
"Phone": "",
"ContactName": "",
"LoadmanAccount": 2,
"LoadName": "DISCOUNT TIR~B",
"Name": "NE 4th",
"Hide": false,
"Quantity": 1,
"RouteName": "Recycle-1",
"RouteId": 2,
"RouteOrder": 2,
"Instructions": "the gate code is 1234",
"ServiceInstructions": "",
"MeterSerialNumber": 1000,
"Truck": "100"
}
]
Services ¶
Get All ServicesGET/scaleapi/v1/services
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 0,
"Notes": "",
"Instructions": "",
"CustomerId": "Renton Technical Col",
"CustomerName": "Renton Technical College",
"SiteId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "WA",
"City": "Renton",
"Zip": "98056",
"Phone": "425-235-2352",
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Quantity": 1,
"GeoFenceRadius": 1800,
"Hide": false,
"Volume": 800
}
]
Create ServicePOST/scaleapi/v1/services
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 0,
"Notes": "",
"Instructions": "",
"CustomerId": "Renton Technical Col",
"CustomerName": "Renton Technical College",
"SiteId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "WA",
"City": "Renton",
"Zip": "98056",
"Phone": "425-235-2352",
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Quantity": 1,
"GeoFenceRadius": 1800,
"Hide": false,
"Volume": 800
}
]
Modify ServicePUT/scaleapi/v1/services
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 0,
"Notes": "",
"Instructions": "",
"CustomerId": "Renton Technical Col",
"CustomerName": "Renton Technical College",
"SiteId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "WA",
"City": "Renton",
"Zip": "98056",
"Phone": "425-235-2352",
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Quantity": 1,
"GeoFenceRadius": 1800,
"Hide": false,
"Volume": 800
}
]
Get Services By Route IdGET/scaleapi/v1/services/route/{id}
Example URI
- id
number
(required) Example: 2
Get Service By Id
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 2,
"Notes": "",
"ServiceNotes": "",
"CustomerName": "Renton Technical College",
"CustomerId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"SiteId": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "Renton",
"City": "WA",
"Zip": "98056",
"Phone": null,
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Hide": false,
"Quantity": 1,
"RouteName": "Recycle-1",
"RouteId": 2,
"RouteOrder": 1,
"Instructions": "",
"ServiceInstructions": "",
"MeterSerialNumber": 1000,
"Truck": "100"
}
]
Get Services By Route NameGET/scaleapi/v1/services/route/{routeName}
Example URI
- routeName
string
(required) Example: A08
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Product": "Recycle",
"ProductId": 1,
"Latitude": 47.490552,
"Longitude": -122.176293,
"ServiceType": "OCC-8",
"ServiceTypeId": 2,
"Notes": "",
"ServiceNotes": "",
"CustomerName": "Renton Technical College",
"CustomerId": "Renton Technical Col",
"SiteName": "Renton Technical Col",
"SiteId": "Renton Technical Col",
"Address": "3000 NE 4th St",
"State": "Renton",
"City": "WA",
"Zip": "98056",
"Phone": "",
"ContactName": "",
"LoadmanAccount": 1,
"LoadName": "RENTON TECHN~A",
"Name": "Renton Technical College",
"Hide": false,
"Quantity": 1,
"RouteName": "Recycle-1",
"RouteId": 2,
"RouteOrder": 1,
"Instructions": "",
"ServiceInstructions": "",
"MeterSerialNumber": 1000,
"Truck": "100"
}
]
Service Types ¶
Get All Service TypesGET/scaleapi/v1/servicetypes
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Id": 1,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "",
"Name": " --unspecified-- ",
"Product": "PRODUCT UNKNOWN",
"ProductId": 1,
"Hide": false
},
{
"Id": 2,
"Capacity": 0,
"Volume": 8,
"MaxDensity": 0,
"Notes": "",
"Name": "OCC-8",
"Product": "Recycle",
"ProductId": 2,
"Hide": false
}
]
Create new Service TypesPOST/scaleapi/v1/servicetypes
Capacity, Volume, and MaxDensity are optional and default to zero if not present. Notes is optional. Product and ProductId are optional. If both are present, only Product is used.
Example URI
Body
[
{
"Name": "4 Yd Cardboard",
"Product": "Recycle",
"ProductId": 2,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "Don't pick up if wet",
"Hide": false
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber": 3237,
"Records": [
{
"Id": 16,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "Don't pick up if wet",
"Name": "4 Yd Cardboard",
"Product": "Recycle",
"ProductId": 2,
"Hide": false
}
]
}
]
Modify Service TypesPUT/scaleapi/v1/servicetypes
Everything is optional except for either Id or Name. If both are present, the service type identified by “Id” will be renamed to “Name”. Other values that are present will be updated.
Example URI
Body
[
{
"Id": 5,
"Name": "4 Yd Cardboard",
"Product": "Recycle",
"ProductId": 2,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "Don't pick up if wet",
"Hide": false
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber": 3237,
"Records": [
{
"Id": 16,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "Don't pick up if wet",
"Name": "4 Yd Cardboard",
"Product": "Recycle",
"ProductId": 2,
"Hide": false
}
]
}
]
Sites ¶
Get All SitesGET/scaleapi/v1/sites
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Id": "A Terrible Beauty Ir",
"Name": "A Terrible Beauty Irish Pub and Restaurant",
"LoadName": "",
"ContactName": "",
"PhoneNumber": "",
"Address": "201 Williams Avenue South",
"State": "WA",
"City": "Renton",
"Zip": "98057",
"Notes": "",
"ServiceTypeId": 4,
"ServiceType": "OCC-6"
}
]
Create new SitesPOST/scaleapi/v1/sites
Example URI
Body
[
{
"Id": "Site1234",
"Name": "New Site Name"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"CustomerId": "Site1234",
"CustomerName": "New Site name",
"Id": "Site1234",
"Name": "New Site Name",
"LoadName": "",
"ServiceTypeId": 1,
"ServiceType": "2$F",
"Product": "REFUSE",
"ProductId": 1,
"ContactName": "",
"PhoneNumber": "",
"Address": "2334 WISCONSIN AVE NW",
"City": "WASHINGTON",
"State": "DC",
"Zip": "20007-1843",
"Instructions": "",
"Notes": "",
"Services": null
}
]
Modify SitesPUT/scaleapi/v1/sites
Example URI
Body
[
{
"Id": "Site1234"
"Name": "Changed Site Name"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"CustomerId": "100187273007",
"CustomerName": "100187273007",
"Id": "Site1234",
"Name": "Changed Site Name",
"LoadName": "",
"ServiceTypeId": 1,
"ServiceType": "2$F",
"Product": "REFUSE",
"ProductId": 1,
"ContactName": "",
"PhoneNumber": "",
"Address": "2334 WISCONSIN AVE NW",
"City": "WASHINGTON",
"State": "DC",
"Zip": "20007-1843",
"Instructions": "",
"Notes": "",
"Services": null
}
]
Trucks ¶
All TrucksGET/trucks
This endpoint to fetch trucks returns only the information that is used by the tablet.
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": "--default",
"Id" : 2,
"Tare": 0,
"Meter": 99990001,
"Hide": false
},
]
Get Specific TruckGET/trucks/{truckId}
This endpoint to fetch truck information returns only what is used by the tablet.
Example URI
- truckId
number
(required) Example: 2
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Name": "--default",
"Id": 2,
"Tare": 0,
"Meter": 99990001,
"Hide": false
}
Truck Details ¶
All Truck DetailsGET/scaleapi/v1/trucks/details{?custTitle}
This endpoint to fetch trucks returns all the truck information.
Example URI
- custTitle
boolean
(optional) Example: falsereturn custom field names for data instead of the default names
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": "100",
"Truck": "100",
"Id": 3,
"Tare": 0,
"Meter": 1000,
"MaxNvw": 0,
"MapId": "",
"MapColorId": 5,
"ConnectName": " TCP Relay",
"LastTime": "2024-08-16T10:35:03",
"Notes": "",
"Hide": true,
"MapColor": "RED"
},
{
"Name": "101FL",
"Truck": "101",
"Id": 4,
"Tare": 0,
"Meter": 1001,
"MaxNvw": 0,
"MapId": "",
"MapColorId": 8,
"ConnectName": " Comm Disabled",
"LastTime": "2024-09-10T04:37:15",
"Notes": "",
"Hide": false,
"MapColor": "GREEN"
}
]
Create new TruckPOST/scaleapi/v1/trucks/details
“Name” and “Meter” are required, and the meter number must be in the license. The rest of the values are optional. “Tare” and “MaxNvw” default to zero if not present. “ConnectName” defaults to “Comm Disabled” if not present. “MapColor” defaults to Black if both “MapColor” and “MapColorId” are not present, and “MapColor” is used if both it and “MapColorId” are present.
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Truck": "T5521",
"Tare": 0,
"Meter": 1004,
"MaxNvw": 0,
"MapId": "1004",
"ConnectName": " TCP Relay",
"Hide": false,
"MapColor": "BLACK",
"Notes": "Check oil level before starting route"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber": 3239,
"Records": [{
"Name": "T5521",
"Truck": "T5521",
"Id": 51,
"Tare": 0,
"Meter": 1004,
"MaxNvw": 0,
"MapId": "1004",
"MapColorId": 0,
"ConnectName": " TCP Relay",
"LastTime": "0001-01-01T00:00:00",
"Notes": "Check oil level before starting route"
"Hide": false,
"MapColor": "BLACK"
}
]
}
]
Modify TruckPUT/scaleapi/v1/trucks/details
All values are optional except for either “TruckId” or “Truck”. The name of the truck will be renamed to the value in “Truck” if both “TruckId” and “Truck” are present.
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"TruckId": 6,
"Truck": "T5521",
"Tare": 0,
"Meter": 1004,
"MaxNvw": 0,
"MapId": "1004",
"ConnectName": " TCP Relay",
"Hide": false,
"MapColor": "BLACK",
"Notes": "Check oil level before starting route"
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber": 3237,
"Records": [
{
"Id": 16,
"Capacity": 0,
"Volume": 0,
"MaxDensity": 0,
"Notes": "Don't pick up if wet",
"Name": "4 Yd Cardboard",
"Product": "Recycle",
"ProductId": 2,
"Hide": false
}
]
}
]
Types ¶
Get TypesGET/scaleapi/v1/types{?custTitle}
Example URI
- custTitle
boolean
(optional) Example: falsereturn custom field names for data instead of the default names
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": " --unspecified-- ",
"Id": 1,
"Hide": false
},
{
"Name": "Corporate",
"Id": 2,
"Hide": false
},
{
"Name": "Franchise",
"Id": 3,
"Hide": false
}
]
Get Type by IdGET/scaleapi/v1/types{?id,custTitle}
Example URI
- id
integer
(required) Example: 2- custTitle
boolean
(optional) Example: falsereturn custom field names for data instead of the default names
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": "Corporate",
"Id": 2,
"Hide": false
}
]
Create new TypePOST/scaleapi/v1/types
Hide is optional and defaults to False if not present
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Name": "NewTruck",
"Hide": true
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": 19,
"Name": "NewTruck",
"Hide": true
}
]
Modify TypePUT/scaleapi/v1/types
Either “Id” or “Name” can be used to identify the Type record. The Type will be renamed to the value in “Name” if both it and “Id” are present.
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Id": 19,
"Name": "NewTruck",
"Hide": false
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": 19,
"Name": "NewerTypeX",
"Hide": true
}
]
Delete Type by IdDELETE/scaleapi/v1/types/Id
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 19,
"Name": "NewerTypeX",
"Hide": true
}
]
Zones ¶
Get ZonesGET/scaleapi/v1/zones{?custTitle}
Example URI
- custTitle
boolean
(optional) Example: falsereturn custom field names for data instead of the default names
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": "Zone1",
"Id": 3,
"Hide": false
},
{
"Name": "Zone2",
"Id": 4,
"Hide": true
}
]
Create new ZonePOST/scaleapi/v1/zones
Hide is optional and defaults to False if not present
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Name": "Zone3",
"Hide": true
}
]
200
Headers
Content-Type: application/json
Body
[
{
"VersionNumber": 3242,
"Records": [
{
"Name": "Zone3",
"Id": 8,
"Hide": true
}
]
}
]
Modify ZonePUT/scaleapi/v1/zones
Either “Id” or “Name” can be used to identify the Zone record. The Zone will be renamed to the value in “Name” if both it and “Id” are present.
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"Id": 8,
"Name": "Zone3",
"Hide": false
}
]
200
Headers
Content-Type: application/json
Body
[
{
"Id": 8,
"Name": "Zone3",
"Hide": true
}
]
Delete Zone by IdDELETE/scaleapi/v1/zones/Id
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 9,
"Name": "Zone3",
"Hide": true
}
]
Delete Zone by NameDELETE/scaleapi/v1/zones/Name
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 9,
"Name": "Zone3",
"Hide": true
}
]
Authentication ¶
These endpoints relate to Authentication and login of a ScaleApi user. ScaleApi uses the OAuth 2.0 protocol in order to verify their users securely and efficiently.
Token Authentication ¶
Token AuthenticationPOST/Auth/token
Example URI
Login/Gain Access Token
Headers
Content-Type: application/x-www-form-urlencode
Body
{
"grant_type": "password",
"username": "{your_username}",
"password": "{your_password}",
"location": "{your_location}",
"organization": "{your_organization}",
"client_id": "{your_client_id}"
}
200
Headers
Content-Type: application/json
Body
{
"access_token": "HW9U_ms0eYFjuSEOVHSF07wRee99ygbPktALpwobk...",
"token_type": "bearer",
"expires_in": 86399,
"refresh_token": "0fc0cc..."
}
400
Body
{
"error": "invalid_grant"
}
Refresh Token
Headers
Content-Type: application/x-www-form-urlencode
Body
{
"grant_type": "refresh_token",
"refresh_token": "0fc0cc...",
"client_id": "{your_client_id}"
}
200
Headers
Content-Type: application/json
Body
{
"access_token": "HW9U_ms0eYFjuSEOVHSF07wRee99ygbPktALpwobk...",
"token_type": "bearer",
"expires_in": 86399,
"refresh_token": "0fc0cc..."
}
400
Body
{
"error": "invalid_grant"
}