Documentation :: AllTruckJobs.com

AllTruckJobs API v2.0

Job Imports

The job imports resource is used to manage job imports from AllTruckJobs.

The job import object

The job import object represents a requested job import for your account in the system.

Attributes


idstring

The ID of the job import.


completedAtdate-time

The date/time when the job import was completed, or null if it is not complete.


requestedAtdate-time

The date/time when the job import was requested.


resultsobject

The import results once the import has been completed, or null if it is not complete.


statusenum

The status of the job import.

Possible enum values:
  • pending
  • running
  • complete


Example

{
    "id": "VYjyzV7E-7rHV4Fc1xG_h",
    "completedAt": null,
    "requestedAt": "2022-12-03T22:53:40.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


addedinteger

The number of processed jobs that were not found in your account, and added.


deletedinteger

The number of jobs that were deleted.


errorslist

A list of errors that occurred during this import, aggregated by job.


errors.*.indexinteger

The index of the job within the jobs list provided in the import.


errors.*.messageslist

A list of individual error messages for the job.


errors.*.referenceNumberstring

The referenceNumber of the associated job provided in the import, or null if it was missing.


failedinteger

The number of processed jobs that failed to import (see errors for details).


processedinteger

The total number of processed jobs.


unchangedinteger

The number of processed jobs that were found in your account, but had no changes.


updatedinteger

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": "qyWUUV3Zyuuh"
        },
        {
            "index": 3178,
            "messages": [
                "Zip is invalid. Value passed was: 0"
            ],
            "referenceNumber": "81B1ViPU4PTw"
        }
    ],
    "failed": 3,
    "processed": 4416,
    "unchanged": 4343,
    "updated": 22
}

Create a job import

POST https://www.alltruckjobs.com/api/v2.0/job-imports

URL Parameters


No parameters.

Body Parameters


deleteJobs 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.


jobs REQUIRED list

A list of job objects to import.


Sample Request

POST https://www.alltruckjobs.com/api/v2.0/job-imports
{
    "deleteJobs": false,
    "jobs": [
        {
            "date": "2022-12-03",
            "referenceNumber": "dvymukVN",
            "title": "Job Title",
            "city": "Lancaster",
            "state": "PA",
            "postalCode": "17603",
            "driverType": "Company Driver",
            "freightType": "Tanker",
            "preference": "Team",
            "description": "Job Description",
            "requirements": "Job Requirements",
            "employmentType": "Full-Time",
            "routeType": "Dedicated",
            "twicOnly": false
        }
    ]
}

Sample Response

{
    "data": {
        "id": "GhaqwEtkg4Ng8zhJiCfU-",
        "completedAt": null,
        "requestedAt": "2022-12-03T22:53:40.000000Z",
        "results": null,
        "status": "pending"
    },
    "links": {
        "self": "https://www.alltruckjobs.com/api/v2.0/job-imports/GhaqwEtkg4Ng8zhJiCfU-"
    }
}

Retrieve a job import

GET https://www.alltruckjobs.com/api/v2.0/job-imports/:id

URL Parameters


id REQUIRED string

The ID of the job import.


Query Parameters


No parameters.

Sample Request

GET https://www.alltruckjobs.com/api/v2.0/job-imports/SiarbpFAxoDMxlp0O-X-E

Sample Response

{
    "data": {
        "id": "SiarbpFAxoDMxlp0O-X-E",
        "completedAt": null,
        "requestedAt": "2022-12-03T22:53:40.000000Z",
        "results": null,
        "status": "pending"
    },
    "links": {
        "self": "https://www.alltruckjobs.com/api/v2.0/job-imports/SiarbpFAxoDMxlp0O-X-E"
    }
}