{
  "openapi": "3.1.0",
  "info": {
    "title": "GSB e-Services federation API",
    "version": "1.1.0",
    "description": "Contract v1 between the national hub and the MDA nodes (backlog FED-02). Every request and answer is signed (detached JWS, ES256 - docs/federation/README.md \"Message signing\"); transport is mTLS. Bodies are canonical JSON validated against the JSON Schemas in schemas/ (unknown fields are refused). Writes need an Idempotency-Key; a repeat with the same key returns the first answer. Versioned under /fed/v1; a sunset is announced with the Deprecation and Sunset headers. Revision 2 (1.1.0, FED-03): catalogue.put answers catalogue-ack.json; catalogue.list takes full, ids and limit; the service manifest gains its signature, the passport detail and tombstones (schemas/service-manifest.json $comment) - additive, hubs first."
  },
  "servers": [
    {
      "url": "https://fed.{instance}.gsb.gov.zm",
      "variables": {
        "instance": {
          "default": "hub",
          "description": "The instance's federation host (ingress with mTLS)."
        }
      }
    }
  ],
  "security": [
    {
      "federationSignature": []
    }
  ],
  "paths": {
    "/fed/v1/ping": {
      "post": {
        "operationId": "ping",
        "summary": "Signed liveness and trust check between two instances",
        "x-gsb-scope": "ping",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "FED-01/FED-02 (wave 1, lane F1)",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/ping-request.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/ping-response.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_IN_PROGRESS: the first request with this key is still running (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/catalogue/services/{serviceId}": {
      "put": {
        "operationId": "catalogue.put",
        "summary": "A node pushes a signed service manifest (publish, unpublish, withdraw)",
        "x-gsb-scope": "catalogue:write",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "FED-03",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "serviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/service-manifest.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature): applied, or unchanged when the hub already mirrors exactly this version.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/catalogue-ack.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION, FED_PATH_MISMATCH (the path's serviceId is not the manifest's), FED_HASH_MISMATCH (contentHash does not match the content)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH, FED_MANIFEST_UNSIGNED / FED_MANIFEST_SIGNATURE (the manifest's own signature is missing, not the sender's or does not verify)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope; FED_NOT_OWNER: the manifest names another owner node, or a ministry the node does not serve, or a service another node owns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_IN_PROGRESS: the first request with this key is still running (Retry-After); FED_STALE_VERSION: the hub mirrors a newer version; FED_VERSION_CONFLICT: the hub mirrors this version with other content; FED_SERVICE_ID_LOCAL: the hub hosts a service with this id itself",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "The node pushes the manifest of a service it owns whenever its catalogue entry changes (publish, edit, unpublish, withdraw). The hub checks the request signature, then the manifest: its owner is the calling node (and, when the registry lists the node's ministries, the manifest's ministry is one of them), its contentHash matches, its own signature (`signature`, typ gsb-manifest+jws) verifies against the node's keys, and its version is not older than the mirrored one. The apply is idempotent on (serviceId, version, contentHash)."
      }
    },
    "/fed/v1/catalogue": {
      "get": {
        "operationId": "catalogue.list",
        "summary": "The hub pulls catalogue changes since a cursor (heals missed pushes)",
        "x-gsb-scope": "catalogue:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-03",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "The cursor of the previous page (pull reconciliation)."
          },
          {
            "name": "full",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "1: include each item's signed manifest (manifestJws)."
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3800
            },
            "description": "Comma-separated service ids (at most 100): just these entries, whatever their change time."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,3}$"
            },
            "description": "Items per page (1-500, default 100; 25 with full=1)."
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/catalogue-page.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "Pull reconciliation (FED-03): the hub reads the node's catalogue ledger - every service the node has offered nationally, with its catalogue version, content hash and state - ordered by change time. With `since` only entries changed after that cursor; with `full=1` each item carries its signed manifest (`manifestJws`, attached compact JWS); with `ids` just those services. The node refreshes its ledger from its live services first, so drift made outside the publishing flow is found too. Answers are signed."
      }
    },
    "/fed/v1/submissions": {
      "post": {
        "operationId": "submissions.create",
        "summary": "The hub relays a citizen application to the owner node",
        "x-gsb-scope": "submissions:write",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "FED-05",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/submission-request.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature): the node made the case - 201 when made now, 200 with `replayed` when this hub submission had already made it (a repeat after a lost answer: one case).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/submission-ack.json"
                }
              }
            }
          },
          "201": {
            "description": "Signed answer: the node made the case (FED-05).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/submission-ack.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope; the citizen assertion refused: FED_ASSURANCE_TOO_LOW, FED_PRINCIPAL_NOT_APPLICANT, FED_PRINCIPAL_INACTIVE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "FED_SERVICE_UNKNOWN: not an active service of this node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_IN_PROGRESS: the first request with this key is still running (Retry-After); DUPLICATE_APPLICATION (EF-49), FED_SERVICE_CLOSED (intake window): the citizen must act",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body; FED_VALIDATION / FED_FORM_CHANGED (the node's live form - `errors` per field; FED_FORM_CHANGED when the form changed since the hub's version), FED_FILE_REFUSED / FED_FILE_CHECKSUM (a file: type, size, antivirus, or not the bytes announced - `errors` with `document:<label>`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "503": {
            "description": "FED_FILE_UNAVAILABLE: the files could not be fetched from the hub's presigned URLs (the hub tries again)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-05 (docs/federation/README.md section 11). The hub relays a citizen's application made on the national portal. Idempotency-Key = the hub submission id; the citizen is the X-GSB-Citizen-Assertion (FED-04, single use). The node re-validates against its live form, pulls the files from the presigned URLs on its own HUB_URL and checks their SHA-256, makes the case for the shadow applicant and answers with its case number. A node never queues."
      }
    },
    "/fed/v1/cases/{caseNumber}/status": {
      "get": {
        "operationId": "cases.status",
        "summary": "Case status only, for the hub helpdesk",
        "x-gsb-scope": "helpdesk:case-status",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-04",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "caseNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "description": "Why the helpdesk looks this case up (10-300 characters, e.g. the call reference). Audited on both sides.",
            "schema": {
              "type": "string",
              "minLength": 10,
              "maxLength": 300
            }
          },
          {
            "name": "operator",
            "in": "query",
            "required": true,
            "description": "The hub helpdesk user's id (pseudonymous to the node).",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/case-status.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION, FED_REASON_REQUIRED (reason or operator missing)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "FED_NOT_FOUND: no case with that number on this node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-04 (built): the hub helpdesk's scoped lookup. The node answers the status only - no form answers, documents or personal data - and requires the helpdesk operator's reason and pseudonymous id (both inside the signed path, htu), which it writes to its own audit (federation.helpdesk.caseStatus) under the same X-GSB-Federation-Id the hub audits (federation.helpdesk.lookup)."
      }
    },
    "/fed/v1/cases/{caseId}/applicant-view": {
      "get": {
        "operationId": "cases.applicantView",
        "summary": "The citizen's live case detail (with a citizen assertion)",
        "x-gsb-scope": "applicant:act",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-06",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/applicant-view.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/cases/{caseId}/actions/{action}": {
      "post": {
        "operationId": "cases.applicantAction",
        "summary": "A citizen action proxied to the node (with a citizen assertion)",
        "x-gsb-scope": "applicant:act",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "FED-06",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/applicant-action.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature); the body is defined by the lane that builds the operation.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_IN_PROGRESS: the first request with this key is still running (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/documents/{documentId}/link": {
      "get": {
        "operationId": "documents.link",
        "summary": "A node-signed short-lived download URL for an issued document",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-08",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/document-link.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "DOCUMENT_NOT_FOUND: no such document, not released to the applicant, or not the asserted citizen's (one answer for all). 401 FED_ASSERTION_* when the citizen assertion is missing or refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-08. Needs X-GSB-Citizen-Assertion; documentId is a case document id or an issued permit id. The url is node-signed and short-lived (FED_DOCUMENT_LINK_TTL_S, 120 s); the hub streams it to the citizen (or redirects) and keeps no copy."
      }
    },
    "/fed/v1/payments/{invoiceNumber}": {
      "get": {
        "operationId": "payments.get",
        "summary": "An invoice as the owner node holds it (read only)",
        "x-gsb-scope": "applicant:act",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-07",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          },
          {
            "name": "invoiceNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/payment-status.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "PAYMENT_NOT_FOUND: no such invoice, or not the asserted citizen's (one answer for both). 401 FED_ASSERTION_* when the citizen assertion is missing or refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-07. Needs X-GSB-Citizen-Assertion: the node answers only for an invoice on a case of the asserted citizen (its own PDP). Read only - no hub component can mark a node invoice paid. checkoutUrl (unpaid, not expired) is a node-signed, short-lived pay link bound to the pairwise subject: opened on the node it redirects to the ZamPay checkout of this node's own merchant."
      }
    },
    "/fed/v1/verify/receipts/{ref}": {
      "get": {
        "operationId": "verify.receipt",
        "summary": "Public receipt verification, routed by the node key in the receipt reference",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-07",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sig",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/receipt-verification.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "RECEIPT_NOT_FOUND: unknown reference, wrong signature, not paid - one answer for all (no oracle)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-07. No citizen assertion: the hub relays a public check of a receipt reference that carries this node's key. The hub applies its per-address limit (RATE_LIMIT_RECEIPT_VERIFY_MAX) before relaying."
      }
    },
    "/fed/v1/verify/documents/{code}": {
      "get": {
        "operationId": "verify.document",
        "summary": "Public permit / licence verification by the verification code, routed by the node key in the code",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-08",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/document-verification.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown or malformed code - one answer (PP-32)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "FED-08. No citizen assertion. Only the verification code (the QR) opens the record (PP-32); the hub applies its per-address limit (VERIFY_CODE_MAX) before relaying."
      }
    },
    "/fed/v1/verify/document-hashes": {
      "get": {
        "operationId": "verify.documentHashes",
        "summary": "Is a file sealed on this node one it issued? By its SHA-256 values only (the hub validated the file)",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "SIGN-22",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "description": "SHA-256 values in hex, comma-separated, at most 12: the whole file and each signed revision.",
            "schema": {
              "type": "string",
              "maxLength": 800
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/document-hash-match.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown or malformed code - one answer (PP-32)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-22 (lane S4 sigverify). The hub validated an uploaded PDF sealed with this node's key against the national trust list and asks, by hashes only, for the issued record: the file never leaves the hub. Unknown hashes: 404 NO_MATCH. The answer never carries holder data."
      }
    },
    "/fed/v1/verify/trust-list": {
      "get": {
        "operationId": "verify.trustList",
        "summary": "The instance's trust list: a node's own seal / TSA / OCSP / CA certificates; the hub's national list",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "SIGN-22",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/trust-list.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown or malformed code - one answer (PP-32)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-19 / SIGN-22 (lane S4 sigverify). Pulled hourly (job verification-maintenance): the hub from every active node, a node from the hub. The receiver keeps only entries that chain to its own configured roots; a root is never taken from a peer."
      }
    },
    "/fed/v1/pay-points/{token}": {
      "get": {
        "operationId": "points.describe",
        "summary": "What a pay-at-point code this node printed sells: label, place, service, charge, amount (ngwee), who is paid - no ids, no personal data (lane paypoint)",
        "x-gsb-scope": "payments:point",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "paypoint",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The code's token, without the node key (22 characters of base64url for the facilities module).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{16,64}$"
            }
          },
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/pay-point.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION, SESSION_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold payments:point (only the hub does, HUB_SCOPES).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "POINT_UNAVAILABLE: unknown, switched off or renewed code, a module that is off, a service the council does not offer - one answer for all.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/pay-points/{token}/orders": {
      "post": {
        "operationId": "points.order",
        "summary": "The ticket invoice for one payer session (the hub's keyed hash of the browser session), priced from the node's approved tariff and raised on the node's merchant; the same invoice again while it is open (lane paypoint)",
        "x-gsb-scope": "payments:point",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "paypoint",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The code's token, without the node key (22 characters of base64url for the facilities module).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{16,64}$"
            }
          },
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/pay-point-session.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The session's open ticket invoice, handed out again (reused: true).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/pay-point-order.json"
                }
              }
            }
          },
          "201": {
            "description": "A new ticket invoice.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/pay-point-order.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION, SESSION_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold payments:point (only the hub does, HUB_SCOPES).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "POINT_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "503": {
            "description": "INVOICE_FAILED: the node's gateway could not raise the invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/pay-points/{token}/ticket": {
      "post": {
        "operationId": "points.ticket",
        "summary": "One payer session's latest ticket at the code: open / paid / expired (the node asks its own gateway through its finaliser first) and, once paid, the receipt number and the receipt check (ref carries the node key) (lane paypoint)",
        "x-gsb-scope": "payments:point",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "paypoint",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The code's token, without the node key (22 characters of base64url for the facilities module).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{16,64}$"
            }
          },
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/pay-point-session.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/pay-point-ticket.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION, SESSION_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold payments:point (only the hub does, HUB_SCOPES).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "POINT_UNAVAILABLE, or NO_TICKET: this session has no ticket at the code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/events": {
      "post": {
        "operationId": "events.post",
        "summary": "A CloudEvent from a node (case.*, payment.*, document.issued, action.required, service.*) or from the hub (session.revoked)",
        "x-gsb-scope": "events:write",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "FED-04 (receiver, session.revoked), FED-06 (case, payment, document and action events: lib/federation/indexHub.js)",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/cloudevent.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature); the body is defined by the lane that builds the operation.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_IN_PROGRESS: the first request with this key is still running (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "The receiver (lib/federation/events.js) checks the envelope and data against the contract, that `source` is the signing peer, and the direction of the type; a type this instance has no handler for answers 501 FED_NOT_IMPLEMENTED (the sender keeps it and retries). FED-04 handles gsb.fed.v1.session.revoked (hub -> node only): the node ends every session it derived from the hub's assertions for that pairwise subject. Answer: { received, id, type, applied }."
      },
      "get": {
        "operationId": "events.list",
        "summary": "The events of one application after a sequence number, from the node's log (the hub's gap repair)",
        "x-gsb-scope": "events:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "FED-06",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "record",
            "in": "query",
            "required": true,
            "description": "The application: its case number on the node.",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Return the events with a higher sequence number (default 0: all).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/event-page.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/jwks.json": {
      "get": {
        "operationId": "wellKnown.jwks",
        "summary": "This instance's federation signing keys (public JWKs, ES256)",
        "security": [],
        "responses": {
          "200": {
            "description": "JWKS",
            "content": {
              "application/jwk-set+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "keys"
                  ],
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kty",
                          "crv",
                          "x",
                          "y",
                          "kid"
                        ],
                        "properties": {
                          "kty": {
                            "const": "EC"
                          },
                          "crv": {
                            "const": "P-256"
                          },
                          "x": {
                            "type": "string"
                          },
                          "y": {
                            "type": "string"
                          },
                          "kid": {
                            "type": "string"
                          },
                          "use": {
                            "const": "sig"
                          },
                          "alg": {
                            "const": "ES256"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/gsb-federation": {
      "get": {
        "operationId": "wellKnown.federation",
        "summary": "Who this instance is: contract version, role, NODE_KEY, where its keys and API are",
        "security": [],
        "responses": {
          "200": {
            "description": "Discovery document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contract",
                    "role",
                    "nodeKey",
                    "jwksUri",
                    "api"
                  ],
                  "properties": {
                    "contract": {
                      "const": "v1"
                    },
                    "role": {
                      "enum": [
                        "combined",
                        "hub",
                        "node"
                      ]
                    },
                    "nodeKey": {
                      "type": "string"
                    },
                    "jwksUri": {
                      "type": "string"
                    },
                    "api": {
                      "type": "string"
                    },
                    "signing": {
                      "type": "object"
                    },
                    "hub": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/geo/sources": {
      "get": {
        "operationId": "geo.sources",
        "summary": "The public map-search sources of this node: registers approved for the public and module sources (LA8, lane landportal; capability geo-search)",
        "x-gsb-scope": "registers:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "landportal",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/geo-search-sources.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown, malformed or not this node's - one answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-22 (lane S4 sigverify). The hub validated an uploaded PDF sealed with this node's key against the national trust list and asks, by hashes only, for the issued record: the file never leaves the hub. Unknown hashes: 404 NO_MATCH. The answer never carries holder data."
      }
    },
    "/fed/v1/geo/sources/{source}/search": {
      "get": {
        "operationId": "geo.search",
        "summary": "Search one public map-search source by number (key, survey record, diagram) or by a place on the map (LA8)",
        "x-gsb-scope": "registers:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "landportal",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "source",
            "in": "path",
            "required": true,
            "description": "The source key of this node (not <key>@<node>: the hub strips its node key).",
            "schema": {
              "type": "string",
              "maxLength": 81
            }
          },
          {
            "name": "by",
            "in": "query",
            "required": false,
            "description": "key (default), survey-record or diagram",
            "schema": {
              "enum": [
                "key",
                "survey-record",
                "diagram"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "The number searched for: letters, digits, spaces and / - . (at most 80)",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "A place on the map: longitude (WGS 84); with lat instead of by/q",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude (WGS 84)",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/geo-search-results.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "SOURCE_NOT_FOUND: no public source of that key here",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-22 (lane S4 sigverify). The hub validated an uploaded PDF sealed with this node's key against the national trust list and asks, by hashes only, for the issued record: the file never leaves the hub. Unknown hashes: 404 NO_MATCH. The answer never carries holder data."
      }
    },
    "/fed/v1/geo/sources/{source}/features": {
      "get": {
        "operationId": "geo.features",
        "summary": "The outlines of one public map-search source in a map view, simplified for the zoom; nothing below minZoom (LA8)",
        "x-gsb-scope": "registers:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "landportal",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "source",
            "in": "path",
            "required": true,
            "description": "The source key of this node (not <key>@<node>: the hub strips its node key).",
            "schema": {
              "type": "string",
              "maxLength": 81
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "description": "minLon,minLat,maxLon,maxLat (WGS 84)",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "zoom",
            "in": "query",
            "required": false,
            "description": "The map zoom, 0-22",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/geo-search-features.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "SOURCE_NOT_FOUND: no public source of that key here",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-22 (lane S4 sigverify). The hub validated an uploaded PDF sealed with this node's key against the national trust list and asks, by hashes only, for the issued record: the file never leaves the hub. Unknown hashes: 404 NO_MATCH. The answer never carries holder data."
      }
    },
    "/fed/v1/verify/lookup/{number}": {
      "get": {
        "operationId": "verify.lookup",
        "summary": "A document of this node's register by its verification code or, for the hub's authenticated partner door, its issued number (the national verification hub, LP-INT-06)",
        "x-gsb-scope": "documents:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "LP-INT-06",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "The verification code (by=code) or the issued number or code (by=number), URL-encoded; at most 80 characters.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "by",
            "in": "query",
            "required": false,
            "description": "code (default) or number. The hub asks by number only for an authenticated partner client (permits:verify).",
            "schema": {
              "enum": [
                "code",
                "number"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/verify-lookup.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown, malformed or not this node's - one answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "SIGN-22 (lane S4 sigverify). The hub validated an uploaded PDF sealed with this node's key against the national trust list and asks, by hashes only, for the issued record: the file never leaves the hub. Unknown hashes: 404 NO_MATCH. The answer never carries holder data."
      }
    },
    "/fed/v1/registers": {
      "get": {
        "operationId": "registers.list",
        "summary": "The registers this instance holds that the asking instance may read: its public registers and those it granted the asker under a data-sharing agreement (NDP-15)",
        "x-gsb-scope": "registers:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "NDP-15",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/register-catalogue-page.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NO_MATCH: unknown, malformed or not this node's - one answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/registers/lookup": {
      "post": {
        "operationId": "registers.lookup",
        "summary": "An officer of the asking instance looks up a register held here: a search (key / label / context) or one record, projected with the home instance's grant for the asking node; both instances audit; nothing is cached (NDP-15)",
        "x-gsb-scope": "registers:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "NDP-15",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/register-lookup-request.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature): `results` for a search, `entry` for a key.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/register-lookup.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "REGISTER_FORBIDDEN: this instance has not granted the register to the asking node.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: no such register here, or no record with the key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN), or more than VERIFY_FED_LOOKUP_PER_MIN look-ups from this peer in a minute (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/citizen/accounts": {
      "get": {
        "operationId": "accounts.list",
        "summary": "The billing accounts the asserted citizen holds or pays on this node (read only)",
        "x-gsb-scope": "applicant:act",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "WP2",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/citizen-accounts.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "Not offered by this node (the hub reads it as \"no accounts\"). 401 FED_ASSERTION_* when the citizen assertion is missing or refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "WP2, contract citizen-accounts.v1. Needs X-GSB-Citizen-Assertion: the node lists only the accounts the asserted citizen holds or pays (a linked account, or a party identifier equal to an NRC the hub vouches for as verified - its own PDP). Numbers, status words, amounts (ngwee) and labels only. The hub caches the answer for at most 60 seconds and never stores it."
      }
    },
    "/fed/v1/citizen/accounts/{source}/{ref}/orders": {
      "post": {
        "operationId": "accounts.order",
        "summary": "An order on one of the asserted citizen's accounts: priced and invoiced by the node on its own merchant",
        "x-gsb-scope": "applicant:act",
        "x-gsb-idempotent-write": true,
        "x-gsb-built-by": "WP2",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/CitizenAssertion"
          },
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 41
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/citizen-account-order-request.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/citizen-account-order.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope; the citizen assertion refused: FED_ASSURANCE_TOO_LOW, FED_PRINCIPAL_NOT_APPLICANT, FED_PRINCIPAL_INACTIVE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "ACCOUNT_NOT_FOUND: no such account, or not the asserted citizen's (one answer for both).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "409": {
            "description": "PRICE_MISMATCH (with the node's total), NOTHING_DUE, MODULE_DISABLED, NO_PAYMENT_SERVICE, FED_IDEMPOTENCY_IN_PROGRESS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: the key was used with another body; FED_VALIDATION / FED_FORM_CHANGED (the node's live form - `errors` per field; FED_FORM_CHANGED when the form changed since the hub's version), FED_FILE_REFUSED / FED_FILE_CHECKSUM (a file: type, size, antivirus, or not the bytes announced - `errors` with `document:<label>`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "503": {
            "description": "FED_FILE_UNAVAILABLE: the files could not be fetched from the hub's presigned URLs (the hub tries again)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        },
        "description": "WP2, contract citizen-accounts.v1. Needs X-GSB-Citizen-Assertion and an Idempotency-Key (a repeat answers the first invoice). The node prices the order from its own ledger, raises the invoice on its own ZamPay merchant and returns a node-signed pay link; ZamPay's callback lands on the node, which allocates the money (oldest bill first)."
      }
    },
    "/fed/v1/status/summary": {
      "get": {
        "operationId": "status.summary",
        "summary": "How the node is doing, for the hub's Ministries overview: aggregate counts (active services, applications received today, outstanding incidents) and readiness only - never a name or a case (lane hubhome)",
        "x-gsb-scope": "status:read",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "hubhome",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature).",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/status-summary.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type - `errors` lists the fields), FED_IDEMPOTENCY_KEY_REQUIRED, FED_HEADER_MISMATCH, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE: the calling peer does not hold this operation's scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    },
    "/fed/v1/staff/sso/redeem": {
      "post": {
        "operationId": "staff.sso.redeem",
        "summary": "A node redeems the single-use sign-on code a member of staff brought from the hub, for a signed staff assertion (lane staffsso; README section 20). The hub answers only the node the code was made for, once, within its life",
        "x-gsb-scope": "sso:redeem",
        "x-gsb-idempotent-write": false,
        "x-gsb-built-by": "staffsso",
        "security": [
          {
            "federationSignature": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FederationId"
          },
          {
            "$ref": "#/components/parameters/TraceParent"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schemas/staff-sso-redeem-request.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed answer (X-GSB-Fed-Signature) carrying the staff assertion (typ gsb-staff+jwt) for the asking node.",
            "headers": {
              "X-GSB-Fed-Signature": {
                "$ref": "#/components/headers/ResponseSignature"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/staff-sso-assertion.json"
                }
              }
            }
          },
          "400": {
            "description": "FED_INVALID (unknown field, wrong type), SSO_CODE_USED (already redeemed, by any node), SSO_CODE_EXPIRED, SSO_CODE_UNKNOWN, FED_VERSION",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "401": {
            "description": "FED_UNSIGNED, FED_MALFORMED, FED_UNKNOWN_ISSUER, FED_UNKNOWN_KEY, FED_BAD_SIGNATURE, FED_WRONG_AUDIENCE, FED_EXPIRED, FED_NOT_YET_VALID, FED_WRONG_TARGET, FED_REPLAY, FED_MTLS_REQUIRED, FED_MTLS_MISMATCH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "403": {
            "description": "FED_SCOPE (the node's registry entry does not hold sso:redeem), SSO_CODE_WRONG_NODE (the code was made for another node; it is spent all the same), SSO_ACCOUNT_UNAVAILABLE (the hub account is no longer active staff, or was signed out everywhere since)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "404": {
            "description": "STAFF_SSO_OFF: staff sign-on is not switched on at the hub (STAFF_SSO); FED_UNKNOWN_ROUTE from an older hub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from this address (FED_RATE_LIMIT_PER_MIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          },
          "501": {
            "description": "FED_NOT_IMPLEMENTED: part of contract v1, not offered by this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schemas/error.json"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "federationSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-GSB-Fed-Signature",
        "description": "Detached compact JWS (RFC 7515 appendix F), ES256, over base64url(protected header) \".\" base64url(canonical JSON body). Protected header: alg, kid, typ \"gsb-fed+jws\", v 1, iss, aud, iat, jti, htm, htu, idk (writes), fid. Keys: the sender's /.well-known/jwks.json or keys pinned in the hub registry. Transport: mTLS with a certificate from the federation CA."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Required on writes, and inside the signature (`idk`). A repeat with the same key returns the first answer (`replayed: true`, Idempotent-Replayed: true).",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._:-]{8,80}$"
        }
      },
      "FederationId": {
        "name": "X-GSB-Federation-Id",
        "in": "header",
        "required": false,
        "description": "Correlation id of the journey, written to both instances' audit trails; inside the signature (`fid`).",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._:-]{8,100}$"
        }
      },
      "TraceParent": {
        "name": "traceparent",
        "in": "header",
        "required": false,
        "description": "W3C trace context, carried end to end.",
        "schema": {
          "type": "string",
          "maxLength": 55
        }
      },
      "CitizenAssertion": {
        "name": "X-GSB-Citizen-Assertion",
        "in": "header",
        "required": false,
        "description": "FED-04: the hub's short-lived (120 s) ES256 citizen assertion (token-exchange profile, pairwise subject, aud = the node). The node decides with its own PDP.",
        "schema": {
          "type": "string",
          "maxLength": 8192
        }
      }
    },
    "headers": {
      "ResponseSignature": {
        "description": "Detached JWS over the answer (typ \"gsb-fed-response+jws\", rid = the request's jti, sts = the HTTP status).",
        "schema": {
          "type": "string"
        }
      },
      "IdempotentReplayed": {
        "description": "\"true\" when this is the stored answer to an earlier request with the same Idempotency-Key.",
        "schema": {
          "type": "string"
        }
      }
    }
  }
}