Create Watchdog


Description

This method create watchdog to the system.

Authentication

Requires HTTP BASIC authentication. The authenticating user must have ROLE_LOAD_PERMITTED assigned.

HTTP Methods

Accepts POST requests.

URI

/api/users/{userUuid}/watchdogs

Path Variables

Name Required/Optional Description Validation
userUuid required The UUID of the user in the system User UUID should exist in the system

HTTP Parameters

Name Required/Optional Description Validation
name optional The watchdog name Length should not be greater then 100 character
originCity optional The Origin City Length should not be greater then 100 character
originState optional The Origin State If Origin City is entered then Origin State is required otherwise not.Length should not be greater then 2 character
originRadius optional The Origin Radius in miles. Min is 25 and Max is 300.Default Value is 100.
destinationCity optional The Destination City Length should not be greater then 100 character
destinationState optional The Destination State If Destination City is entered then Destination State is required otherwise not.Length should not be greater then 2 character
destinationRadius optional The Destination Radius in miles. Min is 25 and Max is 300.Default Value is 100.
fromWeight optional Minimum Weight for the Loads Value should be numeric
toWeight optional Maximum Weight for the Loads Value should be numeric
fullOrLTL optional Full Load or Partial Value can be F or LTL. Leave blank for both types
equipment optional Type of Equipment Value can be AC, ALLFB, ALLRF, ALLVN, DD, DT, F, FBT, FH, FPE, FSD, FWS, FWT, FT, HB, HS, LB, MX, PO, R, RH, RPE, RG, SD, T, V, VH, VA, VF, VR, VV, VC, VPE, VFR, VT or VWF
fromDate optional The Start Date From Date or Start Date should be greater than or equal to Current Date and should be in ISO 8601 date format i.e. yyyy-mm-dd format.
toDate optional The End Date To Date or End Date should be greater than or equal to Current Date and From Date and should be in ISO 8601 date format i.e. yyyy-mm-dd format.
expiry optional The no of days the watchdog should expire. Value should be numberic without decimal places. Default value is 7
fromRate optional Minimum Rate for the Loads Value should be numeric
toRate optional Maximum Rate for the Loads Value should be numeric

Curl Example

Request

curl -u apiuser:test -H "Accept: application/json" -H "Content-Type: application/json; charset=UTF-8" -X POST -d "{\"name\":\"watchdog1\", \"expiryDays\":\"10\",\"originState\":\"UT\"}" "https://www.factorsnetwork.com/api/users/47585125-5fa6-44f5-9e37-afbb5f56b737/watchdogs"
						

Response

{
  "watchdog" : {
    "id" : "ff1aeb04-699c-4e4e-992f-6ac95ef56388",
    "originCity" : null,
    "originState" : "UT",
    "originRadius" : 100,
    "destinationCity" : null,
    "destinationState" : null,
    "destinationRadius" : 100,
    "fromDate" : null,
    "toDate" : null,
    "fromWeight" : null,
    "toWeight" : null,
    "equipment" : null,
    "volume" : null,
    "fromRate" : null,
    "toRate" : null,
    "expiryDays" : 10,
    "expiryDate" : "2016-07-01",
    "status" : "Active",
    "name" : "watchdog1",
    "owner" : "Fname Lname"
  }
}

Note: Responses will not be pretty printed when using the API, but have been formatted here for documentation purposes.