## Read the latest customer sync (tenant:trade:msp:read)

`GET /api/trade/v1/msp/customers/sync`

Module: Trade · operationId: `getMspCustomerSync` · Tag: MSP billing · Auth: access token (`Authorization: Bearer <accessToken>`)

The state of the tenant's latest „Jetzt zuordnen“; `status` is `none` before the first one.

### Responses

- **200** The latest sync. (`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`)

Fields of the 200 answer:

- `error` (string): Why the sync failed.
- `finishedAt` (string (date-time)): When it finished; absent while running.
- `result` (object): Outcome per provider.
  - `mapped` (integer): Customers mapped automatically by their customer number.
  - `open` (integer): Provider customers to clarify after the sync.
  - `providers` (array of object): Outcome per provider.
    - `customers` (integer): Customers the provider listed.
    - `error` (string): Why the provider could not be read.
    - `provider` (string): MSP provider (`mailstore`, `sophos`, `ingram`, `itc`, …).
- `startedAt` (string (date-time)): When it started.
- `status` (string): Status of the sync (`running`, `succeeded`, `failed`). (one of `none`, `running`, `succeeded`, `failed`)
- `triggeredBy` (string): Who started the sync.

Example 200 answer:

```json
{
  "finishedAt": "2026-11-18T13:01:42Z",
  "result": {
    "mapped": 3,
    "open": 5,
    "providers": [
      {
        "customers": 9,
        "provider": "mailstore"
      },
      {
        "customers": 18,
        "provider": "sophos"
      },
      {
        "customers": 24,
        "provider": "ingram"
      }
    ]
  },
  "startedAt": "2026-11-18T13:00:00Z",
  "status": "succeeded",
  "triggeredBy": "anna.weber@muster-it.example"
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/trade/v1/msp/customers/sync' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
