Back to top

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

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 Records
GET/scaleapi/v1/loads{?after,before,product,serviceType,customer,truck,serialNumber,exported,utc,useUploadT,custTitle,showNegative,firstRecord,recordCount,sortDesc}

Example URI

GET /scaleapi/v1/loads?after=7-18-2018&before=8-20-2018&product="recycle"&serviceType="8FL"&customer="Acme Hardware"&truck="209950"&serialNumber=92947&exported=false&utc=false&useUploadT=false&custTitle=false&showNegative=false&firstRecord=0&recordCount=10&sortDesc=false
URI Parameters
HideShow
after
string (optional) Example: 7-18-2018

specifies the beginning of the interval of returned records

before
string (optional) Example: 8-20-2018

specifies 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: 92947

return records only for the specified meter serial number

exported
boolean (optional) Example: false
utc
boolean (optional) Example: false

before/after time entered in UTC time zone

useUploadT
boolean (optional) Example: false

before/after time entered as the UploadTime instead of the PickupTime

custTitle
boolean (optional) Example: false

return custom field names for data instead of the default names

showNegative
boolean (optional) Example: false

if true, return negative weights, else return zero for negative weights

firstRecord
int (optional) Example: 0

If provided, indicates the first record in the dataset to be returned for pagination

recordCount
int (optional) Example: 10

If provided, indicates the number of records after firstRecord to return for pagination

sortDesc
boolean (optional) Example: false

If present and equal true, sorts by PickupTime descending, else ascending

Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Record
POST/scaleapi/v1/loads

Example URI

POST /scaleapi/v1/loads
Request  Standard Load Record
HideShow

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
  }
]
Response  200
HideShow
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 Load
POST/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

POST /scaleapi/v1/loads/missed
Request  Missed Load Record
HideShow
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
    }
]
Response  200
HideShow
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 Record
POST/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

POST /scaleapi/v1/loads/landfill
Request  Landfill Record
HideShow
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
    }
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/loads/confirm

Example URI

POST /scaleapi/v1/loads/confirm
Request
HideShow
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
  }
]
Response  200
HideShow
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 Record
GET/scaleapi/v1/gps{?before,after,truckId,utc}

Example URI

GET /scaleapi/v1/gps?before=4-20-2018&after=1-18-2018&truckId=2&utc=false
URI Parameters
HideShow
before
string (optional) Example: 4-20-2018
after
string (optional) Example: 1-18-2018
truckId
number (optional) Example: 2
utc
boolean (optional) Example: false
Request  Get GPS Records
HideShow
Headers
Content-Type: application/json
Authorization: Bearer {token}
Response  200
HideShow
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 Record
POST/scaleapi/v1/gps

Example URI

POST /scaleapi/v1/gps
Request  Create GPS Record
HideShow
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",
    },
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/assets/records

Example URI

POST /scaleapi/v1/assets/records
Request  Create Asset Record
HideShow
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
    }
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/events/records

Example URI

POST /scaleapi/v1/events/records
Request
HideShow
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"
    }
]
Response  200
HideShow
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 Records
GET/scaleapi/v1/events/records{?before,after,serialNumber,exported,utc}

Example URI

GET /scaleapi/v1/events/records?before='2019&after='2019&serialNumber=12345&exported=false&utc=false
URI Parameters
HideShow
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
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Photos
GET/scaleapi/v1/events/photos{?dateTime,org,loc,truckid}

Example URI

GET /scaleapi/v1/events/photos?dateTime='191008091301'&org='Demo'&loc='Renton'&truckid=10
URI Parameters
HideShow
dateTime
string (required) Example: '191008091301'
org
string (required) Example: 'Demo'
loc
string (required) Example: 'Renton'
truckid
number (required) Example: 10
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Record
POST/scaleapi/v1/meter/power

Example URI

POST /scaleapi/v1/meter/power
Request
HideShow
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
    }
]
Response  200
HideShow
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 Records
POST/scaleapi/v1/meter/zero

Example URI

POST /scaleapi/v1/meter/zero
Request
HideShow
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"
  }
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/customers/arrive

Example URI

POST /scaleapi/v1/customers/arrive
Request
HideShow
Body
[
  {
    "ProductId": 2,
    "Latitude": 1,
    "Longitude": 1,
    "DateTime": "2019-07-02T15:42:04",
    "MeterSerialNumber": 99586,
    "RouteId": 2,
    "LoadmanAccount": 123
  }
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/customers/depart

Example URI

POST /scaleapi/v1/customers/depart
Request
HideShow
Headers
Authorizaton: Bearer {token}
Body
[
  {
    "ProductId": 2,
    "Latitude": 1,
    "Longitude": 1,
    "DateTime": "2019-07-02T15:42:04",
    "MeterSerialNumber": 99586,
    "RouteId": 2,
    "LoadmanAccount": 123
  }
]
Response  200
HideShow
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 Record
POST/scaleapi/v1/services/learn

Example URI

POST /scaleapi/v1/services/learn
Request
HideShow
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
  }
]
Response  200
HideShow
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 Assets
GET/scaleapi/v1/assets

Example URI

GET /scaleapi/v1/assets
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Asset
GET/scaleapi/v1/asset/{id}

Example URI

GET /scaleapi/v1/asset/6291458
URI Parameters
HideShow
id
string (required) Example: 6291458
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Customers
GET/scaleapi/v1/customers

Example URI

GET /scaleapi/v1/customers
Response  200
HideShow
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 Customer
POST/scaleapi/v1/customers

Example URI

POST /scaleapi/v1/customers
Request
HideShow
Body
[
  {
    "Id": "CustomerNew515",
    "Name": "New Customer"
  }
]
Response  200
HideShow
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 Customer
PUT/scaleapi/v1/customers

Example URI

PUT /scaleapi/v1/customers
Request
HideShow
Body
[
  {
    "Id": "CustomerNew515",
    "Name": "Changed Customer Name"
  }
]
Response  200
HideShow
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 drivers
GET/drivers

Example URI

GET /drivers
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "FirstName": "Jim",
    "LastName": "Rivers",
    "Phone": "555-123-4567",
    "Address": "",
    "City": "",
    "State": "",
    "Zip": ""
  }
]

Get Driver by Name
GET/drivers/firstname/{firstName}/lastname/{lastName}

Example URI

GET /drivers/firstname/Jose/lastname/Ferman
URI Parameters
HideShow
firstName
string (required) Example: Jose
lastName
string (required) Example: Ferman
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 events
GET/events

Example URI

GET /events
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 1,
    "Name": "NO PROBLEM",
    "LoadmanCode": 8257536
  }
]

Get Specific Event
GET/events/{id}

Example URI

GET /events/1
URI Parameters
HideShow
id
number (required) Example: 1
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 products
GET/products {?custTitle}

Example URI

GET /products ?custTitle=false
URI Parameters
HideShow
custTitle
boolean (optional) Example: false
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Product": "Recycle",
    "RelProdId": 2,
    "Order": 0,
    "ProductId": "4",
    "LmProdId": 8323076,
    "Notes": "",
    "Hide": false,
    "SyncVersion": 0
  }
]

Get Specific Product
GET/products/{productName}{?custTitle}

Example URI

GET /products/Recycle?custTitle=false
URI Parameters
HideShow
productName
string (required) Example: Recycle
custTitle
boolean (optional) Example: false
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 routes
GET/routes

Example URI

GET /routes
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Routes
GET/routes/{id}

Example URI

GET /routes/2
URI Parameters
HideShow
id
number (required) Example: 2
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Route
POST/routes

Example URI

POST /routes
Request
HideShow
Body
[
  {
    "Name": "Route 1",
    "ProductId": 1,
    "TruckId": 3
  }
]
Response  200
HideShow
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 Stops
GET/routes/{id}/stops

Example URI

GET /routes/1/stops
URI Parameters
HideShow
id
number (required) Example: 1
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Route
POST/routes/{id}/stops

Example URI

POST /routes/2/stops
URI Parameters
HideShow
id
number (required) Example: 2
Request
HideShow
Body
[
    {
        "LoadmanAccount": 12,
    }
]
Response  200
HideShow
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 Stops
PUT/routes/{id}/stops

Example URI

PUT /routes/2/stops
URI Parameters
HideShow
id
number (required) Example: 2
Request
HideShow
Body
[
    {
        "LoadmanAccount": 10"
        "Instructions": "The gate code is 1234"
    }
]
Response  200
HideShow
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 Services
GET/scaleapi/v1/services

Example URI

GET /scaleapi/v1/services
Response  200
HideShow
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 Service
POST/scaleapi/v1/services

Example URI

POST /scaleapi/v1/services
Response  200
HideShow
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 Service
PUT/scaleapi/v1/services

Example URI

PUT /scaleapi/v1/services
Response  200
HideShow
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 Id
GET/scaleapi/v1/services/route/{id}

Example URI

GET /scaleapi/v1/services/route/2
URI Parameters
HideShow
id
number (required) Example: 2
Request  Get Service By Id
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Name
GET/scaleapi/v1/services/route/{routeName}

Example URI

GET /scaleapi/v1/services/route/A08
URI Parameters
HideShow
routeName
string (required) Example: A08
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Types
GET/scaleapi/v1/servicetypes

Example URI

GET /scaleapi/v1/servicetypes
Response  200
HideShow
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 Types
POST/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

POST /scaleapi/v1/servicetypes
Request
HideShow
Body
[
  {
    "Name": "4 Yd Cardboard",
    "Product": "Recycle",
    "ProductId": 2,
    "Capacity": 0,
    "Volume": 0,
    "MaxDensity": 0,
    "Notes": "Don't pick up if wet",
    "Hide": false
  }
]
Response  200
HideShow
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 Types
PUT/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

PUT /scaleapi/v1/servicetypes
Request
HideShow
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
  }
]
Response  200
HideShow
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 Sites
GET/scaleapi/v1/sites

Example URI

GET /scaleapi/v1/sites
Response  200
HideShow
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 Sites
POST/scaleapi/v1/sites

Example URI

POST /scaleapi/v1/sites
Request
HideShow
Body
[
  {
    "Id": "Site1234",
    "Name": "New Site Name"
  }
]
Response  200
HideShow
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 Sites
PUT/scaleapi/v1/sites

Example URI

PUT /scaleapi/v1/sites
Request
HideShow
Body
[
    {
        "Id": "Site1234"
        "Name": "Changed Site Name"
    }
]
Response  200
HideShow
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 Trucks
GET/trucks

This endpoint to fetch trucks returns only the information that is used by the tablet.

Example URI

GET /trucks
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "Name": "--default",
        "Id" : 2,
        "Tare": 0,
        "Meter": 99990001,
        "Hide": false
    },
]

Get Specific Truck
GET/trucks/{truckId}

This endpoint to fetch truck information returns only what is used by the tablet.

Example URI

GET /trucks/2
URI Parameters
HideShow
truckId
number (required) Example: 2
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Name": "--default",
  "Id": 2,
  "Tare": 0,
  "Meter": 99990001,
  "Hide": false
}

Truck Details

All Truck Details
GET/scaleapi/v1/trucks/details{?custTitle}

This endpoint to fetch trucks returns all the truck information.

Example URI

GET /scaleapi/v1/trucks/details?custTitle=false
URI Parameters
HideShow
custTitle
boolean (optional) Example: false

return custom field names for data instead of the default names

Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Truck
POST/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

POST /scaleapi/v1/trucks/details
Request
HideShow
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"
  }
]
Response  200
HideShow
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 Truck
PUT/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

PUT /scaleapi/v1/trucks/details
Request
HideShow
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"
  }
]
Response  200
HideShow
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 Types
GET/scaleapi/v1/types{?custTitle}

Example URI

GET /scaleapi/v1/types?custTitle=false
URI Parameters
HideShow
custTitle
boolean (optional) Example: false

return custom field names for data instead of the default names

Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Id
GET/scaleapi/v1/types{?id,custTitle}

Example URI

GET /scaleapi/v1/types?id=2&custTitle=false
URI Parameters
HideShow
id
integer (required) Example: 2
custTitle
boolean (optional) Example: false

return custom field names for data instead of the default names

Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Name": "Corporate",
    "Id": 2,
    "Hide": false
  }
]

Create new Type
POST/scaleapi/v1/types

Hide is optional and defaults to False if not present

Example URI

POST /scaleapi/v1/types
Request
HideShow
Headers
Authorization: Bearer {token}
Body
[
  {
    "Name": "NewTruck",
    "Hide": true
  }
]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 19,
    "Name": "NewTruck",
    "Hide": true
  }
]

Modify Type
PUT/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

PUT /scaleapi/v1/types
Request
HideShow
Headers
Authorization: Bearer {token}
Body
[
  {
    "Id": 19,
    "Name": "NewTruck",
    "Hide": false
  }
]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 19,
    "Name": "NewerTypeX",
    "Hide": true
  }
]

Delete Type by Id
DELETE/scaleapi/v1/types/Id

Example URI

DELETE /scaleapi/v1/types/Id
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 19,
    "Name": "NewerTypeX",
    "Hide": true
  }
]

Zones

Get Zones
GET/scaleapi/v1/zones{?custTitle}

Example URI

GET /scaleapi/v1/zones?custTitle=false
URI Parameters
HideShow
custTitle
boolean (optional) Example: false

return custom field names for data instead of the default names

Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Name": "Zone1",
    "Id": 3,
    "Hide": false
  },
  {
    "Name": "Zone2",
    "Id": 4,
    "Hide": true
  }
]

Create new Zone
POST/scaleapi/v1/zones

Hide is optional and defaults to False if not present

Example URI

POST /scaleapi/v1/zones
Request
HideShow
Headers
Authorization: Bearer {token}
Body
[
  {
    "Name": "Zone3",
    "Hide": true
  }
]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "VersionNumber": 3242,
    "Records": [
      {
        "Name": "Zone3",
        "Id": 8,
        "Hide": true
      }
    ]
  }
]

Modify Zone
PUT/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

PUT /scaleapi/v1/zones
Request
HideShow
Headers
Authorization: Bearer {token}
Body
[
  {
    "Id": 8,
    "Name": "Zone3",
    "Hide": false
  }
]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 8,
    "Name": "Zone3",
    "Hide": true
  }
]

Delete Zone by Id
DELETE/scaleapi/v1/zones/Id

Example URI

DELETE /scaleapi/v1/zones/Id
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 9,
    "Name": "Zone3",
    "Hide": true
  }
]

Delete Zone by Name
DELETE/scaleapi/v1/zones/Name

Example URI

DELETE /scaleapi/v1/zones/Name
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 Authentication
POST/Auth/token

Example URI

POST /Auth/token
Request  Login/Gain Access Token
HideShow
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}"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "HW9U_ms0eYFjuSEOVHSF07wRee99ygbPktALpwobk...",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "0fc0cc..."
}
Response  400
HideShow
Body
{
  "error": "invalid_grant"
}
Request  Refresh Token
HideShow
Headers
Content-Type: application/x-www-form-urlencode
Body
{
  "grant_type": "refresh_token",
  "refresh_token": "0fc0cc...",
  "client_id": "{your_client_id}"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "HW9U_ms0eYFjuSEOVHSF07wRee99ygbPktALpwobk...",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "0fc0cc..."
}
Response  400
HideShow
Body
{
  "error": "invalid_grant"
}

Generated by aglio on 23 Dec 2024