POST /Rates

Creates a new rate estimate.

Resource URL

https://api.daytonfreight.com/public/3/api/rates

Resource Information

Response formats JSON/XML
Requires Authentication? Yes
Rate Limited? Yes
Rates 450 requests/15 min

Example Request

POST https://api.daytonfreight.com/public/3/api/rates
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json
Host: api.daytonfreight.com

Payment Terms

The payment terms defines the party responsible for paying the freight charges. Generally the shipper is in charge or paying the charges for prepaid shipments and the consignee for collect shipments. If a shipment involves a third-party the third-party will usually be responsible for the freight charges. Since shippers and consignees could have different pricing structures the terms must be specified when making rate estimate requests.

Prepaid Indicates the freight charges are paid by the shipper and the customer code specified is the shipper’s account code.
Collect Indicates the freight charges are paid by the consignee and the customer code specified is the consignee’s account code.
ThirdPartyPrepaid Indicates the freight charges are paid by the shipper and the customer code specified is the third-party’s account code.
ThirdPartyCollect Indicates the freight charges are paid by the consignee and the customer code specified is the third-party’s account code.

Remarks

Prepaid and collect rates are based on the customer's zip. When specifying "Prepaid" as the terms, the origin zip must match customer's zip. When specifying "Collect" as the terms, the destination zip must match the customer's zip. Requests that violate this requirement will result in a HTTP 400 - Bad Request.
A maximum of 11 rate request items is allowed per rate request. If more than 11 items are specified, a HTTP 400 - Bad Request is returned.

Accessorials

Any extra service provided that is not considered standard will incur an additional fee called an accessorial charge. Extra services may include, but are not limited to: arrival notification, inside pickup/delivery, liftgate service, hazardous materials, insurance, and fuel surcharges. To include accessorials in your rate request you must include the requested accessorials in the request. Accessorials are not static and can change on a regular basis. It is recommended that you make a service call to get the list of accessorials. See Retrieving Accessorials for more information. Dislayed below is a list of the accessorials currently supported by rating.

Id Name
{{ type.Code }} {{ type.Description }}

Service Options

Dayton Freight offers several different levels of service. On The Double gives Dayton Freight customers the opportunity to specify when they want their freight delivered – either by Noon or 5 PM – for an additional fee. On-time delivery is guaranteed, or it's free.
Additional service option availability vary based on the origin and destination. In order to avoid validation errors it is recommended that the available service options are validated before requesting a rate. To get the available service options see Retrieving Available Service Options.
None (Default) Indicates standard service.
AM Indicates selection for delivery before noon.
PM Indicates selection for delivery before 5 PM.

Example Request Body

{
    "account": "Dayton Freight Account Code",
    "origin": "Zip Code",
    "destination": "Zip Code",
    "skids": 1,
    "codAmount": null,
    "terms": "Prepaid",
    "items": [
        {
            "class": 99,
            "weight": 9999
        }
    ],
    "accessorials": [ 'Code', 'Code' ],
    "serviceOptions": "AM"
}
{ "account": "Dayton Freight Account Code", "origin": "Zip Code", "destination": "Zip Code", "skids": 1, "codAmount": null, "terms": "Prepaid", "items": [ { "class": 99, "weight": 9999 } ], "accessorials": [ 'Code', 'Code' ], "serviceOptions": "AM" }

* Xml elements must be in alphabetical order

<?xml version='1.0'?>
<rateRequest xmlns:i='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://api.daytonfreight.com'>
    <accessorials>
        <accessorial>CODE</accessorial>
        <accessorial>...</accessorial>
    </accessorials>
    <account>XXXXXXX</account>
    <codAmount i:nil="true" />
    <destination>XXXXX</destination>
    <items>
        <item>
            <class>99</class>
            <weight>9999</weight>
        </item>
    </items>
    <origin>XXXXX</origin>
    <serviceOptions>PM</serviceOptions>
    <skids i:nil="true" />    
    <terms>Prepaid</terms>
</rateRequest>
CODE ... XXXXXXX XXXXX 99 9999 XXXXX PM Prepaid

Example Response

{
    "id": 999999,
    "account": "Dayton Freight Account Code",
    "origin": {
        "city": "Origin City",
        "state": "Origin State",
        "zip": "Origin Zip"
    },
    "destination": {
        "city": "Destination City",
        "state": "Destination State",
        "zip": "Destination Zip"
    },
    "handlingUnits": 1,
    "codAmount": null,
    "discount": 0,
    "discountPercent": 0,
    "fuelSurcharge": 0,
    "fuelSurchargeAmount": 0,
    "gross": 0,
    "deficientRate": null,
    "deficientWeight": null,
    "deficientAmount": null,
    "additionalCharges": 0,
    "total": 0,
    "terms": 0,
    "items": [
        {
            "class": 99,
            "weight": 9999,
            "rate": 99.99,
            "amount": 999.99
        },
        {
            ...
        }
    ],
    "accessorials": [
        { 
            "code" : "Code", 
            "name" : "Description",
            "amount" : 99.99
        },
        {
            ...            
        }            
    ],
    "upgradeOptions":[
        { 
            "option":"AM",
            "amount":99.99  
        },
        {
            ...            
        }    
    ],
    "created": "0001-01-01T00:00:00",
    "serviceEligibility": {
        "originCity": "DAYTON",
        "originState": "OH",
        "originZip":"45414",
        "originServiceCenter": {
            "id": "DAY",
            "phone": "8008606400",
            "fax": "9372367768",
            "name": "Dayton",
            "address1": "6265 Executive Blvd.",
            "address2": "",
            "city": "DAYTON",
            "state": "OH",
            "zip": "45424"
        },
        "destinationCity": "DES PLAINES",
        "destinationState": "IL",
        "destinationZip": "60017",
        "destinationServiceCenter": {
            "id": "ORD",
            "phone": "8668603572",
            "fax": "8477599335",
            "name": "Chicago - Des Plaines",
            "address1": "1000 E. Northwest Hwy.",
            "address2": "",
            "city": "DES PLAINES",
            "state": "IL",
            "zip":"60016"
        },
        "serviceDays": 1,
        "serviceOptions": "AM, PM",
        "originPartner": null, 
        "destinationPartner": null
    }
}
<?xml version="1.0"?>
<rateresponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.daytonfreight.com">
    <accessorials>
        <accessorial>
            <code>Code</code>
            <name>Description</code>
            <amount>99.99</amount>
        </accessorial>
        <accessorial>
            ...
        </accessorial>
    </accessorials>
    <account>Dayton Freight Account</account>
    <additionalcharges>99.99</additionalcharges>
    <codAmount i:nil="true" />
    <created>0001-01-01T00:00:00</created>
    <deficientamount i:nil="true" />
    <deficientrate i:nil="true" />
    <deficientweight i:nil="true" />
    <destination>
        <city>Destination City</city>
        <state>Destination State</state>
        <zip>Destination Zip</zip>
    </destination>
    <discount>99.99</discount>
    <discountpercent>99</discountpercent>
    <fuelsurcharge>99.9</fuelsurcharge>
    <fuelsurchargeamount>99.99</fuelsurchargeamount>
    <gross>999.99</gross>
    <id>999999</id>
    <items>
        <item>
            <amount>999.99</amount>
            <class>99</class>
            <rate>99.99</rate>
            <weight>9999</weight>
        </item>
        <item>
            ...   
        </item>
    </items>
    <origin>
        <city>Origin City</city>
        <state>Origin State</state>
        <zip>Origin Zip</zip>
    </origin>
    <serviceEligibility>
        <destinationCity>DES PLAINES</destinationCity>
        <destinationPartner i:nil='true' />
        <destinationServiceCenter>
            <address1>1000 E. Northwest Hwy.</address1>
            <address2></address2>
            <city>DES PLAINES</city>
            <name>Chicago - Des Plaines</name>
            <state>IL</state>
            <zip>60016</zip>
            <fax>8477599335</fax>
            <id>ORD</id>
            <phone>8668603572</phone>
        </destinationServiceCenter>
        <destinationState>IL</destinationState>
        <destinationZip>60017</destinationZip>
        <originCity>DAYTON</originCity>
        <originPartner i:nil='true' />
        <originServiceCenter>
            <address1>6265 Executive Blvd.</address1>
            <address2></address2>
            <city>DAYTON</city>
            <name>Dayton</name>
            <state>OH</state>
            <zip>45424</zip>
            <fax>9372367768</fax>
            <id>DAY</id>
            <phone>8008606400</phone>
        </originServiceCenter>
        <originState>OH</originState>
        <originZip>45414</originZip>
        <serviceDays>1</serviceDays>
        <serviceOptions>AM PM</serviceOptions>
    </serviceEligibility>
    <skids i:nil="true" />
    <terms>Prepaid</terms>
    <total>9999.99</total>
    <upgradeOptions>
        <guaranteedServiceOption>
            <option>AM</option>
            <amount> 99.99 </amount>
        </guaranteedServiceOption>
        <guaranteedServiceOption>
        ...
        </guaranteedServiceOption>
    </upgradeOptions>
</rateresponse>

Errors

HTTP Status Code Description
400 (Bad Request) This error occurs when a rate request is made with one or more invalid properties or more than 11 rate request items are specified.
403 (Forbidden) This error occurs when the current user does not have access to rate for the customer account.
503 (Service Unavailable) This error occurs when a rate request is made and current service in that area is unavailable or there is a service exception.