GraphQl Schemas
GraphQL: Dispatch Queries
JobListV2
4min
The jobListV2 API is a GraphQL API that retrieves job data based on specified filtering, pagination, and sorting parameters.
The jobListV2 API is defined as follows:
- tenant (String): The identifier for the tenant. This parameter is used to scope the jobs to a specific tenant. It is required and should be a non-empty string.
- filter (String): A search string used to filter the returned jobs. This is optional and defaults to an empty string (""), meaning that no filter will be applied.
- page (Int): The page number for pagination. It is optional and defaults to 10.
- size (Int): The number of jobs to return per page. It is optional and defaults to 10.
- sort (String): The sorting order for the returned jobs. It is optional and defaults to an empty string (""), meaning that no specific sorting order will be applied.

The data object contains the details of each job.
- assets: An array of objects each containing the following properties:
- description: A textual description of the asset.
- documentType: The type of document associated with the asset.
- documentUrl: The URL of the document associated with the asset.
- assignedAt: The date and time when the job was assigned.
- batchId: The identifier of the batch associated with the job.
- cancelled: A Boolean flag indicating whether the job has been cancelled.
- completedAt: The date and time when the job was completed.
- containers: The containers associated with the job.
- createdAt: The date and time when the job was created.
- createdBy: The identifier of the user who created the job.
- customData: Any additional custom data associated with the job.
- dispatchRef: The reference number of the dispatch associated with the job.
- id: The identifier of the job.
- jobRef: The reference number of the job.
- jobTypeId: The identifier of the job type.
- jobTypeName: The name of the job type.
- The objective type contains a list of job-related fields and two complex fields: location and next.
- contact: String field that represents the contact information for the job listing.
- groupId: String field that represents the identifier for the group that the job belongs to.
- location: This field returns a location type.
- next: This field returns a next type.
- objectiveRef: String field that acts as a reference identifier for the objective.
- status: String field that indicates the current status of the job objective.
- The location type includes details about the location of the job.
- address: String field that represents the physical address of the job location.
- createdAt: DateTime field indicating when this location was created.
- createdBy: String field representing the user who created this location entry.
- description: String field providing a description of the job location.
- geolocation: String field representing the geo-coordinates of the job location.
- locationId: String field that acts as a unique identifier for the job location.
- similarityId: String field used to identify similar job locations.
- tags: String field that holds any tags associated with the job location.
- tenantId: String field that represents the tenant or company identifier associated with this job location.
- updatedAt: DateTime field indicating the most recent time this location was updated.
- updatedBy: String field representing the user who last updated this location entry.
- The next type represents the next steps or stages of the job process.
- code: String field representing a code for the next step in the process.
- nextObjective: String field indicating the objective or goal for the next step.
- reason: String field providing an explanation or reason for the next step.
- The timeSlot object represents the time slot for a job.
- from is a string that represents the start time of the time slot.
- to is a string that represents the end time of the time slot.
- The workflowInstance object represents the instance of the workflow associated with a job.
- attemptId is a string that represents the ID of the attempt.
- createdAt is a string that represents the time when the workflow instance was created.
- createdBy is a string that represents the ID of the user who created the workflow instance.
- dispatchId is a string that represents the dispatch ID of the workflow instance.
- id is a string that represents the unique ID of the workflow instance.
- inputs is a string that represents the inputs for the workflow instance.
- jobId is a string that represents the ID of the job associated with the workflow instance.
- lastState is a string that represents the last state of the workflow instance.
- latestSequenceId is a string that represents the latest sequence ID of the workflow instance.
- status is a string that represents the status of the workflow instance.
- tenantId is a string that represents the tenant ID of the workflow instance.
- updatedAt is a string that represents the time when the workflow instance was last updated.
- updatedBy is a string that represents the ID of the user who last updated the workflow instance.
- workflow is a string that represents the workflow associated with the workflow instance.
- parentJobId: This field represents the unique identifier of the parent job, in the context of jobs with parent-child relationships.
- start: This field represents the timestamp when the job started.
- status: This field represents the current status of the job.
- subStatus: This field represents additional detailed status of the job, which supplements the main status field.
- tenantId: This field represents the unique identifier of the tenant associated with the job. This can be particularly useful in multi-tenant environments.
- updatedAt: This field represents the timestamp of the last update made to the job.
- updatedBy: This field represents the identifier of the user or system that last updated the job.
- The scheduledFor object is nested within the data object and contains two fields related to scheduling:
- endDateTime: This field represents the scheduled end date and time for the job.
- startDateTime: This field represents the scheduled start date and time for the job.
- The pagination object contains fields related to the pagination of the job list. These fields provide information about the current page and navigation to other pages. It includes the following fields:
- currPage: This field represents the current page number in the paginated list.
- hasNextPage: This field is a boolean indicating whether there is a next page available.
- nextPage: This field represents the number of the next page, if it exists.
- pageSize: This field represents the number of jobs displayed per page.
- prevPage: This field represents the number of the previous page, if it exists.
- totalCount: This field represents the total count of jobs across all pages.

Updated 03 Aug 2023
Did this page help you?