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 Executable and Source

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{?before,after,product,serviceType,truck,serialNumber,exported,utc,useUploadT}

Example URI

GET https://loadmanspotlight.com/ScaleApi/scaleapi/v1/loads?before=4-20-2018&after=7-18-2018&product="recycle"&serviceType="8&truck="209950"&serialNumber=92947&exported=false&utc=false&useUploadT=false
URI Parameters
HideShow
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)
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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"
    }
]
Response  400

Create Load Record
POST/scaleapi/v1/loads

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/loads
Request  Standard Load Record
HideShow
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
  }
]
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": 47.488341,
            "Longitude": -122.175804,
            "LoadmanAccount": 12,
            "ProductId": 1,
            "LoadWeight": 1000,
            "NetVehicleWeight": 12000,
            "ContainerWeight": 500,
            "RFIDTag": "",
            "DriveId": 6
        },
    ]
}
Response  400
Request  Geofenced Load Record
HideShow
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
  }
]
Response  200
HideShow
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
    }
  ]
}
Response  400

Create Missed Load
POST/scaleapi/v1/loads/missed

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/loads/missed
Request  Missed Load Record
HideShow
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
    }
]
Response  200
HideShow
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
      },
    ]
}
Response  400

Create Landfill Record
POST/scaleapi/v1/loads/landfill

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/loads/landfill
Request  Landfill Record
HideShow
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
    }
]
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": 47.488341,
          "Longitude": -122.175804,
          "LoadmanAccount": 12,
          "ProductId": 1
      }
    ]
}

Create Confirm Pickup Record
POST/scaleapi/v1/loads/confirm

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/loads/confirm
Request
HideShow
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
  }
]
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": 47.488341,
      "Longitude": -122.175804,
      "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 https://loadmanspotlight.com/ScaleApi/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,
    "TruckId": 7
  }
]

Create GPS Record
POST/scaleapi/v1/gps

Example URI

POST https://loadmanspotlight.com/ScaleApi/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.505727",
        "Longitude": "-122.135057",
        "MeterSerialNumber": "124731",
        "RouteId": "10",
    }
]
Response  200
HideShow
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
       }
    ]
  }
Response  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 Record
POST/scaleapi/v1/assets/records

Example URI

POST https://loadmanspotlight.com/ScaleApi/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": 47.488341,
        "Longitude": -122.175804,
        "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": 47.488341,
          "Longitude": -122.175804,
          "LoadmanAccount": 12,
          "ProductId": 1,
          "AssetId": 2,
          "Pickup": true,
          "DriverId": 6
      }
   ]
 }
Response  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 Record
POST/scaleapi/v1/events/records

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/events/records
Request
HideShow
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"
    }
]
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": 47.488341,
            "Longitude": -122.175804,
            "LoadmanAccount": 12,
            "ProductId": 1,
            "ProblemId": 3,
            "Image": "dGVzdGluZw==...",
            "Caption": "Gate Closed",
            "DriverId": 6
        }
    ]
}
Response  400

Get Event Records
GET/scaleapi/v1/events/records{?before,after,serialNumber,exported,utc,useUpload}

Example URI

GET https://loadmanspotlight.com/ScaleApi/scaleapi/v1/events/records?before='2019&after='2019&serialNumber=12345&exported=false&utc=false&useUploadT=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
useUploadT
boolean (optional) Example: false (If true, before/after uses UploadTime instead of PickupTime)
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",
    "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 Photos
GET/scaleapi/v1/events/photos{?dateTime,org,loc,truckid}

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/scaleapi/v1/meter/power
Request
HideShow
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
    }
]
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": 47.488341,
            "Longitude": -122.175804,
            "LoadmanAccount": 12,
            "ProductId": 1,
            "Power": true,
            "DriverId": 6
        }
    ]
}

Create Zero Records
POST/scaleapi/v1/meter/zero

Example URI

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

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/customers/arrive
Request
HideShow
Body
[
  {
    "ProductId": 2,
    "Latitude": 47.488341,
    "Longitude": -122.175804,
    "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": 47.488341,
      "Longitude": -122.175804,
      "LoadmanAccount": 123,
      "AccountDetect": 0,
      "ProductId": 2,
      "RFIDTag": null,
      "DriverId": 1,
      "TruckId": 3
    }
  ]
}

Create Customer Departure Record
POST/scaleapi/v1/customers/depart

Example URI

POST https://loadmanspotlight.com/ScaleApi/scaleapi/v1/customers/depart
Request
HideShow
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
  }
]
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": 47.488341,
      "Longitude": -122.175804,
      "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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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
}

Drivers

Get all drivers
GET/drivers

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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

Example URI

GET https://loadmanspotlight.com/ScaleApi/products
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 3,
    "Name": "Recycle",
    "Notes": "",
    "Hide": false
  }
]

Get Specific Product
GET/products/{productId}

Example URI

GET https://loadmanspotlight.com/ScaleApi/products/1
URI Parameters
HideShow
productId
number (required) Example: 1
Request
HideShow
Headers
Authorization: Bearer {token}
Response  200
HideShow
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 routes
GET/routes

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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
  }
]
Response  400

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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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": 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"
  }
]
Response  400

Modify Route Stops
PUT/routes/{id}/stops

Example URI

PUT https://loadmanspotlight.com/ScaleApi/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": 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 Services
GET/scaleapi/v1/services

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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"
  }
]

Sites

Get All Sites
GET/scaleapi/v1/sites

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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
  }
]

Customers

Get All Customers
GET/scaleapi/v1/customers

Example URI

GET https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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 https://loadmanspotlight.com/ScaleApi/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"
  }
]

Service Types

Service Types are the different types of containers that may be picked up at a Service.

Get All Service Types
GET/scaleapi/v1/serviceTypes

Example URI

GET https://loadmanspotlight.com/ScaleApi/scaleapi/v1/serviceTypes
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "Id": 2,
    "Volume": 200,
    "Name": "4FL",
    "Product": "Recycle",
    "ProductId": 1
  }
]
Response  400

Trucks

All Trucks
GET/trucks

Example URI

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

Get Specific Truck
GET/trucks/{truckId}

Example URI

GET https://loadmanspotlight.com/ScaleApi/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": "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 Authentication
POST/Auth/token

Example URI

POST https://loadmanspotlight.com/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 14 Oct 2019