# Validate & Update

## Address Processing Workflow

The batch process consists of the following steps:

{% stepper %}
{% step %} <i class="fa-inbox-full">:inbox-full:</i> [Create a Batch](#create)
{% endstep %}

{% step %}
Upload File and Start Batch

* <i class="fa-file-circle-plus">:file-circle-plus:</i> [Variant A – Add records](#addrecords)
* <i class="fa-upload">:upload:</i> [Variant B – File upload](#fileupload)
  {% endstep %}

{% step %} <i class="fa-play">:play:</i> [Start processing](#start)
{% endstep %}

{% step %}
Download results

* <i class="fa-memo-circle-check">:memo-circle-check:</i> [Variant A – Retrieve records](#getrecords)
* <i class="fa-download">:download:</i> [Variant B – File download](#filedownload)
  {% endstep %}
  {% endstepper %}

## Functions

### <i class="fa-inbox-full">:inbox-full:</i> Create

A batch serves as the container that defines the processing frame. A new batch must be created for each address run.

<table><thead><tr><th width="239">Request-Parameter</th><th></th></tr></thead><tbody><tr><td><code>orderNr</code></td><td>Custom reference number that can be assigned for the unique identification of an order, e.g., for later inquiries or clarifications.</td></tr><tr><td><code>dataGroupCode</code></td><td><p>Unique identification of the Data Group. </p><p>→ Generated during the creation of the Data Group (<code>/dataGroups/create</code>). Must be referenced here.</p></td></tr><tr><td><code>userDescription</code></td><td>Name of the campaign or batch.</td></tr><tr><td><code>processId</code></td><td><p>System-assigned ID for the process. </p><p>→ Default value: <kbd>400</kbd></p></td></tr><tr><td><code>processingDate</code></td><td>Defines when the batch should be started (e.g., create the batch today, process over the weekend).</td></tr><tr><td><code>businessCase</code></td><td><p>Defines the process flow based on predefined presets. </p><p>→ Default value: <kbd>0</kbd></p></td></tr><tr><td><code>product</code></td><td><p>Selection of the desired product, e.g.:</p><ul><li><kbd>1</kbd> <strong>Enrich</strong>: Enrich existing data.</li><li><kbd>2</kbd> <strong>Reference</strong>: Only analyze the data against available data sources, no data changes → Result: Analysis report from multisource and, if applicable, from Swiss Post.</li><li><kbd>3</kbd> <strong>AddressUpdate</strong>: Update existing addresses.</li></ul></td></tr><tr><td><code>notificationEmail</code></td><td>Email address for notifications. If no specific email address is provided, the default email address of the currently logged-in user will be used.</td></tr></tbody></table>

## POST /addressprocessing/Create

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}},"schemas":{"BatchCreateRequest":{"required":["orderNr","userDescription","processId","product"],"type":"object","properties":{"orderNr":{"type":"string"},"dataGroupId":{"type":"integer","format":"int32"},"dataGroupCode":{"type":"string","nullable":true},"userDescription":{"type":"string","nullable":true},"processId":{"type":"integer","format":"int32"},"businessCase":{"type":"integer","format":"int32"},"product":{"$ref":"#/components/schemas/ProductCase"},"notificationEmail":{"type":"string"},"processingDate":{"type":"string","format":"date-time"},"runParallel":{"type":"boolean"},"settings":{"type":"object","additionalProperties":{"type":"string"}}}},"ProductCase":{"enum":["1 = Enrich","2 = Reference","3 = AddressUpdate"],"type":"string","description":"**Allowed values:**\n- `1` = `Enrich`\n- `2` = `Reference`\n- `3` = `AddressUpdate`"},"BatchDetail":{"type":"object","properties":{"batchId":{"type":"integer","format":"int32"},"batchUniqueId":{"type":"string","format":"uuid"},"processGroup":{"type":"integer","format":"int32"},"insertBy":{"type":"string","nullable":true},"insertAt":{"type":"string","format":"date-time","nullable":true},"description":{"type":"string","nullable":true},"userDescription":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date-time","nullable":true},"endDate":{"type":"string","format":"date-time","nullable":true},"processingDate":{"type":"string","format":"date-time","nullable":true},"duration":{"type":"integer","format":"int32","nullable":true},"errorCount":{"type":"integer","format":"int32","nullable":true},"warningCount":{"type":"integer","format":"int32","nullable":true},"warningRejectCount":{"type":"integer","format":"int32","nullable":true},"createTypeId":{"type":"integer","format":"int32"},"runSingle":{"type":"boolean","nullable":true},"agent":{"type":"string","nullable":true},"datagroupId":{"type":"integer","format":"int32","nullable":true},"orderNr":{"type":"string","nullable":true},"settings":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/BatchFile"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/BatchStep"}}}},"BatchFile":{"type":"object","properties":{"fileUniqueId":{"type":"string","format":"uuid"},"direction":{"type":"string","nullable":true},"fileName":{"type":"string","nullable":true},"processFileDetection":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"s3Key":{"type":"string","nullable":true}}},"BatchStep":{"type":"object","properties":{"stepId":{"type":"integer","format":"int32"},"status":{"type":"string","nullable":true},"sortOrder":{"type":"integer","format":"int32","nullable":true},"startDate":{"type":"string","format":"date-time","nullable":true},"endDate":{"type":"string","format":"date-time","nullable":true},"duration":{"type":"integer","format":"int32","nullable":true},"errorCount":{"type":"integer","format":"int32","nullable":true},"warningCount":{"type":"integer","format":"int32","nullable":true},"warningRejectCount":{"type":"integer","format":"int32","nullable":true},"recordCount":{"type":"integer","format":"int32","nullable":true},"description":{"type":"string","nullable":true},"modulUniqueId":{"type":"string","format":"uuid","nullable":true},"descriptionAdd":{"type":"string","nullable":true}}}}},"paths":{"/addressprocessing/Create":{"post":{"tags":["Batch"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BatchDetail"}},"application/json":{"schema":{"$ref":"#/components/schemas/BatchDetail"}},"text/json":{"schema":{"$ref":"#/components/schemas/BatchDetail"}}}}}}}}}
```

### <i class="fa-file-circle-plus">:file-circle-plus:</i> AddRecords

This function can be used to upload new records individually or to supplement an existing upload with additional records.

## PUT /addressprocessing/AddRecords

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}},"schemas":{"BatchProcessingApiRecord":{"type":"object","properties":{"customerId":{"type":"string","nullable":true},"classification":{"type":"string","nullable":true},"dwhId":{"type":"string","nullable":true},"kbbCompanyId":{"type":"integer","format":"int32","nullable":true},"kbcPersonId":{"type":"integer","format":"int32","nullable":true},"kbcHouseholdId":{"type":"integer","format":"int32","nullable":true},"beac":{"type":"integer","format":"int32","nullable":true},"egid":{"type":"string","nullable":true},"edid":{"type":"string","nullable":true},"postAddressId":{"type":"string","nullable":true},"freetext1":{"type":"string","nullable":true},"freetext2":{"type":"string","nullable":true},"freetext3":{"type":"string","nullable":true},"freetext4":{"type":"string","nullable":true},"freetext5":{"type":"string","nullable":true},"firstname":{"type":"string","nullable":true},"companyName":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"street":{"type":"string","nullable":true},"streetNo":{"type":"string","nullable":true},"streetAdd":{"type":"string","nullable":true},"careOf":{"type":"string","nullable":true},"poBox":{"type":"string","nullable":true},"poZip":{"type":"string","nullable":true},"poTown":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"town":{"type":"string","nullable":true},"mobileNo":{"type":"string","nullable":true},"phoneNo":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"uid":{"type":"string","nullable":true},"chnr":{"type":"string","nullable":true}}}}},"paths":{"/addressprocessing/AddRecords":{"put":{"tags":["Batch"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BatchProcessingApiRecord"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BatchProcessingApiRecord"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BatchProcessingApiRecord"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

### <i class="fa-upload">:upload:</i> FileUpload

Adds a file for processing.

## POST /addressprocessing/FileUpload

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/FileUpload":{"post":{"tags":["Batch"],"parameters":[{"name":"batchId","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"batchUid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"description","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

### <i class="fa-play">:play:</i> Start

Starts the processing.

## POST /addressprocessing/Start

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/Start":{"post":{"tags":["Batch"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

### <i class="fa-memo-circle-check">:memo-circle-check:</i> GetRecords

Retrieves the results of an AdressProcessing batch directly as **JSON**.

This endpoint is useful if the data should be processed directly within the system without downloading a file.

## GET /addressprocessing/GetRecords

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/GetRecords":{"get":{"tags":["Batch"],"parameters":[{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file","in":"query","description":"Optional.","schema":{"type":"boolean","default":false}},{"name":"fileDecompress","in":"query","description":"Optional.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK"}}}}}}
```

### <i class="fa-download">:download:</i> FileDownload

Downloads the results of an AdressProcessing batch as a file.

The output is provided in **TSV format** (tab-separated values).

The parameter **compressed** controls whether the file is delivered **compressed (.txt.gz)** (false) or **uncompressed (.txt)** (true).

## GET /addressprocessing/FileDownload

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/FileDownload":{"get":{"tags":["Batch"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"decompress","in":"query","description":"Optional.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK"}}}}}}
```

## Optional Steps (for Advanced Use Cases)

### Detail

Provides an overview of all available files and their processing steps. It also includes the unique identification number (`fileUniqueId`) for each file.

#### Batch Status

<table><thead><tr><th width="100">Status ID</th><th width="199">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>0</code></td><td><code>Created</code></td><td>Created, not yet processed</td></tr><tr><td><code>1</code></td><td><code>Execute</code></td><td>Queued; processing starts once resources are available</td></tr><tr><td><code>2</code></td><td><code>Processing</code></td><td>Processing in progress</td></tr><tr><td><code>3</code></td><td><code>Marked for processing</code></td><td>Intermediate state between <em>Execute</em> and <em>Processing</em></td></tr><tr><td><code>4</code></td><td><code>Done</code></td><td>Successfully completed</td></tr><tr><td><code>6</code></td><td><code>Error</code></td><td>An error occurred during processing</td></tr><tr><td><code>8</code></td><td><code>Skipped</code></td><td>Certain modules were skipped</td></tr></tbody></table>

## GET /addressprocessing/Detail

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}},"schemas":{"BatchDetail":{"type":"object","properties":{"batchId":{"type":"integer","format":"int32"},"batchUniqueId":{"type":"string","format":"uuid"},"processGroup":{"type":"integer","format":"int32"},"insertBy":{"type":"string","nullable":true},"insertAt":{"type":"string","format":"date-time","nullable":true},"description":{"type":"string","nullable":true},"userDescription":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date-time","nullable":true},"endDate":{"type":"string","format":"date-time","nullable":true},"processingDate":{"type":"string","format":"date-time","nullable":true},"duration":{"type":"integer","format":"int32","nullable":true},"errorCount":{"type":"integer","format":"int32","nullable":true},"warningCount":{"type":"integer","format":"int32","nullable":true},"warningRejectCount":{"type":"integer","format":"int32","nullable":true},"createTypeId":{"type":"integer","format":"int32"},"runSingle":{"type":"boolean","nullable":true},"agent":{"type":"string","nullable":true},"datagroupId":{"type":"integer","format":"int32","nullable":true},"orderNr":{"type":"string","nullable":true},"settings":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/BatchFile"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/BatchStep"}}}},"BatchFile":{"type":"object","properties":{"fileUniqueId":{"type":"string","format":"uuid"},"direction":{"type":"string","nullable":true},"fileName":{"type":"string","nullable":true},"processFileDetection":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"s3Key":{"type":"string","nullable":true}}},"BatchStep":{"type":"object","properties":{"stepId":{"type":"integer","format":"int32"},"status":{"type":"string","nullable":true},"sortOrder":{"type":"integer","format":"int32","nullable":true},"startDate":{"type":"string","format":"date-time","nullable":true},"endDate":{"type":"string","format":"date-time","nullable":true},"duration":{"type":"integer","format":"int32","nullable":true},"errorCount":{"type":"integer","format":"int32","nullable":true},"warningCount":{"type":"integer","format":"int32","nullable":true},"warningRejectCount":{"type":"integer","format":"int32","nullable":true},"recordCount":{"type":"integer","format":"int32","nullable":true},"description":{"type":"string","nullable":true},"modulUniqueId":{"type":"string","format":"uuid","nullable":true},"descriptionAdd":{"type":"string","nullable":true}}}}},"paths":{"/addressprocessing/Detail":{"get":{"tags":["Batch"],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BatchDetail"}},"application/json":{"schema":{"$ref":"#/components/schemas/BatchDetail"}},"text/json":{"schema":{"$ref":"#/components/schemas/BatchDetail"}}}}}}}}}
```

### AddDatagroup

Adds a data group.

Les données sont organisées en Data Groups. Celles-ci permettent, si nécessaire, de séparer logiquement les enregistrements. Vous pouvez ainsi traiter et analyser séparément, par exemple, les clients existants, les nouveaux clients ou les campagnes.

Dans de nombreux cas, une seule Data Group suffit : les données y sont simplement chargées et mises à jour en continu.

> Remarque : Dès qu’une Data Group est lancée, les données existantes dans ce groupe sont remplacées.

## PUT /addressprocessing/AddDatagroup

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/AddDatagroup":{"put":{"tags":["Batch"],"parameters":[{"name":"description","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```

### GetDataGroups

Lists the available data groups.

## GET /addressprocessing/GetDatagroups

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/GetDatagroups":{"get":{"tags":["Batch"],"parameters":[{"name":"loadAll","in":"query","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}}}}
```

### SetBatchSettings

Sets batch settings.

<table><thead><tr><th width="170">Request-Parameter</th><th></th></tr></thead><tbody><tr><td><code>property-name</code></td><td><p>Setting values</p><ul><li><strong><code>InputMapping</code></strong> Defines which data mapping will be applied to data processing.</li><li><strong><code>RangeBack</code></strong> For address changes to be considered (e.g., moves from the last 12 months). → Default value: 36 months.</li><li><strong><code>WebhookUrl</code></strong> For automation after the batch completion (currently only as a GET request with query string parameters). Can be used for further process automation to trigger actions for the customer after the batch completion (e.g., updating reports in PowerBI).</li><li><strong><code>webhookmethod</code></strong> Defines the HTTP method to be used for the call (e.g., POST or PUT).</li><li><strong><code>webhookheader</code></strong> Optional – defines the HTTP headers as a stringified JSON object, e.g. for passing authentication tokens.</li><li><strong><code>webhookbody</code></strong> Optional – defines the HTTP body as a stringified JSON object, e.g. for transmitting custom data or payloads.</li></ul></td></tr></tbody></table>

## POST /addressprocessing/SetBatchSettings

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Batch"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}}},"paths":{"/addressprocessing/SetBatchSettings":{"post":{"tags":["Batch"],"parameters":[{"name":"uid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}},"text/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}},"application/*+json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```


---

# 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://multisource.gitbook.io/multisource-integration-api/integration/validate-and-update.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.
