Create Loads


Description

This method is used to create loads.

Authentication

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

HTTP Methods

Accepts POST requests.

URI

/api/users/{userUuid}/loads

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
pickupCity required The Pick up city The origin city should not be greater than 100 characters.
pickupState required The Pick up State The origin state should not be greater than 2 characters.
pickupDate required The Pickup Date Pickup date should be greater than or equal to current date and less than or equal to delivery date. Pickup date should be in mm/dd/yyyy format
destinationCity required The Destination City The destination city should not be greater than 100 characters.
destinationState required The Destination State The destination state should not be greater than 2 characters.
deliveryDate optional The Delivery Date Delivery date should be greater than or equal to current date and delivery date. Delivery date should be in mm/dd/yyyy format
volume required Full Load or Partial value can be F or LTL
equipment required The Equipment Type Value can be AC, DD, DT, FTB, 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
loadsCount required The Load Count Load count should be numeric and greater than or equal to 1
stops required No of Stops Stops should be numeric and greater than or equal to 0
length optional Length Length should be numeric
rate optional Rate Rate should be numeric
weight optional Weight in lbs Weight should be numeric
distance optional Distance Distance should be numeric
Comment optional Comments
debtorUuid required The Debtor UUID associated with the user The debtorUuid is optional only if one debtor is associated with the user else debtorUuid should be entered.

Curl Example

Request

curl -k -u apiuser:test -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -d "pickupCity=LAS VEGAS&pickupState=NV&destCity=LAS VEGAS&destState=NV&loadCount=1&pickupDate=10/19/2016&deliveryDate=10/19/2016&equipment=VAN&volume=LTL" "https://www.factorsnetwork.com/api/users/3be13e8e-00be-498d-a843-d6aad5af4cc1/loads"
						

Response

{
  "load" : {
    "id" : "f4d7a58a-9ee2-49cc-a623-b4696ee5d205",
    "dispatchNumber" : "949-394-1484",
    "equipmentType" : "Van",
    "fullOrLTL" : "LTL",
    "dateAvailable" : "10/19/2016",
    "deliveryDate" : "10/19/2016",
    "pickUpPoint" : "LAS VEGAS NV",
    "destination" : "LAS VEGAS NV",
    "hoursOld" : 0.0,
    "company" : "XYZ transportation",
    "distance" : 0.0,
    "debtorUuid" : "2g111448-0d0e-437a-b425-e4e30f628d4c",
    "rate" : "$0.00",
    "weight" : 0.0,
    "length" : 0.0,
    "height" : 0.0,
    "width" : 0.0,
    "loadsCount" : 1,
    "loadStatus" : "Active",
    "owner" : "fname lname",
    "postedBy" : "apiuser",
    "comment": "test comments"
  }
}

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