# Models

## The JobRequest object

```json
{"openapi":"3.0.0","info":{"title":"Invoice Service","version":"1.0.0"},"components":{"schemas":{"JobRequest":{"type":"object","properties":{"orderIds":{"type":"array","description":"A list of order IDs for which the invoices should be created.","items":{"type":"string"}},"jobType":{"enum":["AUTOMATIC","MANUAL"],"type":"string","description":"A job type determines if the orders are searched automatically based on parameters configured in configuration service or are manually provided in orderIds array."}},"required":["jobType"]}}}}
```

## The JobCreationResponse object

```json
{"openapi":"3.0.0","info":{"title":"Invoice Service","version":"1.0.0"},"components":{"schemas":{"JobCreationResponse":{"type":"object","properties":{"jobId":{"type":"string","description":"The created job ID."}}}}}}
```

## The JobStatusResponse object

```json
{"openapi":"3.0.0","info":{"title":"Invoice Service","version":"1.0.0"},"components":{"schemas":{"JobStatusResponse":{"type":"object","properties":{"jobStatus":{"description":"Status of the processed job. Possible values: `DONE`,` IN_PROGRESS`","enum":["DONE","IN_PROGRESS"],"type":"string"},"jobType":{"description":"Job type determines if the orders are provided manually or searched by a parametrized query.","enum":["AUTOMATIC","MANUAL"],"type":"string"},"orders":{"type":"array","items":{"type":"object","properties":{"orderId":{"description":"The ID of the processed order.","type":"string"},"orderStatus":{"description":"Status determining if the order was processed successfully.","enum":["SUCCESS","FAILURE","PENDING"],"type":"string"},"message":{"description":"Information about the result of order processing.","type":"string"},"downloadLink":{"description":"URL to the generated invoice PDF.","type":"string"},"invoiceNumber":{"description":"Number of the generated invoice.","type":"string"}}}}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.0","info":{"title":"Invoice Service","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"A descriptive error message for debugging."},"code":{"type":"string","description":"Original HTTP error code. It should be consistent with the HTTP response code."},"detailInfo":{"type":"string","description":"More details about the error (if available)."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/orders/invoice/api-reference/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
