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/creditor/{creditorUuid}/users/{userUuid}/watchdogs

Path Variables

Name Required/Optional Description Validation
creditorUuid required The UUID of the creditor in the system Creditor UUID should exist in the system
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 than 100 character
specificCompany optional Loads from the specific company Length should not be greater than 100 character
originCity required The Origin City Length should not be greater than 100 character
originState required The Origin State If Origin City is entered then Origin State is required otherwise not.Length should not be greater than 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 than 100 character
destinationState optional The Destination State If Destination City is entered then Destination State is required otherwise not.Length should not be greater than 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
volume optional Full Load or Partial Value can be F or LTL. Leave blank for both types
equipment optional Type of Equipment To set Watchdog with more than one Equipment, pass the parameter with right Equipment values separated by commas. for eq: equipment=VAN,FSD.

Value can be AC, ALLFB, ALLRF, ALLVN, BT14, BT20, BT24, BT26, DD, DT, FTB, F48, F53, FBT, FH, FPE, FSD, FWS, FWT, FT, HB, HS, LB, MX, PO, RFR, RH, RPE, RG, SDK, TKR, VAN, 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.
expiryDays 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
To override the recipient details please send us the details below. Please note that these details will only be overriden if the URI Creditor is an official Load Board Client of FactorsNetwork. For more details please Contact Us
recipientName optional Name of the recipient who created the WatchDog Name should not exceed 100 characters
recipientEmail optional Email of the recipient on which WatchDog alerts needs to be sent Email should be valid and should not exceed 100 characters
recipientCompany optional The company name of the user for which the WatchDog is set for The company name should not exceed 100 characters
customMessage optional The message that the factoring company wants to send their clients along with the WatchDog email alerts

Curl Example

Request

curl -u apiuser:test -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -X POST -d "name=watchdog1&specificCompany=ABC Company" "https://www.factorsnetwork.com/api/creditor/96575125-5fa6-44f5-9e37-afbb5f56b737/users/47585125-5fa6-44f5-9e37-afbb5f56b737/watchdogs"
						

Response

{
  "watchdog" : {
    "id" : "ff1aeb04-699c-4e4e-992f-6ac95ef56388",
    "specificCompany" : "ABC Company",
    "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",
    "recipientName" : "testUser",
    "recipientEmail" : "testUser@xyz.in",
    "recipientCompany" : "Test Company",
    "customMessage" : "Test message"
  }
}

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