Skip to content

Instantly share code, notes, and snippets.

@azrosen92
Last active November 21, 2019 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azrosen92/230f4f601ac993098a0e653261c05fd5 to your computer and use it in GitHub Desktop.
Save azrosen92/230f4f601ac993098a0e653261c05fd5 to your computer and use it in GitHub Desktop.
Mobile API V7 – Find Loads Endpoint

Mobile Find Loads Endpoint

GET /stark/:version/mobile/find_shipments
  ?pickupStateCode=<string>
  &pickupCity=<string>
  &deliveryStateCode=<string>
  &deliveryCity=<string>
  &pickupMiles=<number>
  &deliveryMiles=<number>
  &pickupDates=<string>[] // Formatted as "mm/dd/yyyy"
  &trailerType=<'dry van' | 'reefer' | 'open_deck'>[]
  &loadedMiles=<string>[] // We should come up with a way to format/parse this (ie. '1 - 200 mi' could be represented as 1|200)
  &stops=<'any' | 'nonstop'>
  &deliveryDate=<'any' | 'same day' | 'next day'>[]
  &pickupTime=<string>[] // Similar formatting as loadedMiles (ie. '0:00 - 12:00' would be 0:00|12:00)
  &deliveryTime=<string>[]
  &sortField=<'rate_per_mile' | 'pickups'>
  &sortOrder=<'asc' | 'desc'>
  // Pagination Params
  &pageCount=<number>
  &perPage=<number>
interface SearchResults {
  shipments: {
    firstStop: ShipmentStopSearchResult;
    lastStop: ShipmentStopSearchResult;
    equipment: string;
    listRate: number;
    totalMiles: number;
  }[]
}

interface ShipmentStopSearchResult {
  address: { // Abstract this out from load details v7 api
    stateCode: string;
    city: string;
    postalCode: string;
    country_code: string;
  };
  appointment: {
    startTime: string;
    endTime: string;
  };
  stopSequence: number;
  stopType: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment