Authentication

POST
The Authentication service takes an API Key and will return a token.
Parameter
key API key provided by ScoopMonkey Required

Example: httpss://www.scoopmonkey.com/api/authenticate

{"token":"90890h7d9f0s8f86sf8s9","status":"1"}

Add Account

POST
The add account service creates a new ScoopMonkey account for a user. All users need an account to interact with the data. Accounts can be FREE or Paid.
Parameter
token Token received from Authentication service Required
email user's email Required
dock_prefix DOT, MC, MX, or or user Required
dock_num docket number of user Required
first_name first name of user Optional
last_name last name of user Optional
company name name of the company Optional
phone Phone number of user Optional

Example: https://www.scoopmonkey.com/api/addaccount

{"status":"1","account_token":"454fds815sfd5s"}

Get Account Token

GET
The Get Account Token will return the account token for a specific account.
Parameter
token Token received from Authentication service Required
email user's email Required
dock_prefix DOT, MC, MX, or or user Required
dock_num docket number of user Required

Example: https://www.scoopmonkey.com/api/getaccounttoken/?token=90890h7d9f0s8f86sf8s9&dock_prefix=DOT&dock_num=2223295&email=user@example.com

{"status":"1","account_token":"454fds815sfd5s"}

User Login

POST
The User Login service will return the account token for a specific account by using the user's username and password.
Parameter
token Token received from Authentication service Required
username user's ScoopMonkey usernmae Required
password user's ScoopMonkey password Required

Example: https://www.scoopmonkey.com/api/userlogin

{"status":"1","account_token":"454fds815sfd5s"}

Rating

GET
The Get Rating service returns the rating data along with the reviews for the company requested
* Note - If user_token is from a free account, the reviews returned will only be the reviews from that user. If Token is from a paid account, the reviews returned will be from all companies who have reviewed the requested company
Parameter
token Token received from Authentication service Required
dock_prefix DOT, MC, MX, or FF Required
dock_num docket number of company Required
account_token token of user requesting rating Required

Example: https://www.scoopmonkey.com/api/getrating/?token=90890h7d9f0s8f86sf8s9&dock_prefix=DOT&dock_num=2223295&account_token=454fds815sfd5s

{
  "dock_num":"2223295",
    "dock_prefix":"DOT",
    "rating":{
      "rating":"5.0000",
      "professionalism_rating":"5.0000",
      "communication_rating":"3.5000",
      "punctuality_rating":"3.5000"
    },
    "reviews":{
      "personal_reviews":[
      {
        "review_id":"188",
        "overall_rating":"5",
        "professionalism_rating":"5",
        "communication_rating":"3",
        "punctuality_rating":"3",
        "review":"We've booked several loads with this company and have found them easy to work with and fast on payment.",
        "review_date":"2014-03-03 14:16:50",
        "reviewer_dot_num":"162879",
        "reviewer_company_name":"JOHNSONS FREIGHT LINE",
        "alt_user_id":"john@me.com",
        "responses":[]
      },
      {
        "review_id":"187",
        "overall_rating":"5",
        "professionalism_rating":"5",
        "communication_rating":"4",
        "punctuality_rating":"4",
        "review":"Great overall experience.  We had a difficult time connecting with them while in-transit but that might have been a one time issue.",
        "review_date":"2014-03-03 14:12:57",
        "reviewer_dot_num":"306",
        "reviewer_company_name":"JAMES AUSTIN COMPANY",
        "alt_user_id":"john@me.com",
        "responses":[
        {
          "review_response_id":"14",
          "review_id":"187",
          "response":"We apologize for the communication issue.  We were putting in a new phone system that week which caused some calls to be lost.  This should now be resolved!",
          "response_date":"2014-03-03 14:44:51",
          "company_name":"TOTAL QUALITY LOGISTICS LLC"
        }
        ]
      }
      ]   
    }
}

            

Post Review

POST
The Post Review service takes in review data and posts to the db for that company.
Parameter
Token Token received from Authentication service Required
account_token Token of account posting review Required
dock_prefix DOT, MC, MX, or FF of company reviewed Required
dock_num docket number of company reviewed Required
overall_rating 0-5 numeric overall rating Required
professionalism_rating 0-5 numeric professionalism rating Optional defaults to 0
communication_rating 0-5 numeric communication rating Optional defaults to 0
punctuality_rating 0-5 numeric punctuality rating Optional defaults to 0
review text of review Optional
alt_user_id Your internal ID of user posting review Optional

Example: https://www.scoopmonkey.com/api/postreview

{"status":"1", "review_id":"123"}

GET
The search service returns companies matching the specified query. By default the first 25 matches are returned; use the offset parameter to retrieve more matches in subsequent requests.
Parameter
token Token received from Authentication service Required
account_token token of user searching optional
q search term Required
offset Starting offset of results to return Optional

Example: https://www.scoopmonkey.com/api/search/?token=90890h7d9f0s8f86sf8s9&q=millcreek&account_token=454fds815sfd5s

[ 
'total_result_count': 2,
  'results': [
{
  "dot_number":380526,
  "status":"A",
  "legal_name":"MILLCREEK CANDIES",
  "city":"CHEBOYGAN",
  "state":"MI",
  "zip":"49721-9346"
},
{
  "dot_number":1012744,
  "status":"I",
  "legal_name":"MILLCREEK TRANSPORT",
  "city":"GUYTON",
  "state":"GA",
  "zip":"31312"
}
]
]
            

Error Codes

Error codes returned by the API
Code Description
001 Invalid API Key
002 We are unable to locate this company with the FMCSA
003 ScoopMonkey account already exists for this user
004 Required input parameters missing
005 Invalid Account Token
006 Invalid API Session Token
007 Unable to get Account Token, Account does not exist
008 Invalid user credentials
009 Internal server error
010 Not permitted