DrayEasy API v2

DrayEasy API v2


Rate Search

<h2>Overview</h2> <p>This API endpoint is designed to facilitate detailed searches for freight rates across various intermodal regions. It allows users to specify criteria such as intermodal region ID, destination city ID, container size, cargo types, and whether the area has limited access, enabling a tailored search for freight rates that match specific requirements.</p> <h2>Request</h2> <ul> <li>Method: <strong>GET</strong></li> <li>URI: <code>/rates/advanceSearch</code></li> </ul> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>intermodal_region_id (*)</td> <td>Integer</td> <td>The id of Intermodal Region</td> </tr> <tr> <td>to_city_id (*)</td> <td>Integer</td> <td>The id of City</td> </tr> <tr> <td>cntr_size</td> <td>Integer</td> <td>The container size (20, 40, 45). <strong>It is strongly recommended to send request with cntr_size parameter, if not, 40 will be used by default</strong></td> </tr> <tr> <td>cargo_types</td> <td>Integer Array</td> <td>2: HAZMAT, 3: REEFER, 4: OVERWEIGHT. For example, [2, 3] refers to the hazmat and reefer container. empty array or null refers to general cargo</td> </tr> <tr> <td>is_limited_area_access</td> <td>Boolean</td> <td>Limtied area access</td> </tr> </tbody> </table> <p>&gt; <code>(*)</code> it means the field is required.</p> <h2>Code Example</h2> <pre><code>Request: curl https://api.drayeasy.com/api/v2/rates/search?intermodal_region_id=77&amp;amp;to_city_id=240 \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxxxxxx' curl https://api.drayeasy.com/api/v2/rates/search?intermodal_region_id=94&amp;amp;to_city_id=115 \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxxxxxx' curl https://api.drayeasy.com/api/v2/rates/search?intermodal_region_id=92&amp;amp;to_city_id=28269 \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxxxxxx' curl https://api.drayeasy.com/api/v2/rates/search?intermodal_region_id=48&amp;amp;to_city_id=6161 \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxxxxxx' Response: HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { &amp;quot;data&amp;quot;: { &amp;quot;intermodal_region&amp;quot;: { &amp;quot;id&amp;quot;: 77, &amp;quot;name&amp;quot;: &amp;quot;Chicago - IL&amp;quot;, &amp;quot;city&amp;quot;: &amp;quot;Chicago, IL, USA&amp;quot;, &amp;quot;latitude&amp;quot;: 41.642854, &amp;quot;longitude&amp;quot;: -87.868063, &amp;quot;has_ocean_port&amp;quot;: null, &amp;quot;has_ramp_port&amp;quot;: true }, &amp;quot;to_city&amp;quot;: { &amp;quot;id&amp;quot;: 240, &amp;quot;country&amp;quot;: &amp;quot;USA&amp;quot;, &amp;quot;full_name&amp;quot;: &amp;quot;Joliet, IL, USA&amp;quot;, &amp;quot;full_name_zipcode&amp;quot;: &amp;quot;Joliet, IL, USA&amp;quot;, &amp;quot;zipcodes&amp;quot;: [ &amp;quot;60431&amp;quot;, &amp;quot;60432&amp;quot;, &amp;quot;60433&amp;quot;, &amp;quot;60435&amp;quot;, &amp;quot;60436&amp;quot;, &amp;quot;60421&amp;quot;, &amp;quot;60586&amp;quot;, &amp;quot;60434&amp;quot; ], &amp;quot;name&amp;quot;: &amp;quot;JOLIET&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;IL&amp;quot;, &amp;quot;alias&amp;quot;: null, &amp;quot;latitude&amp;quot;: 41.527154, &amp;quot;longitude&amp;quot;: -88.08241 }, &amp;quot;currency&amp;quot;: &amp;quot;USD&amp;quot;, &amp;quot;remaining_limit&amp;quot;: 18, &amp;quot;rates&amp;quot;: [ { &amp;quot;id&amp;quot;: &amp;quot;S198972&amp;quot;, &amp;quot;base_rate&amp;quot;: &amp;quot;497.00&amp;quot;, &amp;quot;fuel_surcharge&amp;quot;: &amp;quot;0.00&amp;quot;, &amp;quot;toll_fee&amp;quot;: null, &amp;quot;truck_rate&amp;quot;: &amp;quot;497.00&amp;quot;, &amp;quot;expired_at&amp;quot;: &amp;quot;2023-08-14&amp;quot;, &amp;quot;terminals&amp;quot;: [ { &amp;quot;id&amp;quot;: 663, &amp;quot;name&amp;quot;: &amp;quot;CN - JOLIET&amp;quot;, &amp;quot;firms_code&amp;quot;: &amp;quot;H903&amp;quot;, &amp;quot;facility_type&amp;quot;: &amp;quot;CN Rail&amp;quot; } ], &amp;quot;scenarios&amp;quot;: [ { &amp;quot;name&amp;quot;: &amp;quot;Best Scenario CHICAGO&amp;quot;, &amp;quot;description&amp;quot;: &amp;quot;Best Scenario / 40'HQ,40',20' / Legal Weight / Live Unload\n2 Days Chassis Usage&amp;quot;, &amp;quot;rates&amp;quot;: [ { &amp;quot;name&amp;quot;: &amp;quot;Base Rate&amp;quot;, &amp;quot;rate&amp;quot;: &amp;quot;497.00&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;CNTR&amp;quot;, &amp;quot;qty&amp;quot;: 1, &amp;quot;amount&amp;quot;: &amp;quot;497.00&amp;quot; }, { &amp;quot;name&amp;quot;: &amp;quot;Fuel Surcharge&amp;quot;, &amp;quot;rate&amp;quot;: &amp;quot;0.00&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;CNTR&amp;quot;, &amp;quot;qty&amp;quot;: 1, &amp;quot;amount&amp;quot;: &amp;quot;0.00&amp;quot; } ], &amp;quot;possible_charges&amp;quot;: [ { &amp;quot;code&amp;quot;: &amp;quot;CHAFE&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;CHASSIS FEE&amp;quot;, &amp;quot;explanation&amp;quot;: null, &amp;quot;rate&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;DAY&amp;quot;, &amp;quot;rate_text&amp;quot;: &amp;quot;45.00/DAYx2 2 DAYs MIN&amp;quot;, &amp;quot;free&amp;quot;: null, &amp;quot;min&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;max&amp;quot;: null, &amp;quot;cntr_size&amp;quot;: [ 0 ], &amp;quot;qty&amp;quot;: 2, &amp;quot;amount&amp;quot;: &amp;quot;90.00&amp;quot;, &amp;quot;statement&amp;quot;: &amp;quot;Chassis Usage 2 Days&amp;quot; } ], &amp;quot;total_rate&amp;quot;: &amp;quot;587.00&amp;quot; }, { &amp;quot;name&amp;quot;: &amp;quot;Average Scenario CHICAGO&amp;quot;, &amp;quot;description&amp;quot;: &amp;quot;Average Scenario 40'HQ,40',20' / Legal Weight / Live Unload\n4 Days Chassis Usage\nPrepull \n2 Day Storage\nChassis Split&amp;quot;, &amp;quot;rates&amp;quot;: [ { &amp;quot;name&amp;quot;: &amp;quot;Base Rate&amp;quot;, &amp;quot;rate&amp;quot;: &amp;quot;497.00&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;CNTR&amp;quot;, &amp;quot;qty&amp;quot;: 1, &amp;quot;amount&amp;quot;: &amp;quot;497.00&amp;quot; }, { &amp;quot;name&amp;quot;: &amp;quot;Fuel Surcharge&amp;quot;, &amp;quot;rate&amp;quot;: &amp;quot;0.00&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;CNTR&amp;quot;, &amp;quot;qty&amp;quot;: 1, &amp;quot;amount&amp;quot;: &amp;quot;0.00&amp;quot; } ], &amp;quot;possible_charges&amp;quot;: [ { &amp;quot;code&amp;quot;: &amp;quot;CHAFE&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;CHASSIS FEE&amp;quot;, &amp;quot;explanation&amp;quot;: null, &amp;quot;rate&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;DAY&amp;quot;, &amp;quot;rate_text&amp;quot;: &amp;quot;45.00/DAYx4 2 DAYs MIN&amp;quot;, &amp;quot;free&amp;quot;: null, &amp;quot;min&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;max&amp;quot;: null, &amp;quot;cntr_size&amp;quot;: [ 0 ], &amp;quot;qty&amp;quot;: 4, &amp;quot;amount&amp;quot;: &amp;quot;180.00&amp;quot;, &amp;quot;statement&amp;quot;: &amp;quot;Chassis Usage 4 days&amp;quot; }, { &amp;quot;code&amp;quot;: &amp;quot;PRECH&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;PREPULL CHARGE&amp;quot;, &amp;quot;explanation&amp;quot;: null, &amp;quot;rate&amp;quot;: &amp;quot;200&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;CNTR&amp;quot;, &amp;quot;rate_text&amp;quot;: &amp;quot;200.00x1&amp;quot;, &amp;quot;free&amp;quot;: null, &amp;quot;min&amp;quot;: null, &amp;quot;max&amp;quot;: null, &amp;quot;cntr_size&amp;quot;: [ 0 ], &amp;quot;qty&amp;quot;: 1, &amp;quot;amount&amp;quot;: &amp;quot;200.00&amp;quot;, &amp;quot;statement&amp;quot;: &amp;quot;Prepull&amp;quot; }, ... ], &amp;quot;total_rate&amp;quot;: &amp;quot;1127.00&amp;quot; } ], &amp;quot;possible_charges&amp;quot;: [ { &amp;quot;code&amp;quot;: &amp;quot;CHAFE&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;CHASSIS FEE&amp;quot;, &amp;quot;explanation&amp;quot;: null, &amp;quot;rate&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;DAY&amp;quot;, &amp;quot;rate_text&amp;quot;: &amp;quot;45.00/DAY 2 DAYs MIN&amp;quot;, &amp;quot;free&amp;quot;: null, &amp;quot;min&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;max&amp;quot;: null, &amp;quot;probability&amp;quot;: &amp;quot;94.00&amp;quot;, &amp;quot;cntr_size&amp;quot;: [ 0 ] }, { &amp;quot;code&amp;quot;: &amp;quot;TERWA&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;TERMINAL WAITING TIME (DETENTION)&amp;quot;, &amp;quot;explanation&amp;quot;: null, &amp;quot;rate&amp;quot;: &amp;quot;100&amp;quot;, &amp;quot;unit&amp;quot;: &amp;quot;HR&amp;quot;, &amp;quot;rate_text&amp;quot;: &amp;quot;100.00/HR 1 HRs FREE&amp;quot;, &amp;quot;free&amp;quot;: &amp;quot;1&amp;quot;, &amp;quot;min&amp;quot;: null, &amp;quot;max&amp;quot;: null, &amp;quot;probability&amp;quot;: &amp;quot;80.00&amp;quot;, &amp;quot;cntr_size&amp;quot;: [ 0 ] }, ... ] }, ... ] } }</code></pre> <h2>Response Fields Description</h2> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>intermodal_region</td> <td>Object</td> <td>Contains details about the intermodal region relevant to the search.</td> </tr> <tr> <td>to_city</td> <td>Object</td> <td>Details of the destination city including ID, country, and full name.</td> </tr> <tr> <td>currency</td> <td>String</td> <td>The currency in which rates are provided, e.g., USD.</td> </tr> <tr> <td>remaining_limit</td> <td>Integer</td> <td>The number of requests remaining before hitting the rate limit.</td> </tr> <tr> <td>rates</td> <td>Array of Rate</td> <td>A list of rate quotes based on the search criteria, including detailed rate information and scenarios.</td> </tr> </tbody> </table> <p><strong> Rate Object </strong></p> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>String</td> <td>Unique identifier for the rate quote.</td> </tr> <tr> <td>base_rate</td> <td>String</td> <td>The base rate for the freight.</td> </tr> <tr> <td>fuel_surcharge</td> <td>String</td> <td>The fuel surcharge applied to the freight rate.</td> </tr> <tr> <td>toll_fee</td> <td>String</td> <td>Toll fees, if applicable. Null if not applicable.</td> </tr> <tr> <td>truck_rate</td> <td>String</td> <td>Total truck rate combining base rate and other charges.</td> </tr> <tr> <td>expired_at</td> <td>Date</td> <td>Expiration date of the rate quote.</td> </tr> <tr> <td>terminals</td> <td>Array of Terminal</td> <td>Details of terminals related to the rate quote, including terminal ID and name. null or empty array indicates that this rate apply to all terminal in this Intermodal Region.</td> </tr> <tr> <td>scenarios</td> <td>Array of Scenario</td> <td>Different shipping scenarios with respective costs and descriptions.</td> </tr> <tr> <td>possible_charges</td> <td>Array of Possible Charge</td> <td>List of possible additional charges that could apply to the rate quote.</td> </tr> </tbody> </table> <p><strong>Terminal Object</strong></p> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>Integer</td> <td>Unique identifier for the terminal.</td> </tr> <tr> <td>name</td> <td>String</td> <td>The name of the terminal.</td> </tr> <tr> <td>firms_code</td> <td>String</td> <td>The FIRMS (Facilities Information and Resources Management System) code associated with the terminal.</td> </tr> <tr> <td>facility_type</td> <td>String</td> <td>Type of facility, such as &quot;CN Rail&quot;.</td> </tr> </tbody> </table> <p><strong>Scenario Object</strong></p> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td>String</td> <td>The name of the scenario, providing a quick reference to the type of cost calculation.</td> </tr> <tr> <td>description</td> <td>String</td> <td>Detailed description of the scenario, including conditions like container size, weight limits, and loading/unloading specifics.</td> </tr> <tr> <td>rates</td> <td>Array</td> <td>A list of rates applicable to this scenario, each object detailing the rate name, unit, quantity, and amount.</td> </tr> <tr> <td>possible_charges</td> <td>Array of Possible Charge</td> <td>List of possible additional charges specific to this scenario, mirroring the structure of the top-level possible charges.</td> </tr> <tr> <td>total_rate</td> <td>String</td> <td>The total calculated rate for this scenario, summing the rates and possible_charges.</td> </tr> </tbody> </table> <p><strong>Rates within Scenario Object</strong></p> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td>String</td> <td>The name of the rate component, such as &quot;Base Rate&quot; or &quot;Fuel Surcharge&quot;.</td> </tr> <tr> <td>rate</td> <td>String</td> <td>The individual rate cost for this component.</td> </tr> <tr> <td>unit</td> <td>String</td> <td>The unit of measure for this rate, typically &quot;CNTR&quot; for container.</td> </tr> <tr> <td>qty</td> <td>Integer</td> <td>The quantity of units this rate applies to, often 1 for scenarios involving single shipments.</td> </tr> <tr> <td>amount</td> <td>String</td> <td>The total amount for this rate component, calculated as rate * qty.</td> </tr> </tbody> </table> <p><strong>Possible Charge Object</strong></p> <table> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>code</td> <td>String</td> <td>A unique code identifying the type of charge.</td> </tr> <tr> <td>name</td> <td>String</td> <td>The name of the charge.</td> </tr> <tr> <td>explanation</td> <td>String</td> <td>Additional information or explanation about the charge. Null if not applicable.</td> </tr> <tr> <td>rate</td> <td>String</td> <td>The rate of the charge.</td> </tr> <tr> <td>unit</td> <td>String</td> <td>The unit in which the charge is calculated, e.g., &quot;DAY&quot;, &quot;HR&quot;.</td> </tr> <tr> <td>rate_text</td> <td>String</td> <td>Text description of the rate, including any calculations like &quot;45.00/DAY&quot;.</td> </tr> <tr> <td>free</td> <td>String</td> <td>Indicates the quantity free of charge before charges apply, if applicable.</td> </tr> <tr> <td>min</td> <td>String</td> <td>The minimum quantity for which the charge applies.</td> </tr> <tr> <td>max</td> <td>String</td> <td>The maximum limit for the charge, if any.</td> </tr> <tr> <td>cntr_size</td> <td>Array</td> <td>Container sizes to which this charge is applicable. [0] indicates all sizes.</td> </tr> <tr> <td>qty</td> <td>Integer</td> <td>The quantity related to the charge.</td> </tr> <tr> <td>amount</td> <td>String</td> <td>The total amount for this charge.</td> </tr> <tr> <td>statement</td> <td>String</td> <td>A brief statement summarizing the charge's context or condition.</td> </tr> <tr> <td>probability</td> <td>String</td> <td>Probability percentage for this possible charge to happen.</td> </tr> </tbody> </table>

页面列表

ITEM_HTML