C2R API für Entwickler

Inserate, Passports, Dienstleistungen und Bedarf maschinenlesbar abrufen und per Webhook über Ereignisse informiert werden.

Authentifizierung

Öffentliche Daten ohne Schlüssel. Bedarf nur mit API-Schlüssel im Header Authorization: Bearer c2r_…

Endpunkte

GET/api/public/v1/listings?category=&country=DE&condition=good&limit=20&offset=0
POST/api/public/v1/listings{ "title": "…", "taxonomy": "DIN276", "code": "333" }API key
GET/api/public/v1/listings/{passportId}
GET/api/public/v1/taxonomies
GET/api/public/v1/services?type=transport&country=DE
GET/api/public/v1/demands?limit=20API key
curl https://<your-domain>/api/public/v1/demands \
  -H "Authorization: Bearer c2r_…"

Webhooks

Wir senden Ereignisse Ihrer Organisation per POST. Prüfen Sie die Signatur X-C2R-Signature (HMAC-SHA256 über den Body mit Ihrem Webhook-Geheimnis).

listing.publishedlisting.updatedlisting.withdrawndemand.createdconversation.startedmessage.createdservice.published
// Node.js
import { createHmac, timingSafeEqual } from "crypto";
const expected = "sha256=" + createHmac("sha256", WEBHOOK_SECRET).update(rawBody).digest("hex");
const ok = timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers["x-c2r-signature"]));