{
  "openapi": "3.1.0",
  "info": {
    "title": "LOGICAR API",
    "version": "1.0.0",
    "summary": "Fahrzeugüberführungen einstellen und verfolgen.",
    "description": "Transportaufträge aus Ihrem System an LOGICAR übergeben und den Stand per Webhook zurückbekommen. Anleitung, Regeln und Beispiele: https://docs.logicar.cloud",
    "contact": {
      "name": "LOGICAR",
      "url": "https://docs.logicar.cloud"
    }
  },
  "servers": [
    {
      "url": "https://api.logicar.cloud/api/v1",
      "description": "Echtbetrieb und Sandbox — die Umgebung ergibt sich aus dem Schlüssel."
    }
  ],
  "externalDocs": {
    "description": "Entwickler-Dokumentation",
    "url": "https://docs.logicar.cloud"
  },
  "security": [
    {
      "bearer": []
    },
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "Access token, connection test."
    },
    {
      "name": "Orders",
      "description": "Transport orders: create, read, change, cancel, status, tracking, documents."
    },
    {
      "name": "Quotes",
      "description": "Quotes: request, read, accept (if your agreement provides for it), decline, download."
    },
    {
      "name": "Webhook subscriptions",
      "description": "Manage the endpoints that receive your events."
    },
    {
      "name": "Transportaufträge",
      "description": "Aufträge einstellen und abfragen (bisherige Schnittstelle)."
    },
    {
      "name": "Sandbox",
      "description": "Test keys only (lc_test_…): drive the simulated scenarios."
    },
    {
      "name": "Webhooks",
      "description": "Messages LOGICAR sends to your endpoints (API v1 format)."
    }
  ],
  "paths": {
    "/extern/oauth/token": {
      "post": {
        "operationId": "requestAccessToken",
        "summary": "Request an access token (OAuth 2.0 Client Credentials)",
        "description": "Client authentication with HTTP Basic (`client_id:client_secret`) or as form fields — not both. Responses and errors follow RFC 6749 §5.1/§5.2, not the error format of the API.",
        "tags": [
          "Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "const": "client_credentials"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "lcc_… (if not sent via HTTP Basic)"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "lc_live_… / lc_test_… (if not sent via HTTP Basic)"
                  },
                  "scope": {
                    "type": "string",
                    "description": "Space-separated subset of the scopes of the client. Default: all of them."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The access token.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "access_token",
                    "token_type",
                    "expires_in",
                    "scope"
                  ],
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string",
                      "const": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "examples": [
                        3600
                      ]
                    },
                    "scope": {
                      "type": "string",
                      "examples": [
                        "orders:read orders:write"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `unsupported_grant_type`, `invalid_scope` or `unauthorized_client` (RFC 6749 §5.2)."
          },
          "401": {
            "description": "`invalid_client`: unknown client_id or wrong secret — indistinguishable on purpose."
          },
          "429": {
            "description": "Too many token requests (limit per client and minute)."
          }
        }
      }
    },
    "/extern/me": {
      "get": {
        "operationId": "getCurrentCredential",
        "summary": "Get the current credential",
        "description": "Returns the account and credential that authenticated the request, with the environment and the scopes that apply. Use it to test a new connection.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [],
        "responses": {
          "200": {
            "description": "The authenticated credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentCredential"
                },
                "example": {
                  "environment": "production",
                  "account": {
                    "id": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                    "name": "Beispiel Leasing GmbH"
                  },
                  "credential": {
                    "id": "0b8e2a57-6a1d-4f7e-9c3b-4f2a6d1e8c90",
                    "name": "SAP Production",
                    "clientId": "lcc_3f9a1c2b7d4e4f60a8b9c0d1e2f3a4b5",
                    "prefix": "lc_live_7c21",
                    "environment": "production",
                    "type": "oauth_client",
                    "scopes": [
                      "orders:read",
                      "orders:write",
                      "tracking:read"
                    ],
                    "expiresAt": null,
                    "createdAt": "2026-09-18T20:00:00.000Z"
                  },
                  "authentication": {
                    "method": "access_token",
                    "expiresAt": "2026-09-18T21:00:00.000Z"
                  },
                  "apiVersion": "2026-09-01"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders": {
      "post": {
        "operationId": "createOrder",
        "summary": "Create a transport order",
        "description": "Creates an order — or, if your agreement asks for a quote in this case, a request (202, `kind: REQUEST`). Price and release follow your agreement; there is no price field. Unknown fields are rejected (400). Send `Idempotency-Key` (or at least `externalOrderId`): the same key with the same body returns the first response again (header `Idempotent-Replayed: true`), the same key with another body is 409 IDEMPOTENCY_KEY_REUSED. With a test key (lc_test_…) the order goes into the sandbox: `X-Sandbox-Scenario` (STANDARD, DELAY, DAMAGE, CANCELLATION, QUOTE_REQUIRED) and `X-Sandbox-Mode` (automatic, manual) choose the simulation.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any string up to 200 characters. The same key with the same body returns the first response again; with a different body: 409 IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "kind": "ORDER",
                  "id": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "trackingUrl": "https://logicar.cloud/track/5b1f…",
                  "requestNumber": null,
                  "externalOrderId": "4500019283",
                  "customerReference": "PO-98312",
                  "status": "ACCEPTED",
                  "readiness": {
                    "status": "READY_FOR_PLANNING",
                    "documentsRequired": false,
                    "missing": []
                  },
                  "transportType": "DRIVEN",
                  "vehicle": {
                    "vin": "WVWZZZ1KZAW000001",
                    "manufacturer": "Volkswagen",
                    "model": "Golf",
                    "modelYear": 2021,
                    "type": "CAR",
                    "fuelType": "DIESEL",
                    "registration": {
                      "status": "REGISTERED",
                      "licensePlate": "HH-LC 1234"
                    },
                    "operationalStatus": {
                      "driveable": true
                    }
                  },
                  "pickup": {
                    "formatted": "Musterstraße 12, 20095 Hamburg",
                    "company": "Autohaus Beispiel GmbH",
                    "street": "Musterstraße 12",
                    "postalCode": "20095",
                    "city": "Hamburg",
                    "country": "DE",
                    "contact": {
                      "name": "Frau Muster · Autohaus Beispiel GmbH",
                      "phone": "+49 40 123456"
                    },
                    "coordinates": {
                      "lat": 53.5507,
                      "lng": 9.9934
                    }
                  },
                  "delivery": {
                    "formatted": "Beispielweg 5, 80331 München",
                    "company": "Fuhrpark Beispiel GmbH",
                    "street": "Beispielweg 5",
                    "postalCode": "80331",
                    "city": "München",
                    "country": "DE",
                    "contact": {
                      "name": null,
                      "phone": null
                    },
                    "coordinates": {
                      "lat": 48.1374,
                      "lng": 11.5755
                    }
                  },
                  "requestedPickup": "2026-10-01T06:00:00.000Z",
                  "requestedDelivery": "2026-10-02T14:00:00.000Z",
                  "actualPickup": null,
                  "actualDelivery": null,
                  "services": {
                    "registration": false,
                    "shortTermPlate": false
                  },
                  "instructions": "Schlüssel liegt beim Empfang.",
                  "price": {
                    "net": 482.5,
                    "gross": 574.18,
                    "vatRate": 19,
                    "currency": "EUR"
                  },
                  "driver": null,
                  "metadata": {
                    "sapPlant": "1000"
                  },
                  "sandbox": false,
                  "createdAt": "2026-09-23T10:15:00.000Z",
                  "updatedAt": "2026-09-23T10:15:01.000Z"
                }
              }
            }
          },
          "202": {
            "description": "Accepted as a request that waits for a quote (`kind: REQUEST`, status QUOTE_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `INVALID_IDEMPOTENCY_KEY`, `INVALID_SCENARIO`, `SANDBOX_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_REQUEST_IN_PROGRESS, EXTERNAL_ORDER_ID_EXISTS or NO_CONTRACTING_PARTY.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Understood but not executable: VEHICLE_NOT_DRIVEABLE, SERVICE_NOT_SUPPORTED, SERVICE_NOT_APPLICABLE, TRANSPORT_TYPE_NOT_ALLOWED. `details.errors` lists each.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrders",
        "summary": "List orders",
        "description": "Newest first. With `externalOrderId` at most one result: your order — or the request, if it still waits for a quote. `updatedSince` returns everything changed since then — useful to catch up after an outage of your webhook endpoint.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:read"
        ],
        "parameters": [
          {
            "name": "externalOrderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of orders.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `INVALID_CURSOR`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}": {
      "get": {
        "operationId": "getOrder",
        "summary": "Get an order",
        "description": "By our id, the order number or the request number. A request that became an order answers as the order. Your own number: `GET /orders?externalOrderId=…`.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "kind": "ORDER",
                  "id": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "trackingUrl": "https://logicar.cloud/track/5b1f…",
                  "requestNumber": null,
                  "externalOrderId": "4500019283",
                  "customerReference": "PO-98312",
                  "status": "ACCEPTED",
                  "readiness": {
                    "status": "READY_FOR_PLANNING",
                    "documentsRequired": false,
                    "missing": []
                  },
                  "transportType": "DRIVEN",
                  "vehicle": {
                    "vin": "WVWZZZ1KZAW000001",
                    "manufacturer": "Volkswagen",
                    "model": "Golf",
                    "modelYear": 2021,
                    "type": "CAR",
                    "fuelType": "DIESEL",
                    "registration": {
                      "status": "REGISTERED",
                      "licensePlate": "HH-LC 1234"
                    },
                    "operationalStatus": {
                      "driveable": true
                    }
                  },
                  "pickup": {
                    "formatted": "Musterstraße 12, 20095 Hamburg",
                    "company": "Autohaus Beispiel GmbH",
                    "street": "Musterstraße 12",
                    "postalCode": "20095",
                    "city": "Hamburg",
                    "country": "DE",
                    "contact": {
                      "name": "Frau Muster · Autohaus Beispiel GmbH",
                      "phone": "+49 40 123456"
                    },
                    "coordinates": {
                      "lat": 53.5507,
                      "lng": 9.9934
                    }
                  },
                  "delivery": {
                    "formatted": "Beispielweg 5, 80331 München",
                    "company": "Fuhrpark Beispiel GmbH",
                    "street": "Beispielweg 5",
                    "postalCode": "80331",
                    "city": "München",
                    "country": "DE",
                    "contact": {
                      "name": null,
                      "phone": null
                    },
                    "coordinates": {
                      "lat": 48.1374,
                      "lng": 11.5755
                    }
                  },
                  "requestedPickup": "2026-10-01T06:00:00.000Z",
                  "requestedDelivery": "2026-10-02T14:00:00.000Z",
                  "actualPickup": null,
                  "actualDelivery": null,
                  "services": {
                    "registration": false,
                    "shortTermPlate": false
                  },
                  "instructions": "Schlüssel liegt beim Empfang.",
                  "price": {
                    "net": 482.5,
                    "gross": 574.18,
                    "vatRate": 19,
                    "currency": "EUR"
                  },
                  "driver": null,
                  "metadata": {
                    "sapPlant": "1000"
                  },
                  "sandbox": false,
                  "createdAt": "2026-09-23T10:15:00.000Z",
                  "updatedAt": "2026-09-23T10:15:01.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND — also for orders of other accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateOrder",
        "summary": "Change an order",
        "description": "Until pickup: references, contacts on site, instructions, requested dates, VIN and license plate, metadata. Addresses and transport type cannot be changed — price and planning depend on them: cancel and create a new order. After pickup: 409 ORDER_NOT_CHANGEABLE. A changed requested date sends `order.rescheduled`; other changes send no event (webhook endpoints in the previous format receive `order.updated`).",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The changed order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "ORDER_NOT_CHANGEABLE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}/cancel": {
      "post": {
        "operationId": "cancelOrder",
        "summary": "Cancel an order",
        "description": "Until pickup. A request that waits for a quote is withdrawn. Cancelling twice returns the cancelled order. The conditions of your agreement apply. After pickup: 409 ORDER_NOT_CANCELLABLE — contact LOGICAR.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cancelled order (status CANCELLED) or the withdrawn request (REJECTED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "ORDER_NOT_CANCELLABLE or REQUEST_HAS_QUOTE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}/status": {
      "get": {
        "operationId": "getOrderStatus",
        "summary": "Get the status of an order",
        "description": "Status, readiness and the dates — the short form of `GET /orders/{id}`.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "orders:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}/tracking": {
      "get": {
        "operationId": "getOrderTracking",
        "summary": "Get tracking and ETA",
        "description": "Position and calculated arrival during the trip. The position only with the driver’s consent, in the interval set for your account.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "tracking:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "tracking:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tracking.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderTracking"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}/documents": {
      "get": {
        "operationId": "listOrderDocuments",
        "summary": "List the documents of an order",
        "description": "Handover protocols, damage reports, signed authorizations, vehicle documents — invoices with invoices:read, quotes with quotes:read.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "documents:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "documents:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDocuments"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/orders/{id}/documents/{documentId}": {
      "get": {
        "operationId": "getOrderDocument",
        "summary": "Download a document",
        "description": "The file itself (usually application/pdf). Only delivered if it is unchanged since it was stored (SHA-256).",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "oauth2": [
              "documents:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "documents:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file."
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND or DOCUMENT_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/quotes": {
      "post": {
        "operationId": "requestQuote",
        "summary": "Request a quote",
        "description": "The same body as `POST /orders`, but it always becomes a request for a quote — also where your agreement would price the case directly. LOGICAR prepares the quote; read it with `GET /quotes/{id}` (status OFFERED). Send `Idempotency-Key` (or at least `externalOrderId`) — the same rules as for orders. In the sandbox the simulation sends the quote and then waits for your system to accept or decline it.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "oauth2": [
              "quotes:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any string up to 200 characters. The same key with the same body returns the first response again; with a different body: 409 IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Requested (status REQUESTED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `INVALID_IDEMPOTENCY_KEY`, `INVALID_SCENARIO`, `SANDBOX_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_REQUEST_IN_PROGRESS or EXTERNAL_ORDER_ID_EXISTS.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Understood but not executable: VEHICLE_NOT_DRIVEABLE, SERVICE_NOT_SUPPORTED, SERVICE_NOT_APPLICABLE, TRANSPORT_TYPE_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/quotes/{id}": {
      "get": {
        "operationId": "getQuote",
        "summary": "Get a quote",
        "description": "By the id of the request (also the one `POST /orders` returns with `kind: REQUEST`), the request number or the quote number. Amounts and positions appear once the quote is on offer (OFFERED) — exactly the version you can accept.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "oauth2": [
              "quotes:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the request number or the quote number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                },
                "example": {
                  "id": "3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f",
                  "requestNumber": "TR-2026-00821",
                  "quoteNumber": "AN-2026-00412",
                  "externalOrderId": "4500019283",
                  "status": "OFFERED",
                  "version": 1,
                  "validUntil": "2026-10-07T21:59:59.000Z",
                  "sentAt": "2026-09-23T13:40:00.000Z",
                  "currency": "EUR",
                  "amount": {
                    "net": 690,
                    "vat": 131.1,
                    "gross": 821.1
                  },
                  "items": [
                    {
                      "position": 1,
                      "description": "Überführung Hamburg → München, Fahrer",
                      "quantity": 1,
                      "unitPriceNet": 640,
                      "totalNet": 640,
                      "vatRate": 19
                    },
                    {
                      "position": 2,
                      "description": "Kurzzeitkennzeichen",
                      "quantity": 1,
                      "unitPriceNet": 50,
                      "totalNet": 50,
                      "vatRate": 19
                    }
                  ],
                  "conditions": "Abholung innerhalb von drei Werktagen nach Annahme.",
                  "document": {
                    "fileName": "AN-2026-00412-v1.pdf",
                    "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
                    "downloadUrl": "/api/v1/extern/quotes/3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f/document"
                  },
                  "acceptance": {
                    "viaApi": true,
                    "acceptedAt": null,
                    "channel": null
                  },
                  "declinedAt": null,
                  "order": null,
                  "sandbox": false,
                  "createdAt": "2026-09-23T10:15:00.000Z",
                  "updatedAt": "2026-09-23T13:40:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "QUOTE_NOT_FOUND — also for quotes of other accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/quotes/{id}/accept": {
      "post": {
        "operationId": "acceptQuote",
        "summary": "Accept a quote",
        "description": "Binding acceptance by your system — only if your agreement provides for it (`acceptance.viaApi: true`), otherwise 403 QUOTE_ACCEPTANCE_NOT_AGREED and a person accepts via the link in the quote email. Name the `version` you read: a renegotiated quote has a higher one (409 QUOTE_VERSION_MISMATCH). The order is created at once; the answer carries it in `order`, your webhook endpoints receive `order.created`.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "oauth2": [
              "quotes:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the request number or the quote number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any string up to 200 characters. The same key with the same body returns the first response again; with a different body: 409 IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "description": "The version you accept — `version` from GET /quotes/{id}.",
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted (ORDERED, with `order`; ACCEPTED while the order is still being created).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `INVALID_IDEMPOTENCY_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "QUOTE_ACCEPTANCE_NOT_AGREED (or INSUFFICIENT_SCOPE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "QUOTE_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "QUOTE_NOT_OFFERED, QUOTE_VERSION_MISMATCH, QUOTE_EXPIRED or QUOTE_ALREADY_DECIDED.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/quotes/{id}/decline": {
      "post": {
        "operationId": "declineQuote",
        "summary": "Decline a quote",
        "description": "Declines the quote on offer (also an expired one); the request ends — your webhook endpoints receive `order.rejected`. A reason helps LOGICAR. No agreement needed: declining binds nothing. Before a quote is on offer, withdraw the request instead: `POST /orders/{id}/cancel`.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "oauth2": [
              "quotes:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the request number or the quote number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Any string up to 200 characters. The same key with the same body returns the first response again; with a different body: 409 IDEMPOTENCY_KEY_REUSED.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Declined (status DECLINED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `INVALID_IDEMPOTENCY_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "QUOTE_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "QUOTE_NOT_OFFERED or QUOTE_ALREADY_DECIDED.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/quotes/{id}/document": {
      "get": {
        "operationId": "getQuoteDocument",
        "summary": "Download the quote document",
        "description": "The quote as PDF — the version on offer (or the accepted one). Only delivered if it is unchanged since it was stored; compare with `document.sha256`.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "oauth2": [
              "quotes:read"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id (UUID), the request number or the quote number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF."
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "QUOTE_NOT_FOUND or QUOTE_DOCUMENT_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/webhook-subscriptions": {
      "post": {
        "operationId": "createWebhookSubscription",
        "summary": "Create a webhook subscription",
        "description": "Registers an https endpoint for the given events. The response contains the signing secret — once. A sandbox key (lc_test_…) creates a sandbox subscription, which receives the events of test orders only.",
        "tags": [
          "Webhook subscriptions"
        ],
        "security": [
          {
            "oauth2": [
              "webhooks:manage"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "webhooks:manage"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Store the secret now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionCreated"
                },
                "example": {
                  "id": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
                  "url": "https://erp.example.com/logicar/webhooks",
                  "events": [
                    "driver.assigned",
                    "vehicle.picked_up",
                    "vehicle.delivered"
                  ],
                  "environment": "production",
                  "apiVersion": "2026-09-01",
                  "description": "SAP Integration Suite",
                  "active": true,
                  "secretHint": "…3f9a",
                  "disabledReason": null,
                  "createdAt": "2026-09-23T10:15:00.000Z",
                  "secret": "9f2c4e6a8b0d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d3f9a"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST or INVALID_WEBHOOK_URL (details.reason says why).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "TOO_MANY_SUBSCRIPTIONS.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listWebhookSubscriptions",
        "summary": "List webhook subscriptions",
        "description": "All webhook endpoints of your account in the environment of this credential.",
        "tags": [
          "Webhook subscriptions"
        ],
        "security": [
          {
            "oauth2": [
              "webhooks:manage"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "webhooks:manage"
        ],
        "responses": {
          "200": {
            "description": "The subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "data": [
                    {
                      "id": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
                      "url": "https://erp.example.com/logicar/webhooks",
                      "events": [
                        "driver.assigned",
                        "vehicle.picked_up",
                        "vehicle.delivered"
                      ],
                      "environment": "production",
                      "apiVersion": "2026-09-01",
                      "description": "SAP Integration Suite",
                      "active": true,
                      "secretHint": "…3f9a",
                      "disabledReason": null,
                      "createdAt": "2026-09-23T10:15:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/webhook-subscriptions/{id}": {
      "get": {
        "operationId": "getWebhookSubscription",
        "summary": "Get a webhook subscription",
        "tags": [
          "Webhook subscriptions"
        ],
        "security": [
          {
            "oauth2": [
              "webhooks:manage"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
                  "url": "https://erp.example.com/logicar/webhooks",
                  "events": [
                    "driver.assigned",
                    "vehicle.picked_up",
                    "vehicle.delivered"
                  ],
                  "environment": "production",
                  "apiVersion": "2026-09-01",
                  "description": "SAP Integration Suite",
                  "active": true,
                  "secretHint": "…3f9a",
                  "disabledReason": null,
                  "createdAt": "2026-09-23T10:15:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `SUBSCRIPTION_NOT_FOUND`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SUBSCRIPTION_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookSubscription",
        "summary": "Delete a webhook subscription",
        "description": "Stops all messages to this endpoint, including pending retries.",
        "tags": [
          "Webhook subscriptions"
        ],
        "security": [
          {
            "oauth2": [
              "webhooks:manage"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `SUBSCRIPTION_NOT_FOUND`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SUBSCRIPTION_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/webhook-subscriptions/{id}/test": {
      "post": {
        "operationId": "testWebhookSubscription",
        "summary": "Send a test message",
        "description": "Sends a signed message of type webhook.test to the endpoint now, regardless of its events, and reports the answer. Use it to check your signature verification. Test messages are not retried.",
        "tags": [
          "Webhook subscriptions"
        ],
        "security": [
          {
            "oauth2": [
              "webhooks:manage"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result of the attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResult"
                },
                "example": {
                  "delivered": true,
                  "statusCode": 200,
                  "message": "Delivered.",
                  "deliveryId": "7d9e4c1a-2b3f-4e5d-8a6b-9c0d1e2f3a4b",
                  "durationMs": 184
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`). Codes: `SUBSCRIPTION_NOT_FOUND`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Scope missing (`INSUFFICIENT_SCOPE`), account not eligible or API not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SUBSCRIPTION_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/sandbox/orders/{id}/advance": {
      "post": {
        "operationId": "advanceSandboxOrder",
        "summary": "Sandbox: run the next step",
        "description": "Test keys and sandbox tokens only. Runs the next step of the scenario now — in manual mode (`X-Sandbox-Mode: manual`) the only way forward, in automatic mode simply earlier. `toEnd: true` runs all remaining steps. Each step sends exactly the events production sends in that situation.",
        "tags": [
          "Sandbox"
        ],
        "security": [
          {
            "oauth2": [
              "orders:write"
            ]
          },
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "x-logicar-scopes": [
          "orders:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Our id, the order number or the request number.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toEnd": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Where the scenario stands now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxProgress"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`INVALID_REQUEST`, fields in `details.fields`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or disabled credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "SANDBOX_ONLY (or INSUFFICIENT_SCOPE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "ORDER_NOT_FOUND.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "SANDBOX_FINISHED — the scenario has run through.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests (`RATE_LIMITED`). Retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error (`INTERNAL_ERROR`). Quote the `requestId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/extern/transportauftraege": {
      "post": {
        "summary": "Transportauftrag einstellen",
        "operationId": "postTransportauftraege",
        "tags": [
          "Transportaufträge"
        ],
        "description": "Legt einen Auftrag an — oder eine Anfrage, wenn Ihre Vereinbarung für diesen Fall ein Angebot vorsieht (`art: REQUEST`). Preis und Freigabe bestimmt Ihre Vereinbarung; mitgeschickte Preisfelder werden verworfen und in `verworfeneFelder` genannt. Mit einem Testschlüssel entsteht ein Vorgang in der Sandbox, der ein Szenario durchläuft.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Beliebige Kennung bis 200 Zeichen. Derselbe Schlüssel ergibt denselben Vorgang — nützlich, wenn Sie keine eigene Auftragsnummer mitgeben.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "X-Sandbox-Scenario",
            "in": "header",
            "required": false,
            "description": "Nur Sandbox: welches Szenario der Vorgang durchläuft. Ohne Angabe STANDARD.",
            "schema": {
              "type": "string",
              "enum": [
                "STANDARD",
                "DELAY",
                "DAMAGE",
                "CANCELLATION",
                "QUOTE_REQUIRED"
              ]
            }
          },
          {
            "name": "X-Sandbox-Mode",
            "in": "header",
            "required": false,
            "description": "Nur Sandbox: `automatic` (Schritte laufen selbst) oder `manual` (Sie schalten mit `/weiter`).",
            "schema": {
              "type": "string",
              "enum": [
                "automatic",
                "manual"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Transportauftrag"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wiederholung: dieser Vorgang war schon angelegt (`wiederholung: true`). Es entstand nichts Neues.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vorgang"
                }
              }
            }
          },
          "201": {
            "description": "Angelegt.",
            "headers": {
              "X-LogiCar-Environment": {
                "description": "`production` oder `sandbox` — nach dem verwendeten Schlüssel.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "production",
                    "sandbox"
                  ]
                }
              },
              "RateLimit-Limit": {
                "description": "Anfragen je Fenster (eine Minute).",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Davon noch frei.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Sekunden bis zum nächsten Fenster.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Policy": {
                "description": "Die Drossel dieses Zugangs, z. B. `600;w=60`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vorgang"
                }
              }
            }
          },
          "400": {
            "description": "Eingabe unvollständig oder falsch (`INVALID_INPUT`, Felder in `details.fehler`), unbekanntes Szenario (`INVALID_SCENARIO`) oder kein gültiges JSON (`invalid_json`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "401": {
            "description": "Kein oder ungültiger Schlüssel (`MISSING_API_KEY`, `INVALID_API_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "403": {
            "description": "Recht fehlt (`INSUFFICIENT_SCOPE`) oder Zugang gesperrt (`ACCESS_DENIED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "409": {
            "description": "Für Ihren Mandanten ist kein Auftraggeber hinterlegt (`NO_CONTRACTING_PARTY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "429": {
            "description": "Zu viele Anfragen (`RATE_LIMITED`) oder, in der Sandbox, das Tageslimit erreicht (`SANDBOX_LIMIT`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "500": {
            "description": "Unerwarteter Fehler (`INTERNAL`). Mit der `requestId` an uns wenden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "503": {
            "description": "Keine eindeutige Nummer vergeben (`NUMBER_COLLISION`); bitte erneut senden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          }
        }
      }
    },
    "/extern/transportauftraege/{kennung}": {
      "get": {
        "summary": "Stand eines Auftrags oder einer Anfrage",
        "operationId": "getTransportauftraegeKennung",
        "tags": [
          "Transportaufträge"
        ],
        "description": "Der aktuelle Stand. Wurde aus einer Anfrage ein Auftrag, antwortet der Endpunkt mit dem Auftrag.",
        "parameters": [
          {
            "name": "kennung",
            "in": "path",
            "required": true,
            "description": "Unsere Auftrags- oder Anfragenummer, die interne Kennung oder Ihre `externalOrderId`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Vorgang.",
            "headers": {
              "X-LogiCar-Environment": {
                "description": "`production` oder `sandbox` — nach dem verwendeten Schlüssel.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "production",
                    "sandbox"
                  ]
                }
              },
              "RateLimit-Limit": {
                "description": "Anfragen je Fenster (eine Minute).",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Davon noch frei.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Sekunden bis zum nächsten Fenster.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Policy": {
                "description": "Die Drossel dieses Zugangs, z. B. `600;w=60`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vorgang"
                }
              }
            }
          },
          "401": {
            "description": "Kein oder ungültiger Schlüssel (`MISSING_API_KEY`, `INVALID_API_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "403": {
            "description": "Recht fehlt (`INSUFFICIENT_SCOPE`) oder Zugang gesperrt (`ACCESS_DENIED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "404": {
            "description": "Zu dieser Kennung ist nichts hinterlegt (`NOT_FOUND`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "429": {
            "description": "Zu viele Anfragen (`RATE_LIMITED`); nach `Retry-After` Sekunden wiederholen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "500": {
            "description": "Unerwarteter Fehler (`INTERNAL`). Mit der `requestId` an uns wenden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          }
        }
      }
    },
    "/extern/sandbox/transportauftraege": {
      "get": {
        "summary": "Die letzten Testvorgänge mit Verlauf",
        "operationId": "getSandboxTransportauftraege",
        "tags": [
          "Sandbox"
        ],
        "x-logicar-umgebung": "sandbox",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Höchstens so viele (1–100, Vorgabe 20).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Testvorgänge, neueste zuerst.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SandboxVorgang"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Kein oder ungültiger Schlüssel (`MISSING_API_KEY`, `INVALID_API_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "403": {
            "description": "Nur mit einem Testschlüssel (`SANDBOX_ONLY`), Recht fehlt (`INSUFFICIENT_SCOPE`) oder Zugang gesperrt (`ACCESS_DENIED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "429": {
            "description": "Zu viele Anfragen (`RATE_LIMITED`); nach `Retry-After` Sekunden wiederholen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "500": {
            "description": "Unerwarteter Fehler (`INTERNAL`). Mit der `requestId` an uns wenden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          }
        }
      }
    },
    "/extern/sandbox/transportauftraege/{kennung}/weiter": {
      "post": {
        "summary": "Nächsten Schritt des Szenarios jetzt ausführen",
        "operationId": "postSandboxTransportauftraegeKennungWeiter",
        "tags": [
          "Sandbox"
        ],
        "x-logicar-umgebung": "sandbox",
        "parameters": [
          {
            "name": "kennung",
            "in": "path",
            "required": true,
            "description": "Unsere Auftrags- oder Anfragenummer, die interne Kennung oder Ihre `externalOrderId`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Stand nach dem Schritt, mit Verlauf.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxSchritt"
                }
              }
            }
          },
          "401": {
            "description": "Kein oder ungültiger Schlüssel (`MISSING_API_KEY`, `INVALID_API_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "403": {
            "description": "Nur mit einem Testschlüssel (`SANDBOX_ONLY`), Recht fehlt (`INSUFFICIENT_SCOPE`) oder Zugang gesperrt (`ACCESS_DENIED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "404": {
            "description": "Zu dieser Kennung ist nichts hinterlegt (`NOT_FOUND`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "409": {
            "description": "Das Szenario ist bereits durchlaufen (`SANDBOX_FINISHED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "429": {
            "description": "Zu viele Anfragen (`RATE_LIMITED`); nach `Retry-After` Sekunden wiederholen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "500": {
            "description": "Unerwarteter Fehler (`INTERNAL`). Mit der `requestId` an uns wenden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          }
        }
      }
    },
    "/extern/sandbox/transportauftraege/{kennung}/abschliessen": {
      "post": {
        "summary": "Alle verbleibenden Schritte ausführen",
        "operationId": "postSandboxTransportauftraegeKennungAbschliessen",
        "tags": [
          "Sandbox"
        ],
        "x-logicar-umgebung": "sandbox",
        "parameters": [
          {
            "name": "kennung",
            "in": "path",
            "required": true,
            "description": "Unsere Auftrags- oder Anfragenummer, die interne Kennung oder Ihre `externalOrderId`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Stand nach dem Schritt, mit Verlauf.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxSchritt"
                }
              }
            }
          },
          "401": {
            "description": "Kein oder ungültiger Schlüssel (`MISSING_API_KEY`, `INVALID_API_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "403": {
            "description": "Nur mit einem Testschlüssel (`SANDBOX_ONLY`), Recht fehlt (`INSUFFICIENT_SCOPE`) oder Zugang gesperrt (`ACCESS_DENIED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "404": {
            "description": "Zu dieser Kennung ist nichts hinterlegt (`NOT_FOUND`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "409": {
            "description": "Das Szenario ist bereits durchlaufen (`SANDBOX_FINISHED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "429": {
            "description": "Zu viele Anfragen (`RATE_LIMITED`); nach `Retry-After` Sekunden wiederholen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          },
          "500": {
            "description": "Unerwarteter Fehler (`INTERNAL`). Mit der `requestId` an uns wenden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fehler"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "order.created": {
      "post": {
        "summary": "Auftrag angelegt",
        "description": "Ein Auftrag ist entstanden — über die API, im Portal oder aus einem angenommenen Angebot.",
        "operationId": "webhook_order_created",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.created"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.created"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.created",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "RECEIVED"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.accepted": {
      "post": {
        "summary": "Zur Planung freigegeben",
        "description": "LOGICAR hat den Auftrag geprüft und zur Planung freigegeben: nichts fehlt mehr, was die Fahrt aufhält.",
        "operationId": "webhook_order_accepted",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.accepted"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.accepted"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.accepted",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "ACCEPTED"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.rejected": {
      "post": {
        "summary": "Anfrage abgelehnt",
        "description": "Eine Anfrage, die auf ein Angebot wartete, wurde abgelehnt oder von Ihnen zurückgezogen. Es entsteht kein Auftrag.",
        "operationId": "webhook_order_rejected",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.rejected"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.rejected"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.rejected",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "2f6d0c3b-9a1e-4b7f-8c2d-5e4f3a2b1c0d",
                  "kind": "REQUEST",
                  "requestNumber": "TR-2026-00042",
                  "orderNumber": null,
                  "trackingNumber": null,
                  "externalOrderId": "4500019284",
                  "status": "REJECTED"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.scheduled": {
      "post": {
        "summary": "Eingeplant",
        "description": "Ein ausführendes Unternehmen oder ein Fahrer ist für den Auftrag eingeplant.",
        "operationId": "webhook_order_scheduled",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.scheduled"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.scheduled"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.scheduled",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "SCHEDULED",
                  "requestedPickup": "2026-10-01T08:00:00.000Z",
                  "requestedDelivery": "2026-10-02T16:00:00.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.rescheduled": {
      "post": {
        "summary": "Termin verschoben",
        "description": "Der Abhol- oder Liefertermin hat sich geändert. Das erste Setzen eines Termins ist keine Verschiebung.",
        "operationId": "webhook_order_rescheduled",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.rescheduled"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.rescheduled"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.rescheduled",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "SCHEDULED",
                  "requestedPickup": "2026-10-01T10:00:00.000Z",
                  "requestedDelivery": "2026-10-02T16:00:00.000Z",
                  "previousRequestedPickup": "2026-10-01T08:00:00.000Z",
                  "previousRequestedDelivery": "2026-10-02T16:00:00.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.completed": {
      "post": {
        "summary": "Auftrag abgeschlossen",
        "description": "Der Auftrag ist abgeschlossen.",
        "operationId": "webhook_order_completed",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.completed"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.completed"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.completed",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "COMPLETED",
                  "completedAt": "2026-10-02T18:05:12.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "summary": "Auftrag storniert",
        "description": "Der Auftrag wurde storniert — über die API, im Portal oder von LOGICAR.",
        "operationId": "webhook_order_cancelled",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "order.cancelled"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "order.cancelled"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "order.cancelled",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "CANCELLED",
                  "cancelledAt": "2026-09-30T09:12:40.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "driver.assigned": {
      "post": {
        "summary": "Fahrer zugewiesen",
        "description": "Ein Fahrer ist zugewiesen oder gewechselt. Den Namen — Vorname und Initial — gibt es nur, wenn Ihr Konto das vorsieht.",
        "operationId": "webhook_driver_assigned",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "driver.assigned"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "driver.assigned"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "driver.assigned",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "SCHEDULED",
                  "driver": {
                    "name": "Max M."
                  },
                  "reassigned": false
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "pickup.started": {
      "post": {
        "summary": "Auf dem Weg zur Abholung",
        "description": "Der Fahrer ist auf dem Weg zum Abholort.",
        "operationId": "webhook_pickup_started",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "pickup.started"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "pickup.started"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "pickup.started",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "PICKUP_STARTED",
                  "startedAt": "2026-10-01T07:31:02.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "pickup.arrived": {
      "post": {
        "summary": "Am Abholort angekommen",
        "description": "Der Fahrer ist am Abholort angekommen, erkannt an seiner Position. Einmal je Auftrag.",
        "operationId": "webhook_pickup_arrived",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "pickup.arrived"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "pickup.arrived"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "pickup.arrived",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "PICKUP_STARTED",
                  "arrivedAt": "2026-10-01T07:58:40.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "vehicle.picked_up": {
      "post": {
        "summary": "Fahrzeug abgeholt",
        "description": "Das Fahrzeug ist übernommen; das Abholprotokoll liegt vor.",
        "operationId": "webhook_vehicle_picked_up",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "vehicle.picked_up"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "vehicle.picked_up"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "vehicle.picked_up",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "IN_TRANSIT",
                  "pickedUpAt": "2026-10-01T08:12:40.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "transport.started": {
      "post": {
        "summary": "Transport begonnen",
        "description": "Das Fahrzeug ist unterwegs zum Ziel. Kommt zusammen mit vehicle.picked_up.",
        "operationId": "webhook_transport_started",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "transport.started"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "transport.started"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "transport.started",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "IN_TRANSIT",
                  "startedAt": "2026-10-01T08:12:41.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "transport.delayed": {
      "post": {
        "summary": "Verspätung",
        "description": "Die errechnete Ankunft liegt hinter dem Liefertermin. Erneut erst, wenn sie zwischendurch wieder davor lag.",
        "operationId": "webhook_transport_delayed",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "transport.delayed"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "transport.delayed"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "transport.delayed",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "IN_TRANSIT",
                  "estimatedDelivery": "2026-10-02T18:00:00.000Z",
                  "requestedDelivery": "2026-10-02T16:00:00.000Z",
                  "delayMinutes": 120
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "delivery.arrived": {
      "post": {
        "summary": "Am Ziel angekommen",
        "description": "Das Fahrzeug ist am Zielort, die Übergabe läuft.",
        "operationId": "webhook_delivery_arrived",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "delivery.arrived"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "delivery.arrived"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "delivery.arrived",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "AT_DELIVERY",
                  "arrivedAt": "2026-10-02T14:20:05.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "vehicle.delivered": {
      "post": {
        "summary": "Fahrzeug zugestellt",
        "description": "Das Fahrzeug ist übergeben; das Übergabeprotokoll liegt vor.",
        "operationId": "webhook_vehicle_delivered",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "vehicle.delivered"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "vehicle.delivered"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "vehicle.delivered",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "DELIVERED",
                  "deliveredAt": "2026-10-02T14:31:44.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "document.required": {
      "post": {
        "summary": "Unterlage angefordert",
        "description": "LOGICAR braucht von Ihnen eine Vollmacht oder eine Unterlage zum Fahrzeug. `blocking: true` heißt: ohne sie wird die Fahrt nicht geplant.",
        "operationId": "webhook_document_required",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "document.required"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "document.required"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "document.required",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "RECEIVED",
                  "requirement": {
                    "code": "TRANSPORT_AUTHORIZATION",
                    "category": "AUTHORIZATION",
                    "blocking": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "document.uploaded": {
      "post": {
        "summary": "Dokument abgelegt",
        "description": "Am Auftrag liegt ein neues Dokument: Protokoll, Schadensbericht, Vollmacht oder Fahrzeugunterlage. Rechnungen meldet invoice.created.",
        "operationId": "webhook_document_uploaded",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "document.uploaded"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "document.uploaded"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "document.uploaded",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "DELIVERED",
                  "document": {
                    "id": "6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d",
                    "type": "DELIVERY_PROTOCOL",
                    "downloadUrl": "/api/v1/extern/orders/8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f/documents/6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "damage.reported": {
      "post": {
        "summary": "Schaden gemeldet",
        "description": "Im Abhol- oder Übergabeprotokoll ist ein Schaden vermerkt, oder es wurde ein Schadensbericht angelegt.",
        "operationId": "webhook_damage_reported",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "damage.reported"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "damage.reported"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "damage.reported",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "DELIVERED",
                  "damage": {
                    "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                    "source": "HANDOVER_PROTOCOL",
                    "stage": "DELIVERY"
                  },
                  "reportedAt": "2026-10-02T14:30:58.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "exception.created": {
      "post": {
        "summary": "Störung am Auftrag",
        "description": "Eine Störung ist am Auftrag vermerkt: die Zustellung ist überfällig (DELIVERY_OVERDUE) oder noch kein Fahrer eingeplant (NO_DRIVER_ASSIGNED).",
        "operationId": "webhook_exception_created",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "exception.created"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "exception.created"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "exception.created",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderNumber": "26K7F070042E",
                  "trackingNumber": "26K7F070042E",
                  "externalOrderId": "4500019283",
                  "status": "IN_TRANSIT",
                  "exception": {
                    "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
                    "code": "DELIVERY_OVERDUE",
                    "severity": "MEDIUM"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    },
    "invoice.created": {
      "post": {
        "summary": "Rechnung gestellt",
        "description": "Eine Rechnung an Sie liegt vor — für einen Auftrag oder als Sammelrechnung über mehrere (dann ist orderId null).",
        "operationId": "webhook_invoice_created",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-LogiCar-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "invoice.created"
            }
          },
          {
            "name": "X-LogiCar-Delivery",
            "in": "header",
            "required": true,
            "description": "Kennung der Zustellung, gleich über alle Versuche. Zum Entdoppeln.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-LogiCar-Timestamp",
            "in": "header",
            "required": true,
            "description": "Unix-Sekunden des Versuchs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Signature",
            "in": "header",
            "required": true,
            "description": "`sha256=` + HMAC-SHA256 (hex) über `<Timestamp>.<Rumpf>` mit dem Geheimnis des Endpunkts. Abweichung über 300 Sekunden: verwerfen.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-LogiCar-Environment",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "sandbox"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invoice.created"
                      },
                      "data": {
                        "type": "object"
                      }
                    }
                  }
                ]
              },
              "example": {
                "id": "3b0f6f4e-5c2a-4d0e-9f59-1f2d8c7a6b10",
                "type": "invoice.created",
                "apiVersion": "2026-09-01",
                "createdAt": "2026-10-02T14:32:11.000Z",
                "tenantId": "5f0c3f0e-8d1f-4c55-9e0a-2d5c1b7a9e11",
                "environment": "production",
                "data": {
                  "invoiceId": "0f1e2d3c-4b5a-4968-8776-655443322110",
                  "invoiceNumber": "26K7F100043",
                  "orderId": "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f",
                  "orderIds": [
                    "8c1d2e3f-4a5b-4c6d-9e7f-0a1b2c3d4e5f"
                  ],
                  "amount": {
                    "net": 405.46,
                    "vat": 77.04,
                    "gross": 482.5,
                    "currency": "EUR"
                  },
                  "issuedAt": "2026-10-03T06:00:00.000Z",
                  "dueDate": "2026-11-02T00:00:00.000Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Empfangen. Alles andere — auch eine Weiterleitung — gilt als Fehlschlag und wird nach Plan wiederholt."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 Client Credentials (RFC 6749 §4.4). The access token is valid for one hour.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.logicar.cloud/api/v1/extern/oauth/token",
            "scopes": {
              "orders:read": "Read orders and their status",
              "orders:write": "Create, update and cancel orders",
              "tracking:read": "Read tracking and ETA",
              "documents:read": "Download order documents (protocols, proof of delivery)",
              "quotes:read": "Read quotes",
              "quotes:write": "Request and accept quotes",
              "invoices:read": "Read invoices",
              "webhooks:manage": "Manage webhook subscriptions"
            }
          }
        }
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "access token, or API key lc_live_… / lc_test_…",
        "description": "`Authorization: Bearer <access token>` or `Authorization: Bearer lc_live_…`"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Alternatively `X-API-Key: lc_live_…`"
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "description": "Every error of the API v1 has this shape. `code` is stable; `message` is for humans and may change.",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "requestId"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable error code, e.g. INVALID_REQUEST.",
                "examples": [
                  "INVALID_REQUEST"
                ]
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string",
                "description": "Also in the X-Request-Id header. Quote it when contacting support."
              },
              "details": {
                "type": "object",
                "description": "Depends on the code. For INVALID_REQUEST: `fields` with field, code and message.",
                "properties": {
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CurrentCredential": {
        "description": "The account and credential behind the request.",
        "type": "object",
        "properties": {
          "environment": {
            "description": "Where this credential works: real orders (production) or the sandbox.",
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Your LogiCar account (tenant) id.",
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "clientId": {
                "description": "Public identifier of the credential (OAuth client_id).",
                "type": "string"
              },
              "prefix": {
                "description": "The first characters of the key, e.g. lc_test_3f9a — never the key.",
                "type": "string"
              },
              "environment": {
                "type": "string",
                "enum": [
                  "production",
                  "sandbox"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "api_key",
                  "oauth_client"
                ]
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "orders:read",
                    "orders:write",
                    "tracking:read",
                    "documents:read",
                    "quotes:read",
                    "quotes:write",
                    "invoices:read",
                    "webhooks:manage"
                  ]
                }
              },
              "expiresAt": {
                "description": "Expiry of the credential, null if it does not expire.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "clientId",
              "prefix",
              "environment",
              "type",
              "scopes",
              "expiresAt",
              "createdAt"
            ],
            "additionalProperties": false
          },
          "authentication": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "api_key",
                  "access_token"
                ]
              },
              "expiresAt": {
                "description": "Expiry of the access token, null for API keys.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "method",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "environment",
          "account",
          "credential",
          "authentication",
          "apiVersion"
        ],
        "additionalProperties": false
      },
      "Readiness": {
        "type": "object",
        "properties": {
          "status": {
            "description": "How far the order is from planning. READY_FOR_PLANNING: nothing missing. WAITING_FOR_DOCUMENTS: an authorization or document is open.",
            "type": "string",
            "enum": [
              "INCOMPLETE",
              "WAITING_FOR_DOCUMENTS",
              "WAITING_FOR_REGISTRATION",
              "WAITING_FOR_CUSTOMER",
              "IN_REVIEW",
              "READY_FOR_PLANNING",
              "PLANNING",
              "SCHEDULED",
              "CANCELLED"
            ]
          },
          "documentsRequired": {
            "type": "boolean"
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                },
                "blocking": {
                  "type": "boolean"
                },
                "responsible": {
                  "type": "string",
                  "enum": [
                    "LOGICAR",
                    "CONTRACTING_PARTY"
                  ]
                }
              },
              "required": [
                "code",
                "category",
                "blocking",
                "responsible"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "status",
          "documentsRequired",
          "missing"
        ],
        "additionalProperties": false
      },
      "LocationOut": {
        "description": "Structured fields are null for orders that did not come in through the API v1.",
        "type": "object",
        "properties": {
          "formatted": {
            "description": "The address as one line — always present.",
            "type": "string"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "street": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postalCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact": {
            "type": "object",
            "properties": {
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name",
              "phone"
            ],
            "additionalProperties": false
          },
          "coordinates": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number"
                  },
                  "lng": {
                    "type": "number"
                  }
                },
                "required": [
                  "lat",
                  "lng"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "formatted",
          "company",
          "street",
          "postalCode",
          "city",
          "country",
          "contact",
          "coordinates"
        ],
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "properties": {
          "kind": {
            "description": "ORDER: a transport order. REQUEST: waits for a quote (your agreement asks for one).",
            "type": "string",
            "enum": [
              "ORDER",
              "REQUEST"
            ]
          },
          "id": {
            "type": "string"
          },
          "orderNumber": {
            "description": "Also on the invoice and in the portal.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trackingNumber": {
            "description": "Same as orderNumber.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trackingUrl": {
            "description": "Public tracking page for the recipient.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalOrderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "customerReference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "RECEIVED",
              "ACCEPTED",
              "SCHEDULED",
              "PICKUP_STARTED",
              "IN_TRANSIT",
              "AT_DELIVERY",
              "DELIVERED",
              "COMPLETED",
              "CANCELLED",
              "QUOTE_REQUIRED",
              "QUOTE_SENT",
              "QUOTE_ACCEPTED",
              "REJECTED"
            ]
          },
          "readiness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Readiness"
              },
              {
                "type": "null"
              }
            ]
          },
          "transportType": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "DRIVEN",
                  "TRAILER",
                  "TRUCK"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "vehicle": {
            "type": "object",
            "properties": {
              "vin": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "manufacturer": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "model": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "modelYear": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "type": "string"
              },
              "fuelType": {
                "type": "string"
              },
              "registration": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "REGISTERED",
                      "UNREGISTERED",
                      "TEMPORARILY_REGISTERED",
                      "UNKNOWN"
                    ]
                  },
                  "licensePlate": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "status",
                  "licensePlate"
                ],
                "additionalProperties": false
              },
              "operationalStatus": {
                "type": "object",
                "properties": {
                  "driveable": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "driveable"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "vin",
              "manufacturer",
              "model",
              "modelYear",
              "type",
              "fuelType",
              "registration",
              "operationalStatus"
            ],
            "additionalProperties": false
          },
          "pickup": {
            "$ref": "#/components/schemas/LocationOut"
          },
          "delivery": {
            "$ref": "#/components/schemas/LocationOut"
          },
          "requestedPickup": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedDelivery": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actualPickup": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actualDelivery": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "services": {
            "type": "object",
            "properties": {
              "registration": {
                "type": "boolean"
              },
              "shortTermPlate": {
                "type": "boolean"
              }
            },
            "required": [
              "registration",
              "shortTermPlate"
            ],
            "additionalProperties": false
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "price": {
            "description": "According to your agreement. `vatRate` is a percentage (19 = 19 %). null while no price is set (e.g. a request waiting for a quote).",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "net": {
                    "type": "number"
                  },
                  "gross": {
                    "type": "number"
                  },
                  "vatRate": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string",
                    "const": "EUR"
                  }
                },
                "required": [
                  "net",
                  "gross",
                  "vatRate",
                  "currency"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "driver": {
            "description": "First name and initial — only if enabled for your account. Never phone or email.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "sandbox": {
            "description": "true for test orders (key lc_test_…).",
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "orderNumber",
          "trackingNumber",
          "trackingUrl",
          "requestNumber",
          "externalOrderId",
          "customerReference",
          "status",
          "readiness",
          "transportType",
          "vehicle",
          "pickup",
          "delivery",
          "requestedPickup",
          "requestedDelivery",
          "actualPickup",
          "actualDelivery",
          "services",
          "instructions",
          "price",
          "driver",
          "metadata",
          "sandbox",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Vehicle": {
        "type": "object",
        "properties": {
          "vin": {
            "description": "Vehicle identification number (ISO 3779), 17 characters.",
            "type": "string"
          },
          "manufacturer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "modelYear": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 2100
          },
          "type": {
            "description": "Vehicle class. Default CAR.",
            "type": "string",
            "enum": [
              "CAR",
              "COMBI",
              "SUV",
              "VAN",
              "TRUCK_7_5",
              "TRUCK_12",
              "TRUCK_40"
            ]
          },
          "fuelType": {
            "description": "Default DIESEL (ELECTRIC if `electric` is true).",
            "type": "string",
            "enum": [
              "DIESEL",
              "PETROL",
              "ELECTRIC",
              "HYBRID",
              "HYDROGEN",
              "LPG",
              "LNG"
            ]
          },
          "electric": {
            "type": "boolean"
          },
          "registration": {
            "type": "object",
            "properties": {
              "status": {
                "description": "UNKNOWN is not the same as UNREGISTERED.",
                "type": "string",
                "enum": [
                  "REGISTERED",
                  "UNREGISTERED",
                  "TEMPORARILY_REGISTERED",
                  "UNKNOWN"
                ]
              },
              "licensePlate": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20
              },
              "validUntil": {
                "description": "For temporary registrations.",
                "type": "string",
                "format": "date"
              },
              "country": {
                "type": "string",
                "pattern": "^[A-Za-z]{2}$"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          },
          "operationalStatus": {
            "type": "object",
            "properties": {
              "driveable": {
                "type": "boolean"
              },
              "roadLegal": {
                "type": "boolean"
              },
              "keysAvailable": {
                "type": "boolean"
              }
            },
            "required": [
              "driveable"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "Location": {
        "description": "A pickup or delivery location.",
        "type": "object",
        "properties": {
          "company": {
            "description": "Company at the location, e.g. the dealership.",
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "street": {
            "description": "Street and house number.",
            "examples": [
              "Musterstraße 12"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "postalCode": {
            "examples": [
              "20095"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "city": {
            "examples": [
              "Hamburg"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "country": {
            "description": "ISO 3166-1 alpha-2. Default DE.",
            "type": "string"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "coordinates": {
            "description": "Optional. Without coordinates LOGICAR geocodes the address.",
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              }
            },
            "required": [
              "lat",
              "lng"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "street",
          "postalCode",
          "city"
        ],
        "additionalProperties": false
      },
      "Contact": {
        "description": "Contact person on site.",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "additionalProperties": false
      },
      "Services": {
        "type": "object",
        "properties": {
          "registration": {
            "description": "LOGICAR registers the vehicle.",
            "type": "boolean"
          },
          "shortTermPlate": {
            "description": "LOGICAR provides a short-term plate for the drive.",
            "type": "boolean"
          },
          "exportPlate": {
            "description": "Not offered — 422 SERVICE_NOT_SUPPORTED.",
            "type": "boolean"
          },
          "customs": {
            "description": "Not offered — 422 SERVICE_NOT_SUPPORTED.",
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OrderCreate": {
        "description": "A transport order. Unknown fields are rejected (400) — free data belongs in `metadata`.",
        "type": "object",
        "properties": {
          "externalOrderId": {
            "description": "Your own order number. Unique per account: the same number again returns the first order (or 409 if the content differs).",
            "examples": [
              "4500019283"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "customerReference": {
            "description": "A free reference such as your purchase order number.",
            "examples": [
              "PO-98312"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "vehicle": {
            "$ref": "#/components/schemas/Vehicle"
          },
          "pickup": {
            "$ref": "#/components/schemas/Location"
          },
          "delivery": {
            "$ref": "#/components/schemas/Location"
          },
          "transportType": {
            "description": "DRIVEN: a driver drives the vehicle. TRAILER: single transport as cargo. TRUCK: collective transport on a car carrier. Without: LOGICAR chooses.",
            "type": "string",
            "enum": [
              "DRIVEN",
              "TRAILER",
              "TRUCK"
            ]
          },
          "requestedPickup": {
            "description": "Requested pickup time, ISO 8601.",
            "type": "string",
            "format": "date-time"
          },
          "requestedDelivery": {
            "description": "Requested delivery time, ISO 8601.",
            "examples": [
              "2026-10-02T16:00:00+02:00"
            ],
            "type": "string",
            "format": "date-time"
          },
          "services": {
            "$ref": "#/components/schemas/Services"
          },
          "endCustomer": {
            "description": "The recipient gets the tracking link and status mails. No account is created.",
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "required": [
              "email"
            ],
            "additionalProperties": false
          },
          "instructions": {
            "description": "Note for dispatch and driver.",
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "metadata": {
            "description": "Free key/value data of your system (up to 20 entries). Returned unchanged, never interpreted.",
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "required": [
          "pickup",
          "delivery"
        ],
        "additionalProperties": false
      },
      "OrderList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "nextCursor": {
            "description": "Pass as `cursor` for the next page; null on the last page.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "OrderIdParam": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Our id (UUID), the order number or the request number.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "id"
        ]
      },
      "OrderUpdate": {
        "description": "Changeable until pickup. Addresses and transport type are not: cancel and create a new order instead.",
        "type": "object",
        "properties": {
          "customerReference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "pickup": {
            "type": "object",
            "properties": {
              "contact": {
                "$ref": "#/components/schemas/Contact"
              }
            },
            "required": [
              "contact"
            ],
            "additionalProperties": false
          },
          "delivery": {
            "type": "object",
            "properties": {
              "contact": {
                "$ref": "#/components/schemas/Contact"
              }
            },
            "required": [
              "contact"
            ],
            "additionalProperties": false
          },
          "requestedPickup": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedDelivery": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "vehicle": {
            "type": "object",
            "properties": {
              "vin": {
                "description": "Vehicle identification number (ISO 3779), 17 characters.",
                "type": "string"
              },
              "registration": {
                "type": "object",
                "properties": {
                  "licensePlate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                },
                "required": [
                  "licensePlate"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "metadata": {
            "description": "Free key/value data of your system (up to 20 entries). Returned unchanged, never interpreted.",
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "OrderStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ORDER",
              "REQUEST"
            ]
          },
          "orderNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalOrderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "RECEIVED",
              "ACCEPTED",
              "SCHEDULED",
              "PICKUP_STARTED",
              "IN_TRANSIT",
              "AT_DELIVERY",
              "DELIVERED",
              "COMPLETED",
              "CANCELLED",
              "QUOTE_REQUIRED",
              "QUOTE_SENT",
              "QUOTE_ACCEPTED",
              "REJECTED"
            ]
          },
          "readiness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Readiness"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedPickup": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedDelivery": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actualPickup": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actualDelivery": {
            "description": "ISO 8601, UTC.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedDelivery": {
            "description": "Calculated arrival during the trip, otherwise null.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "orderNumber",
          "externalOrderId",
          "status",
          "readiness",
          "requestedPickup",
          "requestedDelivery",
          "actualPickup",
          "actualDelivery",
          "estimatedDelivery",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "OrderTracking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "location": {
            "description": "Only during the trip and only with the driver’s consent, in the interval set for your account.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number"
                  },
                  "lng": {
                    "type": "number"
                  },
                  "recordedAt": {
                    "type": "string"
                  },
                  "stale": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "lat",
                  "lng",
                  "recordedAt",
                  "stale"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "locationUnavailableReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "NOT_IN_TRANSIT",
                  "NO_POSITION",
                  "SANDBOX"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedDelivery": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedPickup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "distanceRemainingKm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "driver": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "trackingUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "location",
          "locationUnavailableReason",
          "estimatedDelivery",
          "estimatedPickup",
          "distanceRemainingKm",
          "driver",
          "trackingUrl"
        ],
        "additionalProperties": false
      },
      "OrderDocuments": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "description": "PICKUP_PROTOCOL, DELIVERY_PROTOCOL, DAMAGE_REPORT, AUTHORIZATION, VEHICLE_DOCUMENT; INVOICE with invoices:read; QUOTE, SIGNED_QUOTE with quotes:read.",
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "size": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sha256": {
                  "description": "SHA-256 of the file — compare after download.",
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string"
                },
                "downloadUrl": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type",
                "fileName",
                "mimeType",
                "size",
                "sha256",
                "createdAt",
                "downloadUrl"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "Quote": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Our id of the quote request — the same id `POST /orders` returns for a request (`kind: REQUEST`).",
            "type": "string"
          },
          "requestNumber": {
            "type": "string"
          },
          "quoteNumber": {
            "description": "Set once LOGICAR has prepared the quote.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalOrderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "REQUESTED",
              "OFFERED",
              "ACCEPTED",
              "ORDERED",
              "DECLINED",
              "EXPIRED",
              "REJECTED"
            ]
          },
          "version": {
            "description": "The version on offer. Accept exactly this version; a renegotiated quote has a higher one.",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "validUntil": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sentAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "description": "null until a quote is on offer.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "net": {
                    "type": "number"
                  },
                  "vat": {
                    "type": "number"
                  },
                  "gross": {
                    "type": "number"
                  }
                },
                "required": [
                  "net",
                  "vat",
                  "gross"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "description": "The positions as on the quote document. Empty until a quote is on offer.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer"
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number"
                },
                "unitPriceNet": {
                  "type": "number"
                },
                "totalNet": {
                  "type": "number"
                },
                "vatRate": {
                  "description": "Percent (19 = 19 %).",
                  "type": "number"
                }
              },
              "required": [
                "position",
                "description",
                "quantity",
                "unitPriceNet",
                "totalNet",
                "vatRate"
              ],
              "additionalProperties": false
            }
          },
          "conditions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "document": {
            "description": "The quote as PDF (`GET /quotes/{id}/document`). Not in the sandbox.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string"
                  },
                  "sha256": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "downloadUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "fileName",
                  "sha256",
                  "downloadUrl"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptance": {
            "type": "object",
            "properties": {
              "viaApi": {
                "description": "Whether your agreement lets your system accept quotes with `POST /quotes/{id}/accept`. Otherwise a person accepts via the link in the quote email.",
                "type": "boolean"
              },
              "acceptedAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "channel": {
                "description": "How the quote was accepted: through the API or via the link.",
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "API",
                      "LINK"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "viaApi",
              "acceptedAt",
              "channel"
            ],
            "additionalProperties": false
          },
          "declinedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "description": "The order that came out of the quote — `GET /orders/{id}` from here on.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "orderNumber": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "orderNumber"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sandbox": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "requestNumber",
          "quoteNumber",
          "externalOrderId",
          "status",
          "version",
          "validUntil",
          "sentAt",
          "currency",
          "amount",
          "items",
          "conditions",
          "document",
          "acceptance",
          "declinedAt",
          "order",
          "sandbox",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "QuoteIdParam": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Our id (UUID), the request number or the quote number.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "id"
        ]
      },
      "WebhookSubscriptionCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "description": "The subscribed event types.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "apiVersion": {
            "description": "The format of the messages. null: an endpoint in the legacy format (created before API v1) — see the changelog.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "secretHint": {
            "description": "The last characters of the secret, to tell secrets apart. Never the secret.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "disabledReason": {
            "description": "Set if LOGICAR switched the endpoint off.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "secret": {
            "description": "The signing secret for X-LogiCar-Signature (64 hex characters). Returned once, on creation only — store it now.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "environment",
          "apiVersion",
          "description",
          "active",
          "secretHint",
          "disabledReason",
          "createdAt",
          "secret"
        ],
        "additionalProperties": false
      },
      "WebhookSubscriptionCreate": {
        "type": "object",
        "properties": {
          "url": {
            "description": "https address on the public internet. Redirects are not followed.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "events": {
            "description": "At least one event type from the catalog.",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "order.created",
                "order.accepted",
                "order.rejected",
                "order.scheduled",
                "order.rescheduled",
                "order.completed",
                "order.cancelled",
                "driver.assigned",
                "pickup.started",
                "pickup.arrived",
                "vehicle.picked_up",
                "transport.started",
                "transport.delayed",
                "delivery.arrived",
                "vehicle.delivered",
                "document.required",
                "document.uploaded",
                "damage.reported",
                "exception.created",
                "invoice.created"
              ]
            }
          },
          "description": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "url",
          "events"
        ],
        "additionalProperties": false
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "description": "The subscribed event types.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "apiVersion": {
            "description": "The format of the messages. null: an endpoint in the legacy format (created before API v1) — see the changelog.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "secretHint": {
            "description": "The last characters of the secret, to tell secrets apart. Never the secret.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "disabledReason": {
            "description": "Set if LOGICAR switched the endpoint off.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "environment",
          "apiVersion",
          "description",
          "active",
          "secretHint",
          "disabledReason",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WebhookTestResult": {
        "type": "object",
        "properties": {
          "delivered": {
            "type": "boolean"
          },
          "statusCode": {
            "description": "The HTTP status your endpoint answered with, null without an answer.",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "deliveryId": {
            "description": "Sent as X-LogiCar-Delivery.",
            "type": "string"
          },
          "durationMs": {
            "type": "number"
          }
        },
        "required": [
          "delivered",
          "statusCode",
          "message",
          "deliveryId",
          "durationMs"
        ],
        "additionalProperties": false
      },
      "SandboxProgress": {
        "type": "object",
        "properties": {
          "order": {
            "description": "The order (or request) as `GET /orders/{id}` shows it now.",
            "$ref": "#/components/schemas/Order"
          },
          "scenario": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "step": {
                "description": "Steps done so far.",
                "type": "integer"
              },
              "steps": {
                "type": "integer"
              },
              "finished": {
                "type": "boolean"
              },
              "last": {
                "description": "Title of the last step, as in the portal.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name",
              "step",
              "steps",
              "finished",
              "last"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "order",
          "scenario"
        ],
        "additionalProperties": false
      },
      "Transportauftrag": {
        "type": "object",
        "required": [
          "pickup",
          "delivery"
        ],
        "properties": {
          "externalOrderId": {
            "type": "string",
            "description": "Ihre eigene Auftragsnummer (bis 200 Zeichen). Je Mandant eindeutig: derselbe Aufruf ein zweites Mal ergibt keinen zweiten Auftrag, sondern die Antwort des ersten. Auch als `external_order_id`.",
            "examples": [
              "SAP-4500019283"
            ]
          },
          "pickup": {
            "type": "string",
            "description": "Abholadresse in einer Zeile: Straße, Hausnummer, Postleitzahl, Ort.",
            "examples": [
              "Musterstraße 12, 20095 Hamburg"
            ]
          },
          "delivery": {
            "type": "string",
            "description": "Zieladresse in einer Zeile.",
            "examples": [
              "Beispielweg 5, 80331 München"
            ]
          },
          "pickupZip": {
            "type": "string",
            "description": "Postleitzahl des Abholorts. Wird angenommen, aber nicht getrennt ausgewertet — die Postleitzahl gehört in `pickup`."
          },
          "deliveryZip": {
            "type": "string",
            "description": "Postleitzahl des Zielorts. Wie `pickupZip`."
          },
          "pickupDate": {
            "type": "string",
            "format": "date-time",
            "description": "Gewünschter Abholzeitpunkt, ISO 8601.",
            "examples": [
              "2026-10-01T08:00:00Z"
            ]
          },
          "expectedDeliveryDate": {
            "type": "string",
            "format": "date-time",
            "description": "Gewünschter Liefertermin, ISO 8601.",
            "examples": [
              "2026-10-01T18:00:00Z"
            ]
          },
          "vehicleType": {
            "type": "string",
            "enum": [
              "CAR",
              "COMBI",
              "SUV",
              "VAN",
              "TRUCK_7_5",
              "TRUCK_12",
              "TRUCK_40"
            ],
            "description": "Fahrzeugklasse. Ohne Angabe gilt CAR.",
            "examples": [
              "CAR"
            ]
          },
          "fuelType": {
            "type": "string",
            "enum": [
              "DIESEL",
              "PETROL",
              "ELECTRIC",
              "HYBRID",
              "HYDROGEN",
              "LPG",
              "LNG"
            ],
            "description": "Antrieb. Ohne Angabe gilt DIESEL.",
            "examples": [
              "DIESEL"
            ]
          },
          "vin": {
            "type": "string",
            "description": "Fahrgestellnummer.",
            "examples": [
              "WVWZZZ1KZAW000001"
            ]
          },
          "vehicleMake": {
            "type": "string",
            "description": "Hersteller.",
            "examples": [
              "Volkswagen"
            ]
          },
          "vehicleModel": {
            "type": "string",
            "description": "Modell.",
            "examples": [
              "Golf"
            ]
          },
          "vehicleYear": {
            "type": "integer",
            "description": "Baujahr (ganze Zahl, auch als Text).",
            "examples": [
              2021
            ]
          },
          "licensePlate": {
            "type": "string",
            "description": "Kennzeichen, falls das Fahrzeug zugelassen ist.",
            "examples": [
              "HH-LC 1234"
            ]
          },
          "pickupContactName": {
            "type": "string",
            "description": "Ansprechpartner am Abholort.",
            "examples": [
              "Autohaus Beispiel, Frau Muster"
            ]
          },
          "pickupContactPhone": {
            "type": "string",
            "description": "Telefon am Abholort.",
            "examples": [
              "+49 40 123456"
            ]
          },
          "deliveryContactName": {
            "type": "string",
            "description": "Ansprechpartner am Zielort.",
            "examples": [
              "Fuhrpark Beispiel, Herr Beispiel"
            ]
          },
          "deliveryContactPhone": {
            "type": "string",
            "description": "Telefon am Zielort.",
            "examples": [
              "+49 89 654321"
            ]
          },
          "notes": {
            "type": "string",
            "description": "Hinweis für Disposition und Fahrer, bis 500 Zeichen.",
            "examples": [
              "Schlüssel liegt beim Empfang."
            ]
          },
          "registrationService": {
            "type": "string",
            "enum": [
              "NONE",
              "FULL_REGISTRATION"
            ],
            "description": "Zulassungsleistung: FULL_REGISTRATION = LOGICAR lässt das Fahrzeug zu."
          },
          "transportMode": {
            "type": "string",
            "enum": [
              "DRIVEN_SINGLE",
              "CARRIER_SINGLE",
              "CARRIER_MULTI",
              "FLEXIBLE"
            ],
            "description": "Transportart: DRIVEN_SINGLE (auf eigener Achse gefahren), CARRIER_SINGLE (Einzeltransport auf fremder Achse), CARRIER_MULTI (Sammeltransport), FLEXIBLE (LOGICAR wählt die wirtschaftlichste Art)."
          },
          "roadMovementMethod": {
            "type": "string",
            "enum": [
              "EXISTING_REGISTRATION",
              "RED_PLATE",
              "SHORT_TERM_PLATE",
              "AUTO_SELECT",
              "NOT_REQUIRED"
            ],
            "description": "Fahrberechtigung: EXISTING_REGISTRATION (vorhandene Zulassung), RED_PLATE (rotes Kennzeichen), SHORT_TERM_PLATE (Kurzzeitkennzeichen), AUTO_SELECT (LOGICAR wählt), NOT_REQUIRED (wird transportiert)."
          },
          "registrationStatus": {
            "type": "string",
            "enum": [
              "REGISTERED",
              "NOT_REGISTERED",
              "DEREGISTERED"
            ],
            "description": "Zulassungsstand: REGISTERED, NOT_REGISTERED oder DEREGISTERED (abgemeldet). Ohne Angabe gilt „unbekannt“, nicht „nein“."
          },
          "distance": {
            "type": "number",
            "description": "Strecke in Kilometern, falls bekannt (auch als Text).",
            "examples": [
              780
            ]
          },
          "endCustomerEmail": {
            "type": "string",
            "format": "email",
            "description": "E-Mail des Endkunden. Er erhält den Link zur Sendungsverfolgung und die Statusmeldungen; ein Konto wird nicht angelegt. Auch als `end_customer_email`.",
            "examples": [
              "empfaenger@example.com"
            ]
          }
        },
        "description": "Unbekannte Felder werden nicht übernommen. Diese Felder bestimmen Sie nicht, sie werden verworfen und in `verworfeneFelder` genannt: basePrice, price, priceNet, priceGross, priceVatRate, manualPrice, priceAdjustmentPercent, discount, status, tenantId, customerId, driverId, executingTenantId, awardType, orderSource, priceSnapshot, payoutNet, payoutGross."
      },
      "Vorgang": {
        "type": "object",
        "required": [
          "art",
          "wiederholung",
          "status",
          "externalOrderId",
          "verworfeneFelder"
        ],
        "properties": {
          "art": {
            "type": "string",
            "enum": [
              "ORDER",
              "REQUEST"
            ],
            "description": "ORDER = Auftrag, REQUEST = Anfrage, die auf ein Angebot wartet."
          },
          "wiederholung": {
            "type": "boolean",
            "description": "true, wenn dieser Aufruf schon einmal gestellt wurde."
          },
          "orderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "requestId": {
            "type": "string"
          },
          "requestNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Auftragsstatus bzw. Stand der Anfrage."
          },
          "externalOrderId": {
            "type": [
              "string",
              "null"
            ]
          },
          "verworfeneFelder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hinweis": {
            "type": "string",
            "description": "Was passiert ist, in einem Satz."
          },
          "sandbox": {
            "type": "boolean",
            "const": true,
            "description": "Nur in der Sandbox."
          },
          "scenario": {
            "type": "string",
            "enum": [
              "STANDARD",
              "DELAY",
              "DAMAGE",
              "CANCELLATION",
              "QUOTE_REQUIRED"
            ],
            "description": "Nur in der Sandbox."
          }
        }
      },
      "Fehler": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Fester Code, zum Auswerten.",
            "examples": [
              "INVALID_INPUT"
            ]
          },
          "message": {
            "type": "string",
            "description": "Satz für Menschen."
          },
          "details": {
            "type": "object",
            "properties": {
              "fehler": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "feld": {
                      "type": "string"
                    },
                    "grund": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "requestId": {
            "type": "string",
            "description": "Kennung der Anfrage — bitte bei Rückfragen angeben."
          }
        }
      },
      "SandboxVorgang": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "art": {
            "type": "string",
            "enum": [
              "ORDER",
              "REQUEST"
            ]
          },
          "orderNumber": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "SBX-2026-00001"
            ]
          },
          "requestNumber": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "SBX-TR-2026-00001"
            ]
          },
          "externalOrderId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "scenario": {
            "type": "string",
            "enum": [
              "STANDARD",
              "DELAY",
              "DAMAGE",
              "CANCELLATION",
              "QUOTE_REQUIRED"
            ]
          },
          "automatisch": {
            "type": "boolean"
          },
          "schritt": {
            "type": "integer",
            "description": "Index des nächsten Schritts."
          },
          "schritteGesamt": {
            "type": "integer"
          },
          "naechsterSchritt": {
            "type": [
              "string",
              "null"
            ]
          },
          "naechsterSchrittAm": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fertig": {
            "type": "boolean"
          },
          "verlauf": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxVerlauf"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SandboxVerlauf": {
        "type": "object",
        "properties": {
          "schritt": {
            "type": "integer"
          },
          "titel": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "ereignisse": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "am": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SandboxSchritt": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Vorgang"
          },
          {
            "type": "object",
            "properties": {
              "verlauf": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SandboxVerlauf"
                }
              },
              "fertig": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "description": "A webhook message (API v1): endpoints with apiVersion.",
        "required": [
          "id",
          "type",
          "apiVersion",
          "createdAt",
          "tenantId",
          "environment",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The event id — the same in every delivery attempt and for every endpoint. Use it to process an event once."
          },
          "type": {
            "type": "string",
            "enum": [
              "order.created",
              "order.accepted",
              "order.rejected",
              "order.scheduled",
              "order.rescheduled",
              "order.completed",
              "order.cancelled",
              "driver.assigned",
              "pickup.started",
              "pickup.arrived",
              "vehicle.picked_up",
              "transport.started",
              "transport.delayed",
              "delivery.arrived",
              "vehicle.delivered",
              "document.required",
              "document.uploaded",
              "damage.reported",
              "exception.created",
              "invoice.created"
            ]
          },
          "apiVersion": {
            "type": "string",
            "description": "The version the message is built by."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened (UTC). Delivery order is not guaranteed — this is the order."
          },
          "tenantId": {
            "type": "string",
            "description": "Your LogiCar account."
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "data": {
            "type": "object",
            "description": "The event data. Ignore unknown fields: new ones are added within v1."
          }
        }
      },
      "WebhookUmschlag": {
        "type": "object",
        "description": "Bisheriges Format — nur Endpunkte ohne apiVersion (vor API v1 angelegt).",
        "required": [
          "id",
          "event",
          "timestamp",
          "environment",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Kennung der Zustellung (wie X-LogiCar-Delivery)."
          },
          "event": {
            "type": "string",
            "enum": [
              "order.created",
              "order.updated",
              "order.status_changed",
              "order.delivered",
              "order.completed",
              "order.cancelled",
              "protocol.pickup.submitted",
              "protocol.delivery.submitted",
              "protocol.submitted"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Zeitpunkt des Ereignisses."
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "data": {
            "type": "object",
            "description": "Die Nutzdaten des Ereignisses. Unbekannte Felder bitte übergehen: es kommen neue hinzu."
          }
        }
      }
    }
  }
}