October 20, 2021 | Fork Freight
Fork Freight APIs
We provide high-end, affordable services that will help carriers, shippers, and brokers grow their business.
Our goal is to change the way you use load boards, increasing the effectiveness of load process and delivery. Our industry professionals work to significantly improve freight matching for you and your customers.
Which are the API commands used in Fork Freight?
Command | Purpose |
---|---|
POST | Create an object |
GET | Fetch one or more objects |
PUT | Update an object |
DELETE | Remove an object |
To use the API’s listed above, you need to authenticate your id as you would when you log in to your Fork Freight account using your API key.
Each user in Fork Freight service is provided with a unique API key. To find your API key
For example, if your API key is sfg999666t673t7t82, the curl command to use is:
curlcurl -H 'x-api-key: sfg999666t673t7t82' -H "Content-Type: application/json" -X GET https:// -H "Content-Type: application/json" -X GET https://
I have encountered an error. How do I fix this?
API requests that result in errors will return an appropriate HTTP status code to help you identify the type of error and fix it. You can use the table below to understand what each code means.
HTTP Status Code | Text | Description |
---|---|---|
400* | Client or Validation Error | Indicates that the request is not in the correct format or the request params are invalid. For example, If load weight and length are of type string you will get an error. |
401 | Authentication Failure | Indicates that the Authorization Key header is either missing or incorrect. |
403 | Access Denied | This indicates that the user whose credentials were used in making this request was not authorized to perform this API call. It could be that this API call requires admin level credentials or perhaps the Fork Freight Developer portal doesn’t have the corresponding feature enabled. |
404 | Requested Resource not Found | This status code is returned when the request contains invalid ID/Fork Freight domain in the URL or an invalid URL itself. For example, an API call to retrieve a Load/Truck with an invalid ID will return HTTP 404 status code to let you know that no such Load/Truck exists. |
429 | Too many requests | This status code appears when the user has exceeded the API limit set per hour per account. In Fork Freight, this limit is 1000 API requests per hour per account. |
500 | Unexpected Server Error | Phew!! You can’t do anything more here. This indicates an error at Fork Freight side. Please email us your API script along with the response headers. We will reach you out to you and fix this ASAP. |
502 | Bad Gateway | Requested url is invalid or does not exists. |
503 | Service Unavailable | Error code indicates that the requested service is not available at the moment or service no longer exists. |
In addition to the HTTP status code, most errors would also return a response body that contains more information on the error. Here’s a sample error response:
{
"errors": {
"code":"Status code of the error",
"message":"Error Description"
}
}
Field | Description |
---|---|
code | HTTP error status code |
message | Description about the error. |
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
destination_city* | String | Load destination city (city name) |
delivery_date* | String | Delivery date (when load of truck is delivered) Format(yyyy-mm-dd) |
destination_state* | String | Destination state where loads to be delivered |
description | String | Description about loads |
equipment_type* | String | Equipment type such as Van, Box-truck |
load_weight | Number | Weight of load |
load_length | Number | Length of load |
loads_count | Number | Number of loads count |
pickup_city* | String | city from where load will be picked (city name) |
pickup_date | String | Pickup date (when load is to be picked) Format(yyyy-mm-dd) |
pickup_state* | String | State from where loads to be picked |
ready_date | String | Date when the load will be ready |
target_rate | Number | Desired rate for the load |
* Mandatory fields for creating contact. |
This API allows you to create a Load.
Post/api/v1/load
curl -X POST "https://forkfreight-external-api-test.herokuapp.com/api/v1/load" -H "accept: application/json" -H 'x-api-key: your API key ' -H "Content-Type: application/json" -d "{"delivery_addresses":["Florence, SC, USA"],"delivery_cities":["Florence"],"delivery_date":"2021-10-26T11:12:00.000Z","delivery_lat_long":[-79.7625625,34.1954331],"delivery_states":["SC"],"delivery_zips":null,"description":"new load","equipment_type":"Box Truck","load_weight":"1000","load_length":"1000","no_of_count":"123","pickup_addresses":["Miami, FL, USA"],"pickup_date":"2021-10-23T11:12:00.000Z","pickup_cities":["Miami"],"pickup_lat_long":[-80.1917902,25.7616798],"pickup_states":["FL"],"pickup_zips":null,"ready_date":"2021-10-20T11:12:00.533Z","target_rate":"123"}"
For creating a new load you will get success response with StatusCode:201
{
code:201
message : 'Load is added successfully'
}
This API allows you to view a Load.
Get/api/v1/load
curl -X GET "https://forkfreight-external-api-test.herokuapp.com/api/v1/load?limit=10&page=1&sort=desc" -H "accept: application/json" -H "x-api-key: your API Key" -H "Content-Type: application/json"
{
"code": 200,
"count": 1,
"data": [
{
"id": "616d804281d14f001657e4e1",
"pickup_lat_long": {
"type": "MultiPoint",
"coordinates": [
[
-80.1917902,
25.7616798
]
]
},
"delivery_lat_long": {
"type": "MultiPoint",
"coordinates": [
[
-111.651302,
35.1982836
]
]
},
"pickup_addresses": [
"Miami, FL, USA"
],
"pickup_cities": [
"Miami"
],
"pickup_states": [
"FL"
],
"pickup_zips": null,
"delivery_addresses": [
"Flagstaff, AZ, USA"
],
"delivery_cities": [
"Flagstaff"
],
"delivery_states": [
"AZ"
],
"delivery_zips": null,
"equipment_type": "Box Truck",
"no_of_count": 1000,
"target_rate": "1000",
"load_weight": 1000,
"load_length": 100,
"pickup_date": "2021-10-21T14:08:20.000Z",
"delivery_date": "2021-10-23T19:00:00.000Z",
"description": null,
"updatedAt": "2021-10-18T14:42:30.388Z",
"ready_date": "10/17/2021"
}
]
}
This API allows you to update a Load.
Put/api/v1/load/612f779856a781001654df38
curl -X PUT "https://forkfreight-external-api-test.herokuapp.com/api/v1/load/612f779856a781001654df38" -H "accept: application/json" -H 'x-api-key: your API key ' -H "Content-Type: application/json" -d "{"delivery_addresses":["Florence, SC, USA"],"delivery_cities":["Florence"],"delivery_date":"2021-10-26T11:12:00.000Z","delivery_lat_long":[-79.7625625,34.1954331],"delivery_states":["SC"],"delivery_zips":null,"description":"new load","equipment_type":"Box Truck","load_weight":"1000","load_length":"1000","no_of_count":"123","pickup_addresses":["Miami, FL, USA"],"pickup_date":"2021-10-23T11:12:00.000Z","pickup_cities":["Miami"],"pickup_lat_long":[-80.1917902,25.7616798],"pickup_states":["FL"],"pickup_zips":null,"ready_date":"2021-10-20T11:12:00.533Z","target_rate":"123"}"
API returns with the status code 204 with no content in the body.
This API allows you to delete a Load.
Delete/api/v1/load/612f779856a781001654df38
curl -X DELETE "https://forkfreight-external-api-test.herokuapp.com/api/v1/load/612f779856a781001654df38" -H "x-api-key: your API key "
API returns with the status code 204 with no content in the body.
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
address_type_city* | Boolean | Address type city (True/False) |
destination_city_radius | string | Destination city range |
destination_city | string | Destination city |
equipment_types | Array of string | Truck Equipment types |
length | string | Length of truck |
origin_city | string | Origin city name |
origin_state | string | Origin of city state |
rate_per_mile | string | Rate per mile |
ready_date | String | Truck ready date |
ready_end | String | Ready end date |
ready_start | String | Ready start date |
weight | string | Weight of truck |
destination_bycity_address | String | Destination of city address |
tracking_number | Number | Tracking number of truck |
amount_of_load | String | Amount of load |
source | String | Fork Freight or third party source data |
Company | ObjectId | Company Id as Reference |
* Mandatory fields for creating contact. |
This API allows you to create a Truck.
Post/api/v1/truck
curl -X POST "https://forkfreight-external-api-test.herokuapp.com/api/v1/truck" -H "accept: application/json" -H "x-api-key: your API key " -H "Content-Type: application/json" -d "{\"address_type_city\":true,\"origin_states\":\"\",\"destination_states\":\"\",\"origin_city_address\":\"Miami, FL, USA\",\"origin_city_lat_long\":[-80.1917902,25.7616798],\"origin_city_zip\":\"\",\"origin_city_state\":\"\",\"origin_city\":\"Miami\",\"origin_city_range\":500,\"destination_city_address\":\"Florida Mall Ave, Orlando, FL 32809, USA\",\"destination_city_range\":500,\"destination_city_lat_long\":[-81.39378289999999,28.4485982],\"destination_city_zip\":\"\",\"destination_city_state\":\"\",\"destination_city_city\":\"Orlando\",\"equipment_type\":[\"Dump Trailer\"],\"weight\":\"1000\",\"length\":\"1000\",\"rate_per_mile\":1000,\"ready_date\":\"2021-10-18\",\"description\":\"new\"}"
{
code:201
message : 'Truck is added successfully'
}
This API allows you to view a Truck.
Getapi/v1/truck
curl -X GET "https://forkfreight-external-api-test.herokuapp.com/api/v1/truck?limit=10&page=1&sort=desc" -H "accept: application/json" -H "x-api-key: your API Key" -H "Content-Type: application/json"
{
"code": 200,
"count": 1,
"data": [
{
"id": "617013f18831de0016dc0c76",
"origin_city_lat_long": {
"type": "Point",
"coordinates": [
-80.1917902,
25.7616798
]
},
"destination_city_lat_long": {
"type": "Point",
"coordinates": [
-74.0059728,
40.7127753
]
},
"origin_state_states": [
""
],
"destination_states": [
""
],
"equipment_type": [
"Box Truck"
],
"origin_city_address": "Miami, FL, USA",
"origin_city": "Miami",
"origin_city_zip": null,
"origin_city_range": "500",
"destination_city_address": "New York, NY, USA",
"destination_city_city": "New York",
"destination_city_zip": null,
"destination_city_range": "500",
"weight": 1000,
"length": 1000,
"rate_per_mile": 1000,
"description": "NEW",
"updatedAt": "2021-10-20T13:04:49.499Z",
"ready_date": "10/20/2021"
}
]
}
This API allows you to update a Truck.
Put/api/v1/truck/612f779856a781001654df38
curl -X PUT "https://forkfreight-external-api-test.herokuapp.com/api/v1/truck/612f779856a781001654df38" -H "accept: application/json" -H "x-api-key: your API key " -H "Content-Type: application/json" -d "{\"address_type_city\":true,\"origin_states\":\"\",\"destination_states\":\"\",\"origin_city_address\":\"Miami, FL, USA\",\"origin_city_lat_long\":[-80.1917902,25.7616798],\"origin_city_zip\":\"\",\"origin_city_state\":\"\",\"origin_city\":\"Miami\",\"origin_city_range\":500,\"destination_city_address\":\"Florida Mall Ave, Orlando, FL 32809, USA\",\"destination_city_range\":500,\"destination_city_lat_long\":[-81.39378289999999,28.4485982],\"destination_city_zip\":\"\",\"destination_city_state\":\"\",\"destination_city\":\"Orlando\",\"equipment_type\":[\"Dump Trailer\"],\"weight\":\"1000\",\"length\":\"1000\",\"rate_per_mile\":1000,\"ready_date\":\"2021-10-18\",\"description\":\"new\"}
API returns with the status code 204 with no content in the body.
This API allows you to delete a Truck.
Delete/api/v1/truck/612f779856a781001654df38
curl -X DELETE "https://forkfreight-external-api-test.herokuapp.com/api/v1/truck/612f779856a781001654df38" -H "x-api-key: your API key "
API returns with the status code 204 with no content in the body.
June 14, 2022 | Fork Freight
Our Blogs gives us a unique opportunity to share news, updates and content, while also offering a place for us...
December 10, 2021 | Fork Freight
If you are reading this article, chances are that you have already heard about factoring invoices for trucking companies. Let...
November 24, 2021 | Fork Freight
Truckers are always asking themselves this question. The answer is actually pretty simple, but it might surprise you. While there...
November 10, 2021 | Fork Freight
Freight brokers are the unsung heroes in international trade. It is not just because they provide a valuable service, but...
October 21, 2021 | Fork Freight
The trucking industry is booming right now, with the demand for trucks outpacing the supply. If you are a professional...