## Test the credentials of one connector without saving (tenant:settings:write)

`POST /api/trade/v1/itsp/config/test/{connector}`

Module: Trade · operationId: `testItspConnection` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

The body is the configuration as entered (same shape as `saveItspConfig`); masked secrets are taken from the stored configuration. A failed check is a `200` with `ok: false` and a German `message`; the check gives up after 25 seconds.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `connector` | path | string | yes | (one of `egis`, `ingram`, `infinigate`, `amazon`, `mailstore`, `sophos`, `msp-ingram`) |

### Request body

`application/json` (required)

- `active` (boolean, read-only): True while any connection on the page is enabled.
- `aiEnrichment` (AIEnrichmentConfig): Null until saved once.
  - `enabled` (boolean): Propose article texts and product groups with AI.
  - `model` (string): AI model of the enrichment; empty uses the default.
- `amazon` (AmazonConfig)
  - `baseUrl` (string): Base URL of the API; empty uses the default.
  - `clientId` (string): OAuth client id.
  - `clientSecret` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
  - `enabled` (boolean): Search the Amazon Business catalog.
  - `locale` (string): Locale of the product data (e.g. `de_DE`).
  - `refreshToken` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
  - `region` (string): Amazon region of the account.
  - `sandbox` (boolean): Use the sandbox environment.
  - `userEmail` (string): E-mail of the Amazon Business user the searches run as.
- `egis` (EgisConfig)
  - `baseUrl` (string): Base URL of the API; empty uses the default.
  - `enabled` (boolean): Search and order through EGIS.
  - `erp` (string): ERP name sent to EGIS; empty uses the default.
  - `login` (string): EGIS login. (max length 40)
  - `password` (object): EGIS password; masked in answers, the mask or an empty value keeps the stored one. (max length 40)
- `infinigate` (InfinigateConfig)
  - `apiKey` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
  - `baseUrl` (string): Base URL of the API; empty uses the default.
  - `clientId` (string): OAuth client id.
  - `clientSecret` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
  - `enabled` (boolean): Search and order through the Infinigate API.
  - `orderingEnabled` (boolean): Purchase orders of suppliers linked to Infinigate are sent through the Infinigate API (off by default; not available yet).
  - `testMode` (boolean): Use the Infinigate test environment.
- `ingram` (IngramCatalogConfig)
  - `baseUrl` (string): Base URL of the API; empty uses the default.
  - `clientId` (string): OAuth client id.
  - `clientSecret` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
  - `countryCode` (string): Ingram Micro country of the account (ISO 3166-1 alpha-2).
  - `customerNumber` (string): Ingram Micro customer number of the tenant.
  - `enabled` (boolean): Search and order through the Ingram Micro API.
  - `orderingEnabled` (boolean): Purchase orders of suppliers linked to Ingram Micro are sent through the Ingram API (off by default).
  - `sandbox` (boolean): Use the sandbox environment.
- `lastEditor` (string, read-only): Who saved the configuration last.
- `lastUpdate` (string (date-time), read-only): When the configuration was last saved.
- `manufacturerMappings` (array of ManufacturerMapping): Manufacturer names and aliases mapped to masterdata manufacturer codes.
  - `aliases` (array of string): Other spellings of the manufacturer in the distributor catalogs.
  - `code` (string): Manufacturer code in masterdata.
  - `id` (string): Id of the mapping.
  - `name` (string): Manufacturer name in masterdata.
- `msp` (TradeMSPConfig)
  - `autoBilling` (object): Window in the month after the billed one in which the drafts are approved without a person, once every active connector collected the month and no subscription lacks a customer or an article: at `from` when nothing blocks, else at every recheck and right after a collection ended, until `to`. When enabled, `from` must lie before `to` and every enabled connector's schedule before `to` (422 otherwise).
    - `enabled` (boolean): Bill the month automatically.
    - `from` (MspSchedule): A day of the month and a time of day (Europe/Berlin); unset values take the defaults (day 1, 06:00).
      - `day` (integer): Day of the month (1–28). (max 28)
      - `time` (string): `HH:MM`, 24 h.
    - `recheckHours` (integer): Hours until a blocked month (a connector missing, subscriptions without customer or article) is checked again; empty: 4. (max 168)
    - `to` (MspSchedule): A day of the month and a time of day (Europe/Berlin); unset values take the defaults (day 1, 06:00).
      - `day` (integer): Day of the month (1–28). (max 28)
      - `time` (string): `HH:MM`, 24 h.
  - `enabled` (boolean): MSP billing is on.
  - `ingram` (object): Ingram Micro cloud subscriptions (Microsoft CSP included), read through the Reseller API v7 with the Ingram connection of the distributor settings (`itsp.ingram`). The end customers (details, Custom_Account_ID = our address number) are read from the Cloud Marketplace API with the `marketplace*` access below; optional, without it customers are matched by name only.
    - `articleProductGroupId` (string (uuid)): Masterdata product group of the Microsoft articles MSP billing creates (see `articleUnitCode`).
    - `articleUnitCode` (string): Masterdata unit code of the Microsoft articles MSP billing creates for subscriptions without article; without unit and product group none is created.
    - `enabled` (boolean): Collect Ingram Micro marketplace usage.
    - `marketplaceCode` (string): Marketplace code.
    - `marketplaceLogin` (string): Ingram Micro marketplace login.
    - `marketplacePassword` (object): Write-only: stored encrypted, masked in answers; send the mask back to keep it.
    - `marketplaceSubscriptionKey` (object): Subscription key (`X-Subscription-Key`). Write-only: stored encrypted, masked in answers.
    - `marketplaceUrl` (string): Base URL of the Cloud Marketplace API gateway.
    - `schedule` (object): See `mailstore`.
    - `supplierAddressId` (string): See `mailstore` (distributor id `ingram`). Also the supplier of the Microsoft articles MSP billing creates.
  - `itc` (object): ITC Riemer (provider `itc`): no API, its monthly reports are uploaded (`uploadMspItcReport`) and count for the completeness of the month without a schedule.
    - `articleProductGroupId` (string (uuid)): Masterdata product group of the ITC articles MSP billing creates (see `articleUnitCode`).
    - `articleUnitCode` (string): Masterdata unit code of the ITC articles MSP billing creates for SKUs without article; without unit and product group none is created.
    - `enabled` (boolean): Bill ITC Riemer reports.
    - `supplierAddressId` (string): Masterdata address of ITC Riemer: uploaded reports are filed under it in DMS, it is the supplier of the ITC articles MSP billing creates and the reconciliation compares its inbound invoices.
  - `mailstore` (object): MailStore connection.
    - `enabled` (boolean): Collect MailStore usage.
    - `password` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
    - `schedule` (object): When the previous month is collected each month.
    - `supplierAddressId` (string): Masterdata address of the supplier whose inbound invoices the reconciliation compares; empty: the address linked with the distributor id `mailstore`.
    - `url` (string): URL of the MailStore SPE.
    - `username` (string): MailStore user name.
  - `notify` (object): Who is told about the connector runs and the automatic billing.
    - `recipients` (array of string (email)): E-mail addresses; trimmed, empty and repeated ones dropped.
  - `sophos` (object): Sophos connection.
    - `articleProductGroupId` (string (uuid)): Masterdata product group of the Sophos articles MSP billing creates (see `articleUnitCode`).
    - `articleUnitCode` (string): Masterdata unit code of the Sophos articles MSP billing creates from the Infinigate catalog for SKUs without article; without unit and product group none is created.
    - `clientId` (string): Sophos API client id.
    - `clientSecret` (Secret): Masked (`••••••••`) in answers; send the mask or an empty value to keep the stored secret.
    - `enabled` (boolean): Collect Sophos usage.
    - `partnerId` (string): Sophos partner id.
    - `schedule` (object): See `mailstore`.
    - `supplierAddressId` (string): See `mailstore` (distributor id `sophos`). Also the supplier of the Sophos articles MSP billing creates (else the address of the distributor id `infinigate`).
  - `taxRate` (number): VAT rate of the MSP invoices in percent; empty: 19. (max 100)

Example:

```json
{
  "active": true,
  "aiEnrichment": {
    "enabled": true,
    "model": ""
  },
  "amazon": {
    "baseUrl": "",
    "clientId": "",
    "clientSecret": "",
    "enabled": false,
    "locale": "de_DE",
    "refreshToken": "",
    "region": "EU",
    "sandbox": false,
    "userEmail": ""
  },
  "egis": {
    "baseUrl": "",
    "enabled": true,
    "erp": "ConnectCloud",
    "login": "EXAMPLE-egis-login",
    "password": "••••••••"
  },
  "infinigate": {
    "apiKey": "••••••••",
    "baseUrl": "",
    "clientId": "EXAMPLE-infinigate-client-id",
    "clientSecret": "••••••••",
    "enabled": true,
    "orderingEnabled": false,
    "testMode": false
  },
  "ingram": {
    "baseUrl": "",
    "clientId": "EXAMPLE-ingram-client-id",
    "clientSecret": "••••••••",
    "countryCode": "DE",
    "customerNumber": "EXAMPLE-20-123456",
    "enabled": true,
    "orderingEnabled": true,
    "sandbox": false
  },
  "lastEditor": "laura.kaestner@muster-it.example",
  "lastUpdate": "2026-11-18T15:40:00Z",
  "manufacturerMappings": [
    {
      "aliases": [
        "HP Enterprise",
        "HPE Aruba"
      ],
      "code": "HPE",
      "id": "7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b01",
      "name": "Hewlett Packard Enterprise"
    },
    {
      "aliases": [
        "Lenovo Global Technology",
        "LENOVO DCG"
      ],
      "code": "LNV",
      "id": "7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b02",
      "name": "Lenovo"
    }
  ],
  "msp": {
    "autoBilling": {
      "enabled": true,
      "from": {
        "day": 5,
        "time": "06:00"
      },
      "recheckHours": 4,
      "to": {
        "day": 10,
        "time": "17:00"
      }
    },
    "enabled": true,
    "ingram": {
      "articleProductGroupId": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c04",
      "articleUnitCode": "LIZ",
      "enabled": true,
      "marketplaceCode": "de",
      "marketplaceLogin": "EXAMPLE-marketplace-login",
      "marketplacePassword": "••••••••",
      "marketplaceSubscriptionKey": "••••••••",
      "marketplaceUrl": "https://marketplace.ingram.example",
      "schedule": {
        "day": 1,
        "time": "06:00"
      },
      "supplierAddressId": "6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d10"
    },
    "itc": {
      "articleProductGroupId": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c05",
      "articleUnitCode": "MON",
      "enabled": true,
      "supplierAddressId": "6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d03"
    },
    "mailstore": {
      "enabled": true,
      "password": "••••••••",
      "schedule": {
        "day": 1,
        "time": "06:00"
      },
      "supplierAddressId": "",
      "url": "https://mailstore.muster-it.example:8474",
      "username": "EXAMPLE-api-user"
    },
    "notify": {
      "recipients": [
        "laura.kaestner@muster-it.example",
        "christina.adler@muster-it.example"
      ]
    },
    "sophos": {
      "articleProductGroupId": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c04",
      "articleUnitCode": "LIZ",
      "clientId": "EXAMPLE-sophos-client-id",
      "clientSecret": "••••••••",
      "enabled": true,
      "partnerId": "EXAMPLE-sophos-partner-id",
      "schedule": {
        "day": 2,
        "time": "06:00"
      },
      "supplierAddressId": "6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d11"
    },
    "taxRate": 19
  }
}
```

### Responses

- **200** Result (`application/json`)
- **400** Invalid body or unknown connector. (`application/json`)
- **401** No valid session or bearer token (no body).
- **403** Missing permission, no active tenant in the token, or a missing CSRF token on a cookie write. (`application/json`)
- **503** The configuration store is not available. (`application/json`)

Fields of the 200 answer:

- `connector` (string): The connector tested.
- `durationMs` (integer): Duration of the test in milliseconds.
- `environment` (string): `Produktiv`, `Sandbox` or `Test`, where the connector has one. (one of `Produktiv`, `Sandbox`, `Test`)
- `message` (string): German result text.
- `ok` (boolean): The credentials work.

Example 200 answer:

```json
{
  "connector": "egis",
  "durationMs": 842,
  "environment": "Produktiv",
  "message": "Anmeldung erfolgreich – 12 Lieferanten für Ihren Zugang freigeschaltet.",
  "ok": true
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/trade/v1/itsp/config/test/egis' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"active":true,"aiEnrichment":{"enabled":true,"model":""},"amazon":{"baseUrl":"","clientId":"","clientSecret":"","enabled":false,"locale":"de_DE","refreshToken":"","region":"EU","sandbox":false,"userEmail":""},"egis":{"baseUrl":"","enabled":true,"erp":"ConnectCloud","login":"EXAMPLE-egis-login","password":"••••••••"},"infinigate":{"apiKey":"••••••••","baseUrl":"","clientId":"EXAMPLE-infinigate-client-id","clientSecret":"••••••••","enabled":true,"orderingEnabled":false,"testMode":false},"ingram":{"baseUrl":"","clientId":"EXAMPLE-ingram-client-id","clientSecret":"••••••••","countryCode":"DE","customerNumber":"EXAMPLE-20-123456","enabled":true,"orderingEnabled":true,"sandbox":false},"lastEditor":"laura.kaestner@muster-it.example","lastUpdate":"2026-11-18T15:40:00Z","manufacturerMappings":[{"aliases":["HP Enterprise","HPE Aruba"],"code":"HPE","id":"7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b01","name":"Hewlett Packard Enterprise"},{"aliases":["Lenovo Global Technology","LENOVO DCG"],"code":"LNV","id":"7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b02","name":"Lenovo"}],"msp":{"autoBilling":{"enabled":true,"from":{"day":5,"time":"06:00"},"recheckHours":4,"to":{"day":10,"time":"17:00"}},"enabled":true,"ingram":{"articleProductGroupId":"9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c04","articleUnitCode":"LIZ","enabled":true,"marketplaceCode":"de","marketplaceLogin":"EXAMPLE-marketplace-login","marketplacePassword":"••••••••","marketplaceSubscriptionKey":"••••••••","marketplaceUrl":"https://marketplace.ingram.example","schedule":{"day":1,"time":"06:00"},"supplierAddressId":"6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d10"},"itc":{"articleProductGroupId":"9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c05","articleUnitCode":"MON","enabled":true,"supplierAddressId":"6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d03"},"mailstore":{"enabled":true,"password":"••••••••","schedule":{"day":1,"time":"06:00"},"supplierAddressId":"","url":"https://mailstore.muster-it.example:8474","username":"EXAMPLE-api-user"},"notify":{"recipients":["laura.kaestner@muster-it.example","christina.adler@muster-it.example"]},"sophos":{"articleProductGroupId":"9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c04","articleUnitCode":"LIZ","clientId":"EXAMPLE-sophos-client-id","clientSecret":"••••••••","enabled":true,"partnerId":"EXAMPLE-sophos-partner-id","schedule":{"day":2,"time":"06:00"},"supplierAddressId":"6d8f0a12-3c4e-4a5b-9d6f-7e8a9b0c1d11"},"taxRate":19}}'
```
