# Retrieve Jobs Sorted by Ascending StartDate and Filters

Retrieve Jobs sorted by ascending startDate. By default, the response contains the 100 (maxItems property) first items. To retrieve the next items matching the request, use the query parameter 'after' with the ID of the last item

Endpoint: GET /jobs
Version: 1.0.0
Security: api_key

## Security:

  - `api_key` (unknown)
    apiKey in header x-api-key

## Query parameters:

  - `from` (string)
    Filter for Jobs with startDate greater than a specific datetime expressed in UTC timezone (format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

  - `until` (string)
    Filter for Jobs with startDate less than a specific datetime expressed in UTC timezone (format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

  - `workflowId` (string)
    Filter for Jobs using a specific Workflow

  - `after` (string)
    Cursor for pagination. Indicates that the API should return the Jobs which are immediately after this one in the list (the next page)

  - `maxItems` (number)
    Maximum number (1 - 1000) of Jobs that might be returned. It is possible that the response contains fewer elements. Default to 100

## Header parameters:

  - `x-managed-company-id` (string)
    Optional: the ID of the managed company on behalf of which the request is made

## Response 200 fields (application/json):

  - `items` (array, required)
    Array of items for the current page

  - `items.id` (string, required)
    Unique identifier of the Job

  - `items.name` (string, required)
    Name of the Job

  - `items.startDate` (string, required)
    The Datetime denoting the moment of Job creation

  - `items.status` (string, required)
    Status of the Job
    Enum: "AWAITING_FILE_UPLOAD", "WAITING", "PROCESSING", "OK", "ACTION_REQUIRED", "ERROR", "CANCELLED"

  - `items.pendingEsigningApprovalCount` (number)
    Number of eSigning documents awaiting approval after signing

  - `items.originalFilename` (string, required)
    Name of the the file used to create the Job

  - `items.executionDate` (string, required)
    Datetime of the moment when the SendingEvents of the Job are created

  - `items.sendingEventExecutionDateUtc` (string)
    Datetime of the scheduled SendingEvents execution in UTC

  - `items.author` (string)
    Name of the user who submitted the Job

  - `items.approval` (object)
    The approval information for the job

  - `items.approval.status` (string, required)
    Status of the approval
    Enum: "PREPARING_FOR_APPROVAL", "AWAITING_APPROVAL", "APPROVED", "REJECTED", "TIMEOUT", "PROCESSING"

  - `items.approval.userId` (string)
    Unique identifier of the user who approved or rejected the Job

  - `items.approval.username` (string)
    Username of the user who approved or rejected the Job

  - `items.approval.timestamp` (string)
    Timestamp in format ISO 8601 of when the Job was approved or rejected

  - `items.sendingEvents` (object, required)
    SendingEvents count details

  - `items.sendingEvents.ok` (number, required)
    Amount of SendingEvents which have no warning or error after the job preparation

  - `items.sendingEvents.warning` (number, required)
    Amount of SendingEvents having at least one warning. (Ex. unrecognized physical address for an Easyprint task)

  - `items.sendingEvents.total` (number, required)
    Amount of SendingEvents having at least one warning. They cannot be processed. (Ex. invalid email address for an Email task)

  - `items.errorList` (array, required)
    List of errors for the job

  - `items.errorList.code` (string, required)
    Error code representing the type of error

  - `items.errorList.message` (string, required)
    Error message providing more details about the error

  - `items.errorList.timestamp` (string, required)
    Timestamp when the error occurred

  - `items.warningList` (array, required)
    List of warnings for the job

  - `items.workflowId` (string, required)
    Unique identifier of the workfow used to process the Job

  - `totalItems` (number, required)
    Total number of items available (without pagination)

## Response 400:

  - `400` (unknown)
    Invalid query parameter format

