> For the complete documentation index, see [llms.txt](https://docs.opencityitalia.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opencityitalia.it/sviluppatori-e-partner-tecnologici/integrazioni/processi-asincroni-job/importazione-dovuti.md).

# Importazione dovuti

Come descritto nella sezione precedente tramite le API dei jobs è possibile creare un processo di importazione dovuti.

{% hint style="warning" %}
Per poter procedere correttamente all'importazione bisogna prima creare un servizio a cui i dovuti devono essere collegati.
{% endhint %}

Questa operazione può essere fatta tramite interfaccia nella sezione admin, il servizio creato dovrà essere di tipo **"Servizio di pagamento dovuti"**

<figure><img src="/files/P7ssj2HWqkiiQRKPNd0m" alt=""><figcaption></figcaption></figure>

Per il servizio appena creato dovrà essere configurato anche il gateway di pagamento

<figure><img src="/files/O6kFTPwyybP1I2RgJ3XY" alt=""><figcaption></figcaption></figure>

### Creazione di un Job per l'importazione dovuti

Per poter creare un Job di importazione dovuti bisogna eseguire una chiamata **POST** all' endpoint `api/jobs`

Il payload per la creazione di un Job è così composto

```
{
  "attachment": {
    "name": "dovuti.csv",
    "mime_type": "text/csv",
    "file": "bm90aWNlX251bWJlsYW1vdW50LHJlYXNvbixjcmVhdGVkX2F0LGV4cGlyZV9hdCxjcmV..."
  },
  "args": {
    "service_id": "a5a9bf9f-7b5c-4aed-b020-5bf2d1ca75ab"
  },
  "type": "import_dovuti"
}
```

Dove:

**attachments** -> è il file csv contenente i dovuti da importare

Il file csv deve acere un template specifico di questo tipo:

{% file src="/files/ypXkzU7QDitrdOlNPDD2" %}

**service\_id** -> è un parametro specifico del tipo di job import\_dovuti ed indica su quale servizio devono essere agganciati i dovuti importati


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.opencityitalia.it/sviluppatori-e-partner-tecnologici/integrazioni/processi-asincroni-job/importazione-dovuti.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
