> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OutputJob

> A print, mail or upload that runs in the background.



**Kind**: `object`

## Fields

**`id`**: `UUID!`

The ID of the output job.

---

**`action`**: `String!`

What the job does: PRINT, MAIL, UPLOAD_PDF, UPLOAD_EXPORT or UPLOAD_E_INVOICE. New values can be added; treat an unknown value as an action you do not know.

---

**`state`**: `String!`

PENDING (waiting), RUNNING, SUCCEEDED or FAILED. New values can be added; treat an unknown value as not finished.

---

**`documentType`**: `String!`

The document type of the output. Known values: SalesQuotation, SalesOrder, SalesInvoice, SalesInvoiceCorrection, DeliveryNote, SalesReturn, DunningLetter, PurchaseOrder, PickList, InventoryDifferenceList, CustomerDetails, PaymentReceipt, ShippingNotification and ReturnLabelEmail. The list can grow; a client treats a value it does not know as an opaque string and does not fail.

---

**`documentId`**: `String`

The ID of the document. Absent for label jobs, which carry several objects.

---

**`templateSetId`**: `ID`

The template set the job used.

---

**`createdAt`**: `DateTime!`

When the job was created.

---

**`finishedAt`**: `DateTime`

When the job finished.

---

**`errorCode`**: `String`

The error code of a failed job in UPPER_SNAKE_CASE, for example OUTPUT_UPLOAD_FAILED.

---

**`errorMessage`**: `String`

A human-readable explanation of the failure.

---

**`result`**: `OutputJobResult`

The result of a succeeded job.

