AllTruckJobs API v2.0
Job Imports
The job imports resource is used to manage bulk job posting.
When importing jobs to AllTruckJobs, the client posts a single request containing all of the jobs that should be posted, along with optional configurations for the import. The server accepts that request and places the import into a queue for processing. The processing may be delayed depending on how busy the server is, and the amount of time to process the import may depend on the number of jobs being posted and additional factors. Because of the asynchronous nature of import processing, there are two workflows available for determining when the import is complete: callback (suggested) and polling.
Callback workflow
When creating a job import, you can optionally provide a callbackUrl
parameter. When processing of your job import completes, AllTruckJobs will send a POST
request to your provided callbackUrl
containing the results of the import.
sequenceDiagram box HTTP participant Client participant Server end box Imports participant Queue end Client->>Server: POST /api/v2.0/job-imports Server->>+Queue: Queue for processing Server-->>Client: 202 Accepted Note over Client,Server: Server responds immediately, letting
Client know import is queued Queue->>-Server: Done processing Server->>Client: POST {callbackUrl} Note over Client,Server: Server notifies Client that import is
complete via provided webhook
Polling workflow
After initially creating the job import, it will be up to you to poll the server periodically to determine when an import is complete.
sequenceDiagram box HTTP participant Client participant Server end box Imports participant Queue end Client->>Server: POST /api/v2.0/job-imports Server->>+Queue: Queue for processing Server-->>Client: 202 Accepted Note over Client,Server: Server responds immediately, letting
Client know import is queued Client->>Server: GET /api/v2.0/job-imports/{id} Server-->>Client: {"status": "pending", ...} Note over Client,Server: Client requests status update before
import is complete Queue->>-Server: Done processing Client->>Server: GET /api/v2.0/job-imports/{id} Server-->>Client: {"status": "complete", ...} Note over Client,Server: Client requests status update after
import is complete
The job import object
The job import object represents a requested job import for your account in the system.
Attributes
string
The ID of the job import.
date-time
The date/time when the job import was completed, or null
if it is not complete.
date-time
The date/time when the job import was requested.
enum
The status of the job import.
Possible enum values:pending
running
complete
Example
{
"id": "HIk0c8fho8KhZ4kXLZ7Xu",
"completedAt": null,
"requestedAt": "2023-12-03T07:53:15.000000Z",
"results": null,
"status": "pending"
}
The job import results object
The job import results object represents the results of a requested job import, including summary counts and detailed errors for any failures.
Attributes
integer
The number of processed jobs that were not found in your account, and added.
integer
The number of jobs that were deleted.
integer
The number of processed jobs that failed to import (see errors
for details).
integer
The total number of processed jobs.
integer
The number of processed jobs that were found in your account, but had no changes.
integer
The number of processed jobs that were found in your account and updated.
Example
{
"added": 48,
"deleted": 0,
"errors": [
{
"index": 227,
"messages": [
"Job ID is missing"
],
"referenceNumber": null
},
{
"index": 3142,
"messages": [
"State is invalid. Value passed was: MC"
],
"referenceNumber": "hnGvH0FEYHsQ"
},
{
"index": 3178,
"messages": [
"Zip is invalid. Value passed was: 0"
],
"referenceNumber": "kDTyDg5Cs3y9"
}
],
"failed": 3,
"ignoredValues": [],
"processed": 4416,
"unchanged": 4343,
"updated": 22
}
The job import error object
The job import error object represents a failed job encountered during a requested job import, and coinciding error messages leading to that failure.
Attributes
integer
The index of the job within the jobs
list provided in the import.
list<string>
A list of individual error messages for the job.
string
The referenceNumber
of the associated job provided in the import, or null
if it was missing.
Example
{
"index": 3142,
"messages": [
"State is invalid. Value passed was: MC"
],
"referenceNumber": "Ivq2SUDUgypd"
}
Create a job import
URL Parameters
No parameters.
Body Parameters
optional
url
A webhook URL that you control. An HTTP POST
request will be made to this URL when the import is complete. The payload of this request will be identical to the response when retrieving the job import.
optional
boolean
Whether or not to delete all other preexisting jobs that are not found in the provided jobs
for this import.
The default is false
.
Example Request
{
"callbackUrl": "https://www.example.com/webhooks/job-import-completed",
"deleteJobs": false,
"jobs": [
{
"referenceNumber": "u9FE7VIZ",
"title": "Job Title",
"city": "Lancaster",
"state": "PA",
"postalCode": "17603",
"description": "Text or HTML describing this job",
"requirements": "Text or HTML describing the requirements for this job",
"driverType": "Company Driver",
"freightType": "Dry Van",
"payAmountMin": "1300.00",
"payAmountMax": "1700.00",
"payFrequency": "Weekly",
"preference": "Team",
"employmentType": [
"Full-Time",
"Permanent"
],
"routeType": [
"Dedicated",
"Regional"
],
"twicOnly": true,
"licenseClass": "A"
}
]
}
Example Response
{
"data": {
"id": "SdWQo-ZMojzKEU8snRt0W",
"completedAt": null,
"requestedAt": "2023-12-03T07:53:15.000000Z",
"results": null,
"status": "pending"
},
"links": {
"self": "https://www.alltruckjobs.com/api/v2.0/job-imports/SdWQo-ZMojzKEU8snRt0W"
}
}
Retrieve a job import
URL Parameters
REQUIRED
string
The ID of the job import.
Query Parameters
No parameters.
Example Request
Example Response
{
"data": {
"id": "DSmSFftBV_f_0D-8nr2YF",
"completedAt": null,
"requestedAt": "2023-12-03T07:53:15.000000Z",
"results": null,
"status": "pending"
},
"links": {
"self": "https://www.alltruckjobs.com/api/v2.0/job-imports/DSmSFftBV_f_0D-8nr2YF"
}
}