# PeppolCheck.fr API reference (markdown)

Base URL: `https://peppolcheck.fr`. JSON, UTF-8, no authentication required.

## GET /api/v1/participant/{scheme}:{value}

Resolve a Peppol participant by its identifier. `{scheme}` is a 4-digit ISO 6523 code; `{value}` is the issuer-specific registration value.

Example:

```
curl https://peppolcheck.fr/api/v1/participant/0208:0848934496
```

200 response (abridged):

```json
{
  "participantId": "0208:0848934496",
  "directory": { "name": "CARREFOUR BELGIUM SA", "countryCode": "BE", "docTypes": [...] },
  "smp": { "url": "https://smp.example/...", "hostname": "smp.example", "serviceCount": 7, "endpoint": {...} }
}
```

Error codes: `invalid_participant_id` (400), `not_found` (404), `lookup_failed` (502).

## GET /api/v1/search?q={query}

Full-text search the Peppol Directory by company name, VAT, or registry ID. `q` must be at least 2 characters; up to 25 results returned.

Example:

```
curl 'https://peppolcheck.fr/api/v1/search?q=carrefour'
```

200 response (abridged):

```json
{
  "query": "carrefour",
  "totalCount": 12,
  "results": [
    { "participantId": "0208:0848934496", "name": "CARREFOUR BELGIUM SA", "countryCode": "BE" }
  ]
}
```

Error codes: `missing_query` (400), `query_too_short` (400), `search_failed` (502).

## NLWeb /ask

`POST https://peppolcheck.fr/ask` accepts `{ "query": "..." }` and responds JSON. Set `Accept: text/event-stream` for SSE streaming with NLWeb `start`, `result`, `complete` events.

## OpenAPI

Full schema: `https://peppolcheck.fr/openapi.json`.
