Scale API
Scale API is a REST web service that provides users with full access to their own load data.
Sample Application Download
ScaleAPI Demo Executable and SourceAuthentication
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{?before,after,product,serviceType,truck,serialNumber,exported,utc,useUploadT}
Example URI
- before
string
(optional) Example: 4-20-2018- after
string
(optional) Example: 7-18-2018- product
string
(optional) Example: "recycle"- serviceType
string
(required) Example: "8FL",- truck
string
(optional) Example: "209950"- serialNumber
number
(optional) Example: 92947- exported
boolean
(optional) Example: false- utc
boolean
(optional) Example: false- useUploadT
boolean
(optional) Example: false (If true, before/after uses UploadTime instead of PickupTime)
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"MeterSerialNumber": 117657,
"Route": "Recycle-1",
"GeoRoute": "false",
"DateTime": "2019-04-22T14:52:23",
"UploadTime": "2019-04-22T14:51:07",
"LoadType": "Load",
"Latitude": 47.505869,
"Longitude": -122.134817,
"ServiceLatitde": 47.50595,
"ServiceLongitude": -122.157446,
"Product": "Recycle",
"LoadWeight": 1035,
"NetVehicleWeight": 1040,
"ContainerWeight": 3324,
"RFIDTag": "",
"Driver": "Martin, Bob",
"Truck": "117",
"SiteName": "King and Bunnys Appl",
"SiteId": "King and Bunnys Appl",
"CustomerName": "King and Bunnys Appliances",
"CustomerId": "King and Bunnys Appl",
"ServiceType": "OCC-4",
"ContainerVolume": 4,
"TypeId": 1,
"ZoneId": 1
"Address": "4608 Northeast Sunset Boulevard",
"Address2": "",
"City": "Renton",
"State": "WA",
"ZipCode": "98059"
}
]
400
Create Load RecordPOST/scaleapi/v1/loads
Example URI
Standard Load Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 1234,
"RouteId": 1,
"DateTime": "2018-04-25T00:00:00",
"Latitude": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1,
"LoadWeight": 1000,
"NetVehicleWeight": 12000,
"ContainerWeight": 500
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"MeterSerialNumber": 123456,
"RouteId": 2,
"GeoRoute": false,
"DateTime": "2018-04-25T00:00:00",
"Latitude": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1,
"LoadWeight": 1000,
"NetVehicleWeight": 12000,
"ContainerWeight": 500,
"RFIDTag": "",
"DriveId": 6
},
]
}
400
Geofenced Load Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 1234,
"RouteId": 1,
"DateTime": "2018-04-25T00:00:00",
"Latitude": 47.488341,
"Longitude": -122.175804,
"ProductId": 1,
"LoadWeight": 1000,
"NetVehicleWeight": 12000,
"ContainerWeight": 500,
"GeoRoute": true
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 22,
"Records": [
{
"MeterSerialNumber": 1234,
"RouteId": 1,
"DateTime": "2018-04-25T00:00:00",
"Latitude": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 14,
"ProductId": 1,
"LoadWeight": 1000,
"NetVehicleWeight": 12000,
"ContainerWeight": 500,
"GeoRoute": true
}
]
}
400
Create Missed LoadPOST/scaleapi/v1/loads/missed
Example URI
Missed Load Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"MeterSerialNumber": 123456,
"Latitude": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"DateTime": "2018-04-25T00:00:00",
"RouteId": 1,
"ProductId": 1,
"GrossWeight": 10000,
"NetVehicleWeight": 10000,
"LoadmanAccount": 10,
"GeoRoute": false
},
]
}
400
Create Landfill RecordPOST/scaleapi/v1/loads/landfill
Example URI
Landfill Record
Headers
Content-Type: application/json
Authorization: Bearer {token}
Body
[
{
"ProductId": 3,
"RouteId": 6,
"MeterSerialNumber": 123456,
"DateTime": "2018-04-25T00:00:00",
"Latitude": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1
}
]
}
Create Confirm Pickup RecordPOST/scaleapi/v1/loads/confirm
Example URI
Headers
Authorization: Bearer {token}
Body
[
{
"ProductId": 1,
"Latitude": 47.488341,
"Longitude": -122.175804,
"DateTime": "2019-01-01T15:42:01",
"MeterSerialNumber": 99586,
"RouteId": 2,
"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": 47.488341,
"Longitude": -122.175804,
"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,
"TruckId": 7
}
]
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.505727",
"Longitude": "-122.135057",
"MeterSerialNumber": "124731",
"RouteId": "10",
}
]
200
Headers
Content-Type: application/json
Body
{
"VersionNumber": 15,
"Records": [
{
"DateTime": "2019-03-09T19:32:02",
"Latitude": "47.505727",
"Longitude": "-122.135057",
"MeterSerialNumber": "124731",
"RouteId": "10",
"DriverId": 6
}
]
}
400
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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1,
"AssetId": 2,
"Pickup": true,
"DriverId": 6
}
]
}
400
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": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1,
"ProblemId": 3,
"Image": "dGVzdGluZw==...",
"Caption": "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": 47.488341,
"Longitude": -122.175804,
"LoadmanAccount": 12,
"ProductId": 1,
"ProblemId": 3,
"Image": "dGVzdGluZw==...",
"Caption": "Gate Closed",
"DriverId": 6
}
]
}
400
Get
Event RecordsGET/scaleapi/v1/events/records{?before,after,serialNumber,exported,utc,useUpload}
Example URI
- before
string
(required) Example: '2019-02-01’ (optional, string)- after
string
(required) Example: '2019>01-01’ (optional, string)- serialNumber
number
(optional) Example: 12345- exported
boolean
(optional) Example: false- utc
boolean
(optional) Example: false- useUploadT
boolean
(optional) Example: false (If true, before/after uses UploadTime instead of PickupTime)
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"MeterSerialNumber": 1000,
"Route": "1",
"DateTime": "2019-04-03T11:10:04",
"UploadTime": "2019-04-03T11:11:14",
"Latitude": 47.488341,
"Longitude": -122.175804,
"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": "",
"NetVehicleWeight": 0,
"Address": "3205 NE 4th St",
"Address2": "",
"City": "Renton",
"State": "WA",
"ZipCode": "98059"
}
]
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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"DateTime": "2019-07-03T16:22:01",
"DriverId": 1,
"NetVehicleWeight": 1000,
"GeoRoute": false,
"AccountDetect": 0
}
]
}
Customer Records ¶
Create Customer Arrival RecordPOST/scaleapi/v1/customers/arrive
Example URI
Body
[
{
"ProductId": 2,
"Latitude": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"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": 47.488341,
"Longitude": -122.175804,
"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
}
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
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Id": 3,
"Name": "Recycle",
"Notes": "",
"Hide": false
}
]
Get Specific ProductGET/products/{productId}
Example URI
- productId
number
(required) Example: 1
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Id": 1,
"Name": "product unknown",
"Notes": "Product Unknown",
"Hide": false
}
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
}
]
400
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": 47.488341,
"Longitude": -122.175804,
"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"
}
]
400
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": 47.488341,
"Longitude": -122.175804,
"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"
}
]
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
}
]
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"
}
]
Service Types ¶
Service Types are the different types of containers that may be picked up at a Service.
Get All Service TypesGET/scaleapi/v1/serviceTypes
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"Id": 2,
"Volume": 200,
"Name": "4FL",
"Product": "Recycle",
"ProductId": 1
}
]
400
Trucks ¶
All TrucksGET/trucks
Example URI
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
[
{
"Name": "Truck 24",
"Id" : 2,
"Tare": 0,
"Meter": 99990001,
"Hide": false
}
]
Get Specific TruckGET/trucks/{truckId}
Example URI
- truckId
number
(required) Example: 2
Headers
Authorization: Bearer {token}
200
Headers
Content-Type: application/json
Body
{
"Name": "Truck 24",
"Id": 2,
"Tare": 0,
"Meter": 99990001,
"Hide": false
}
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"
}