{
  "openapi": "3.1.0",
  "info": {
    "title": "CLC Core API",
    "version": "2.0",
    "description": "HTTP API of the CLC Core service for accounts, vouchers, pools, catalogs and gasless transactions.",
    "license": {
      "name": "AGPL-3.0",
      "identifier": "AGPL-3.0-only"
    }
  },
  "servers": [
    {
      "url": "https://example.com",
      "description": "Your deployment"
    }
  ],
  "tags": [
    {
      "name": "Auth endpoints",
      "description": "Sign-in with Ethereum, passkeys, sessions and the profile of the caller."
    },
    {
      "name": "Relayer",
      "description": "Gasless batches that a user signs and the relayer sends."
    },
    {
      "name": "Contracts, tracking and system",
      "description": "Deploy and upgrade contracts, track jobs and read system data."
    },
    {
      "name": "Vouchers and offerings",
      "description": "Public market reads and the write routes for vouchers, reviews and offerings."
    },
    {
      "name": "Pools",
      "description": "Pool reads and pool profile writes."
    },
    {
      "name": "Curated catalogs",
      "description": "Catalogs that a user makes from pools and vouchers."
    },
    {
      "name": "Posts",
      "description": "Field reports and their moderation."
    },
    {
      "name": "Lookups and shared vocabulary",
      "description": "Tags, units, name checks and recipient lookups."
    },
    {
      "name": "Account data",
      "description": "Token balances, transfers and activity of an account."
    },
    {
      "name": "Pretium",
      "description": "Cash-in and cash-out routes that proxy the Pretium Ramp service."
    },
    {
      "name": "Current user",
      "description": "Data that belongs to the signed-in user."
    },
    {
      "name": "Admin",
      "description": "Administrative routes for users, catalogs, moderation and statistics. Role mutation requires SUPERADMIN."
    }
  ],
  "paths": {
    "/auth/nonce": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Get a sign-in nonce",
        "description": "Creates a one-time nonce for a SIWE message. The route reads no request body. Access: Public.",
        "operationId": "postAuthNonce",
        "responses": {
          "200": {
            "description": "Nonce generated for SIWE challenge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "nonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Nonce generated for SIWE challenge",
                  "result": {
                    "nonce": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/auth/signup": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Register a user and sign in",
        "description": "Creates a user with the status 'APPROVED' and the role 'USER'. The response sets the session cookie. The caller does not need to call 'POST /auth/signin' after sign-up. Access: Public.",
        "operationId": "postAuthSignup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "SIWE message."
                  },
                  "signature": {
                    "type": "string",
                    "description": "SIWE signature."
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be a valid email. The server stores it in lower case."
                  }
                },
                "required": [
                  "message",
                  "signature",
                  "name",
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registration successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "integer"
                        },
                        "status": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Registration successful",
                  "result": {
                    "userId": 123,
                    "status": "APPROVED",
                    "role": "USER"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. E04: The signature is not valid, the signer does not match line 2, or the nonce is not valid or is expired."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The address is already linked to a user. Use POST /auth/signin instead. E17: The email is already linked to another user. The address is not registered. E16 or E17: Another request registered the same address or email at the same time. The code follows the constraint that failed."
          }
        },
        "security": []
      }
    },
    "/auth/signin": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Sign in, registering a new address",
        "description": "Signs in a user and registers the user if the address is new. A new address creates a user with the status APPROVED, the role USER, the name Sign-in card and a placeholder email of the form pending+<address without 0x>@clc.local. The caller can set real values with POST /auth/profile. The response sets the session cookie. Access: Public.",
        "operationId": "postAuthSignin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "SIWE message."
                  },
                  "signature": {
                    "type": "string",
                    "description": "SIWE signature."
                  }
                },
                "required": [
                  "message",
                  "signature"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed in successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Signed in successfully",
                  "result": {
                    "userId": 123,
                    "role": "USER"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field is missing, the signature is not valid, the signer does not match line 2, or the nonce is not valid or is expired."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The user status is PENDING or REJECTED."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E17: The placeholder email of the new address is linked to another user. The address is not registered."
          },
          "410": {
            "$ref": "#/components/responses/Gone",
            "description": "E20: The address is a replaced sign-in card. The service does not register it again."
          }
        },
        "security": []
      }
    },
    "/auth/key-rotation": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Replace a compromised sign-in card",
        "description": "Moves the account from the old sign-in card to a new one. Both proofs sign a SIWE message whose statement is exactly \"Replace sign-in card <old address> with <new address>\", with checksummed addresses, its own nonce and the service chain id. If the old address has an active passkey, the old proof must be a passkey assertion. The account keeps its user id; posts, offerings, reviews, flags and retirement requests follow the address; passkeys move as 'moved'; the old address can never sign in or register again; the new address is queued for the AccountIndex. Catalog ownership changes only when the chain does. The response sets the session cookie for the new address, and a session for the old address stops working. A retry of a committed rotation with fresh proofs returns 'replayed: true'. Access: Public. The route checks proofs, not the session cookie.",
        "operationId": "postAuthKeyRotation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "old": {
                    "type": "object",
                    "description": "Exactly one of siwe or webauthn.",
                    "properties": {
                      "siwe": {
                        "$ref": "#/components/schemas/KeyRotationSIWEProof"
                      },
                      "nonce": {
                        "type": "string",
                        "description": "With webauthn. A fresh nonce from POST /auth/nonce, spent when the assertion verifies."
                      },
                      "webauthn": {
                        "type": "object",
                        "description": "A WebAuthn assertion by an active passkey of the old address, in the body shape of POST /auth/webauthn/verify. Its challenge is base64url (unpadded) of sha256(statement + \"\\n\" + nonce); a sign-in challenge is refused.",
                        "properties": {
                          "credentialId": {
                            "type": "string"
                          },
                          "authenticatorData": {
                            "type": "string"
                          },
                          "clientDataJSON": {
                            "type": "string"
                          },
                          "signature": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "new": {
                    "$ref": "#/components/schemas/KeyRotationSIWEProof"
                  }
                },
                "required": [
                  "old",
                  "new"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sign-in card replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyRotationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: The body is not valid, a proof is missing, both old proofs are set, or a proof does not match the statement, signer, chain or nonce."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The account is not APPROVED, or the old address has an active passkey and the request sent old.siwe (result.passkeyRequired is true)."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No account holds the old or the new address."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The account no longer holds the old address, the new address already has an account, or a deployment of the account is in flight."
          },
          "410": {
            "$ref": "#/components/responses/Gone",
            "description": "E20: The old address was already replaced with a different address."
          }
        },
        "security": []
      }
    },
    "/auth/logout": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Clear the session cookie",
        "description": "Clears the session cookie. The route does not read a body. The route succeeds when the caller has no session. The server keeps no token blocklist. A copy of the token stays valid until it expires. Access: Public.",
        "operationId": "postAuthLogout",
        "responses": {
          "200": {
            "description": "Signed out successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {}
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Signed out successfully",
                  "result": {}
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/auth/webauthn/verify": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Sign in with a passkey",
        "description": "Signs in with a passkey. The request does not need a SIWE message. The assertion is the proof. The response sets the session cookie. Access: Public.",
        "operationId": "postAuthWebauthnVerify",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "credentialId": {
                    "type": "string",
                    "description": "The credential ID that the wallet registered."
                  },
                  "authenticatorData": {
                    "type": "string",
                    "description": "Base64url. Padded and unpadded forms work. At least 37 bytes after decoding."
                  },
                  "clientDataJSON": {
                    "type": "string",
                    "description": "Base64url. The type must be 'webauthn.get'. The origin must be on the allowed origin list."
                  },
                  "signature": {
                    "type": "string",
                    "description": "Base64url, DER-encoded ECDSA P-256 signature."
                  }
                },
                "required": [
                  "credentialId",
                  "authenticatorData",
                  "clientDataJSON",
                  "signature"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed in successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "keyHash": {
                          "type": "string"
                        },
                        "publicKeyX": {
                          "type": "string"
                        },
                        "publicKeyY": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Signed in successfully",
                  "result": {
                    "userId": 123,
                    "role": "USER",
                    "address": "0x1111111111111111111111111111111111111111",
                    "keyHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
                    "publicKeyX": "1",
                    "publicKeyY": "2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: The body is not valid JSON, or a field is missing."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E15: The assertion is not valid. The challenge can be unknown, expired or used. The origin can be wrong. The signature can be wrong."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The user status is PENDING or REJECTED."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No active credential has this credentialId. E03: The credential address has no user."
          }
        },
        "security": []
      }
    },
    "/auth/session": {
      "get": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Return the session of the caller",
        "description": "Returns the current database-backed session of the caller. When the stored role differs from the cookie claim, the response refreshes the cookie. This response does not use the standard envelope. Access: Public. The route reads the '__clc_auth' cookie. It ignores the 'Authorization' header.",
        "operationId": "getAuthSession",
        "responses": {
          "200": {
            "description": "The caller has a valid session. This response does not use the standard envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string",
                      "description": "Account address in EIP-55 checksum form."
                    },
                    "chainId": {
                      "type": "integer"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "USER",
                        "ADMIN",
                        "SUPERADMIN"
                      ]
                    }
                  },
                  "required": [
                    "address",
                    "chainId",
                    "role"
                  ]
                },
                "example": {
                  "address": "0x1111111111111111111111111111111111111111",
                  "chainId": 42220,
                  "role": "USER"
                }
              }
            }
          },
          "204": {
            "description": "The cookie is missing or is not valid. The response has no body."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/auth/webauthn/credentials": {
      "get": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "List the passkeys of the session account",
        "description": "Lists the passkeys that are mapped to the account of the session. The server reads only stored data. It does not read the chain. The order is newest first. Access: User session. The route reads the '__clc_auth' cookie. A service token does not work.",
        "operationId": "getAuthWebauthnCredentials",
        "responses": {
          "200": {
            "description": "WebAuthn credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "credentials": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "credentialId": {
                                "type": "string",
                                "description": "The credential ID."
                              },
                              "state": {
                                "type": "string",
                                "description": "'pending', 'active', 'failed', 'legacy', 'unverified' or 'moved'. A moved credential came with the account in a key rotation and signs in once the new wallet registers it."
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "RFC 3339 time."
                              },
                              "trackingId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Set only while 'state' is 'pending'. Use it with 'GET /api/v2/relayer/track/:trackingId'."
                              },
                              "publicKeyX": {
                                "type": "string",
                                "description": "P-256 public key X as a decimal string. Needed to register a moved passkey on the new wallet."
                              },
                              "publicKeyY": {
                                "type": "string",
                                "description": "P-256 public key Y as a decimal string."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "WebAuthn credentials",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "credentials": [
                      {
                        "credentialId": "abc",
                        "state": "pending",
                        "createdAt": "2026-01-01T00:00:00Z",
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The cookie is missing, or is not valid, or has no valid address."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/auth/siwe/nonce": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Get a sign-in nonce",
        "description": "Creates a one-time nonce for a SIWE message. The route reads no request body. It does the same as POST /auth/nonce. Access: Public.",
        "operationId": "postAuthSiweNonce",
        "responses": {
          "200": {
            "description": "Nonce generated for SIWE challenge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "nonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Nonce generated for SIWE challenge",
                  "result": {
                    "nonce": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/auth/siwe/verify": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Sign in, or register and sign in",
        "description": "Signs in a user and registers the user if the address is new. Use this route for wallet SDKs. The request has the same fields as POST /auth/signin. A new address creates a user with the status APPROVED, the role USER and an empty name. The caller can set real values with POST /auth/profile. This route is the only sign-in route that returns the token in the body. The response also sets the session cookie. Access: Public.",
        "operationId": "postAuthSiweVerify",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "SIWE message."
                  },
                  "signature": {
                    "type": "string",
                    "description": "SIWE signature."
                  }
                },
                "required": [
                  "message",
                  "signature"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authenticated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Authenticated successfully",
                  "result": {
                    "token": "<token>",
                    "address": "0x1111111111111111111111111111111111111111",
                    "expiresAt": "2026-02-01T00:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field is missing. E04: The nonce is not valid or is expired."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E04: The signature is not valid, or the signer does not match line 2."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The user status is PENDING or REJECTED."
          }
        },
        "security": []
      }
    },
    "/auth/profile": {
      "get": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Get the profile of the caller",
        "description": "Returns the profile of the signed-in user. The address comes from the session. Access: User session. A service token returns '403' with 'E10'. A caller without a valid credential gets '401' with 'E06'.",
        "operationId": "getAuthProfile",
        "responses": {
          "200": {
            "description": "User profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "preferredCurrency": {
                          "type": "string"
                        },
                        "bio": {
                          "type": "string"
                        },
                        "website": {
                          "type": "string"
                        },
                        "locationName": {
                          "type": "string"
                        },
                        "geoLat": {
                          "type": "number"
                        },
                        "geoLng": {
                          "type": "number"
                        },
                        "avatarUrl": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "User profile",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "name": "Alice",
                    "username": "alice",
                    "email": "user@example.com",
                    "phone": "+254700000000",
                    "country": "KE",
                    "preferredCurrency": "USD",
                    "bio": "Farmer",
                    "website": "https://example.com",
                    "locationName": "Nairobi, Kenya",
                    "geoLat": -1.286389,
                    "geoLng": 36.817223,
                    "avatarUrl": "https://example.com/avatar.webp",
                    "createdAt": "2026-01-01T00:00:00Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: the user does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Save the profile of the caller",
        "description": "Saves the profile and returns the saved values. The response has the same fields as GET /auth/profile except createdAt. Access: User session. A service token returns '403' with 'E10'. A caller without a valid credential gets '401' with 'E06'.",
        "operationId": "postAuthProfile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Maximum 80 characters. Omitted sets an empty name."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be a valid email. Omitted or empty clears the email."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Omitted or empty clears the phone."
                  },
                  "country": {
                    "type": "string",
                    "description": "Exactly 2 characters if sent. Omitted sets an empty value."
                  },
                  "username": {
                    "type": "string",
                    "description": "1 to 80 characters after trimming. The server applies Unicode NFC. Omitted keeps the current value."
                  },
                  "preferredCurrency": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Maximum 32 characters. Omitted keeps the value."
                  },
                  "bio": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Maximum 500 characters. Omitted keeps the value. An empty string clears it."
                  },
                  "website": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL, or an empty string. Omitted keeps the value. An empty string clears it."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Maximum 200 characters. Must not be blank. Omitted keeps the value."
                  },
                  "geoLat": {
                    "type": "number",
                    "description": "-90 to 90. Send with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "description": "-180 to 180. Send with 'geoLat'."
                  },
                  "clearLocation": {
                    "type": "boolean",
                    "description": "If 'true', the server clears 'locationName', 'geoLat' and 'geoLng'."
                  },
                  "avatarUrl": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL. Omitted keeps the value."
                  },
                  "clearAvatar": {
                    "type": "boolean",
                    "description": "If 'true', the server clears 'avatarUrl'."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The profile was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "preferredCurrency": {
                          "type": "string"
                        },
                        "bio": {
                          "type": "string"
                        },
                        "website": {
                          "type": "string"
                        },
                        "locationName": {
                          "type": "string"
                        },
                        "geoLat": {
                          "type": "number"
                        },
                        "geoLng": {
                          "type": "number"
                        },
                        "avatarUrl": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails a rule above. The description names the problem."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The user does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E17: The email is linked to another user. E18: The phone is linked to another user. E16: The username is already in use."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/auth/storage-token": {
      "post": {
        "tags": [
          "Auth endpoints"
        ],
        "summary": "Get the session token for the image service",
        "description": "Returns the session token of the caller so that the caller can send it to the image storage service. The storage service reads only an 'Authorization' header. A browser script cannot read the 'HttpOnly' cookie. The route does not read a body. The route returns the same token that authenticated the request. It does not make a new token. Two calls with the same session return the same 'token' and 'expiresAt'. The response has the header 'Cache-Control: no-store'. Access: User session. A service token returns '403' with 'E10'.",
        "operationId": "postAuthStorageToken",
        "responses": {
          "200": {
            "description": "Storage token issued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Storage token issued",
                  "result": {
                    "token": "<token>",
                    "expiresAt": "2026-02-01T00:00:00Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The caller has no valid credential. E06: The credential is not a user token that the route can read. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token. E10:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return active vouchers that have complete coordinates",
        "description": "Returns active vouchers that have complete coordinates. The route supports a map viewport, search, tag filters and an owner filter. Access: Public. A user session is needed when 'nearby=true'.",
        "operationId": "getVouchers",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once with the two halves of an antimeridian-crossing viewport. At most two boxes. Coordinates must be finite, longitude must be within -180 to 180, latitude within -90 to 90, and each minimum must not exceed its maximum. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A hex address. The server compares it with the voucher owner and ignores case. An invalid address returns '400' 'E04'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The server trims the value and collapses inner spaces. The length must be 2 to 64 characters. An empty value means no search. A value of 2 characters matches a prefix. A longer value matches a substring. The match is case-insensitive. The characters '%', '_' and '\\' match themselves."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag values. Repeat the parameter or use commas. At most 12 distinct values. The server trims, deduplicates and sorts the values. Tag values are case-sensitive."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'. Other values return '400' 'E04'."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Value for Go 'ParseBool', for example 'true' or 'false'. The server computes tag facets on the first page only."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Narrow to resources related to the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with pools."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool references in the form 'chainId:address'. Repeat the parameter or use commas. At most 100 distinct references. The chain ID must be a positive integer. A voucher matches when at least one selected pool allows it."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "'true' or 'false'. Other values return '400' 'E04'."
          }
        ],
        "responses": {
          "200": {
            "description": "Market vouchers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "chainId": {
                                    "type": "integer"
                                  },
                                  "address": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The display name, or the contract name when no display name is set."
                                  },
                                  "symbol": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "iconUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "locationName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "geoLat": {
                                    "type": "number",
                                    "description": "Never 'null' on this route."
                                  },
                                  "geoLng": {
                                    "type": "number",
                                    "description": "Never 'null' on this route."
                                  },
                                  "kind": {
                                    "type": "string",
                                    "description": "Always 'voucher'."
                                  },
                                  "markerIcon": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The marker the owner chose. 'null' means automatic."
                                  },
                                  "markerColor": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The marker the owner chose. 'null' means automatic."
                                  }
                                }
                              },
                              "description": "Voucher summaries. Empty array when none."
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Market vouchers",
                  "result": {
                    "vouchers": [
                      {
                        "id": 7,
                        "chainId": 42220,
                        "address": "0x0000000000000000000000000000000000000001",
                        "name": "Example Voucher",
                        "symbol": "EXV",
                        "iconUrl": null,
                        "locationName": "Nairobi",
                        "geoLat": -1.286389,
                        "geoLng": 36.817223,
                        "kind": "voucher",
                        "markerIcon": null,
                        "markerColor": null
                      }
                    ],
                    "first": 7,
                    "last": 7
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: perPage, next or cursor is not valid. E04: bbox, owner, a search parameter or a pools reference is not valid. E04: nearby=true and the caller has no saved location."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: nearby=true and the request has no valid session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: nearby=true and the caller uses a service token."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return the detail of one active voucher",
        "description": "Returns the detail of one active voucher. Access: Public.",
        "operationId": "getVouchersByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address. The lookup ignores case."
          }
        ],
        "responses": {
          "200": {
            "description": "Market voucher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Market voucher",
                  "result": {
                    "voucher": {
                      "id": 7,
                      "chainId": 42220,
                      "address": "0x0000000000000000000000000000000000000001",
                      "name": "Example Voucher",
                      "contractName": "Example Voucher",
                      "symbol": "EXV",
                      "decimals": 6,
                      "ownerAddress": "0x1111111111111111111111111111111111111111",
                      "description": "A community voucher",
                      "voucherUoa": "KES",
                      "voucherValue": "10",
                      "locationName": "Nairobi",
                      "geoLat": -1.286389,
                      "geoLng": 36.817223,
                      "email": "owner@example.com",
                      "website": "https://example.com",
                      "phone": null,
                      "terms": null,
                      "iconUrl": null,
                      "bannerUrl": null,
                      "tags": [
                        "Food"
                      ],
                      "kind": "voucher",
                      "markerIcon": null,
                      "markerColor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: The voucher does not exist or is retired. The two cases give the same response."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      },
      "delete": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Retire a voucher",
        "description": "Retires a voucher. The server sets the voucher to inactive. The voucher then disappears from the public reads. The server keeps the voucher row, its offerings and its reports. The route takes no body. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "deleteVouchersByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "responses": {
          "200": {
            "description": "The voucher is retired.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Voucher retired",
                  "result": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The voucher does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher is already retired. The server checks this before the owner check."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/offerings": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return the available offerings of one active voucher",
        "description": "Returns the available offerings of one active voucher. The order is descending 'id'. Access: Public.",
        "operationId": "getVouchersByAddressOfferings",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address. The lookup ignores case."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Maximum is '100'. '0' or a larger value becomes '100'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          }
        ],
        "responses": {
          "200": {
            "description": "Offerings for the voucher.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "offerings": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Offering"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address. E02: perPage, next or cursor is not valid."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Create an offering for a voucher",
        "description": "Creates an offering for a voucher. The server sets the seller. The seller is the voucher owner. When the voucher has no owner, only an administrator can create the offering, and the seller is that administrator. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "postVouchersByAddressOfferings",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "commodityName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The server trims it. At most 120 characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The server trims it. At most 2000 characters."
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The server trims it. At most 32 characters. A value that is not in the unit list becomes a new custom unit."
                  },
                  "price": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Plain decimal text, for example '5' or '12.50'. No sign, no exponent and no separator. The value must be above zero. At most 64 characters."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "An 'http' or 'https' URL. An empty string or 'null' means no image."
                  }
                },
                "required": [
                  "commodityName",
                  "description",
                  "unit",
                  "price"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The offering was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "offering": {
                          "$ref": "#/components/schemas/Offering"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not valid, or a body field is outside the rules."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The voucher does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher is retired."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The caller reached the offer limit of the account. The result has resource, used and limit. An administrator has no limit."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/offerings/{id}": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return one available offering of an active voucher",
        "description": "Returns one available offering of an active voucher. Access: Public.",
        "operationId": "getVouchersByAddressOfferingsById",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive integer."
          }
        ],
        "responses": {
          "200": {
            "description": "One offering.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "offering": {
                          "$ref": "#/components/schemas/Offering"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a hex address, or id is not a positive integer."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The offering does not exist, is unlisted, belongs to another voucher, or its voucher is retired."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      },
      "put": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Replace the product fields of an offering",
        "description": "Replaces the product fields of an offering. The body is the same as for 'POST /api/v2/vouchers/:address/offerings'. Every field is written. A request without 'imageUrl' removes the image. There is no partial update. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "putVouchersByAddressOfferingsById",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "commodityName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The server trims it. At most 120 characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The server trims it. At most 2000 characters."
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The server trims it. At most 32 characters. A value that is not in the unit list becomes a new custom unit."
                  },
                  "price": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Plain decimal text, for example '5' or '12.50'. No sign, no exponent and no separator. The value must be above zero. At most 64 characters."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "An 'http' or 'https' URL. An empty string or 'null' means no image."
                  }
                },
                "required": [
                  "commodityName",
                  "description",
                  "unit",
                  "price"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The offering was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "offering": {
                          "$ref": "#/components/schemas/Offering"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address or id is not valid, or a body field is outside the rules."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The offering does not exist, belongs to another voucher, or is unlisted."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher is retired."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Unlist an offering",
        "description": "Unlists an offering. The server keeps the row and sets 'available' to 'false'. The public routes no longer return it. The server does not delete the stored image. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "deleteVouchersByAddressOfferingsById",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "responses": {
          "200": {
            "description": "The offering is unlisted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Offering deleted",
                  "result": {
                    "id": 42
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/reviews": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return the visible reviews of a voucher, newest first",
        "description": "Returns the visible reviews of a voucher, newest first. Each page has at most 20 reviews. Access: Public.",
        "operationId": "getVouchersByAddressReviews",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "stars",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "description": "From 1 to 5. The filter applies to the list only. 'counts', 'total' and 'average' cover all visible reviews."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A review 'id'. Returns reviews with a lower 'id'. Use the 'next' value of the previous response."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reviews": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Review"
                          },
                          "description": "Review objects."
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "1": {
                              "type": "integer"
                            },
                            "2": {
                              "type": "integer"
                            },
                            "3": {
                              "type": "integer"
                            },
                            "4": {
                              "type": "integer"
                            },
                            "5": {
                              "type": "integer"
                            }
                          },
                          "description": "The number of reviews for each star value. The keys are '\"1\"' to '\"5\"'."
                        },
                        "total": {
                          "type": "integer"
                        },
                        "average": {
                          "type": "number",
                          "description": "'0' when there are no reviews."
                        },
                        "next": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "The 'before' value for the next page."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "reviews": [
                      {
                        "id": 12,
                        "stars": 5,
                        "comment": "Good service",
                        "reply": null
                      }
                    ],
                    "counts": {
                      "1": 0,
                      "2": 0,
                      "3": 0,
                      "4": 0,
                      "5": 1
                    },
                    "total": 1,
                    "average": 5,
                    "next": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address. stars is not an integer from 1 to 5, or before is not a valid number."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The voucher does not exist."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      }
    },
    "/api/v2/offerings": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Return available offerings of active vouchers",
        "description": "Returns available offerings of active vouchers. An offering must have a location. The location is the offering location, or the voucher location when the offering has none. The order is newest first, nearest first within 1000 km with 'nearby=true', or nearest first without a radius with 'sort=nearest'. For 'sort=nearest', an authenticated profile location is preferred; otherwise the center of 'bbox' is used. Access: Public. A user session is needed when 'nearby=true'.",
        "operationId": "getOfferings",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "From 1 to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The 'nextCursor' of the previous response."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Matches the offering name, the offering description, the voucher name, the voucher symbol and the offering tags."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag values. Repeat the parameter or use commas. At most 12 distinct values. The server trims, deduplicates and sorts the values. Tag values are case-sensitive."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'. Other values return '400' 'E04'."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Value for Go 'ParseBool', for example 'true' or 'false'. The server computes tag facets on the first page only."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Narrow to resources related to the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with pools."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool references in the form 'chainId:address'. Repeat the parameter or use commas. At most 100 distinct references. The chain ID must be a positive integer. A voucher matches when at least one selected pool allows it."
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once for an antimeridian split. Bounds use the offering location, falling back to its voucher location. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "'true' or 'false'. Other values return '400' 'E04'."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "nearest"
              ]
            },
            "description": "'nearest' orders without adding a radius filter. The server uses a valid authenticated profile location, then the center of 'bbox'. It falls back to the existing order when neither origin exists. Cannot be combined with 'nearby=true'."
          }
        ],
        "responses": {
          "200": {
            "description": "Offerings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "offerings": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Offering"
                          }
                        },
                        "nextCursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tagFacets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: perPage, cursor, a search parameter or a pools reference is not valid. E04: nearby=true and the caller has no saved location."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: nearby=true and the request has no valid session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: nearby=true and the caller uses a service token."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/market-map": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "List clustered Marketplace map features",
        "description": "Returns lightweight markers and server clusters for one settled viewport. Identical cache misses coalesce. Successful responses are publicly cacheable for 15 seconds. Access is public; a valid session selects the signed-in wallet rate-limit bucket.",
        "operationId": "getMarketMap",
        "parameters": [
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Viewport as minLng,minLat,maxLng,maxLat. Repeat once for an antimeridian split."
          },
          {
            "name": "zoom",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 22,
              "default": 0
            },
            "description": "Map zoom. The server rounds down to a quarter-zoom bucket and clusters within a 30-pixel grid below zoom 20."
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Values catalog, pool, post, voucher, and want. Repeat the parameter or use commas."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "creditablePools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Verified pool references as chainId:address. Repeat the parameter or use commas."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Filter by the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with creditablePools."
          },
          {
            "name": "postTiming",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "future",
                "past",
                "all"
              ]
            },
            "description": "Schedule filter for Posts only. Future includes posts with no end time or an end time at or after the database transaction time. Cannot be combined with posted."
          },
          {
            "name": "postVouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Voucher references as chainId:address. Repeat the parameter or use commas. Other resource kinds are unchanged."
          },
          {
            "name": "postVoucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "postPools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Pool references as chainId:address. A Post matches a direct Pool link or an active linked Voucher currently allowed by the Pool. Other resource kinds are unchanged."
          },
          {
            "name": "postPoolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "6m",
                "1y",
                "all"
              ],
              "default": "1m"
            },
            "description": "Restricts the post layer to posts whose createdAt is within this calendar window. Omitted is 1m. all is every approved post pin. Other kinds are unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "At most 2,000 lightweight markers and clusters, plus optional tag facets.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "public, max-age=15, stale-while-revalidate=60"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OKResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/market-map/points": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "List every Marketplace map point",
        "description": "Returns every mappable resource that matches the filters, for the client to cluster. The response does not depend on the viewport or zoom, so panning and zooming reuse it. Identical cache misses coalesce. Successful responses are publicly cacheable for 15 seconds. Access is public; a valid session selects the signed-in wallet rate-limit bucket.",
        "operationId": "getMarketMapPoints",
        "parameters": [
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Values catalog, pool, post, voucher, and want. Repeat the parameter or use commas."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "creditablePools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Verified pool references as chainId:address. Repeat the parameter or use commas."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Filter by the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with creditablePools."
          },
          {
            "name": "postTiming",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "future",
                "past",
                "all"
              ]
            },
            "description": "Schedule filter for Posts only. Future includes posts with no end time or an end time at or after the database transaction time. Cannot be combined with posted."
          },
          {
            "name": "postVouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Voucher references as chainId:address. Repeat the parameter or use commas. Other resource kinds are unchanged."
          },
          {
            "name": "postVoucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "postPools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Pool references as chainId:address. A Post matches a direct Pool link or an active linked Voucher currently allowed by the Pool. Other resource kinds are unchanged."
          },
          {
            "name": "postPoolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "6m",
                "1y",
                "all"
              ],
              "default": "1m"
            },
            "description": "Restricts the post layer to posts whose createdAt is within this calendar window. Omitted is 1m. all is every approved post pin. Other kinds are unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "Every matching point, at most 50,000, and whether more matched.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "public, max-age=15, stale-while-revalidate=60"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OKResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/market-map/facets": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Count Marketplace map filter facets in a viewport",
        "description": "Returns the tag facets, and the Post Voucher and Pool facets when Posts are selected, of the resources inside the viewport. Shares the cache, coalescing and rate limit of the map routes. Access is public; a valid session selects the signed-in wallet rate-limit bucket.",
        "operationId": "getMarketMapFacets",
        "parameters": [
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Viewport as minLng,minLat,maxLng,maxLat. Repeat once for an antimeridian split."
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Values catalog, pool, post, voucher, and want. Repeat the parameter or use commas."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "creditablePools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Verified pool references as chainId:address. Repeat the parameter or use commas."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Filter by the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with creditablePools."
          },
          {
            "name": "postTiming",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "future",
                "past",
                "all"
              ]
            },
            "description": "Schedule filter for Posts only. Future includes posts with no end time or an end time at or after the database transaction time. Cannot be combined with posted."
          },
          {
            "name": "postVouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Voucher references as chainId:address. Repeat the parameter or use commas. Other resource kinds are unchanged."
          },
          {
            "name": "postVoucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "postPools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Pool references as chainId:address. A Post matches a direct Pool link or an active linked Voucher currently allowed by the Pool. Other resource kinds are unchanged."
          },
          {
            "name": "postPoolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "6m",
                "1y",
                "all"
              ],
              "default": "1m"
            },
            "description": "Restricts the post layer to posts whose createdAt is within this calendar window. Omitted is 1m. all is every approved post pin. Other kinds are unchanged."
          }
        ],
        "responses": {
          "200": {
            "description": "Tag, Post Voucher and Post Pool facets of the viewport.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "public, max-age=15, stale-while-revalidate=60"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OKResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/marketplace": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "List Marketplace resources together",
        "description": "Returns one mixed list of offerings, Wants, vouchers, pools and curated catalogs. Approved posts are included only when 'post' is explicitly selected in 'kinds'; omitting 'kinds' preserves the commerce-only response. The server does the ranking, total count and paging in one query. Every response has 'Cache-Control: no-store'. Access: Public. A user session is needed when 'nearby=true'.",
        "operationId": "getMarketplace",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "From 1 to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The 'nextCursor' of the previous response."
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Values 'catalog', 'offering', 'pool', 'post', 'voucher' and 'want'. Repeat the parameter or use commas. The server ignores case and empty items. Omitting this parameter returns commerce resources only. Another value returns '400' 'E04'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Matches the name, symbol, description, tags and related names of a row."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Filter by the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with pools."
          },
          {
            "name": "postTiming",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "future",
                "past",
                "all"
              ]
            },
            "description": "Schedule filter for explicitly selected Posts only. Future includes posts with no end time or an end time at or after the database transaction time. Cannot be combined with posted."
          },
          {
            "name": "postVouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Voucher references as chainId:address. Repeat the parameter or use commas. Other resource kinds are unchanged."
          },
          {
            "name": "postVoucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "postPools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Post Pool references as chainId:address. A Post matches a direct Pool link or an active linked Voucher currently allowed by the Pool. Other resource kinds are unchanged."
          },
          {
            "name": "postPoolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag values. Repeat the parameter or use commas. At most 12 distinct values. The server trims, deduplicates and sorts the values. Tag values are case-sensitive."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'. Other values return '400' 'E04'."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Value for Go 'ParseBool', for example 'true' or 'false'. The server computes tag facets on the first page only."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool references in the form 'chainId:address'. Repeat the parameter or use commas. At most 100 distinct references. The chain ID must be a positive integer. A voucher matches when at least one selected pool allows it."
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once for an antimeridian split. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "'true' or 'false'. Other values return '400' 'E04'."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "nearest"
              ]
            },
            "description": "'nearest' orders without adding a radius filter. The server uses a valid authenticated profile location, then the center of 'bbox'. It falls back to the existing order when neither origin exists. Search relevance remains the primary order. Cannot be combined with 'nearby=true'."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "'offering', 'want', 'voucher', 'pool', 'catalog' or explicitly selected 'post'."
                              },
                              "id": {
                                "type": "integer",
                                "description": "ID in the table of the kind."
                              },
                              "chainId": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "'null' for a catalog."
                              },
                              "address": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The voucher address for an offering. 'null' for a catalog."
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "symbol": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "imageUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "markerIcon": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For a voucher row only."
                              },
                              "markerColor": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For a voucher row only."
                              },
                              "voucherKind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For a voucher row only."
                              },
                              "locationName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "geoLat": {
                                "type": "number"
                              },
                              "geoLng": {
                                "type": "number"
                              },
                              "distanceMeters": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Set when a distance origin is available, including 'nearby=true' and 'sort=nearest'."
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "voucherAddress": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "voucherName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "voucherSymbol": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "voucherUoa": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "priceInUnitOfAccount": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "unit": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "For an offering row only."
                              },
                              "poolCount": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "For a catalog row only."
                              },
                              "voucherCount": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "For a pool row and a catalog row."
                              },
                              "relatedKind": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The kind of the first related resource for a post row."
                              },
                              "relatedName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The name of the first related resource for a post row."
                              },
                              "relatedSymbol": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The symbol of the first related resource for a post row."
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "RFC 3339 time."
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "RFC 3339 time."
                              }
                            }
                          },
                          "description": "Rows. Empty array when none."
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Complete filtered count before cursor pagination."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "results": [
                      {
                        "kind": "voucher",
                        "id": 7,
                        "chainId": 42220,
                        "address": "0x0000000000000000000000000000000000000001",
                        "name": "Example Voucher",
                        "description": null,
                        "symbol": "EXV",
                        "imageUrl": null,
                        "markerIcon": null,
                        "markerColor": null,
                        "voucherKind": "voucher",
                        "locationName": "Nairobi",
                        "geoLat": -1.286389,
                        "geoLng": 36.817223,
                        "distanceMeters": null,
                        "tags": [
                          "Food"
                        ],
                        "voucherAddress": null,
                        "voucherName": null,
                        "voucherSymbol": null,
                        "voucherUoa": null,
                        "priceInUnitOfAccount": null,
                        "unit": null,
                        "poolCount": null,
                        "voucherCount": null,
                        "createdAt": "2025-01-15T10:30:00Z",
                        "updatedAt": "2025-01-15T10:30:00Z"
                      }
                    ],
                    "nextCursor": null,
                    "total": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: perPage, kinds, a search parameter or a pools reference is not valid. E04: nearby=true and the caller has no saved location."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: nearby=true and the request has no valid session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: nearby=true and the caller uses a service token."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The cursor is not valid for this search. The cursor check does not return a validation error."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Return a page of catalogs",
        "description": "Returns a page of catalogs. The default order is newest first ('id' descending). With 'nearby=true', the order is nearest first, then 'id' ascending. A request with 'nearby=true' and no valid session returns '401 E06'. A request with 'nearby=true' and a service token returns '403 E10'. A caller without a saved profile location gets '400 E04' with the description 'a valid saved profile location is required'. Access: Public. With 'nearby=true', a user session is required.",
        "operationId": "getCatalogs",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once for an antimeridian split. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Use the saved profile location of the caller. Only catalogs within 1000 km are returned. The response is not cached."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search text. Whitespace is trimmed and repeated spaces become one space. The length must be 2 to 64 characters. The search is not case-sensitive. It matches 'name', 'locationName', and 'description'. A term of 2 characters matches the start of the text. A longer term matches any part of the text."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag filter. Repeat the parameter or use a comma-separated list. At most 12 distinct values. Each value must exist in the tag vocabulary. The comparison is exact."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A catalog must have any of the tags, or all of the tags."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Narrow to resources related to the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with pools."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool filter. Repeat the parameter or use a comma-separated list of 'chainId:address' values. At most 100 distinct values. A catalog matches when it contains one of the pools, or contains a voucher that one of the pools allows."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "With 'true' on the first page, add 'tagFacets' to the response."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "catalogs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Catalog"
                          },
                          "description": "The page."
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "catalogs": [
                      {
                        "id": 12,
                        "name": "Community market",
                        "description": null,
                        "imageUrl": "https://example.com/catalog.png",
                        "locationName": "Nairobi",
                        "geoLat": -1.2864,
                        "geoLng": 36.8172,
                        "ownerAddress": "0x0000000000000000000000000000000000000001",
                        "poolCount": 2,
                        "voucherCount": 5,
                        "distanceMeters": null,
                        "tags": [
                          "Art"
                        ],
                        "createdAt": "2026-08-01T08:00:00Z",
                        "updatedAt": "2026-08-02T08:00:00Z"
                      }
                    ],
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10:."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Create a catalog",
        "description": "Creates a catalog. The owner is the caller. A body field cannot set the owner. Access: User session. For 'PUT', the caller must be the owner of the catalog.",
        "operationId": "postCatalogs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Trimmed. 1 to 120 Unicode characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Trimmed. At most 500 characters. An empty string clears the description."
                  },
                  "locationName": {
                    "type": "string",
                    "description": "Trimmed. 1 to 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "An absolute 'http' or 'https' URL without spaces. A missing, null, or blank value clears the image. The service stores the URL only. Upload the image with the storage flow first."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "At most 12 values. A missing array removes all tags."
                  }
                },
                "required": [
                  "name",
                  "locationName",
                  "geoLat",
                  "geoLng"
                ]
              },
              "example": {
                "name": "Community market",
                "description": "Pools and vouchers of our market.",
                "locationName": "Nairobi",
                "geoLat": -1.2864,
                "geoLng": 36.8172,
                "imageUrl": "https://example.com/catalog.png",
                "tags": [
                  "Art",
                  "Culture"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The catalog was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "catalog": {
                          "$ref": "#/components/schemas/Catalog"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field breaks a rule. The description names the field. Also for tag errors."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The request has no valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token. Or the caller is not the owner (PUT). E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: PUT and the catalog does not exist."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: POST and the caller used all the catalog slots."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs/{id}": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Return one catalog",
        "description": "Returns one catalog. The distance filter does not apply. Any catalog is visible by ID. Access: Public.",
        "operationId": "getCatalogsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "responses": {
          "200": {
            "description": "One catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "catalog": {
                          "$ref": "#/components/schemas/Catalog"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad ID."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: the catalog does not exist."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11:. E11: The rate limit is exceeded."
          }
        },
        "security": []
      },
      "put": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Replace a catalog",
        "description": "Replaces the editable state of a catalog. An omitted optional field is cleared. Access: User session. For 'PUT', the caller must be the owner of the catalog.",
        "operationId": "putCatalogsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Trimmed. 1 to 120 Unicode characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Trimmed. At most 500 characters. An empty string clears the description."
                  },
                  "locationName": {
                    "type": "string",
                    "description": "Trimmed. 1 to 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "An absolute 'http' or 'https' URL without spaces. A missing, null, or blank value clears the image. The service stores the URL only. Upload the image with the storage flow first."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "At most 12 values. A missing array removes all tags."
                  }
                },
                "required": [
                  "name",
                  "locationName",
                  "geoLat",
                  "geoLng"
                ]
              },
              "example": {
                "name": "Community market",
                "description": "Pools and vouchers of our market.",
                "locationName": "Nairobi",
                "geoLat": -1.2864,
                "geoLng": 36.8172,
                "imageUrl": "https://example.com/catalog.png",
                "tags": [
                  "Art",
                  "Culture"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The catalog was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "catalog": {
                          "$ref": "#/components/schemas/Catalog"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field breaks a rule. The description names the field. Also for tag errors."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The request has no valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token. Or the caller is not the owner (PUT). E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: PUT and the catalog does not exist."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: POST and the caller used all the catalog slots."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs/{id}/pools": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "List the pools of a catalog",
        "description": "Lists the pools of a catalog in ascending id order. The list has every pool in the catalog. Access: Public.",
        "operationId": "getCatalogsByIdPools",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "From 1 to 100. Other values return '400 E04'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The 'nextCursor' value from the previous page. The maximum length is 1024 characters."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CatalogMember"
                          }
                        },
                        "nextCursor": {
                          "description": "The value can be null."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "items": [
                      {
                        "id": 7,
                        "chainId": 42220,
                        "address": "0x1111111111111111111111111111111111111111",
                        "name": "Community pool",
                        "imageUrl": null
                      }
                    ],
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: an unknown catalog, and 429 E11."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      }
    },
    "/api/v2/catalogs/{id}/vouchers": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "List the vouchers of a catalog",
        "description": "Lists the vouchers of a catalog in ascending id order. The list has only active vouchers. A retired voucher is hidden. Access: Public.",
        "operationId": "getCatalogsByIdVouchers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "From 1 to 100. Other values return '400 E04'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The 'nextCursor' value from the previous page. The maximum length is 1024 characters."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CatalogMember"
                          }
                        },
                        "nextCursor": {
                          "description": "The value can be null."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "items": [
                      {
                        "id": 7,
                        "chainId": 42220,
                        "address": "0x1111111111111111111111111111111111111111",
                        "name": "Community pool",
                        "imageUrl": null
                      }
                    ],
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: an unknown catalog, and 429 E11."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      }
    },
    "/api/v2/pools": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "Return the pool catalog, newest first",
        "description": "Returns the pool catalog, newest first. Access: Public. A user session is needed when 'nearby=true'.",
        "operationId": "getPools",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Maximum is '100'. '0' or a larger value becomes '100'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Matches the pool name or symbol, or the name or symbol of an active voucher that the pool allows. The name is the display name when one is set."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The tags are the tags of the pool itself."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'."
          },
          {
            "name": "vouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Voucher references in the form 'chainId:address'. Repeat the parameter or use commas. At most 12 distinct references. The pool must allow the voucher."
          },
          {
            "name": "voucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'. Other values return '400' 'E04'."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A hex address. The server compares it with the pool owner and ignores case."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "With 'true' on the first page, the response has 'tagFacets' and 'voucherFacets'."
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once for an antimeridian split. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "'true' or 'false'. The pool rows have no distance field."
          }
        ],
        "responses": {
          "200": {
            "description": "Pools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "pools": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Pool"
                              },
                              "description": "Pool objects. Empty array when none."
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Pools",
                  "result": {
                    "pools": [
                      {
                        "id": 51,
                        "chainId": 42220,
                        "address": "0x0000000000000000000000000000000000000002",
                        "name": "Example Pool",
                        "contractName": "Example Pool",
                        "symbol": "EXP",
                        "ownerAddress": "0x1111111111111111111111111111111111111111",
                        "feePpm": 1000,
                        "feeAddress": null,
                        "tokenRegistryAddress": null,
                        "limiterAddress": null,
                        "quoterAddress": null,
                        "quoterType": "decimal",
                        "feePolicyAddress": null,
                        "protocolFeeControllerAddress": null,
                        "feesDecoupled": false,
                        "decimals": 6,
                        "description": null,
                        "unitOfAccount": "KES",
                        "locationName": null,
                        "geoLat": null,
                        "geoLng": null,
                        "email": null,
                        "website": null,
                        "phone": null,
                        "terms": null,
                        "imageUrl": null,
                        "bannerUrl": null,
                        "defaultVoucherId": null,
                        "platformContractId": null,
                        "voucherCount": 3,
                        "tags": [
                          "Market"
                        ],
                        "createdAt": "2025-01-15T10:30:00Z",
                        "updatedAt": "2025-01-15T10:30:00Z"
                      }
                    ],
                    "first": 51,
                    "last": 51
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: perPage, next or cursor is not valid. E04: A search parameter, voucherMatch, owner or a vouchers reference is not valid, or a voucher reference does not exist. E04: nearby=true and the caller has no saved location."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: nearby=true and the request has no valid session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: nearby=true and the caller uses a service token."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: A signed-out caller exceeds the pool rate limit."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pools/{address}": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "Return one pool",
        "description": "Returns one pool. The lookup ignores case. The route does not check the address format, so a value that is not an address returns '404'. Access: Public.",
        "operationId": "getPoolsByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "responses": {
          "200": {
            "description": "One pool.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "pool": {
                          "$ref": "#/components/schemas/Pool"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No pool has this address."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: A signed-out caller exceeds the pool rate limit."
          }
        },
        "security": []
      }
    },
    "/api/v2/pools/{address}/vouchers": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "List the active vouchers that a pool allows",
        "description": "Returns the active vouchers that the pool allows, newest voucher 'id' first. Access: Public.",
        "operationId": "getPoolsByAddressVouchers",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Maximum is '100'. '0' or a larger value becomes '100'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          }
        ],
        "responses": {
          "200": {
            "description": "Vouchers that the pool allows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/PoolVoucher"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address. E02: perPage, next or cursor is not valid."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: A signed-out caller exceeds the pool rate limit."
          }
        },
        "security": []
      }
    },
    "/api/v2/pools/{address}/offerings": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "List the offerings of vouchers that a pool allows",
        "description": "Returns the available offerings of the active vouchers that the pool allows. The order is descending offering 'id'. The route sets no cache headers. Access: Public.",
        "operationId": "getPoolsByAddressOfferings",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Maximum is '100'. '0' or a larger value becomes '100'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          }
        ],
        "responses": {
          "200": {
            "description": "Offerings of vouchers that the pool allows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "offerings": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Offering"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address. E02: perPage, next or cursor is not valid."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: A signed-out caller exceeds the pool rate limit."
          }
        },
        "security": []
      }
    },
    "/api/v2/vouchers/{address}/reviews/me": {
      "get": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Get the review rights of the caller for a voucher",
        "description": "Returns what the caller can do with the reviews of this voucher. Access: User session.",
        "operationId": "getVouchersByAddressReviewsMe",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "responses": {
          "200": {
            "description": "What the caller can do with the reviews.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "isOwner": {
                          "type": "boolean"
                        },
                        "editableUntil": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "review": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/Review"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "hidden": {
                          "type": "boolean"
                        },
                        "editableReplyIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "flaggedReviewIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The voucher does not exist."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "The voucher is not on the configured chain, or the transfer index is not available."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Create or replace a review",
        "description": "Creates or replaces the review of the caller. Access: User session. The caller must be a reviewer with a redemption in the last 7 days.",
        "operationId": "putVouchersByAddressReviewsMe",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stars": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "From 1 to 5."
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The server trims the value. At most 2000 characters."
                  }
                },
                "required": [
                  "stars"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The review was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not a valid hex address. stars or comment is outside the rules."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, owns the voucher, has a hidden review, has no redemption in the last 7 days, or the edit window closed. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The voucher does not exist."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "The voucher is not on the configured chain, or the transfer index is not available."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/reviews/{id}/reply": {
      "put": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Set the reply of the owner on a review",
        "description": "Sets the reply of the owner on a review. A new reply replaces the old reply of the same owner. Access: User session. The caller must be the current voucher owner.",
        "operationId": "putVouchersByAddressReviewsByIdReply",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reply": {
                    "type": "string",
                    "description": "Required. The server trims it. From 1 to 2000 characters."
                  }
                },
                "required": [
                  "reply"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reply was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not a valid hex address. id is not valid, or reply is empty or too long."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not the current voucher owner, or uses a service token. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The voucher or the review does not exist, the review is hidden, or another account wrote the reply."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/reviews/{id}/flag": {
      "post": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Report a review to the moderators",
        "description": "Reports a review to the moderators. A second flag from the same owner on the same review has no effect and still returns success. Access: User session. The caller must be the current voucher owner.",
        "operationId": "postVouchersByAddressReviewsByIdFlag",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "Required. The server trims it. From 1 to 500 characters."
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The flag was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs/{id}/membership": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Tell whether one pool or voucher is in the catalog",
        "description": "Tells whether one pool or voucher is in the catalog. Access: User session. The caller must be the owner of the catalog.",
        "operationId": "getCatalogsByIdMembership",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pool",
                "voucher"
              ]
            },
            "description": "Type of the resource."
          },
          {
            "name": "resourceId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The internal 'id' of the pool or voucher. It is the 'id' of the member object. It must be a positive integer."
          }
        ],
        "responses": {
          "200": {
            "description": "Membership state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "added": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad kind, resourceId, or :id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token or a caller that is not the owner."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: the catalog does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs/{id}/pools/{poolId}": {
      "put": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Add a pool to a catalog",
        "description": "Adds a pool to the catalog. The route is idempotent. The pool ID must be a positive integer. Access: User session. The caller must be the owner of the catalog.",
        "operationId": "putCatalogsByIdPoolsByPoolId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "poolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Internal ID of the pool."
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "added": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad ID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token or a caller that is not the owner."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Remove a pool from a catalog",
        "description": "Removes a pool from the catalog. The route is idempotent. The pool ID must be a positive integer. Access: User session. The caller must be the owner of the catalog.",
        "operationId": "deleteCatalogsByIdPoolsByPoolId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "poolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Internal ID of the pool."
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "added": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad ID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token or a caller that is not the owner."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/catalogs/{id}/vouchers/{voucherId}": {
      "put": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Add a voucher to a catalog",
        "description": "Adds a voucher to the catalog. The route is idempotent. The voucher ID must be a positive integer. Access: User session. The caller must be the owner of the catalog.",
        "operationId": "putCatalogsByIdVouchersByVoucherId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "voucherId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Internal ID of the voucher."
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "added": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad ID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token or a caller that is not the owner."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Remove a voucher from a catalog",
        "description": "Removes a voucher from the catalog. The route is idempotent. The voucher ID must be a positive integer. Access: User session. The caller must be the owner of the catalog.",
        "operationId": "deleteCatalogsByIdVouchersByVoucherId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          },
          {
            "name": "voucherId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Internal ID of the voucher."
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "added": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad ID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token or a caller that is not the owner."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/contracts/token": {
      "post": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Queue a job that deploys a voucher (ERC-20 proxy)",
        "description": "Queues a job that deploys a voucher (ERC-20 proxy). Access: User or service token. A user caller counts against the voucher limit. An administrator or service token has no limit.",
        "operationId": "postContractsToken",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Trimmed, inner spaces collapsed. Must not be blank. Maximum 120 characters."
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "decimals": {
                    "type": "string",
                    "description": "Send an integer from 0 to 255 as a string. The API does not check the format (see Late checks)."
                  },
                  "owner": {
                    "type": "string",
                    "description": "Checksummed address."
                  },
                  "expiryTimestamp": {
                    "type": "string",
                    "description": "Unix time in seconds, as a string. The API does not check the format (see Late checks)."
                  },
                  "description": {
                    "type": "string",
                    "description": "No limit in the API."
                  },
                  "website": {
                    "type": "string",
                    "description": "Must be a URL."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be an email address."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No check."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Maximum 5000 characters. A link or Markdown text."
                  },
                  "voucherUoa": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Unit of account. Maximum 32 characters."
                  },
                  "voucherValue": {
                    "type": "number",
                    "description": "Value of one voucher unit in the unit of account. Must be 0 or more."
                  },
                  "locationName": {
                    "type": "string",
                    "description": "No limit in the API."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180."
                  },
                  "iconUrl": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL."
                  },
                  "markerIcon": {
                    "type": "string",
                    "enum": [
                      "basket",
                      "hand-coin",
                      "coupon",
                      "food",
                      "farm",
                      "tools",
                      "health",
                      "education"
                    ],
                    "description": "One of 'basket', 'hand-coin', 'coupon', 'food', 'farm', 'tools', 'health', 'education'."
                  },
                  "markerColor": {
                    "type": "string",
                    "enum": [
                      "blue",
                      "purple",
                      "orange",
                      "pink",
                      "cyan",
                      "brown"
                    ],
                    "description": "One of 'blue', 'purple', 'orange', 'pink', 'cyan', 'brown'."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name",
                  "symbol",
                  "decimals",
                  "owner"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token deploy request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Token deploy request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. Examples: bad address, name blank or longer than 120, bad markerIcon, bad tag, bad unit of account."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No platform contract row exists for the configured chain."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher name is in use, or the name or symbol is already claimed."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The user reached the voucher limit. The result object has resource (vouchers), used and limit."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/contracts/pool": {
      "post": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Queue a job that deploys a pool",
        "description": "Queues a job that deploys a pool. Access: User or service token. A user caller counts against the pool limit. An administrator or service token has no limit.",
        "operationId": "postContractsPool",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Trimmed, inner spaces collapsed. Must not be blank. Maximum 80 characters."
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "decimals": {
                    "type": "string",
                    "description": "Send an integer from 0 to 255 as a string. The API does not check the format."
                  },
                  "owner": {
                    "type": "string",
                    "description": "Checksummed address."
                  },
                  "quoterType": {
                    "type": "string",
                    "enum": [
                      "decimal",
                      "oracle",
                      "relative"
                    ],
                    "description": "One of 'decimal', 'oracle', 'relative'."
                  },
                  "feesDecoupled": {
                    "type": "boolean",
                    "description": "Default 'false'."
                  },
                  "feePolicyDefault": {
                    "type": "string",
                    "description": "Default fee as a percentage. A number from 0 to 100, for example '\"0.5\"'."
                  },
                  "feeAddress": {
                    "type": "string",
                    "description": "Checksummed address that receives the fees. Needs a 'feePolicyDefault' above 0."
                  },
                  "baseCurrency": {
                    "type": "string",
                    "description": "Checksummed address. Must not be the zero address."
                  },
                  "unitOfAccount": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Maximum 32 characters."
                  },
                  "description": {
                    "type": "string",
                    "description": "No limit in the API."
                  },
                  "website": {
                    "type": "string",
                    "description": "Must be a URL."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be an email address."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No check."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Maximum 5000 characters."
                  },
                  "locationName": {
                    "type": "string",
                    "description": "No limit in the API."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180."
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "Must be an 'http' or 'https' URL."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Same rules as for 'POST /api/v2/contracts/token'."
                  }
                },
                "required": [
                  "name",
                  "symbol",
                  "decimals",
                  "owner",
                  "quoterType",
                  "feePolicyDefault",
                  "unitOfAccount"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pool deploy request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Pool deploy request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. Examples: name blank or longer than 80, quoterType missing or unknown, feePolicyDefault not a number from 0 to 100, feeAddress set with a fee of 0, baseCurrency missing, invalid or zero for oracle, custom unit with oracle."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: A platform contract row is missing for the configured chain."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The pool name or symbol is already in use."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The user reached the pool limit. The result object has resource (pools), used and limit."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/contracts/version": {
      "post": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Set the implementation address and version of a contract",
        "description": "Sets the implementation address and version string for a platform contract on the configured chain. Access: Service token only. A user caller gets '403'.",
        "operationId": "postContractsVersion",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "description": "Version label."
                  },
                  "contractType": {
                    "type": "string",
                    "enum": [
                      "ERC20",
                      "ERC20_DEMURRAGE",
                      "SWAPPOOL",
                      "TOKEN_UNIQUE_SYMBOL_INDEX",
                      "LIMITER",
                      "FEE_POLICY",
                      "ORACLE_QUOTER",
                      "RELATIVE_QUOTER"
                    ],
                    "description": "'ERC20', 'ERC20_DEMURRAGE', 'SWAPPOOL', 'TOKEN_UNIQUE_SYMBOL_INDEX', 'LIMITER', 'FEE_POLICY', 'ORACLE_QUOTER' or 'RELATIVE_QUOTER'."
                  },
                  "implementationAddress": {
                    "type": "string",
                    "description": "Checksummed address. Must not be the zero address."
                  }
                },
                "required": [
                  "version",
                  "contractType",
                  "implementationAddress"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contract version updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "contractType": {
                          "type": "string"
                        },
                        "implementationAddress": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Contract version updated",
                  "result": {
                    "contractType": "ERC20",
                    "implementationAddress": "0x1111111111111111111111111111111111111111",
                    "version": "v1.0.0"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation, or the address is not a valid non-zero address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E04: The caller is not a service token. The description is Insufficient permissions: service token required. E10: The caller uses a user token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No platform contract row matches."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/contracts/upgrade/token": {
      "post": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Queue an upgrade of one voucher proxy",
        "description": "Queues a job that upgrades one voucher proxy to the current ERC-20 implementation in the platform contract table. Access: Service token only. A user caller gets '403'.",
        "operationId": "postContractsUpgradeToken",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Checksummed address of a confirmed deployed voucher. The match is exact."
                  }
                },
                "required": [
                  "address"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token upgrade request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Token upgrade request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "address": "0x1111111111111111111111111111111111111111"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02, E04: The body is not valid JSON, or address fails validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E04: The caller is not a service token. E10: The caller uses a user token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No confirmed deployed voucher has this address, or no ERC-20 platform contract exists."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/contracts/upgrade/pool": {
      "post": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Queue upgrade jobs for a pool proxy and its sub-contracts",
        "description": "Queues upgrade jobs for a pool proxy and its sub-contracts. All jobs share one tracking ID. Access: Service token only. A user caller gets '403'.",
        "operationId": "postContractsUpgradePool",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Checksummed address of a confirmed deployed pool. The comparison ignores case."
                  }
                },
                "required": [
                  "address"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pool upgrade request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        },
                        "upgrades": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "address": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "address": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Pool upgrade request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "upgrades": [
                      {
                        "type": "SWAPPOOL",
                        "address": "0x1111111111111111111111111111111111111111"
                      }
                    ],
                    "skipped": [
                      {
                        "type": "LIMITER",
                        "address": "0x0000000000000000000000000000000000000001",
                        "reason": "already on the current implementation"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02, E04: The body is not valid JSON, or address fails validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E04: The caller is not a service token. E10: The caller uses a user token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No confirmed deployed pool has this address."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/token-tags": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Return every tag, built-in and custom, sorted by value",
        "description": "Returns every tag, built-in and custom, sorted by value. Access: User or service token.",
        "operationId": "getTokenTags",
        "responses": {
          "200": {
            "description": "Available token tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Available token tags",
                  "result": {
                    "tags": [
                      "Agriculture",
                      "Art",
                      "Culture"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/offering-units": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "List every offering unit",
        "description": "Returns every offering unit, built-in and custom, sorted by value. Access: User or service token.",
        "operationId": "getOfferingUnits",
        "responses": {
          "200": {
            "description": "Available offering units",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "units": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Available offering units",
                  "result": {
                    "units": [
                      "bag",
                      "kg",
                      "Produce Crate"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/units-of-account": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Return every unit of account",
        "description": "Returns every unit of account. Built-in values come first, then custom values. Each group is sorted by value. Access: User session. A service token returns '403 E10'.",
        "operationId": "getUnitsOfAccount",
        "responses": {
          "200": {
            "description": "Available units of account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "unitsOfAccount": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "isCustom": {
                                "type": "boolean"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Available units of account",
                  "result": {
                    "unitsOfAccount": [
                      {
                        "value": "KES",
                        "isCustom": false
                      },
                      {
                        "value": "Community Credits",
                        "isCustom": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/symbols": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Show the symbols that are in use under one symbol stem",
        "description": "Shows the symbols that are in use under one symbol stem. Use it before a voucher or pool deployment. The result is advice only. It does not reserve a symbol. Access: User or service token.",
        "operationId": "getSymbols",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "voucher",
                "pool"
              ]
            },
            "description": "Type of the symbol."
          },
          {
            "name": "prefix",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "1 to 6 letters or digits."
          }
        ],
        "responses": {
          "200": {
            "description": "Taken symbols",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "prefix": {
                          "type": "string"
                        },
                        "taken": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Taken symbols",
                  "result": {
                    "kind": "voucher",
                    "prefix": "FARM",
                    "taken": [
                      "FARM",
                      "FARM1"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/names": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Tell whether a voucher name or a pool name is free",
        "description": "Tells whether a voucher name or a pool name is free. Use it before a deployment or a rename. The result is advice only. The deployment makes the real claim. Access: User or service token.",
        "operationId": "getNames",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "voucher",
                "pool"
              ]
            },
            "description": "Type of the name."
          },
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The service trims it and changes repeated spaces to one space. It must not be blank. A voucher name has at most 120 characters. A pool name has at most 80 characters."
          },
          {
            "name": "exclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A hex address. The name of this voucher or pool does not count as taken. Use it for a rename form."
          }
        ],
        "responses": {
          "200": {
            "description": "Name availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "available": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Name availability",
                  "result": {
                    "kind": "pool",
                    "name": "Community pool",
                    "available": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/recipients": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Search recipients",
        "description": "Searches approved users by exact case-insensitive username or exact normalized full phone number. User prefixes return no result and user responses expose the username, never the profile name. Public pool names retain partial matching. This route has an independent caller/IP throttle of one request per second with a burst of 30. Access: User or service token.",
        "operationId": "getRecipients",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Trimmed. 1 to 120 characters."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "pool"
              ]
            },
            "description": "Filter by type."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "recipients": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Recipient"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "recipients": [
                      {
                        "kind": "user",
                        "name": "amina",
                        "alias": "amina",
                        "address": "0x0000000000000000000000000000000000000001",
                        "chainId": 42220
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/recipients/suggest": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Suggest a free username",
        "description": "Suggests a free username. The route does not reserve the name. The unique rule is checked when the user saves the username. Access: Public.",
        "operationId": "getRecipientsSuggest",
        "parameters": [
          {
            "name": "hint",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 120
            },
            "description": "Trimmed. At most 120 characters. The service changes it to NFC form and cuts it to 80 code points."
          }
        ],
        "responses": {
          "200": {
            "description": "A free username.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "username": "Amina2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: hint is longer than 120 characters."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The hint is blank, or no free name exists in the 100 candidates."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: Over the rate limit."
          }
        },
        "security": []
      }
    },
    "/api/v2/recipients/resolve": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Find the one recipient with an exact name",
        "description": "Finds the one recipient with an exact name. This form takes the name as a query parameter. Use it for a name with punctuation or a slash. If the name is also in the path form, the name query parameter wins. Access: User or service token.",
        "operationId": "getRecipientsResolve",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 120
            },
            "description": "Exact name of the recipient. Use this form for a name with punctuation or a slash."
          }
        ],
        "responses": {
          "200": {
            "description": "The recipient with this name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "recipient": {
                          "$ref": "#/components/schemas/Recipient"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The name is blank or longer than 120 characters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No recipient has this name."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: More than one recipient matches."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/recipients/resolve/{name}": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Find the one recipient with an exact name",
        "description": "Finds the one recipient with an exact name. The name is in the path. This form works for simple names. If the request also has a name query parameter, the query parameter wins. Access: User or service token.",
        "operationId": "getRecipientsResolveByName",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The service trims it and changes repeated spaces to one space. It must not be blank. A voucher name has at most 120 characters. A pool name has at most 80 characters."
          }
        ],
        "responses": {
          "200": {
            "description": "The recipient with this name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "recipient": {
                          "$ref": "#/components/schemas/Recipient"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The name is blank or longer than 120 characters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No recipient has this name."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: More than one recipient matches."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/recipients/reverse/{address}": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "Find the recipient identity of an account address",
        "description": "Finds the recipient identity of an account address. The comparison ignores case. Use it to show a name for an address. An address with no recipient is still a valid destination. Success: 'result' is '{\"recipient\": <recipient>}'. Access: User or service token.",
        "operationId": "getRecipientsReverseByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account or contract address."
          }
        ],
        "responses": {
          "200": {
            "description": "The recipient with this address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "recipient": {
                          "$ref": "#/components/schemas/Recipient"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: :address is not a hex address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No recipient has this address."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: More than one recipient matches."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/oracle-feeds": {
      "get": {
        "tags": [
          "Lookups and shared vocabulary"
        ],
        "summary": "List the price oracle feeds",
        "description": "Lists the price oracle feeds that a pool can use for oracle pricing, sorted by 'name'. Access: User or service token.",
        "operationId": "getOracleFeeds",
        "parameters": [
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Must be a positive integer. Another value returns '400 E04'. Default: The chain ID of the service."
          }
        ],
        "responses": {
          "200": {
            "description": "Available oracle feeds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "feeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "chainId": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              },
                              "address": {
                                "type": "string"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The feed's pair as its description() reports it, for example 'EUR / USD'."
                              },
                              "decimals": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The decimals of the feed's answer."
                              },
                              "maxStalenessSeconds": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The per-feed freshness bound to send with setOracle(token, oracle, maxStaleness). Null means the quoter's global bound applies."
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Available oracle feeds",
                  "result": {
                    "feeds": [
                      {
                        "id": 7,
                        "chainId": 100,
                        "name": "EUR",
                        "address": "0xab70BCB260073d036d1660201e9d5405F5829b7a",
                        "description": "EUR / USD",
                        "decimals": 8,
                        "maxStalenessSeconds": 93600,
                        "createdAt": "2026-08-01T08:00:00Z",
                        "updatedAt": "2026-08-01T08:00:00Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/system": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Get the master signer address and the build string",
        "description": "Returns the public address of the master signer and the build string. Access: User or service token.",
        "operationId": "getSystem",
        "responses": {
          "200": {
            "description": "Current system information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "systemSigner": {
                          "type": "string"
                        },
                        "build": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Current system information",
                  "result": {
                    "systemSigner": "0x0000000000000000000000000000000000000001",
                    "build": "v1.0.0"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/otx/track/{trackingId}": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Return the OTX chain for a tracking ID",
        "description": "Returns the OTX chain for a tracking ID. Access: User or service token. A user caller who is not an administrator can track only IDs that the API recorded for that user at deploy time.",
        "operationId": "getOtxTrackByTrackingId",
        "parameters": [
          {
            "name": "trackingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Must be a UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "OTX chain for tracking ID f47ac10b-58cc-4372-a567-0e02b2c3d479",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "otx": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Otx"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "OTX chain for tracking ID f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "result": {
                    "otx": [
                      {
                        "id": 1,
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "otxType": "TOKEN_PROXY_DEPLOY",
                        "signerAccount": "0x0000000000000000000000000000000000000001",
                        "rawTx": "0x02f8...",
                        "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
                        "nonce": 5,
                        "replaced": false,
                        "createdAt": "2026-01-15T10:30:00Z",
                        "updatedAt": "2026-01-15T10:30:05Z",
                        "status": "SUCCESS"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: trackingId is not a UUID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: A user caller (not an administrator) does not own the tracking ID."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/otx/track/{trackingId}/contract": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Return the contract that a deploy created",
        "description": "Returns the contract that a deploy created. The route looks for a voucher first, then for a pool. Access: User or service token. A user caller who is not an administrator can read only IDs that the API recorded for that user at deploy time.",
        "operationId": "getOtxTrackByTrackingIdContract",
        "parameters": [
          {
            "name": "trackingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A UUID. The route does not check the format."
          }
        ],
        "responses": {
          "200": {
            "description": "Deployed token for tracking ID f47ac10b-58cc-4372-a567-0e02b2c3d479",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "contract": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "status": {
                              "type": "string"
                            },
                            "address": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Deployed token for tracking ID f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "result": {
                    "type": "TOKEN",
                    "contract": {
                      "id": 42,
                      "status": "CONFIRMED",
                      "address": "0x1111111111111111111111111111111111111111"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: A user caller (not an administrator) does not own the tracking ID."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: A user caller sends a value that is not a UUID."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/account/otx/{address}": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "List the OTX that a custodial account signed",
        "description": "Returns the OTX that a custodial signer account signed, newest first. Access: User or service token. 'address' must be the caller's own address, unless the caller is a service token or an administrator.",
        "operationId": "getAccountOtxByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An OTX 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched OTX for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "otx": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Otx"
                          },
                          "description": "The page. Can be 'null' when empty."
                        },
                        "first": {
                          "type": "number",
                          "description": "'id' of the first item (the highest). 0 when the page is empty."
                        },
                        "last": {
                          "type": "number",
                          "description": "'id' of the last item (the lowest). 0 when the page is empty."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Successfully fetched OTX for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "otx": [
                      {
                        "id": 50,
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "otxType": "RELAY_EXEC",
                        "signerAccount": "0x0000000000000000000000000000000000000001",
                        "rawTx": "0x02f8...",
                        "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
                        "nonce": 4,
                        "replaced": false,
                        "createdAt": "2026-01-15T10:30:00Z",
                        "updatedAt": "2026-01-15T10:30:05Z",
                        "status": "SUCCESS"
                      }
                    ],
                    "first": 50,
                    "last": 50
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: perPage, cursor or next has a wrong type. E04: address is not a valid checksummed address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is a user and address is not the caller's own address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/account/status/{address}": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Return the chain and internal state of a custodial account",
        "description": "Returns the chain and internal state of a custodial account. Access: User or service token.",
        "operationId": "getAccountStatusByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          }
        ],
        "responses": {
          "200": {
            "description": "Custodial account status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "gasBalance": {
                          "type": "string",
                          "description": "Native balance in wei, as a decimal string."
                        },
                        "networkNonce": {
                          "type": "number",
                          "description": "The chain transaction count minus 1. It is 0 when the count is 0."
                        },
                        "internalNonce": {
                          "type": "number",
                          "description": "The next nonce that the service holds for the account."
                        },
                        "active": {
                          "type": "boolean",
                          "description": "The 'active' flag of the key pair of the account."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Custodial account status",
                  "result": {
                    "gasBalance": "1000000000000000000",
                    "networkNonce": 4,
                    "internalNonce": 5,
                    "active": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid checksummed address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: The service has no key pair or nonce record for the address."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The chain node call fails."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/reports": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Return a page of APPROVED posts",
        "description": "Returns a page of 'APPROVED' posts. The default order is 'updatedAt' descending, then 'id' descending. With 'sort=nearest', the server uses a valid authenticated profile location, then the center of 'bbox', and otherwise keeps the default order. A request with 'nearby=true' and no valid session returns '401 E06'. A service token returns '403 E10'. The response has no 'Cache-Control' header, except for location-aware requests, which set 'private, no-store'. Access: Public. With 'nearby=true', a user session is required.",
        "operationId": "getReports",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            },
            "description": "'0' or no value means 20. A value above 100 becomes 100. A value that is not a non-negative integer returns '400 E04'."
          },
          {
            "name": "cursorUpdatedAt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "RFC 3339 time (nanoseconds allowed). Send with 'cursorId'."
          },
          {
            "name": "cursorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Positive integer. Send with 'cursorUpdatedAt'."
          },
          {
            "name": "cursorDistance",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Distance position for a nearest-sorted page. Send with 'cursorUpdatedAt', 'cursorId' and 'cursorOrigin'."
          },
          {
            "name": "cursorOrigin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque origin identity returned by the previous nearest-sorted page. Send with 'cursorUpdatedAt', 'cursorId' and 'cursorDistance'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search in 'title' and 'description'. The length must be 2 to 64 characters after trimming. A term of 2 characters matches the start of the text. A longer term matches any part of the text."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list. At most 12 distinct values. Each value must exist in the tag vocabulary."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A post must have any of the tags, or all of the tags."
          },
          {
            "name": "vouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list of 'chainId:address' values. At most 12 distinct values. Every voucher must exist."
          },
          {
            "name": "voucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A post must link any of the vouchers, or all of the vouchers."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list of 'chainId:address' values. At most 12 distinct values. Every pool must exist."
          },
          {
            "name": "poolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A Post must match any or all selected Pools. A Pool matches a direct link or an active linked Voucher currently allowed by it."
          },
          {
            "name": "creditDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "Filter by the pools the session wallet can reach within this many hops, where max means the router's maximum (3), or to a voucher it already holds, resolved on the server. Needs a user session; makes the response private. Cannot be combined with creditablePools."
          },
          {
            "name": "creditablePools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list of 'chainId:address' values. A post matches when it directly links one selected pool or links an active voucher currently allowed by one. At most 100 distinct values. Every pool must exist."
          },
          {
            "name": "bbox",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'minLng,minLat,maxLng,maxLat'. Repeat once for an antimeridian split. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "nearby",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Show only posts with coordinates within 1000 km of the saved profile location of the caller. The order does not change. A caller without a saved location gets '400 E04'."
          },
          {
            "name": "timing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "future",
                "past",
                "all"
              ]
            },
            "description": "Schedule filter. Future includes posts with no end time or an end time at or after the database transaction time. Past includes posts whose end time is before that time. Cannot be combined with posted."
          },
          {
            "name": "posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "6m",
                "1y",
                "all"
              ],
              "default": "1m"
            },
            "description": "Restrict to posts whose 'createdAt' is within this calendar window. Omitted is '1m'. 'all' is every approved post. Another value returns '400' 'E04'."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "nearest"
              ]
            },
            "description": "'nearest' orders without adding a radius filter. The server uses a valid authenticated profile location, then the center of 'bbox'. It falls back to the default order when neither origin exists. Cannot be combined with 'nearby=true'."
          },
          {
            "name": "facets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "With 'true' and no cursor, add 'tagFacets', 'voucherFacets', and 'poolFacets'."
          }
        ],
        "responses": {
          "200": {
            "description": "Reports",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reports": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "description": "The value can be null."
                              },
                              "geoLat": {
                                "type": "number"
                              },
                              "geoLng": {
                                "type": "number"
                              },
                              "distanceMeters": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Set when a nearest-order origin is available."
                              },
                              "periodFrom": {
                                "description": "The value can be null."
                              },
                              "periodTo": {
                                "description": "The value can be null."
                              },
                              "markerIcon": {
                                "type": "string",
                                "enum": [
                                  "post",
                                  "event",
                                  "announcement"
                                ]
                              },
                              "markerColor": {
                                "type": "string",
                                "enum": [
                                  "blue",
                                  "purple",
                                  "orange",
                                  "pink",
                                  "cyan",
                                  "brown"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "vouchers": {
                                "type": "array",
                                "items": {}
                              },
                              "pools": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          },
                          "description": "The page. The array is empty when there are no matches."
                        },
                        "next": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "id": {
                              "type": "integer"
                            },
                            "distance": {
                              "type": "number",
                              "minimum": 0
                            },
                            "origin": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Reports",
                  "result": {
                    "reports": [
                      {
                        "id": 4633,
                        "title": "August community harvest",
                        "description": "Twenty members took part.",
                        "imageUrl": null,
                        "geoLat": -1.2864,
                        "geoLng": 36.8172,
                        "periodFrom": null,
                        "periodTo": null,
                        "markerIcon": "event",
                        "markerColor": "pink",
                        "createdAt": "2026-08-01T08:00:00Z",
                        "updatedAt": "2026-08-02T08:00:00Z",
                        "tags": [
                          "Agriculture"
                        ],
                        "vouchers": [
                          {
                            "id": 21,
                            "chainId": 100,
                            "address": "0x1111111111111111111111111111111111111111",
                            "name": "Harvest",
                            "symbol": "HRV"
                          }
                        ],
                        "pools": []
                      }
                    ],
                    "next": {
                      "updatedAt": "2026-08-02T08:00:00Z",
                      "id": 4633,
                      "distance": 1250.5,
                      "origin": "6680119d1f68094b"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10:."
          }
        },
        "security": [
          {},
          {
            "cookieAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Create a post",
        "description": "Creates a post. The status is APPROVED at once. There is no review queue. The body cannot set authorAddress, status or a time. The service takes the author from the session. Access: User session.",
        "operationId": "postReports",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Trimmed. Not blank. At most 200 characters."
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 500000,
                    "description": "Markdown. At most 500000 characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "At most 10000 characters."
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90. Send with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180. Send with 'geoLat'."
                  },
                  "periodFrom": {
                    "type": "string",
                    "description": "RFC 3339 time. Must not be after 'periodTo'."
                  },
                  "periodTo": {
                    "type": "string",
                    "description": "RFC 3339 time."
                  },
                  "hostName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Trimmed. At most 200 characters. A blank value is cleared."
                  },
                  "participants": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Trimmed. At most 100 characters. A blank value is cleared."
                  },
                  "timeTaken": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Trimmed. At most 100 characters. A blank value is cleared."
                  },
                  "markerIcon": {
                    "type": "string",
                    "enum": [
                      "post",
                      "event",
                      "announcement"
                    ],
                    "description": "Defaults to 'post' when omitted."
                  },
                  "markerColor": {
                    "type": "string",
                    "enum": [
                      "blue",
                      "purple",
                      "orange",
                      "pink",
                      "cyan",
                      "brown"
                    ],
                    "description": "Defaults to 'pink' when omitted."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "At most 12 values. Each value must not be blank and has at most 100 characters. No duplicates. A tag that is not in the vocabulary is created."
                  },
                  "vouchers": {
                    "type": "array",
                    "description": "At most 12 items: '{\"chainId\": 42220, \"address\": \"0x...\"}'. 'chainId' must be positive. 'address' must be a hex address. No duplicates. Every voucher must exist."
                  },
                  "pools": {
                    "type": "array",
                    "description": "At most 12 items: '{\"chainId\": 100, \"address\": \"0x...\"}'. 'chainId' must be positive. 'address' must be a hex address. No duplicates. Every pool must exist. At least one voucher or pool is required."
                  },
                  "images": {
                    "type": "array",
                    "description": "At most 50 items. No duplicate URLs."
                  },
                  "attachments": {
                    "type": "array",
                    "description": "At most 20 items. No duplicate 'kind' and 'url' pairs."
                  }
                },
                "required": [
                  "title"
                ]
              },
              "example": {
                "title": "August community harvest",
                "body": "## Harvest\n\nTwenty members took part.",
                "description": "A summary for the feed.",
                "imageUrl": "https://example.com/posts/cover.jpg",
                "geoLat": -1.2864,
                "geoLng": 36.8172,
                "periodFrom": "2026-08-01T08:00:00Z",
                "periodTo": "2026-08-01T12:00:00Z",
                "hostName": "Example Group",
                "participants": "20",
                "timeTaken": "4 hours",
                "markerIcon": "event",
                "markerColor": "pink",
                "tags": [
                  "Agriculture",
                  "Youth"
                ],
                "vouchers": [
                  {
                    "chainId": 42220,
                    "address": "0x1111111111111111111111111111111111111111"
                  }
                ],
                "pools": [],
                "images": [
                  {
                    "url": "https://example.com/posts/1.jpg",
                    "width": 720,
                    "height": 1080,
                    "caption": "Sorting"
                  }
                ],
                "attachments": [
                  {
                    "kind": "FILE",
                    "url": "https://example.com/posts/notes.pdf",
                    "filename": "notes.pdf",
                    "byteSize": 81920
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The post was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: Also when neither a voucher nor pool is linked, for a resource that does not exist, and for a tag error."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The request has no valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token. Or a regular caller links a voucher or pool that the caller does not own. E10:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/reports/{id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Get one approved post",
        "description": "'result' is '{\"report\": <post>}' and 'description' is 'Report'. The route returns only 'APPROVED' posts. A post in another status gives '404 E03', the same as a post that does not exist. The response has no 'Cache-Control' header. Access: Public.",
        "operationId": "getReportsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "responses": {
          "200": {
            "description": "One approved post.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: :id is not a positive integer."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The post does not exist or is not APPROVED. E03:."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: Over the rate limit."
          }
        },
        "security": []
      },
      "put": {
        "tags": [
          "Posts"
        ],
        "summary": "Replace a post",
        "description": "Replaces all editable fields and all five collections of a post. An omitted optional field is cleared. An omitted collection becomes empty. At least one voucher or pool is required. A failed request changes nothing. After an edit by the original author the status is APPROVED. After an edit by an administrator the status does not change. Access: User session. The caller must be the original author or an administrator.",
        "operationId": "putReportsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Trimmed. Not blank. At most 200 characters."
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 500000,
                    "description": "Markdown. At most 500000 characters."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "At most 10000 characters."
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90. Send with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180. Send with 'geoLat'."
                  },
                  "periodFrom": {
                    "type": "string",
                    "description": "RFC 3339 time. Must not be after 'periodTo'."
                  },
                  "periodTo": {
                    "type": "string",
                    "description": "RFC 3339 time."
                  },
                  "hostName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Trimmed. At most 200 characters. A blank value is cleared."
                  },
                  "participants": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Trimmed. At most 100 characters. A blank value is cleared."
                  },
                  "timeTaken": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Trimmed. At most 100 characters. A blank value is cleared."
                  },
                  "markerIcon": {
                    "type": "string",
                    "enum": [
                      "post",
                      "event",
                      "announcement"
                    ],
                    "description": "Defaults to 'post' when omitted."
                  },
                  "markerColor": {
                    "type": "string",
                    "enum": [
                      "blue",
                      "purple",
                      "orange",
                      "pink",
                      "cyan",
                      "brown"
                    ],
                    "description": "Defaults to 'pink' when omitted."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "At most 12 values. Each value must not be blank and has at most 100 characters. No duplicates. A tag that is not in the vocabulary is created."
                  },
                  "vouchers": {
                    "type": "array",
                    "description": "At most 12 items: '{\"chainId\": 42220, \"address\": \"0x...\"}'. 'chainId' must be positive. 'address' must be a hex address. No duplicates. Every voucher must exist."
                  },
                  "pools": {
                    "type": "array",
                    "description": "At most 12 items: '{\"chainId\": 100, \"address\": \"0x...\"}'. 'chainId' must be positive. 'address' must be a hex address. No duplicates. Every pool must exist. At least one voucher or pool is required."
                  },
                  "images": {
                    "type": "array",
                    "description": "At most 50 items. No duplicate URLs."
                  },
                  "attachments": {
                    "type": "array",
                    "description": "At most 20 items. No duplicate 'kind' and 'url' pairs."
                  }
                },
                "required": [
                  "title"
                ]
              },
              "example": {
                "title": "August community harvest",
                "body": "## Harvest\n\nTwenty members took part.",
                "description": "A summary for the feed.",
                "imageUrl": "https://example.com/posts/cover.jpg",
                "geoLat": -1.2864,
                "geoLng": 36.8172,
                "periodFrom": "2026-08-01T08:00:00Z",
                "periodTo": "2026-08-01T12:00:00Z",
                "hostName": "Example Group",
                "participants": "20",
                "timeTaken": "4 hours",
                "markerIcon": "event",
                "markerColor": "pink",
                "tags": [
                  "Agriculture",
                  "Youth"
                ],
                "vouchers": [
                  {
                    "chainId": 42220,
                    "address": "0x1111111111111111111111111111111111111111"
                  }
                ],
                "pools": [],
                "images": [
                  {
                    "url": "https://example.com/posts/1.jpg",
                    "width": 720,
                    "height": 1080,
                    "caption": "Sorting"
                  }
                ],
                "attachments": [
                  {
                    "kind": "FILE",
                    "url": "https://example.com/posts/notes.pdf",
                    "filename": "notes.pdf",
                    "byteSize": 81920
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: :id is not a positive integer, or a field breaks a rule."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The request has no valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not the author and not an administrator. Or a service token. Or a regular caller links a voucher or pool that the caller does not own. E10:."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The post does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Posts"
        ],
        "summary": "Delete a post",
        "description": "Deletes the post with its tags, voucher links, pool links, images, and attachments. An author cannot delete the own post. Status '200'. 'description' is 'Report deleted'. 'result' is '{\"id\": 4633}'. Access: Administrative.",
        "operationId": "deleteReportsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "responses": {
          "200": {
            "description": "The post was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Report deleted",
                  "result": {
                    "id": 4633
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad :id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a caller that is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: the post does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/reports/{id}/approve": {
      "put": {
        "tags": [
          "Posts"
        ],
        "summary": "Set the status of the post to APPROVED",
        "description": "Sets the status of the post to 'APPROVED'. The request has no body. The route changes nothing else. A post that is already 'APPROVED' stays the same and returns '200'. Status '200'. 'description' is 'Report approved'. 'result' is '{\"report\": <post>}'. Access: Administrative.",
        "operationId": "putReportsByIdApprove",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "responses": {
          "200": {
            "description": "The post is approved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad :id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a caller that is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: the post does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pools/{address}/profile": {
      "put": {
        "tags": [
          "Pools"
        ],
        "summary": "Replace the off-chain profile of a pool",
        "description": "Replaces the off-chain profile of a pool. The route writes every field, so a request must send the full record. An omitted field is cleared. The fields 'displayName', 'imageUrl' and 'bannerUrl' are the exception: an omitted field keeps its stored value, and an empty string clears it. The tags are always replaced. Access: User session. The caller must be the pool owner or an administrator. A pool with no owner can only be changed by an administrator. This route has no rate limit.",
        "operationId": "putPoolsByAddressProfile",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "At most 80 characters. The server trims it."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "At most 500 characters."
                  },
                  "unitOfAccount": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "At most 32 characters. Must not be blank. A new value becomes a custom unit of account. Omit the field to clear it."
                  },
                  "email": {
                    "type": "string",
                    "description": "A valid email address."
                  },
                  "website": {
                    "type": "string",
                    "description": "A valid URL."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No rule."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "At most 5000 characters."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "At most 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90. Send with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180. Send with 'geoLat'."
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL, or an empty string."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL, or an empty string."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Each tag at most 100 characters, with no comma, not blank, and no duplicate. A tag that is not in the vocabulary becomes a new custom tag."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pool profile was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "pool": {
                          "$ref": "#/components/schemas/Pool"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not a valid address, a field is outside the rules, or only one of geoLat and geoLng is present."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the pool owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The pool does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: Another pool uses the display name, or the request changes the unit of account of an oracle pool."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/display-name": {
      "put": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Set the public name of a voucher",
        "description": "Sets the public name of a voucher. The contract name does not change. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "putVouchersByAddressDisplayName",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "description": "The server trims it. From 1 to 120 characters."
                  }
                },
                "required": [
                  "displayName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The display name was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not valid, displayName is missing, blank or longer than 120 characters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The voucher does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher is retired, or another voucher or pending token already uses the name."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/vouchers/{address}/profile": {
      "put": {
        "tags": [
          "Vouchers and offerings"
        ],
        "summary": "Replace the off-chain profile of a voucher",
        "description": "Replaces the off-chain profile of a voucher. The route writes every field, so a request must send the full record. An omitted field is cleared. The fields 'displayName', 'iconUrl', 'bannerUrl', 'markerIcon' and 'markerColor' are the exception: an omitted field keeps its stored value, and an empty string clears it. The tags are always replaced. Access: User session. The caller must be the voucher owner or an administrator.",
        "operationId": "putVouchersByAddressProfile",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "At most 120 characters. The server trims it."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "At most 500 characters."
                  },
                  "voucherUoa": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "At most 32 characters. Must not be blank. A new value becomes a custom unit of account. Omit the field to clear it."
                  },
                  "voucherValue": {
                    "type": "number",
                    "description": "Zero or more. The value of one voucher in 'voucherUoa'."
                  },
                  "email": {
                    "type": "string",
                    "description": "A valid email address."
                  },
                  "website": {
                    "type": "string",
                    "description": "A valid URL."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No rule."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "At most 5000 characters."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "At most 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From -90 to 90. Send with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From -180 to 180. Send with 'geoLat'."
                  },
                  "iconUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL, or an empty string."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL, or an empty string."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Each tag at most 100 characters, with no comma, not blank, and no duplicate. A tag that is not in the vocabulary becomes a new custom tag."
                  },
                  "markerIcon": {
                    "type": "string",
                    "description": "'basket', 'hand-coin', 'coupon', 'food', 'farm', 'tools', 'health', 'education', or an empty string."
                  },
                  "markerColor": {
                    "type": "string",
                    "description": "'blue', 'purple', 'orange', 'pink', 'cyan', 'brown', or an empty string."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The voucher profile was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not valid, a field is outside the rules, or only one of geoLat and geoLng is present."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, or is not the owner or an administrator. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The voucher does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The voucher is retired, or another voucher or pending token already uses the display name."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/trigger-onramp": {
      "post": {
        "tags": [
          "Pretium"
        ],
        "summary": "Start a fiat-to-crypto onramp",
        "description": "Starts a fiat-to-crypto onramp. Access: User or service token. 'address' must be the caller's own address, unless the caller is a service token or an administrator.",
        "operationId": "postPretiumTriggerOnramp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Checksummed address."
                  },
                  "phoneNumber": {
                    "type": "string",
                    "description": "No check in this API."
                  },
                  "asset": {
                    "type": "string",
                    "enum": [
                      "USDT",
                      "USDC",
                      "cUSD"
                    ],
                    "description": "'USDT', 'USDC' or 'cUSD'."
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 20,
                    "maximum": 250000,
                    "description": "From 20 to 250000."
                  }
                },
                "required": [
                  "address",
                  "asset",
                  "amount"
                ]
              },
              "example": {
                "address": "0x0000000000000000000000000000000000000001",
                "phoneNumber": "+254700000000",
                "asset": "USDT",
                "amount": 20
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/link": {
      "post": {
        "tags": [
          "Pretium"
        ],
        "summary": "Link a public key to a phone number",
        "description": "Links a public key to a phone number. Access: User or service token. 'publicKey' must be the caller's own address, unless the caller is a service token or an administrator.",
        "operationId": "postPretiumLink",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "publicKey": {
                    "type": "string",
                    "description": "Checksummed address."
                  },
                  "phoneNumber": {
                    "type": "string",
                    "description": "Must not be empty."
                  }
                },
                "required": [
                  "publicKey",
                  "phoneNumber"
                ]
              },
              "example": {
                "publicKey": "0x0000000000000000000000000000000000000001",
                "phoneNumber": "+254700000000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/link/{phoneNumber}": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return the links of a phone number",
        "description": "Returns the links of a phone number. Access: Service token or administrator.",
        "operationId": "getPretiumLinkByPhoneNumber",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required."
          }
        ],
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/link-by-address/{address}": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return the link of a wallet address",
        "description": "Returns the link of a wallet address. Access: User or service token. 'address' must be the caller's own address, unless the caller is a service token or an administrator.",
        "operationId": "getPretiumLinkByAddressByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          }
        ],
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/transactions/{phoneNumber}": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return the transactions of a phone number",
        "description": "Returns the transactions of a phone number. Access: Service token or administrator.",
        "operationId": "getPretiumTransactionsByPhoneNumber",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required."
          }
        ],
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/transactions-by-address/{address}": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return the transactions of an address",
        "description": "Returns the transactions of an address. Access: User or service token. 'address' must be the caller's own address, unless the caller is a service token or an administrator.",
        "operationId": "getPretiumTransactionsByAddressByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          }
        ],
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/transactions-recent": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return recent transactions",
        "description": "Returns recent transactions. The route has no parameters. The response is the upstream response. Access: Service token or administrator.",
        "operationId": "getPretiumTransactionsRecent",
        "responses": {
          "200": {
            "description": "The response of the upstream service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "Body that the upstream service returns."
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The request fails local validation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not allowed to use this address or this route."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The upstream call fails or its reply is not valid."
          },
          "502": {
            "$ref": "#/components/responses/BadGateway",
            "description": "E01: The upstream service returns a 5xx status."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pretium/rates": {
      "get": {
        "tags": [
          "Pretium"
        ],
        "summary": "Return the current rates",
        "description": "Returns the current rates. The route has no parameters. The response is the upstream response. Access: User or service token.",
        "operationId": "getPretiumRates",
        "responses": {
          "200": {
            "description": "Rates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {}
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Rates",
                  "result": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/accounts/{address}/tokens/latest": {
      "get": {
        "tags": [
          "Account data"
        ],
        "summary": "List the latest token balances of an account",
        "description": "Returns up to 5 token balances of an account, most recent movement first. The balance is the sum of the successful transfers of the account for each token. Only balances above 0 count. The route skips tokens that the catalog marks as retired. It looks further back in the history to fill the 5 places. This route has no pagination. Access: User or service token.",
        "operationId": "getAccountsByAddressTokensLatest",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address. A bad value returns '400' with code 'E04'."
          }
        ],
        "responses": {
          "200": {
            "description": "Latest token balances for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "tokens": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Cursor value. For holdings it is the ID of the last transaction that moved the token."
                              },
                              "tokenAddress": {
                                "type": "string",
                                "description": "Token contract address."
                              },
                              "tokenSymbol": {
                                "type": "string",
                                "description": "From the catalog."
                              },
                              "tokenName": {
                                "type": "string",
                                "description": "From the catalog."
                              },
                              "tokenDecimals": {
                                "type": "number",
                                "description": "From the catalog."
                              },
                              "balance": {
                                "type": "string",
                                "description": "Raw units."
                              },
                              "iconUrl": {
                                "type": "string",
                                "description": "From the catalog. Not present if there is none."
                              },
                              "lastDateBlock": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Time of the last movement."
                              },
                              "catalogActive": {
                                "type": "boolean",
                                "description": "'false' if the voucher is retired. Not present if the token is not in the catalog."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Latest token balances for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "tokens": [
                      {
                        "id": 1043746,
                        "tokenAddress": "0x1111111111111111111111111111111111111111",
                        "tokenSymbol": "VCH",
                        "tokenName": "Example Voucher",
                        "tokenDecimals": 6,
                        "balance": "100000",
                        "iconUrl": "https://example.com/icon.png",
                        "lastDateBlock": "2026-07-01T12:20:29Z",
                        "catalogActive": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: The address is not valid, or a search value is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: Federation is not configured, so the route does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/accounts/{address}/tokens/issued": {
      "get": {
        "tags": [
          "Account data"
        ],
        "summary": "List the vouchers that an account owns, with its balance",
        "description": "Returns the active catalog vouchers that the address owns, each with the balance of the address. The route sorts rows by catalog voucher ID, newest first. Unlike '/tokens', this route keeps a zero balance. A voucher that the owner never moved has 'balance' '\"0\"' and a 'lastDateBlock' of '0001-01-01T00:00:00Z'. Retired vouchers are not listed. Access: User or service token.",
        "operationId": "getAccountsByAddressTokensIssued",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address. A bad value returns '400' with code 'E04'."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Issued tokens for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tokens": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/TokenBalance"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Issued tokens for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "tokens": [
                      {
                        "id": 12,
                        "tokenAddress": "0x1111111111111111111111111111111111111111",
                        "tokenSymbol": "VCH",
                        "tokenName": "Example Voucher",
                        "tokenDecimals": 6,
                        "balance": "0",
                        "lastDateBlock": "0001-01-01T00:00:00Z",
                        "catalogActive": true
                      }
                    ],
                    "first": 12,
                    "last": 12
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: A query parameter has a wrong type. E04: The address is not valid, or a search value is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: Federation is not configured, so the route does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/accounts/{address}/tokens": {
      "get": {
        "tags": [
          "Account data"
        ],
        "summary": "Return all token balances above 0 for an account",
        "description": "Returns all token balances above 0 for an account. The route sorts rows by the ID of the last transaction that moved the token, highest first. The page can have more than 'perPage' rows when two tokens share the same last transaction. The route does not hide retired vouchers. Check 'catalogActive'. Access: User or service token.",
        "operationId": "getAccountsByAddressTokens",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address. A bad value returns '400' with code 'E04'."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Token balances for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tokens": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/TokenBalance"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Token balances for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "tokens": [
                      {
                        "id": 1043746,
                        "tokenAddress": "0x1111111111111111111111111111111111111111",
                        "tokenSymbol": "VCH",
                        "tokenName": "Example Voucher",
                        "tokenDecimals": 6,
                        "balance": "100000",
                        "lastDateBlock": "2026-07-01T12:20:29Z",
                        "catalogActive": true
                      }
                    ],
                    "first": 1043746,
                    "last": 1043746
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: A query parameter has a wrong type. E04: The address is not valid, or a search value is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: Federation is not configured, so the route does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/accounts/{address}/transfers": {
      "get": {
        "tags": [
          "Account data"
        ],
        "summary": "Return the raw token transfers of an account",
        "description": "Returns the raw token transfers of an account. The route sorts rows by transfer ID, highest first. The list includes failed transactions. Check 'success'. A transfer from an account to itself shows once, as 'IN'. Access: User or service token.",
        "operationId": "getAccountsByAddressTransfers",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address. A bad value returns '400' with code 'E04'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional search text. White space is collapsed. From 2 to 66 characters."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Transfer history for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "transfers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Transfer ID. Use it as the cursor."
                                  },
                                  "txHash": {
                                    "type": "string",
                                    "description": "Transaction hash."
                                  },
                                  "dateBlock": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Block time."
                                  },
                                  "direction": {
                                    "type": "string",
                                    "description": "'IN' or 'OUT', from the view of 'address'."
                                  },
                                  "counterpartyAddress": {
                                    "type": "string",
                                    "description": "The other party."
                                  },
                                  "senderAddress": {
                                    "type": "string",
                                    "description": "The parties of the transfer."
                                  },
                                  "recipientAddress": {
                                    "type": "string",
                                    "description": "The parties of the transfer."
                                  },
                                  "tokenAddress": {
                                    "type": "string",
                                    "description": "The token."
                                  },
                                  "tokenSymbol": {
                                    "type": "string",
                                    "description": "The token."
                                  },
                                  "tokenName": {
                                    "type": "string",
                                    "description": "The token."
                                  },
                                  "tokenDecimals": {
                                    "type": "integer",
                                    "description": "The token."
                                  },
                                  "amount": {
                                    "type": "string",
                                    "description": "Raw units."
                                  },
                                  "success": {
                                    "type": "boolean",
                                    "description": "'false' if the transaction reverted."
                                  },
                                  "uoaValue": {
                                    "type": "string",
                                    "description": "Value of the amount in the unit of account. Not present if there is no value."
                                  },
                                  "uoa": {
                                    "type": "string",
                                    "description": "Name of the unit of account. Not present if there is no value."
                                  },
                                  "hasNote": {
                                    "type": "boolean",
                                    "description": "'true' if the caller can read a private attachment for this transaction."
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Transfer history for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "transfers": [
                      {
                        "id": 743839,
                        "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
                        "dateBlock": "2026-07-01T12:20:29Z",
                        "direction": "IN",
                        "counterpartyAddress": "0x0000000000000000000000000000000000000002",
                        "senderAddress": "0x0000000000000000000000000000000000000002",
                        "recipientAddress": "0x0000000000000000000000000000000000000001",
                        "tokenAddress": "0x1111111111111111111111111111111111111111",
                        "tokenSymbol": "VCH",
                        "tokenName": "Example Voucher",
                        "tokenDecimals": 6,
                        "amount": "100000",
                        "success": true,
                        "uoaValue": "125",
                        "uoa": "Community Hours",
                        "hasNote": false
                      }
                    ],
                    "first": 743839,
                    "last": 743839
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: A query parameter has a wrong type. E04: The address is not valid, or a search value is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: Federation is not configured, so the route does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/accounts/{address}/activity": {
      "get": {
        "tags": [
          "Account data"
        ],
        "summary": "Return the activity feed of an account",
        "description": "Returns classified activity before filtering and pagination. Includes creation, sent, received, swapped, deposited and pool_payout. The App labels pool outflows Pay Out. User swap routes form one row per transaction; pool feeds keep each swap operation. Matched transfer legs are not duplicated. Unrelated batch transfers stay visible. A pool-to-pool send is a payout for the source and a deposit for the destination. A pool outflow that is not part of a swap is pool_payout. Use the transfers endpoint for raw transfers. Rows sort by opaque cursor id descending. Access: User or service token. Reads bounded batches of complete transactions until the requested filtered page is filled or candidates are exhausted. The existing indexer schema does not retain protocol fees. The protocolFee field is omitted rather than inferred from pool fees or token-tax movements; omission does not mean zero. Withdrawals retain nominalAmount separately from the matched transfer amount.",
        "operationId": "getAccountsByAddressActivity",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address. A bad value returns '400' with code 'E04'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional search text. Same rules as for '/transfers'. It also matches pool addresses."
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "creation",
                "sent",
                "received",
                "swapped"
              ]
            },
            "description": "Optional comma-separated or repeated filter: creation, sent, received, swapped, deposited, pool_payout. Case-insensitive. Empty means all types."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Activity for 0x0000000000000000000000000000000000000001",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "activity": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Cursor value."
                                  },
                                  "kind": {
                                    "type": "string",
                                    "description": "Operation classification. creation means a transfer from the zero address.",
                                    "enum": [
                                      "creation",
                                      "sent",
                                      "received",
                                      "swapped",
                                      "deposited",
                                      "pool_payout"
                                    ]
                                  },
                                  "txHash": {
                                    "type": "string",
                                    "description": "Transaction hash."
                                  },
                                  "dateBlock": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Block time."
                                  },
                                  "success": {
                                    "type": "boolean",
                                    "description": "'false' if the transaction reverted."
                                  },
                                  "counterpartyAddress": {
                                    "type": "string",
                                    "description": "The parties."
                                  },
                                  "senderAddress": {
                                    "type": "string",
                                    "description": "The parties."
                                  },
                                  "recipientAddress": {
                                    "type": "string",
                                    "description": "The parties."
                                  },
                                  "transfer": {
                                    "type": "object",
                                    "properties": {
                                      "tokenAddress": {
                                        "type": "string",
                                        "description": "Token contract address."
                                      },
                                      "tokenName": {
                                        "type": "string",
                                        "description": "From the catalog."
                                      },
                                      "tokenSymbol": {
                                        "type": "string",
                                        "description": "From the catalog."
                                      },
                                      "tokenDecimals": {
                                        "type": "number",
                                        "description": "From the catalog."
                                      },
                                      "amount": {
                                        "type": "string",
                                        "description": "Raw units."
                                      }
                                    },
                                    "description": "The token leg."
                                  },
                                  "hasNote": {
                                    "type": "boolean"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "IN",
                                      "OUT"
                                    ],
                                    "description": "Direct-operation direction relative to the viewed account."
                                  },
                                  "initiatorAddress": {
                                    "type": "string",
                                    "description": "Observed caller, when known; may differ from recipient."
                                  },
                                  "poolName": {
                                    "type": "string",
                                    "description": "Current name of the first related pool on the configured chain, when known."
                                  },
                                  "poolAddresses": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "Related pools; route order for swaps."
                                  },
                                  "protocolFee": {
                                    "type": "object",
                                    "properties": {
                                      "tokenAddress": {
                                        "type": "string",
                                        "description": "Token contract address."
                                      },
                                      "tokenName": {
                                        "type": "string",
                                        "description": "From the catalog."
                                      },
                                      "tokenSymbol": {
                                        "type": "string",
                                        "description": "From the catalog."
                                      },
                                      "tokenDecimals": {
                                        "type": "number",
                                        "description": "From the catalog."
                                      },
                                      "amount": {
                                        "type": "string",
                                        "description": "Raw units."
                                      }
                                    },
                                    "description": "Omitted with the current indexer schema: the stored fee is the retained pool fee, and transfers cannot distinguish protocol fees from token tax. Omission means unknown, not zero."
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Activity for 0x0000000000000000000000000000000000000001",
                  "result": {
                    "activity": [
                      {
                        "id": 98765000001,
                        "kind": "received",
                        "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
                        "dateBlock": "2026-07-01T12:20:29Z",
                        "success": true,
                        "counterpartyAddress": "0x0000000000000000000000000000000000000002",
                        "senderAddress": "0x0000000000000000000000000000000000000002",
                        "recipientAddress": "0x0000000000000000000000000000000000000001",
                        "transfer": {
                          "tokenAddress": "0x1111111111111111111111111111111111111111",
                          "tokenName": "Example Voucher",
                          "tokenSymbol": "VCH",
                          "tokenDecimals": 6,
                          "amount": "100000"
                        },
                        "hasNote": false
                      }
                    ],
                    "first": 98765000001,
                    "last": 98765000001
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: A query parameter has a wrong type. E04: The address is not valid, or a search value is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: Federation is not configured, so the route does not exist."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return the profile of the caller",
        "description": "Returns the profile of the caller. Access: User session.",
        "operationId": "getUsersMe",
        "responses": {
          "200": {
            "description": "Current user profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "User ID."
                            },
                            "ethereumAddress": {
                              "type": "string",
                              "description": "Address of the user."
                            },
                            "username": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Public user name."
                            },
                            "name": {
                              "type": "string",
                              "description": "Contact fields. Empty string if not set."
                            },
                            "email": {
                              "type": "string",
                              "description": "Contact fields. Empty string if not set."
                            },
                            "phone": {
                              "type": "string",
                              "description": "Contact fields. Empty string if not set."
                            },
                            "country": {
                              "type": "string",
                              "description": "Contact fields. Empty string if not set."
                            },
                            "preferredCurrency": {
                              "type": "string",
                              "description": "Profile fields. Not present if not set."
                            },
                            "bio": {
                              "type": "string",
                              "description": "Profile fields. Not present if not set."
                            },
                            "website": {
                              "type": "string",
                              "description": "Profile fields. Not present if not set."
                            },
                            "locationName": {
                              "type": "string",
                              "description": "Profile fields. Not present if not set."
                            },
                            "geoLat": {
                              "type": "number",
                              "description": "Profile fields. Not present if not set."
                            },
                            "geoLng": {
                              "type": "number",
                              "description": "Profile fields. Not present if not set."
                            },
                            "avatarUrl": {
                              "type": "string",
                              "description": "Profile fields. Not present if not set."
                            },
                            "role": {
                              "type": "string",
                              "description": "'USER', 'ADMIN' or 'SUPERADMIN'."
                            },
                            "status": {
                              "type": "string",
                              "description": "'PENDING', 'APPROVED' or 'REJECTED'."
                            },
                            "maxPools": {
                              "type": "number",
                              "description": "Pool limit."
                            },
                            "maxTokens": {
                              "type": "number",
                              "description": "Voucher limit."
                            },
                            "maxCatalogs": {
                              "type": "number",
                              "description": "Catalog limit."
                            },
                            "maxOffers": {
                              "type": "number",
                              "description": "Offering limit per voucher."
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "RFC 3339 times."
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "RFC 3339 times."
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Current user profile",
                  "result": {
                    "user": {
                      "id": 7,
                      "ethereumAddress": "0x0000000000000000000000000000000000000001",
                      "username": "alice",
                      "name": "Alice",
                      "email": "user@example.com",
                      "phone": "",
                      "country": "KE",
                      "preferredCurrency": "KES",
                      "bio": "Baker",
                      "website": "https://example.com",
                      "locationName": "Nairobi",
                      "geoLat": -1.286389,
                      "geoLng": 36.817223,
                      "avatarUrl": "https://example.com/avatar.png",
                      "role": "USER",
                      "status": "APPROVED",
                      "maxPools": 10,
                      "maxTokens": 1,
                      "maxCatalogs": 1,
                      "maxOffers": 3,
                      "createdAt": "2026-01-15T10:30:00Z",
                      "updatedAt": "2026-01-15T10:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Error."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/resource-usage": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return how much of each limit the caller used",
        "description": "Returns how much of each limit the caller used. With voucher, offers is scoped to that owned voucher; without it, offers retains the legacy account-wide aggregate. The response has the header 'Cache-Control: no-store'. Access: User session.",
        "operationId": "getUsersMeResourceUsage",
        "parameters": [
          {
            "name": "voucher",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Voucher address. Scopes offers usage to this voucher. The caller must own it unless the caller is an administrator."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "$ref": "#/components/schemas/ResourceLimit"
                            },
                            "pools": {
                              "$ref": "#/components/schemas/ResourceLimit"
                            },
                            "catalogs": {
                              "$ref": "#/components/schemas/ResourceLimit"
                            },
                            "offers": {
                              "$ref": "#/components/schemas/ResourceLimit"
                            },
                            "wants": {
                              "$ref": "#/components/schemas/ResourceLimit"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "",
                  "result": {
                    "usage": {
                      "vouchers": {
                        "used": 1,
                        "limit": 1,
                        "unlimited": false,
                        "canCreate": false
                      },
                      "pools": {
                        "used": 2,
                        "limit": 10,
                        "unlimited": false,
                        "canCreate": true
                      },
                      "catalogs": {
                        "used": 0,
                        "limit": 1,
                        "unlimited": false,
                        "canCreate": true
                      },
                      "offers": {
                        "used": 2,
                        "limit": 3,
                        "unlimited": false,
                        "canCreate": true
                      },
                      "wants": {
                        "used": 1,
                        "limit": 3,
                        "unlimited": false,
                        "canCreate": true
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/catalogs": {
      "get": {
        "tags": [
          "Curated catalogs"
        ],
        "summary": "Return the catalogs that the caller owns",
        "description": "Returns the catalogs that the caller owns. There is no distance filter and no search. The order is 'id' descending. Each page has 100 catalogs. The 'perPage' parameter is not used. The success response is '{\"catalogs\": [<catalog object>], \"nextCursor\": null}'. 'nextCursor' is a string when more catalogs exist. A bad cursor returns '400 E04'. Access: User session.",
        "operationId": "getUsersMeCatalogs",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The nextCursor value of the previous page. Each page has 100 catalogs."
          }
        ],
        "responses": {
          "200": {
            "description": "Catalogs that the caller owns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "catalogs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Catalog"
                          }
                        },
                        "nextCursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04:."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/vouchers": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return the vouchers that the caller owns now",
        "description": "Returns the vouchers that the caller owns now. The catalog owner address must equal the address of the caller. The list includes retired vouchers and vouchers with no location. The response has the header 'Cache-Control: no-store'. Access: User session.",
        "operationId": "getUsersMeVouchers",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Currently owned vouchers for user 7",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "Catalog ID. Use it as the cursor."
                                  },
                                  "chainId": {
                                    "type": "number",
                                    "description": "Chain ID."
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "Voucher address."
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Display name, else contract name, else address."
                                  },
                                  "symbol": {
                                    "type": "string",
                                    "description": "Symbol, or a short form of the address if there is none."
                                  },
                                  "decimals": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "Token decimals."
                                  },
                                  "iconUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Icon URL."
                                  },
                                  "ownerAddress": {
                                    "type": "string",
                                    "description": "Catalog owner address."
                                  },
                                  "active": {
                                    "type": "boolean",
                                    "description": "'false' if the voucher is retired."
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Currently owned vouchers for user 7",
                  "result": {
                    "vouchers": [
                      {
                        "id": 12,
                        "chainId": 42220,
                        "address": "0x1111111111111111111111111111111111111111",
                        "name": "Example Voucher",
                        "symbol": "VCH",
                        "decimals": 6,
                        "iconUrl": null,
                        "ownerAddress": "0x0000000000000000000000000000000000000001",
                        "active": true
                      }
                    ],
                    "first": 12,
                    "last": 12
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/tokens": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "List the vouchers that the caller deployed",
        "description": "Returns the confirmed vouchers that the caller deployed with this API. Only deploys recorded for the caller appear. The route sorts rows by deployment ID, highest first. Access: User session.",
        "operationId": "getUsersMeTokens",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmed tokens for user 7",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tokens": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "otxId": {
                                    "type": "integer"
                                  },
                                  "platformContractId": {
                                    "type": "integer"
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "type": "string"
                                  },
                                  "symbol": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "type": "integer"
                                  },
                                  "admin": {
                                    "type": "string"
                                  },
                                  "trackingId": {
                                    "type": "string"
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Confirmed tokens for user 7",
                  "result": {
                    "tokens": [
                      {
                        "id": 42,
                        "otxId": 100,
                        "platformContractId": 1,
                        "status": "CONFIRMED",
                        "address": "0x1111111111111111111111111111111111111111",
                        "symbol": "VCH",
                        "name": "Example Voucher",
                        "decimals": 6,
                        "admin": "0x0000000000000000000000000000000000000001",
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "createdAt": "2026-01-15T10:30:00Z",
                        "updatedAt": "2026-01-15T10:35:00Z"
                      }
                    ],
                    "first": 42,
                    "last": 42
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/tokens/{address}": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return one confirmed deployed voucher",
        "description": "Returns one confirmed deployed voucher. Access: User session. The caller must have started the deployment, or be an administrator.",
        "operationId": "getUsersMeTokensByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Voucher address. The match is exact. No format check."
          }
        ],
        "responses": {
          "200": {
            "description": "Token at address 0x1111111111111111111111111111111111111111",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "$ref": "#/components/schemas/DeployedToken"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Token at address 0x1111111111111111111111111111111111111111",
                  "result": {
                    "token": {
                      "id": 42,
                      "otxId": 100,
                      "platformContractId": 1,
                      "status": "CONFIRMED",
                      "address": "0x1111111111111111111111111111111111111111",
                      "symbol": "VCH",
                      "name": "Example Voucher",
                      "decimals": 6,
                      "admin": "0x0000000000000000000000000000000000000001",
                      "description": "A voucher for example goods",
                      "website": null,
                      "email": null,
                      "phone": null,
                      "terms": null,
                      "voucherUoa": "Hours",
                      "voucherValue": 1.5,
                      "locationName": "Nairobi",
                      "geoLat": -1.286389,
                      "geoLng": 36.817223,
                      "iconUrl": null,
                      "bannerUrl": null,
                      "markerIcon": "basket",
                      "markerColor": "blue",
                      "tags": [
                        "Food"
                      ],
                      "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                      "createdAt": "2026-01-15T10:30:00Z",
                      "updatedAt": "2026-01-15T10:35:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Error."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/pools": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "List the pools that the caller deployed",
        "description": "Returns the confirmed pools that the caller deployed with this API. The route sorts rows by deployment ID, highest first. Access: User session.",
        "operationId": "getUsersMePools",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "A value of 0, or above 100, becomes 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "An 'id' from a previous page."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Sets the direction."
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmed pools for user 7",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "pools": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/DeployedPool"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Confirmed pools for user 7",
                  "result": {
                    "pools": [
                      {
                        "id": 51,
                        "otxId": 120,
                        "platformContractId": 2,
                        "status": "CONFIRMED",
                        "address": "0x2222222222222222222222222222222222222222",
                        "name": "Example Pool",
                        "symbol": "EXP",
                        "decimals": 6,
                        "tokenRegistryAddress": "0x3333333333333333333333333333333333333333",
                        "limiterAddress": "0x4444444444444444444444444444444444444444",
                        "feePolicyAddress": "0x5555555555555555555555555555555555555555",
                        "quoterAddress": "0x6666666666666666666666666666666666666666",
                        "quoterType": "relative",
                        "protocolFeeControllerAddress": "0x7777777777777777777777777777777777777777",
                        "feesDecoupled": false,
                        "feePpm": null,
                        "feeAddress": null,
                        "admin": "0x0000000000000000000000000000000000000001",
                        "description": null,
                        "unitOfAccount": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "terms": null,
                        "locationName": null,
                        "geoLat": null,
                        "geoLng": null,
                        "imageUrl": null,
                        "bannerUrl": null,
                        "tags": [],
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "createdAt": "2026-01-15T10:30:00Z",
                        "updatedAt": "2026-01-15T10:35:00Z"
                      }
                    ],
                    "first": 51,
                    "last": 51
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/pools/{address}": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return one confirmed deployed pool",
        "description": "Returns one confirmed deployed pool. Access: User session. The caller must have started the deployment, or be an administrator.",
        "operationId": "getUsersMePoolsByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Pool address. The comparison ignores case. No format check."
          }
        ],
        "responses": {
          "200": {
            "description": "One deployed pool.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "pool": {
                          "$ref": "#/components/schemas/DeployedPool"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Error."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/deployments": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return all deploy requests of the caller, newest first",
        "description": "Returns all deploy requests of the caller, newest first. The route has no pagination. Use 'trackingId' with 'GET /api/v2/otx/track/:trackingId'. Access: User session.",
        "operationId": "getUsersMeDeployments",
        "responses": {
          "200": {
            "description": "Deployment history for user 7",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "deployments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "Record ID."
                              },
                              "userId": {
                                "type": "number",
                                "description": "User ID."
                              },
                              "trackingId": {
                                "type": "string",
                                "description": "Tracking UUID."
                              },
                              "resourceType": {
                                "type": "string",
                                "description": "'TOKEN' or 'POOL'."
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "RFC 3339 time of the request."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Deployment history for user 7",
                  "result": {
                    "deployments": [
                      {
                        "id": 3,
                        "userId": 7,
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "resourceType": "TOKEN",
                        "createdAt": "2026-01-15T10:30:00Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/shares/eligibility/{address}": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Check if an address can receive a private send attachment",
        "description": "Checks if an address can receive a private send attachment. The route returns only a boolean. It never returns profile data. Access: User session.",
        "operationId": "getUsersMeSharesEligibilityByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. A hex address. The route does not check the checksum."
          }
        ],
        "responses": {
          "200": {
            "description": "Private share eligibility",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "eligible": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Private share eligibility",
                  "result": {
                    "eligible": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Error."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/key-rotations": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "List the sign-in cards this account replaced",
        "description": "Lists the sign-in cards the account replaced, newest first, so the app can move what is left on an old card. GET /api/v2/users/me/owned-pools?owner=<oldAddress> lists the pools an old address still owns. Access: User session.",
        "operationId": "getUsersMeKeyRotations",
        "responses": {
          "200": {
            "description": "Replaced sign-in cards",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "rotations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "userId": {
                                "type": "integer"
                              },
                              "oldAddress": {
                                "type": "string"
                              },
                              "newAddress": {
                                "type": "string"
                              },
                              "initiatedBy": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "admin"
                                ]
                              },
                              "adminUserId": {
                                "type": "integer"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/credit": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Estimate what the session wallet can reach",
        "description": "The vouchers and pools the wallet can probably reach in one or two hops, from an in-memory graph as of asOfBlock. An estimate; only a quote is authoritative. Private: Cache-Control private, no-store. Access: User session.",
        "operationId": "getUsersMeCredit",
        "parameters": [
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "max, or 1 to the router's maximum (3). A larger depth includes every smaller one. Default max."
          }
        ],
        "responses": {
          "200": {
            "description": "Estimated reach",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "asOfBlock": {
                          "type": "integer"
                        },
                        "graphVersion": {
                          "type": "integer"
                        },
                        "stale": {
                          "type": "boolean"
                        },
                        "depth": {
                          "type": "integer"
                        },
                        "digest": {
                          "type": "string"
                        },
                        "inputs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "voucher": {
                                "type": "string"
                              },
                              "balance": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              }
                            }
                          }
                        },
                        "vouchers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string"
                              },
                              "minHops": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "pools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string"
                              },
                              "minHops": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: depth is not 1 or 2."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "E27 router_unavailable: the graph or the RPC cannot be used. Retry. Never an empty result."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/credit/routes": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "List routes to one voucher",
        "description": "Routes from the wallet's vouchers to one voucher, grouped by input voucher and ranked within each group: with an amount, routes that carry it first by output (exactInput) or input (exactOutput); otherwise by rate. Ties go to fewer hops. 50 routes per page, never silently truncated. Estimates as of asOfBlock. Access: User session.",
        "operationId": "getUsersMeCreditRoutes",
        "parameters": [
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The voucher to obtain."
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(max|[1-5])$"
            },
            "description": "max, or 1 to the router's maximum (3). Default max."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only routes that spend this voucher."
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Raw units. With it, each route reports carriesAmount."
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "exactInput",
                "exactOutput"
              ]
            },
            "description": "exactInput (default) or exactOutput."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "From a previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Routes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "asOfBlock": {
                          "type": "integer"
                        },
                        "graphVersion": {
                          "type": "integer"
                        },
                        "stale": {
                          "type": "boolean"
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "address": {
                              "type": "string"
                            },
                            "symbol": {
                              "type": "string"
                            },
                            "decimals": {
                              "type": "integer"
                            }
                          }
                        },
                        "complete": {
                          "type": "boolean"
                        },
                        "inputs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "voucher": {
                                "type": "string"
                              },
                              "walletBalance": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "routes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "hops": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "pool": {
                                            "type": "object",
                                            "properties": {
                                              "address": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          "tokenIn": {
                                            "type": "string"
                                          },
                                          "tokenOut": {
                                            "type": "string"
                                          },
                                          "feePpm": {
                                            "type": "string"
                                          },
                                          "feeSource": {
                                            "type": "string",
                                            "enum": [
                                              "pair",
                                              "default"
                                            ]
                                          },
                                          "protocolFeePpm": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    },
                                    "rate": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "properties": {
                                        "amountIn": {
                                          "type": "string",
                                          "description": "Raw token units as a decimal string."
                                        },
                                        "amountOut": {
                                          "type": "string",
                                          "description": "Raw token units as a decimal string."
                                        }
                                      }
                                    },
                                    "maxAmountIn": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "maxAmountOut": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "maxIsExact": {
                                      "type": "boolean"
                                    },
                                    "limitedBy": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "wallet, deposit_cap or liquidity."
                                    },
                                    "limitedByHop": {
                                      "type": "integer"
                                    },
                                    "carriesAmount": {
                                      "type": "boolean"
                                    },
                                    "amountIn": {
                                      "type": "string",
                                      "description": "Raw token units as a decimal string."
                                    },
                                    "amountOut": {
                                      "type": "string",
                                      "description": "Raw token units as a decimal string."
                                    },
                                    "refusal": {
                                      "type": "object",
                                      "properties": {
                                        "reason": {
                                          "type": "string"
                                        },
                                        "hop": {
                                          "type": "integer"
                                        }
                                      }
                                    },
                                    "effectiveFeePpm": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "fallbackPools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "liquidity": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "accepts": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: to is missing, or a parameter is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: the voucher is not in the catalog."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E28: the listing changed between pages; restart from the first page."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "E27 router_unavailable: the graph or the RPC cannot be used. Retry. Never an empty result."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/credit/quote": {
      "post": {
        "tags": [
          "Current user"
        ],
        "summary": "Quote a route and return the batch to sign",
        "description": "Reads the pools and the wallet at one pinned block, reproduces the contract arithmetic, checks it against getAmountOut, simulates the batch, and returns the SignedBatchedCall fields and EIP-712 digest. Three calls per hop: approve(pool, 0), approve(pool, amountIn), bounded withdraw. Intermediate hops pay the wallet; hop i must deliver what hop i+1 spends. The final minimum is the quoted output (exactInput) or the requested amount (exactOutput); no tolerance. Nothing is stored. Rate limit 0.5 per second per user, burst 10. Access: User session.",
        "operationId": "postUsersMeCreditQuote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "route",
                  "mode",
                  "amount"
                ],
                "properties": {
                  "route": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "object",
                      "required": [
                        "pool",
                        "tokenIn",
                        "tokenOut"
                      ],
                      "properties": {
                        "pool": {
                          "type": "string"
                        },
                        "tokenIn": {
                          "type": "string"
                        },
                        "tokenOut": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "exactInput",
                      "exactOutput"
                    ]
                  },
                  "amount": {
                    "type": "string",
                    "description": "Raw token units as a decimal string."
                  },
                  "recipient": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Final recipient; the wallet by default."
                  },
                  "keyHash": {
                    "type": "string",
                    "description": "Empty or zero for the root key (Sign-in Card); a passkey sends its key hash."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quote and signable batch",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "quoteId": {
                          "type": "string"
                        },
                        "block": {
                          "type": "object",
                          "properties": {
                            "number": {
                              "type": "integer"
                            },
                            "hash": {
                              "type": "string"
                            }
                          }
                        },
                        "expiresAt": {
                          "type": "integer"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "amountIn": {
                          "type": "string",
                          "description": "Raw token units as a decimal string."
                        },
                        "amountOut": {
                          "type": "string",
                          "description": "Raw token units as a decimal string."
                        },
                        "minAmountOut": {
                          "type": "string",
                          "description": "Raw token units as a decimal string."
                        },
                        "recipient": {
                          "type": "string"
                        },
                        "hops": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "pool": {
                                "type": "string"
                              },
                              "tokenIn": {
                                "type": "string"
                              },
                              "tokenOut": {
                                "type": "string"
                              },
                              "amountIn": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "grossOut": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "poolFee": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "protocolFee": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "netOut": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "minAmountOut": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "feePpm": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              },
                              "protocolFeePpm": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              }
                            }
                          }
                        },
                        "fees": {
                          "type": "object",
                          "properties": {
                            "feeFreeAmountOut": {
                              "type": "string",
                              "description": "Raw token units as a decimal string."
                            },
                            "effectiveFeePpm": {
                              "type": "string"
                            }
                          }
                        },
                        "surplus": {
                          "type": "object",
                          "properties": {
                            "output": {
                              "type": "string",
                              "description": "Raw token units as a decimal string."
                            },
                            "bridge": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "voucher": {
                                    "type": "string"
                                  },
                                  "amount": {
                                    "type": "string",
                                    "description": "Raw token units as a decimal string."
                                  }
                                }
                              }
                            }
                          }
                        },
                        "batch": {
                          "type": "object",
                          "properties": {
                            "batchedCall": {
                              "type": "object",
                              "properties": {
                                "calls": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "to": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "revertOnFailure": {
                                  "type": "boolean"
                                }
                              }
                            },
                            "nonce": {
                              "type": "string"
                            },
                            "keyHash": {
                              "type": "string"
                            },
                            "executor": {
                              "type": "string"
                            },
                            "deadline": {
                              "type": "string"
                            },
                            "digest": {
                              "type": "string"
                            }
                          }
                        },
                        "simulation": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "gasEstimate": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "delegated": {
                          "type": "boolean"
                        },
                        "eoaNonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: a field fails a rule, or the route is not contiguous, repeats a pool or voucher, or is too long."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E24 route_unavailable (result.reason, result.hop), E25 quote_mismatch, or E26 simulation_failed (result.revert)."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: the quote rate limit is exceeded."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "E27 router_unavailable: the graph or the RPC cannot be used. Retry. Never an empty result."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/routed-swaps": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "List grouped receipts of routed exchanges",
        "description": "Newest first, 20 per page. A routed exchange is one entry with its hops. Access: User session.",
        "operationId": "getUsersMeRoutedSwaps",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "From a previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Routed swaps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "swap": {
                                "type": "object",
                                "properties": {
                                  "trackingId": {
                                    "type": "string"
                                  },
                                  "chainId": {
                                    "type": "integer"
                                  },
                                  "wallet": {
                                    "type": "string"
                                  },
                                  "recipient": {
                                    "type": "string"
                                  },
                                  "tokenIn": {
                                    "type": "string"
                                  },
                                  "tokenOut": {
                                    "type": "string"
                                  },
                                  "amountIn": {
                                    "type": "string",
                                    "description": "Raw token units as a decimal string."
                                  },
                                  "minAmountOut": {
                                    "type": "string",
                                    "description": "Raw token units as a decimal string."
                                  },
                                  "hopCount": {
                                    "type": "integer"
                                  },
                                  "bounded": {
                                    "type": "boolean"
                                  },
                                  "deadline": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "txHash": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "status": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Dispatch status of the relayed transaction."
                                  },
                                  "hops": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "index": {
                                          "type": "integer"
                                        },
                                        "pool": {
                                          "type": "string"
                                        },
                                        "tokenIn": {
                                          "type": "string"
                                        },
                                        "tokenOut": {
                                          "type": "string"
                                        },
                                        "amountIn": {
                                          "type": "string",
                                          "description": "Raw token units as a decimal string."
                                        },
                                        "minAmountOut": {
                                          "type": "string",
                                          "description": "Raw token units as a decimal string."
                                        },
                                        "recipient": {
                                          "type": "string"
                                        },
                                        "txHash": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "block": {
                                          "type": [
                                            "integer",
                                            "null"
                                          ]
                                        },
                                        "logIndex": {
                                          "type": [
                                            "integer",
                                            "null"
                                          ]
                                        },
                                        "settledAmountIn": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "quotedAmountOut": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "nominalAmountOut": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "amountOut": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "poolFee": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "protocolFee": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "settledAt": {
                                          "type": [
                                            "string",
                                            "null"
                                          ],
                                          "format": "date-time"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "settled": {
                                "type": "boolean"
                              },
                              "bridgeRemainder": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "voucher": {
                                      "type": "string"
                                    },
                                    "amount": {
                                      "type": "string",
                                      "description": "Raw token units as a decimal string."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: the cursor is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/routed-swaps/{trackingId}": {
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Read the grouped receipt of one routed exchange",
        "description": "Recorded from the signed calldata when the relay accepted the route; each hop is filled from its settlement event. Another wallet's tracking id reads as not found. Access: User session.",
        "operationId": "getUsersMeRoutedSwap",
        "parameters": [
          {
            "name": "trackingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Routed swap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "swap": {
                          "type": "object",
                          "properties": {
                            "trackingId": {
                              "type": "string"
                            },
                            "chainId": {
                              "type": "integer"
                            },
                            "wallet": {
                              "type": "string"
                            },
                            "recipient": {
                              "type": "string"
                            },
                            "tokenIn": {
                              "type": "string"
                            },
                            "tokenOut": {
                              "type": "string"
                            },
                            "amountIn": {
                              "type": "string",
                              "description": "Raw token units as a decimal string."
                            },
                            "minAmountOut": {
                              "type": "string",
                              "description": "Raw token units as a decimal string."
                            },
                            "hopCount": {
                              "type": "integer"
                            },
                            "bounded": {
                              "type": "boolean"
                            },
                            "deadline": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "txHash": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "status": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Dispatch status of the relayed transaction."
                            },
                            "hops": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer"
                                  },
                                  "pool": {
                                    "type": "string"
                                  },
                                  "tokenIn": {
                                    "type": "string"
                                  },
                                  "tokenOut": {
                                    "type": "string"
                                  },
                                  "amountIn": {
                                    "type": "string",
                                    "description": "Raw token units as a decimal string."
                                  },
                                  "minAmountOut": {
                                    "type": "string",
                                    "description": "Raw token units as a decimal string."
                                  },
                                  "recipient": {
                                    "type": "string"
                                  },
                                  "txHash": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "block": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "logIndex": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "settledAmountIn": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "quotedAmountOut": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "nominalAmountOut": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "amountOut": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "poolFee": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "protocolFee": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "settledAt": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "settled": {
                          "type": "boolean"
                        },
                        "bridgeRemainder": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "voucher": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "string",
                                "description": "Raw token units as a decimal string."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: trackingId is not a UUID."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: no receipt for this wallet."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/shares/{txHash}": {
      "post": {
        "tags": [
          "Current user"
        ],
        "summary": "Create a private attachment for a confirmed token send",
        "description": "Creates a private attachment for a confirmed token send. Only the sender and the recipient of the send can read it later. The note and the profile data stay off chain. Access: User session.",
        "operationId": "postUsersMeSharesByTxHash",
        "parameters": [
          {
            "name": "txHash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. 66 characters. Starts with '0x'. Hexadecimal."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission": {
                    "type": "integer",
                    "description": "Bit mask from 0 to 7. Default 0. '1' is email, '2' is phone, '4' is location."
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Trimmed. Maximum 500 characters."
                  }
                }
              },
              "example": {
                "permission": 5,
                "note": "Thanks for the supplies"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private send attachment saved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "shareId": {
                          "type": "integer"
                        },
                        "txHash": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Private send attachment saved",
                  "result": {
                    "shareId": 42,
                    "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: txHash or permission is not valid, note is too long, an unknown permission bit is set, or both note and permission are empty."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is a service token, or the user record does not match the session address. E10: The caller uses a service token."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: A different attachment already exists for this transaction."
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "E19: The transaction is not a confirmed token send from the caller, the recipient is not available (not registered, not approved, or the caller), or the profile lacks the data for a permission bit."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01: The chain node call fails."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "get": {
        "tags": [
          "Current user"
        ],
        "summary": "Return the private attachment of a send",
        "description": "Returns the private attachment of a send. Access: User session. Only the sender (owner) and the recipient of the attachment can read it.",
        "operationId": "getUsersMeSharesByTxHash",
        "parameters": [
          {
            "name": "txHash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. 66 characters. Starts with '0x'. Hexadecimal. The comparison ignores case."
          }
        ],
        "responses": {
          "200": {
            "description": "Private send attachment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Attachment ID."
                        },
                        "txHash": {
                          "type": "string",
                          "description": "Transaction hash."
                        },
                        "permission": {
                          "type": "number",
                          "description": "The bit mask."
                        },
                        "note": {
                          "type": "string",
                          "description": "The note. Empty string if none."
                        },
                        "sharedBy": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "location": {
                              "type": "object",
                              "properties": {
                                "locationName": {
                                  "type": "string"
                                },
                                "lat": {
                                  "type": "number"
                                },
                                "lng": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "RFC 3339 time."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Private send attachment",
                  "result": {
                    "id": 42,
                    "txHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
                    "permission": 5,
                    "note": "Thanks for the supplies",
                    "sharedBy": {
                      "name": "Alice",
                      "email": "user@example.com",
                      "location": {
                        "locationName": "Nairobi, Kenya",
                        "lat": -1.286389,
                        "lng": 36.817223
                      }
                    },
                    "createdAt": "2026-08-04T12:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: txHash is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid credential. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is a service token. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: No attachment exists, or the caller is not the sender or the recipient."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/reports": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Return the posts that the caller wrote, in every status",
        "description": "Returns the posts that the caller wrote, in every status. The author is the caller. The 'author' parameter is not used. The response has 'Cache-Control: no-store'. Access: User session.",
        "operationId": "getUsersMeReports",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "APPROVED",
                "REJECTED"
              ]
            },
            "description": "'DRAFT', 'SUBMITTED', 'APPROVED', or 'REJECTED'. The case does not matter. No value shows every status. Another value returns '400 E04'."
          },
          {
            "name": "cursorUpdatedAt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Send both or neither. One alone returns '400 E04'."
          },
          {
            "name": "cursorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Send both or neither. One alone returns '400 E04'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "'true' gets the older page. 'false' gets the newer page. 'next' without a cursor returns '400 E04'. Default: true when a cursor exists."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search in 'title' and 'description'. The length must be 2 to 64 characters after trimming. A term of 2 characters matches the start of the text. A longer term matches any part of the text."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list. At most 12 distinct values. Each value must exist in the tag vocabulary."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A post must have any of the tags, or all of the tags."
          },
          {
            "name": "vouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list of 'chainId:address' values. At most 12 distinct values. Every voucher must exist."
          },
          {
            "name": "voucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A post must link any of the vouchers, or all of the vouchers."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repeat the parameter or use a comma-separated list of 'chainId:address' values. At most 12 distinct values. Every pool must exist."
          },
          {
            "name": "poolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "A post must link any of the pools, or all of the pools."
          }
        ],
        "responses": {
          "200": {
            "description": "Posts that the caller wrote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reports": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Post"
                          }
                        },
                        "first": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "id": {
                                  "type": "integer"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "id": {
                                  "type": "integer"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad parameter."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/users/me/reports/{id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Get one post that the caller wrote",
        "description": "Returns one post that the caller wrote, in any status, with the detail fields. 'description' is 'Report'. 'result' is '{\"report\": <post>}'. The response has 'Cache-Control: no-store'. The post of another author returns '404 E03', the same as a post that does not exist. Errors: '400 E04' for a bad ':id'. '401 E06'. '403 E10' for a service token. --- Access: User session.",
        "operationId": "getUsersMeReportsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Record ID."
          }
        ],
        "responses": {
          "200": {
            "description": "One post that the caller wrote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a bad :id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06:."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03:."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return one page of the account directory",
        "description": "Return one page of the account directory. Rows are newest first. Access: Administrative.",
        "operationId": "getAdminUsers",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term. The server searches the name, username, email, phone and address of each account. It does not search country or role."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by approval status. Values are 'PENDING', 'APPROVED' and 'REJECTED'. The case does not matter."
          },
          {
            "name": "roles",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by USER, ADMIN, or SUPERADMIN. Repeat the parameter or use comma-separated values. Selected roles use OR semantics."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Users list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "users": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/User"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Users list",
                  "result": {
                    "users": [
                      {
                        "id": 4210,
                        "ethereumAddress": "0x0000000000000000000000000000000000000001",
                        "username": "ada",
                        "name": "Ada Lovelace",
                        "email": "user@example.com",
                        "phone": "+254700000000",
                        "country": "KE",
                        "role": "USER",
                        "status": "PENDING",
                        "maxPools": 5,
                        "maxTokens": 5,
                        "maxCatalogs": 5,
                        "maxOffers": 5,
                        "createdAt": "2026-08-12T10:00:00Z",
                        "updatedAt": "2026-08-12T10:00:00Z"
                      }
                    ],
                    "first": 4210,
                    "last": 4210
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: q is shorter than 2 or longer than 64 characters. E04: status or roles contains an unknown value."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/role": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Change a User to Admin or an Admin to User",
        "description": "Changes USER to ADMIN or ADMIN to USER without changing approval status. Existing SUPERADMIN records are immutable through this route. Access: Superadmin.",
        "operationId": "putAdminUsersByAddressRole",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "USER",
                      "ADMIN"
                    ]
                  }
                },
                "required": [
                  "role"
                ]
              },
              "example": {
                "role": "ADMIN"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User role updated or unchanged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/User"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: The address, body, or role is invalid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not a current SUPERADMIN."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No user has this address."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The target is a SUPERADMIN."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/key-rotation": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Move an account to a new sign-in card",
        "description": "Moves the account at the address to a new sign-in card without proof from the old card, for a forgotten password with no passkey. The old wallet's assets stay on chain. The new card signs a SIWE message with the statement \"Replace sign-in card <address> with <new address>\". Sets no cookie. Not allowed for the caller's own account or a SUPERADMIN. Access: Superadmin.",
        "operationId": "postAdminUsersByAddressKeyRotation",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account's current address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new": {
                    "$ref": "#/components/schemas/KeyRotationSIWEProof"
                  }
                },
                "required": [
                  "new"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sign-in card replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyRotationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: The address or the proof is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not a current SUPERADMIN, the target is the caller, or the target is a SUPERADMIN."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No account holds the address."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: As for POST /auth/key-rotation."
          },
          "410": {
            "$ref": "#/components/responses/Gone",
            "description": "E20: The address was already replaced with a different address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/approve": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Set the status of an account to APPROVED",
        "description": "Sets the status of an account to APPROVED. The route does not check the old status or the role of the account. Access: Administrative.",
        "operationId": "putAdminUsersByAddressApprove",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "responses": {
          "200": {
            "description": "User status updated to APPROVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "ethereumAddress": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "User status updated to APPROVED",
                  "result": {
                    "user": {
                      "id": 4210,
                      "ethereumAddress": "0x0000000000000000000000000000000000000001",
                      "status": "APPROVED"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No user has this address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/reject": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Set the status of an account to REJECTED",
        "description": "Sets the status of an account to REJECTED. The route does not check the old status or the role of the account. Access: Administrative.",
        "operationId": "putAdminUsersByAddressReject",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "responses": {
          "200": {
            "description": "User status updated to APPROVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "ethereumAddress": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "User status updated to APPROVED",
                  "result": {
                    "user": {
                      "id": 4210,
                      "ethereumAddress": "0x0000000000000000000000000000000000000001",
                      "status": "APPROVED"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No user has this address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/limits": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Change the creation limits of an account",
        "description": "Change the creation limits of an account. The server changes only the fields that you send. Access: Administrative.",
        "operationId": "putAdminUsersByAddressLimits",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "maxPools": {
                    "type": "integer",
                    "description": "Pool limit. The value must be from '0' to '2147483647'."
                  },
                  "maxTokens": {
                    "type": "integer",
                    "description": "Voucher limit. The value must be from '0' to '2147483647'."
                  },
                  "maxCatalogs": {
                    "type": "integer",
                    "description": "Catalog limit. The value must be from '0' to '2147483647'."
                  },
                  "maxOffers": {
                    "type": "integer",
                    "description": "Offering limit per voucher. The value must be from '0' to '2147483647'."
                  }
                }
              },
              "example": {
                "maxPools": 20,
                "maxTokens": 50
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The limits were changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/User"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A value is negative or above 2147483647, or address is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No user has this address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/profile": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Replace the profile of an account",
        "description": "Correct the identity, contact details and preferences of another account. The route does not change the status, the role or the limits. Access: Administrative.",
        "operationId": "putAdminUsersByAddressProfile",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Optional. The server trims the value. It must have 1 to 80 characters. If you omit it, the account has no username, and 'name' is not empty, the server assigns a username."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Maximum 80 characters."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be a valid email address. Must be unique across accounts."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Must be unique across accounts."
                  },
                  "country": {
                    "type": "string",
                    "description": "Exactly 2 characters when present."
                  },
                  "preferredCurrency": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Optional. Maximum 32 characters."
                  },
                  "bio": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Optional. Maximum 500 characters. Send '\"\"' to clear."
                  },
                  "website": {
                    "type": "string",
                    "description": "Optional. Must be an 'http' or 'https' URL. Send '\"\"' to clear."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Optional. Maximum 200 characters. It must not be blank."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "Optional. From '-90' to '90'. Send it with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "Optional. From '-180' to '180'. Send it with 'geoLat'."
                  },
                  "clearLocation": {
                    "type": "boolean",
                    "description": "Optional. If 'true', the server clears the location label and the coordinates."
                  },
                  "avatarUrl": {
                    "type": "string",
                    "description": "Optional. Must be an 'http' or 'https' URL."
                  },
                  "clearAvatar": {
                    "type": "boolean",
                    "description": "Optional. If 'true', the server clears the avatar."
                  }
                }
              },
              "example": {
                "name": "Ada Lovelace",
                "email": "user@example.com",
                "phone": "+254700000000",
                "country": "KE",
                "preferredCurrency": "KES",
                "bio": "Community organiser",
                "website": "https://example.com",
                "locationName": "Nairobi",
                "geoLat": -1.2921,
                "geoLng": 36.8219
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The profile was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/User"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. The description is Validation failed on one or more fields. E04: Only one of geoLat and geoLng is present. The description is Validation failed: geoLat and geoLng must be provided together. E04: A rule between fields fails (clearLocation, clearAvatar, blank locationName, invalid username, blank or too long preferredCurrency). The description names the rule."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: No user has this address. The description is user not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The username is in use. E17: The email belongs to another account. E18: The phone number belongs to another account."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/pools": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List the pools of an account",
        "description": "Return the pools to which an account belongs, with cursor pagination. The server derives the membership. An account belongs to each pool that allows a voucher that the account owns. Pool ownership and deployment history do not count. Access: Administrative.",
        "operationId": "getAdminUsersByAddressPools",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Number of rows in one page. The maximum is '100'. A value of '0' or a value above '100' becomes '100'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A row ID from an earlier response. Use the value of 'first' or 'last'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Direction from 'cursor'."
          }
        ],
        "responses": {
          "200": {
            "description": "Pool memberships of the account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "pools": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/DeployedPool"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not valid. E02: A pagination parameter has an invalid type."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/users/{address}/stats": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return the counts for one account",
        "description": "Return the counts for one account. Access: Administrative.",
        "operationId": "getAdminUsersByAddressStats",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "responses": {
          "200": {
            "description": "Account statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reports": {
                          "type": "integer",
                          "description": "Approved posts that the account wrote."
                        },
                        "vouchers": {
                          "type": "integer",
                          "description": "Vouchers that the account owns, that are active and have a location."
                        },
                        "poolMemberships": {
                          "type": "integer",
                          "description": "Number of different pools that allow a voucher that the account owns."
                        },
                        "transactions": {
                          "type": "integer",
                          "description": "Number of successful transactions of the account."
                        },
                        "swaps": {
                          "type": "integer",
                          "description": "Number of successful swaps."
                        },
                        "partners": {
                          "type": "integer",
                          "description": "Number of different counterparties."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Account statistics",
                  "result": {
                    "reports": 3,
                    "vouchers": 2,
                    "poolMemberships": 1,
                    "transactions": 118,
                    "swaps": 4,
                    "partners": 9
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/tokens": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return all confirmed voucher deployments of all users",
        "description": "Return all confirmed voucher deployments of all users. The list is not paginated. Rows are newest first by 'createdAt'. The name is the display name of the voucher when one exists. Access: Administrative.",
        "operationId": "getAdminTokens",
        "responses": {
          "200": {
            "description": "All deployed tokens",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "tokens": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/DeployedToken"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "All deployed tokens",
                  "result": {
                    "tokens": [
                      {
                        "id": 12,
                        "otxId": 340,
                        "platformContractId": 1,
                        "status": "CONFIRMED",
                        "address": "0x1111111111111111111111111111111111111111",
                        "symbol": "MTK",
                        "name": "My Token",
                        "decimals": 6,
                        "admin": "0x0000000000000000000000000000000000000001",
                        "description": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "terms": null,
                        "voucherUoa": null,
                        "voucherValue": null,
                        "locationName": null,
                        "geoLat": null,
                        "geoLng": null,
                        "iconUrl": null,
                        "bannerUrl": null,
                        "markerIcon": null,
                        "markerColor": null,
                        "tags": null,
                        "trackingId": "",
                        "createdAt": "2026-08-12T10:00:00Z",
                        "updatedAt": "2026-08-12T10:00:00Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/pools": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return all confirmed pool deployments of all users",
        "description": "Return all confirmed pool deployments of all users. The list is not paginated. Rows are newest first by 'createdAt'. Access: Administrative.",
        "operationId": "getAdminPools",
        "responses": {
          "200": {
            "description": "All deployed pools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "pools": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/DeployedPool"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "All deployed pools",
                  "result": {
                    "pools": [
                      {
                        "id": 7,
                        "otxId": 351,
                        "platformContractId": 2,
                        "status": "CONFIRMED",
                        "address": "0x2222222222222222222222222222222222222222",
                        "name": "My Pool",
                        "symbol": "MYP",
                        "decimals": 6,
                        "tokenRegistryAddress": "0x0000000000000000000000000000000000000003",
                        "limiterAddress": "0x0000000000000000000000000000000000000004",
                        "feePolicyAddress": "0x0000000000000000000000000000000000000005",
                        "quoterAddress": "0x0000000000000000000000000000000000000006",
                        "quoterType": "decimal",
                        "protocolFeeControllerAddress": "0x0000000000000000000000000000000000000007",
                        "feesDecoupled": false,
                        "feePpm": null,
                        "feeAddress": null,
                        "admin": "0x0000000000000000000000000000000000000001",
                        "description": null,
                        "unitOfAccount": null,
                        "website": null,
                        "email": null,
                        "phone": null,
                        "terms": null,
                        "locationName": null,
                        "geoLat": null,
                        "geoLng": null,
                        "imageUrl": null,
                        "bannerUrl": null,
                        "tags": null,
                        "trackingId": "",
                        "createdAt": "2026-08-12T10:00:00Z",
                        "updatedAt": "2026-08-12T10:00:00Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/pools/{address}/vouchers": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return the vouchers of one pool, with cursor pagination",
        "description": "Return the vouchers of one pool, with cursor pagination. Access: Administrative.",
        "operationId": "getAdminPoolsByAddressVouchers",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            },
            "description": "Number of rows in one page. The maximum is '100'. A value of '0' or a value above '100' becomes '100'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A row ID from an earlier response. Use the value of 'first' or 'last'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Direction from 'cursor'."
          }
        ],
        "responses": {
          "200": {
            "description": "Vouchers in pool 0x2222222222222222222222222222222222222222",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Description."
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/PoolVoucher"
                              },
                              "description": "Page of pool vouchers."
                            },
                            "total": {
                              "type": "integer",
                              "description": "Number of vouchers of the pool, including retired vouchers. It does not depend on the page."
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Vouchers in pool 0x2222222222222222222222222222222222222222",
                  "result": {
                    "vouchers": [
                      {
                        "id": 88,
                        "chainId": 1,
                        "address": "0x1111111111111111111111111111111111111111",
                        "name": "Community Credit",
                        "symbol": "CCR",
                        "active": false,
                        "isAllowed": true,
                        "tags": []
                      }
                    ],
                    "first": 88,
                    "last": 88,
                    "total": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/pools/{address}/profile": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Replace the off-chain record of a pool",
        "description": "Replace the off-chain record of a pool. The route changes catalog data only. It does not change the name, symbol, decimals or contract addresses, which are facts from the chain. The owner can use 'PUT /api/v2/pools/:address/profile' with the same body. Access: Administrative.",
        "operationId": "putAdminPoolsByAddressProfile",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Maximum 80 characters. The server trims the value. Omit it to keep the old value. Send '\"\"' to remove the override."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Maximum 500 characters."
                  },
                  "unitOfAccount": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Maximum 32 characters."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be a valid email address."
                  },
                  "website": {
                    "type": "string",
                    "description": "Must be a valid URL."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No validation."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Maximum 5000 characters."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Maximum 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From '-90' to '90'. Send it with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From '-180' to '180'. Send it with 'geoLat'."
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL. Omit it to keep the old value. Send '\"\"' to clear."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL. Omit it to keep the old value. Send '\"\"' to clear."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The new full set of tags."
                  }
                }
              },
              "example": {
                "displayName": "My Pool",
                "description": "Pool for the community",
                "unitOfAccount": "KES",
                "locationName": "Nairobi",
                "geoLat": -1.2921,
                "geoLng": 36.8219,
                "tags": [
                  "Food",
                  "Farming"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pool profile was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "pool": {
                          "$ref": "#/components/schemas/DeployedPool"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. E04: Only one of geoLat and geoLng is present. E04: A tag or the unit of account is not valid. The description names the problem."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The pool does not exist. The description is pool not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: Another pool has the same displayName. The description is a pool with this name already exists. E16: The request changes the unit of account of an oracle pool."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vouchers/{address}/profile": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Replace the off-chain record of a voucher",
        "description": "Replace the off-chain record of a voucher. The route changes catalog data only. It does not change the contract name, symbol, decimals or owner. It does not retire or restore the voucher. The owner can use 'PUT /api/v2/vouchers/:address/profile' with the same body. Access: Administrative.",
        "operationId": "putAdminVouchersByAddressProfile",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Maximum 120 characters. Omit it to keep the old value. Send '\"\"' to remove the override."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Maximum 500 characters."
                  },
                  "voucherUoa": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Maximum 32 characters."
                  },
                  "voucherValue": {
                    "type": "number",
                    "description": "Value in the unit of account. Must be '0' or more."
                  },
                  "email": {
                    "type": "string",
                    "description": "Must be a valid email address."
                  },
                  "website": {
                    "type": "string",
                    "description": "Must be a valid URL."
                  },
                  "phone": {
                    "type": "string",
                    "description": "No validation."
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Maximum 5000 characters."
                  },
                  "locationName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Maximum 200 characters."
                  },
                  "geoLat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "From '-90' to '90'. Send it with 'geoLng'."
                  },
                  "geoLng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "From '-180' to '180'. Send it with 'geoLat'."
                  },
                  "iconUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL. Omit it to keep the old value. Send '\"\"' to clear."
                  },
                  "bannerUrl": {
                    "type": "string",
                    "description": "An 'http' or 'https' URL. Omit it to keep the old value. Send '\"\"' to clear."
                  },
                  "markerIcon": {
                    "type": "string",
                    "enum": [
                      "basket",
                      "hand-coin",
                      "coupon",
                      "food",
                      "farm",
                      "tools",
                      "health",
                      "education"
                    ],
                    "description": "One of 'basket', 'hand-coin', 'coupon', 'food', 'farm', 'tools', 'health', 'education'. Omit it to keep the old value. Send '\"\"' to return to the automatic icon."
                  },
                  "markerColor": {
                    "type": "string",
                    "enum": [
                      "blue",
                      "purple",
                      "orange",
                      "pink",
                      "cyan",
                      "brown"
                    ],
                    "description": "One of 'blue', 'purple', 'orange', 'pink', 'cyan', 'brown'. Omit it to keep the old value. Send '\"\"' to return to the automatic color."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The new full set of tags."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The voucher profile was replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails validation. E04: Only one of geoLat and geoLng is present. E04: A tag or the unit of account is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The voucher does not exist, or the voucher is retired. The description is voucher not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: Another voucher has the same displayName. The description is a voucher with this name already exists."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vouchers": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List vouchers for the console",
        "description": "Return the voucher catalog for the console, with cursor pagination. This route shows all vouchers. Each row has the field 'active'. This route has no 'bbox' parameter. Access: Administrative.",
        "operationId": "getAdminVouchers",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag filter. Repeat the parameter or use a comma list. Maximum 12 values. Each value must be in the tag vocabulary."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'any' (default) or 'all'. The case does not matter."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Owner address."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'all' (default), 'active' or 'retired'. The case does not matter."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vouchers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "vouchers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "Voucher ID."
                                  },
                                  "chainId": {
                                    "type": "integer",
                                    "description": "Chain ID."
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "Voucher address."
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Display name, or the contract name."
                                  },
                                  "symbol": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Symbol."
                                  },
                                  "iconUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Icon URL."
                                  },
                                  "locationName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Location label."
                                  },
                                  "geoLat": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "Coordinates."
                                  },
                                  "geoLng": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "Coordinates."
                                  },
                                  "kind": {
                                    "type": "string",
                                    "description": "Marker kind that the server derives."
                                  },
                                  "active": {
                                    "type": "boolean",
                                    "description": "'false' for a retired voucher."
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Vouchers",
                  "result": {
                    "vouchers": [
                      {
                        "id": 88,
                        "chainId": 1,
                        "address": "0x1111111111111111111111111111111111111111",
                        "name": "Community Credit",
                        "symbol": "CCR",
                        "iconUrl": null,
                        "locationName": null,
                        "geoLat": null,
                        "geoLng": null,
                        "kind": "voucher",
                        "active": false
                      }
                    ],
                    "first": 88,
                    "last": 88
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: q, tags, tagMatch, owner, status, facets or nearby is not valid. The description names the rule. E04: tags has a value that is not in the tag vocabulary."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vouchers/{address}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return one voucher, whatever its visibility",
        "description": "Return one voucher, whatever its visibility. The route has no 'active' filter. A '404' means that the catalog does not hold the address. Access: Administrative.",
        "operationId": "getAdminVouchersByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "responses": {
          "200": {
            "description": "Voucher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Description."
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Voucher",
                  "result": {
                    "voucher": {
                      "id": 88,
                      "chainId": 1,
                      "address": "0x1111111111111111111111111111111111111111",
                      "name": "Community Credit",
                      "contractName": "Community Credit",
                      "symbol": "CCR",
                      "decimals": 6,
                      "ownerAddress": "0x0000000000000000000000000000000000000001",
                      "description": null,
                      "voucherUoa": "KES",
                      "voucherValue": "1",
                      "locationName": null,
                      "geoLat": null,
                      "geoLng": null,
                      "email": null,
                      "website": null,
                      "phone": null,
                      "terms": null,
                      "iconUrl": null,
                      "bannerUrl": null,
                      "tags": [],
                      "kind": "voucher",
                      "markerIcon": null,
                      "markerColor": null,
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: The catalog does not hold this address."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vouchers/{address}/restore": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Return a retired voucher to the public catalog",
        "description": "Return a retired voucher to the public catalog. The route has no owner version. The request has no body. Access: Administrative.",
        "operationId": "putAdminVouchersByAddressRestore",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account address."
          }
        ],
        "responses": {
          "200": {
            "description": "The voucher is active again.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "voucher": {
                          "$ref": "#/components/schemas/Voucher"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: The catalog does not hold this address."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The restore puts a user over a limit. The response has result with resource (vouchers or offers), used and limit."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/deployments": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return the deployment history of all users",
        "description": "Return the deployment history of all users. The list is not paginated. Rows are newest first by 'createdAt'. Access: Administrative.",
        "operationId": "getAdminDeployments",
        "responses": {
          "200": {
            "description": "All deployment history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "deployments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "userId": {
                                "type": "integer"
                              },
                              "trackingId": {
                                "type": "string"
                              },
                              "resourceType": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "ethereumAddress": {
                                "type": "string"
                              },
                              "userName": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "All deployment history",
                  "result": {
                    "deployments": [
                      {
                        "id": 55,
                        "userId": 4210,
                        "trackingId": "00000000-0000-0000-0000-000000000001",
                        "resourceType": "TOKEN",
                        "createdAt": "2026-08-12T10:00:00Z",
                        "ethereumAddress": "0x0000000000000000000000000000000000000001",
                        "userName": "Ada Lovelace"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vocabulary": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List the shared vocabularies",
        "description": "Return all values of the three shared vocabularies: tags, offering units and units of account. The list includes built-in values and custom values. The response is not paginated. Access: Administrative.",
        "operationId": "getAdminVocabulary",
        "responses": {
          "200": {
            "description": "Vocabulary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "isCustom": {
                                "type": "boolean"
                              },
                              "deployedTokens": {
                                "type": "integer"
                              },
                              "deployedPools": {
                                "type": "integer"
                              },
                              "vouchers": {
                                "type": "integer"
                              },
                              "pools": {
                                "type": "integer"
                              },
                              "posts": {
                                "type": "integer"
                              },
                              "offerings": {
                                "type": "integer"
                              },
                              "catalogs": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "units": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "isCustom": {
                                "type": "boolean"
                              },
                              "offerings": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "unitsOfAccount": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "isCustom": {
                                "type": "boolean"
                              },
                              "profiles": {
                                "type": "integer"
                              },
                              "vouchers": {
                                "type": "integer"
                              },
                              "pools": {
                                "type": "integer"
                              },
                              "voucherDeployments": {
                                "type": "integer"
                              },
                              "poolDeployments": {
                                "type": "integer"
                              },
                              "total": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Vocabulary",
                  "result": {
                    "tags": [
                      {
                        "value": "Urban Farming",
                        "isCustom": true,
                        "deployedTokens": 0,
                        "deployedPools": 0,
                        "vouchers": 2,
                        "pools": 0,
                        "posts": 1,
                        "offerings": 0,
                        "catalogs": 0
                      }
                    ],
                    "units": [
                      {
                        "value": "Produce Crate",
                        "isCustom": true,
                        "offerings": 4
                      }
                    ],
                    "unitsOfAccount": [
                      {
                        "value": "Community Credits",
                        "isCustom": true,
                        "profiles": 1,
                        "vouchers": 2,
                        "pools": 1,
                        "voucherDeployments": 2,
                        "poolDeployments": 1,
                        "total": 7
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vocabulary/tags": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Rename a tag",
        "description": "Renames a tag. All records that use the value follow the new name. Access: Administrative.",
        "operationId": "putAdminVocabularyTags",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Current value. The server trims it and finds it without regard to case."
                  },
                  "replacement": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "New value. The server removes extra spaces and keeps the case that you send. Maximum 100 characters for a tag and 32 for a unit. A tag must not contain a comma."
                  }
                },
                "required": [
                  "value",
                  "replacement"
                ]
              },
              "example": {
                "value": "Urban Farming",
                "replacement": "Community Gardens"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Vocabulary value renamed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Vocabulary value renamed",
                  "result": {
                    "value": "Community Gardens"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value or replacement is missing or blank. E04: replacement is too long (vocabulary value is too long), or a tag has a comma."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist. The description is vocabulary value not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: A value with this name already exists (not case-sensitive). E16: The value is a built-in offering unit. E16: An unfinished deployment uses the tag."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Delete a custom tag",
        "description": "Deletes a custom tag. The value is in the JSON body, not in the path. Access: Administrative.",
        "operationId": "deleteAdminVocabularyTags",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Value to delete. The server trims it and finds it without regard to case."
                  }
                },
                "required": [
                  "value"
                ]
              },
              "example": {
                "value": "Urban Farming"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Custom vocabulary value deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "usage": {
                          "$ref": "#/components/schemas/TagUsage"
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Custom vocabulary value deleted",
                  "result": {
                    "value": "Urban Farming",
                    "usage": {
                      "deployedTokens": 0,
                      "deployedPools": 0,
                      "vouchers": 2,
                      "pools": 0,
                      "posts": 1,
                      "offerings": 0,
                      "catalogs": 0
                    },
                    "total": 3
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value is missing or blank."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist. The description is vocabulary value not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The value is built-in. The description is built-in vocabulary values cannot be deleted."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vocabulary/units": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Rename an offering unit",
        "description": "Renames an offering unit. All records that use the value follow the new name. Access: Administrative.",
        "operationId": "putAdminVocabularyUnits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Current value. The server trims it and finds it without regard to case."
                  },
                  "replacement": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "New value. The server removes extra spaces and keeps the case that you send. Maximum 100 characters for a tag and 32 for a unit. A tag must not contain a comma."
                  }
                },
                "required": [
                  "value",
                  "replacement"
                ]
              },
              "example": {
                "value": "Urban Farming",
                "replacement": "Community Gardens"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Vocabulary value renamed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Vocabulary value renamed",
                  "result": {
                    "value": "Community Gardens"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value or replacement is missing or blank. E04: replacement is too long (vocabulary value is too long), or a tag has a comma."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist. The description is vocabulary value not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: A value with this name already exists (not case-sensitive). E16: The value is a built-in offering unit. E16: An unfinished deployment uses the tag."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Delete a custom offering unit",
        "description": "Deletes a custom offering unit. The value is in the JSON body, not in the path. Access: Administrative.",
        "operationId": "deleteAdminVocabularyUnits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Value to delete. The server trims it and finds it without regard to case."
                  }
                },
                "required": [
                  "value"
                ]
              },
              "example": {
                "value": "Urban Farming"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Custom vocabulary value deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "usage": {
                          "$ref": "#/components/schemas/TagUsage"
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Custom vocabulary value deleted",
                  "result": {
                    "value": "Urban Farming",
                    "usage": {
                      "deployedTokens": 0,
                      "deployedPools": 0,
                      "vouchers": 2,
                      "pools": 0,
                      "posts": 1,
                      "offerings": 0,
                      "catalogs": 0
                    },
                    "total": 3
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value is missing or blank."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist. The description is vocabulary value not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The value is built-in. The description is built-in vocabulary values cannot be deleted."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/vocabulary/units-of-account": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Create a custom unit of account",
        "description": "Create a custom unit of account. This is the only vocabulary value that has a create route. The server creates tags and offering units when a write names them. Access: Administrative.",
        "operationId": "postAdminVocabularyUnitsOfAccount",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "New value. The server removes extra spaces. Maximum 32 characters."
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Custom unit of account created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Custom unit of account created",
                  "result": {
                    "value": "Community Credits"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value is missing, blank, or longer than 32 characters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The value exists as a built-in value. The description is unit of account already exists as a built-in value."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Rename a custom unit of account",
        "description": "Rename a custom unit of account. The new name applies to profiles, vouchers, pools and deployment data. It does not change the stored valuation snapshots of old transfers. Access: Administrative.",
        "operationId": "putAdminVocabularyUnitsOfAccount",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Current value. The server trims it and finds it without regard to case."
                  },
                  "replacement": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "New value. Maximum 32 characters. The server removes extra spaces and writes each word with a capital first letter and lower-case other letters."
                  }
                },
                "required": [
                  "value",
                  "replacement"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The unit of account was renamed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Unit of account renamed",
                  "result": {
                    "value": "Kenyan Shilling"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value or replacement is missing or blank. E04: replacement has more than 32 characters. The description is unit of account must be 32 characters or fewer."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The value is built-in. The description is built-in units of account cannot be renamed. E16: An unfinished deployment uses the value. E16: A value with this name already exists."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Delete a custom unit of account",
        "description": "Delete a custom unit of account. The route deletes the value only when no record uses it. Access: Administrative.",
        "operationId": "deleteAdminVocabularyUnitsOfAccount",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Value to delete. The server trims it and finds it without regard to case."
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Custom unit of account deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "usage": {
                          "type": "object",
                          "properties": {
                            "profiles": {
                              "type": "integer"
                            },
                            "vouchers": {
                              "type": "integer"
                            },
                            "pools": {
                              "type": "integer"
                            },
                            "voucherDeployments": {
                              "type": "integer"
                            },
                            "poolDeployments": {
                              "type": "integer"
                            }
                          }
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Custom unit of account deleted",
                  "result": {
                    "value": "Community Credits",
                    "usage": {
                      "profiles": 0,
                      "vouchers": 0,
                      "pools": 0,
                      "voucherDeployments": 0,
                      "poolDeployments": 0
                    },
                    "total": 0
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: value is missing or blank."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The value does not exist."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The value is built-in (built-in units of account cannot be deleted). E16: An unfinished deployment uses the value. E16: A record still uses the value (unit of account is still in use)."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/review-notifications": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return the open flags on Voucher and Pool reviews",
        "description": "Returns unresolved flags on Voucher and Pool reviews, newest first across both resource kinds. Each page has at most 20 rows. Access: Administrative.",
        "operationId": "getAdminReviewNotifications",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Use 'next' from the previous response."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "notifications": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Flag ID."
                              },
                              "reviewId": {
                                "type": "integer",
                                "description": "Review ID."
                              },
                              "resourceKind": {
                                "type": "string",
                                "enum": [
                                  "voucher",
                                  "pool"
                                ],
                                "description": "Kind of the reviewed resource."
                              },
                              "resourceAddress": {
                                "type": "string",
                                "description": "Address of the reviewed resource."
                              },
                              "voucherAddress": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Voucher address, retained for compatibility."
                              },
                              "poolAddress": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Pool address."
                              },
                              "reason": {
                                "type": "string",
                                "description": "Reason from the owner."
                              },
                              "stars": {
                                "type": "integer",
                                "description": "Current stars of the review."
                              },
                              "comment": {
                                "type": "string",
                                "description": "Current comment of the review."
                              },
                              "reportedStars": {
                                "type": "integer",
                                "description": "Stars when the owner made the flag."
                              },
                              "reportedComment": {
                                "type": "string",
                                "description": "Comment when the owner made the flag."
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "RFC 3339 time."
                              }
                            }
                          },
                          "description": "Open flags."
                        },
                        "next": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Value for 'before' that returns the next page. The value is 'null' when there are no more rows."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "notifications": [
                      {
                        "id": 31,
                        "reviewId": 12,
                        "resourceKind": "pool",
                        "resourceAddress": "0x1111111111111111111111111111111111111111",
                        "poolAddress": "0x1111111111111111111111111111111111111111",
                        "reason": "Abusive language",
                        "stars": 1,
                        "comment": "Bad comment",
                        "reportedStars": 1,
                        "reportedComment": "Bad comment",
                        "createdAt": "2026-08-12T10:00:00Z"
                      }
                    ],
                    "next": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "before is not a valid number. The description is invalid notification cursor. The code field is empty."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/review-notifications/{id}": {
      "put": {
        "tags": [
          "Admin"
        ],
        "summary": "Resolve a flag on a review",
        "description": "Resolve a flag on a review. Access: Administrative.",
        "operationId": "putAdminReviewNotificationsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Flag ID. It must be above '0'."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "description": "'hide' hides the review. 'dismiss' keeps the review visible.",
                    "enum": [
                      "hide",
                      "dismiss"
                    ]
                  }
                },
                "required": [
                  "action"
                ]
              },
              "example": {
                "action": "hide"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "id is not a positive integer. The description is invalid notification ID. action is not hide or dismiss. The description is action must be hide or dismiss. E02: The body is not valid JSON."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The flag does not exist, or it is already resolved. The description is review or voucher not found, or action is no longer available."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/reports": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return posts in all statuses from all authors",
        "description": "Return posts in all statuses from all authors. It orders posts by 'updatedAt', newest first, with 'id' as the tie-breaker. The cursor has two parts. Access: Administrative.",
        "operationId": "getAdminReports",
        "parameters": [
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            },
            "description": "Page size. The maximum is '100'. A value of '0' becomes '20'. A value above '100' becomes '100'. A value that is not a non-negative integer returns '400'."
          },
          {
            "name": "cursorUpdatedAt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'updatedAt' of the cursor row, in RFC 3339 format."
          },
          {
            "name": "cursorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "'id' of the cursor row. You must send it with 'cursorUpdatedAt'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Direction from the cursor."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "APPROVED",
                "REJECTED"
              ]
            },
            "description": "'DRAFT', 'SUBMITTED', 'APPROVED' or 'REJECTED'. The case does not matter. There is no value for all statuses. Omit the parameter."
          },
          {
            "name": "author",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Author address. The match is exact and not case-sensitive."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag filter. Repeat the parameter or use a comma list. Maximum 12 values. Each value must be in the tag vocabulary."
          },
          {
            "name": "tagMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'."
          },
          {
            "name": "vouchers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Voucher filter. A list of 'chainId:address' values, with commas or repeated parameters. Maximum 12 values. Each voucher must exist in the catalog."
          },
          {
            "name": "voucherMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'."
          },
          {
            "name": "pools",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool filter. A list of 'chainId:address' values, with commas or repeated parameters. Maximum 12 values. Each pool must exist in the catalog."
          },
          {
            "name": "poolMatch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "all"
              ],
              "default": "any"
            },
            "description": "'any' or 'all'."
          }
        ],
        "responses": {
          "200": {
            "description": "Reports",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reports": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "description": "The value can be null."
                              },
                              "geoLat": {
                                "description": "The value can be null."
                              },
                              "geoLng": {
                                "description": "The value can be null."
                              },
                              "periodFrom": {
                                "description": "The value can be null."
                              },
                              "periodTo": {
                                "description": "The value can be null."
                              },
                              "authorAddress": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "vouchers": {
                                "type": "array",
                                "items": {}
                              },
                              "pools": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          },
                          "description": "Page of post summaries."
                        },
                        "first": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "id": {
                              "type": "integer"
                            }
                          },
                          "description": "Cursor of the first post: 'updatedAt' and 'id'. The value is 'null' for an empty page."
                        },
                        "last": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "id": {
                              "type": "integer"
                            }
                          },
                          "description": "Cursor of the last post. The value is 'null' for an empty page."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Reports",
                  "result": {
                    "reports": [
                      {
                        "id": 4633,
                        "title": "Market day",
                        "description": "Short text",
                        "imageUrl": null,
                        "geoLat": null,
                        "geoLng": null,
                        "periodFrom": null,
                        "periodTo": null,
                        "authorAddress": "0x0000000000000000000000000000000000000001",
                        "status": "APPROVED",
                        "createdAt": "2026-08-12T10:00:00Z",
                        "updatedAt": "2026-08-12T10:00:00Z",
                        "tags": [
                          "Food"
                        ],
                        "vouchers": [],
                        "pools": []
                      }
                    ],
                    "first": {
                      "updatedAt": "2026-08-12T10:00:00Z",
                      "id": 4633
                    },
                    "last": {
                      "updatedAt": "2026-08-12T10:00:00Z",
                      "id": 4633
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: perPage is not a non-negative integer. E04: The cursor is not valid. The description is one of: cursorUpdatedAt and cursorId must be sent together, cursorUpdatedAt must be an RFC3339 timestamp, cursorId must be a positive integer. E04: next is not true or false, or next has no cursor. E04: status is not valid. The description is status must be one of DRAFT, SUBMITTED, APPROVED, REJECTED. E04: author is not a valid address. E04: q, tags, tagMatch, vouchers, voucherMatch, pools or poolMatch is not valid, or a tag or resource does not exist."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/reports/{id}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Return one complete post in any status",
        "description": "Return one complete post in any status. Access: Administrative.",
        "operationId": "getAdminReportsById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Post ID. It must be above '0'."
          }
        ],
        "responses": {
          "200": {
            "description": "One post in any status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "report": {
                          "$ref": "#/components/schemas/Post"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: id is not a positive integer."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: The post does not exist. The description is report not found."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/dashboard/stats": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Get the totals and time series for the dashboard",
        "description": "Return the totals and the time series for the console dashboard. Access: Administrative.",
        "operationId": "getAdminDashboardStats",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "5m",
                "15m",
                "30m",
                "1h",
                "6h",
                "1d",
                "custom"
              ],
              "default": "1d"
            },
            "description": "'5m', '15m', '30m', '1h', '6h', '1d' or 'custom'. The window ends now."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start of a custom window, in RFC 3339 format."
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End of a custom window, in RFC 3339 format."
          }
        ],
        "responses": {
          "200": {
            "description": "Admin dashboard totals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "range": {
                          "type": "object",
                          "properties": {
                            "preset": {
                              "type": "string"
                            },
                            "since": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "until": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "bucket": {
                              "type": "string"
                            }
                          }
                        },
                        "pools": {
                          "type": "integer",
                          "description": "Number of all pools in the catalog. It does not depend on the window."
                        },
                        "vouchers": {
                          "type": "integer",
                          "description": "Number of all vouchers in the catalog. It does not depend on the window."
                        },
                        "accounts": {
                          "type": "integer",
                          "description": "Number of all accounts. It does not depend on the window."
                        },
                        "reports": {
                          "type": "integer",
                          "description": "Number of approved posts created in the window."
                        },
                        "transactions": {
                          "type": "integer",
                          "description": "Number of transactions in the window. It is the sum of 'transactionSeries'."
                        },
                        "catalogSeries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "t": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "reports": {
                                "type": "integer",
                                "description": "Number of approved posts created in the window."
                              },
                              "vouchers": {
                                "type": "integer",
                                "description": "Number of all vouchers in the catalog. It does not depend on the window."
                              },
                              "pools": {
                                "type": "integer",
                                "description": "Number of all pools in the catalog. It does not depend on the window."
                              }
                            }
                          },
                          "description": "One item for each bucket: 't', and the numbers of 'reports', 'vouchers' and 'pools' created in the bucket."
                        },
                        "transactionSeries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "t": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "transactions": {
                                "type": "integer",
                                "description": "Number of transactions in the window. It is the sum of 'transactionSeries'."
                              }
                            }
                          },
                          "description": "One item for each bucket: 't' and 'transactions'. The array is empty when federation is not available."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Admin dashboard totals",
                  "result": {
                    "range": {
                      "preset": "1d",
                      "since": "2026-08-12T00:00:00Z",
                      "until": "2026-08-13T00:00:00Z",
                      "bucket": "1h"
                    },
                    "pools": 42,
                    "vouchers": 2192,
                    "accounts": 310,
                    "reports": 12,
                    "transactions": 1843,
                    "catalogSeries": [
                      {
                        "t": "2026-08-12T00:00:00Z",
                        "reports": 1,
                        "vouchers": 2,
                        "pools": 0
                      }
                    ],
                    "transactionSeries": [
                      {
                        "t": "2026-08-12T00:00:00Z",
                        "transactions": 16
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: range is not one of the listed values. The description is unknown range \"<value>\"; use 5m,15m,30m,1h,6h,1d,custom. E04: A custom window has only one of since and until. The description is custom range requires since and until (RFC3339). E04: since or until is not in RFC 3339 format. E04: until is not after since, the window is shorter than 1 minute, or the window is longer than 90 days."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/transactions/vouchers": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List federation events for vouchers",
        "description": "Returns voucher movements from federation, with cursor pagination. Access: Administrative.",
        "operationId": "getAdminTransactionsVouchers",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Event type. The case does not matter. For 'vouchers': 'transfer', 'mint' or 'burn'. For 'pools': 'swap' or 'deposit'."
          },
          {
            "name": "voucher",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Voucher address. Only for 'vouchers'."
          },
          {
            "name": "pool",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool address. Only for 'pools'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term. The server searches the transaction hash and the addresses of the event."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Voucher transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "transactions": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/FederationTransaction"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Voucher transactions",
                  "result": {
                    "transactions": [
                      {
                        "id": 905000003,
                        "txId": 905,
                        "logIndex": 3,
                        "txHash": "0x00000000000000000000000000000000000000000000000000000000000000a1",
                        "t": "2026-08-12T10:00:00Z",
                        "success": true,
                        "type": "transfer",
                        "voucher": "0x1111111111111111111111111111111111111111",
                        "voucherName": "Community Credit",
                        "voucherSymbol": "CCR",
                        "voucherDecimals": 6,
                        "from": "0x0000000000000000000000000000000000000001",
                        "to": "0x0000000000000000000000000000000000000002",
                        "amount": "1000000"
                      }
                    ],
                    "first": 905000003,
                    "last": 905000003
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: type is not valid. The description starts with 'unknown type; use' and lists the values. E04: voucher or pool is not a valid address. The description is voucher must be a valid hex address or pool must be a valid hex address. E04: q is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "Federation is not configured. The description is Federation is not configured. The code field is empty."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/transactions/pools": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List federation events for pools",
        "description": "Returns pool operations from federation, with cursor pagination. Access: Administrative.",
        "operationId": "getAdminTransactionsPools",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Event type. The case does not matter. For 'vouchers': 'transfer', 'mint' or 'burn'. For 'pools': 'swap' or 'deposit'."
          },
          {
            "name": "voucher",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Voucher address. Only for 'vouchers'."
          },
          {
            "name": "pool",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pool address. Only for 'pools'."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term. The server searches the transaction hash and the addresses of the event."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Voucher transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "transactions": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/FederationTransaction"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Voucher transactions",
                  "result": {
                    "transactions": [
                      {
                        "id": 905000003,
                        "txId": 905,
                        "logIndex": 3,
                        "txHash": "0x00000000000000000000000000000000000000000000000000000000000000a1",
                        "t": "2026-08-12T10:00:00Z",
                        "success": true,
                        "type": "transfer",
                        "voucher": "0x1111111111111111111111111111111111111111",
                        "voucherName": "Community Credit",
                        "voucherSymbol": "CCR",
                        "voucherDecimals": 6,
                        "from": "0x0000000000000000000000000000000000000001",
                        "to": "0x0000000000000000000000000000000000000002",
                        "amount": "1000000"
                      }
                    ],
                    "first": 905000003,
                    "last": 905000003
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: type is not valid. The description starts with 'unknown type; use' and lists the values. E04: voucher or pool is not a valid address. The description is voucher must be a valid hex address or pool must be a valid hex address. E04: q is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "Federation is not configured. The description is Federation is not configured. The code field is empty."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/transactions/otx": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List origin transactions that this service signed",
        "description": "Return the origin transactions that this service signed, with cursor pagination. The route reads only local data. It works when federation is not available. An origin transaction with the status 'REVERTED' is not the same as a reverted transfer on the chain. Access: Administrative.",
        "operationId": "getAdminTransactionsOtx",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Transaction type. The server converts the value to upper case."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dispatch status. The server converts the value to upper case."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term. The server searches the tracking ID and the transaction hash."
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            },
            "description": "Maximum is '500'. '0' or a larger value becomes '500'."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A voucher 'id'."
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Origin transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KeysetPage"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "otx": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "Origin transaction ID."
                                  },
                                  "trackingId": {
                                    "type": "string",
                                    "description": "Tracking ID."
                                  },
                                  "otxType": {
                                    "type": "string",
                                    "description": "Transaction type."
                                  },
                                  "signer": {
                                    "type": "string",
                                    "description": "Service signer account that sent the transaction."
                                  },
                                  "txHash": {
                                    "type": "string",
                                    "description": "Transaction hash."
                                  },
                                  "nonce": {
                                    "type": "integer",
                                    "description": "Nonce."
                                  },
                                  "replaced": {
                                    "type": "boolean",
                                    "description": "'true' if another transaction replaced this one."
                                  },
                                  "status": {
                                    "type": "string",
                                    "description": "Dispatch status."
                                  },
                                  "createdAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "RFC 3339 times."
                                  },
                                  "updatedAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "RFC 3339 times."
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Origin transactions",
                  "result": {
                    "otx": [
                      {
                        "id": 351,
                        "trackingId": "00000000-0000-0000-0000-000000000001",
                        "otxType": "POOL_PROXY_DEPLOY",
                        "signer": "0x0000000000000000000000000000000000000009",
                        "txHash": "0x00000000000000000000000000000000000000000000000000000000000000b2",
                        "nonce": 17,
                        "replaced": false,
                        "status": "SUCCESS",
                        "createdAt": "2026-08-12T10:00:00Z",
                        "updatedAt": "2026-08-12T10:01:00Z"
                      }
                    ],
                    "first": 351,
                    "last": 351
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: type is not valid. The description starts with 'unknown type; use one of' and lists the values. E04: status is not valid. The description starts with 'unknown status; use one of' and lists the values. E04: q is not valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not an administrator."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/router/stats": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Report the credit router's graph and chain loops",
        "description": "Graph version, oldest balance block, head block, staleness, counts, and per loop (reload, structure, params, balances, pair_fees, dirty) its runs, last success, last error and corrections. Access: Admin.",
        "operationId": "getAdminRouterStats",
        "responses": {
          "200": {
            "description": "Router stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "stats": {
                          "type": "object"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: the caller is not an admin."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "E27 router_unavailable: the graph or the RPC cannot be used. Retry. Never an empty result."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/admin/router/graph": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Export the credit router graph",
        "description": "Every pool with its quoter, verification, fees and seal state, and each edge's membership, limit, price index, balance and held fees. Access: Admin.",
        "operationId": "getAdminRouterGraph",
        "responses": {
          "200": {
            "description": "Router graph",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "graphVersion": {
                          "type": "integer"
                        },
                        "asOfBlock": {
                          "type": "integer"
                        },
                        "legs": {
                          "type": "integer"
                        },
                        "pools": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: no valid user session."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: the caller is not an admin."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "E27 router_unavailable: the graph or the RPC cannot be used. Retry. Never an empty result."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/federation/system": {
      "get": {
        "tags": [
          "Contracts, tracking and system"
        ],
        "summary": "Check the federation database connection",
        "description": "Checks that federation answers a ping within 5 seconds. The route exists only when the service has federation configured. Access: User or service token.",
        "operationId": "getFederationSystem",
        "responses": {
          "200": {
            "description": "Federation DB connectivity check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Federation DB connectivity check",
                  "result": {
                    "status": "UP"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "The ping fails. The description is Federation DB unreachable."
          }
        },
        "security": [
          {
            "cookieAuth": []
          },
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v2/relayer/health": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return the state of the relayer",
        "description": "Returns the state of the relayer. Access: Public.",
        "operationId": "getRelayerHealth",
        "responses": {
          "200": {
            "description": "Relayer status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "build": {
                          "type": "string"
                        },
                        "chainId": {
                          "type": "integer"
                        },
                        "relayerAddress": {
                          "type": "string"
                        },
                        "idempotentRelay": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Relayer status",
                  "result": {
                    "status": "healthy",
                    "build": "<build>",
                    "chainId": 42220,
                    "relayerAddress": "0x1111111111111111111111111111111111111111",
                    "idempotentRelay": true
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/nonce/{address}": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return the transaction nonce of an account on the chain",
        "description": "Returns the transaction nonce of an account on the chain. Use it as the 'nonce' of an EIP-7702 authorization. Access: Public.",
        "operationId": "getRelayerNonceByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          }
        ],
        "responses": {
          "200": {
            "description": "EOA nonce",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "nonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "EOA nonce",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "nonce": "0"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid checksummed address."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/calibur-nonce/{address}": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Get the Calibur nonce of an account for the root key",
        "description": "Returns the Calibur sequence number for the account and the root key (all zeros). Access: Public.",
        "operationId": "getRelayerCaliburNonceByAddress",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          }
        ],
        "responses": {
          "200": {
            "description": "Calibur sequence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "keyHash": {
                          "type": "string"
                        },
                        "nonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Calibur sequence",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "keyHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "nonce": "0"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a path parameter is not valid."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/calibur-nonce/{address}/{keyHash}": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Get the Calibur nonce of an account for a key",
        "description": "Returns the Calibur sequence number for the account and the key. Access: Public.",
        "operationId": "getRelayerCaliburNonceByAddressByKeyHash",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. Checksummed address."
          },
          {
            "name": "keyHash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Optional. '0x' and 64 hex characters."
          }
        ],
        "responses": {
          "200": {
            "description": "Calibur sequence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "keyHash": {
                          "type": "string"
                        },
                        "nonce": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Calibur sequence",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "keyHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "nonce": "0"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: a path parameter is not valid."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/track/{trackingId}": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return the transactions for a tracking ID",
        "description": "Returns the transactions for a tracking ID. A relay can have more than one transaction when the service replaces a transaction. The order is oldest first. Access: Public.",
        "operationId": "getRelayerTrackByTrackingId",
        "parameters": [
          {
            "name": "trackingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Required. UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "Relayer OTX chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "otx": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Otx"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Relayer OTX chain",
                  "result": {
                    "otx": [
                      {
                        "id": 1,
                        "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "otxType": "RELAY_EXEC",
                        "signerAccount": "0x1111111111111111111111111111111111111111",
                        "rawTx": "0x<raw transaction>",
                        "txHash": "0x<transaction hash>",
                        "nonce": 7,
                        "replaced": false,
                        "createdAt": "2026-01-01T00:00:00Z",
                        "updatedAt": "2026-01-01T00:00:05Z",
                        "status": "SUCCESS"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: trackingId is not a UUID."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The tracking ID belongs to a transaction that is not a relay type. E10:."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E03: No transaction exists for the tracking ID. This is normal for a short time after POST /api/v2/relayer/relay, because the relayer writes the record after the job runs. Poll again."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/delegate": {
      "post": {
        "tags": [
          "Relayer"
        ],
        "summary": "Delegate a wallet to Calibur without any call",
        "description": "Delegates a wallet to Calibur without any call. Use it when the wallet must be a smart account before the first relay. Access: Public.",
        "operationId": "postRelayerDelegate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ephemeralAddress": {
                    "type": "string",
                    "description": "Checksummed address of the wallet."
                  },
                  "authorization": {
                    "$ref": "#/components/schemas/Authorization",
                    "description": "An authorization."
                  }
                },
                "required": [
                  "ephemeralAddress",
                  "authorization"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Delegate request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        },
                        "registerTrackingId": {
                          "type": "string"
                        },
                        "duplicate": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Delegate request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "registerTrackingId": "0d3f5c1e-2b4a-4c6d-8e9f-1a2b3c4d5e6f",
                    "duplicate": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02:."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/relay": {
      "post": {
        "tags": [
          "Relayer"
        ],
        "summary": "Queue a signed batch for the relayer",
        "description": "Queues a signed batch for the relayer. The route returns after the job is queued. The relayer builds, signs and sends the transaction later. The batch can have 1 to 16 calls. There is no separate batch route. One signature covers all calls. Access: Public.",
        "operationId": "postRelayerRelay",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operationId": {
                    "type": "string",
                    "description": "UUID. Makes the request idempotent."
                  },
                  "userAddress": {
                    "type": "string",
                    "description": "Checksummed address of the wallet."
                  },
                  "signedBatch": {
                    "$ref": "#/components/schemas/SignedBatch",
                    "description": "A signed batch."
                  },
                  "signature": {
                    "type": "string",
                    "description": "Must start with '0x'. ABI encoding of '(bytes signature, bytes hookData)'."
                  },
                  "signatureType": {
                    "type": "string",
                    "enum": [
                      "secp256k1",
                      "webauthn"
                    ],
                    "description": "'secp256k1' or 'webauthn'."
                  },
                  "authorization": {
                    "$ref": "#/components/schemas/Authorization",
                    "description": "An authorization. Required for the first relay of a wallet."
                  },
                  "credentialId": {
                    "type": "string",
                    "description": "Registers a passkey."
                  },
                  "publicKeyX": {
                    "type": "string",
                    "description": "Decimal number. P-256 x coordinate."
                  },
                  "publicKeyY": {
                    "type": "string",
                    "description": "Decimal number. P-256 y coordinate."
                  }
                },
                "required": [
                  "userAddress",
                  "signedBatch",
                  "signature",
                  "signatureType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relay request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "trackingId": {
                          "type": "string"
                        },
                        "valuationSnapshots": {
                          "type": "array",
                          "items": {}
                        },
                        "operationId": {
                          "type": "string"
                        },
                        "replayed": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Relay request accepted",
                  "result": {
                    "trackingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "valuationSnapshots": [],
                    "operationId": "6f1c0a52-8d4e-4b87-9f3a-2d1b7c5e9a10",
                    "replayed": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: A field fails a rule, for example more than 16 calls, an address that is not checksummed, or signatureType that is not secp256k1 or webauthn. E04: The passkey registration is incomplete or is not valid. E04:."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "E16: The operationId was used for a different request. E16: The credentialId is already mapped. E16:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/relay/preview": {
      "post": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return the full nonce and the EIP-712 digest for a batch",
        "description": "Returns the full nonce and the EIP-712 digest for a batch. The call is read-only. It queues nothing and needs no signature. A signature over this digest matches the batch that the relayer submits. The client can also compute the digest itself. Access: Public.",
        "operationId": "postRelayerRelayPreview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userAddress": {
                    "type": "string",
                    "description": "Checksummed address of the wallet."
                  },
                  "batchedCall": {
                    "$ref": "#/components/schemas/BatchedCall",
                    "description": "A batched call with 1 to 16 calls."
                  },
                  "keyHash": {
                    "type": "string",
                    "description": "'0x' and 64 hex characters. Omitted or empty means the root key."
                  },
                  "executor": {
                    "type": "string",
                    "description": "Checksummed address."
                  },
                  "deadline": {
                    "type": "string",
                    "description": "Decimal number."
                  }
                },
                "required": [
                  "userAddress",
                  "batchedCall",
                  "executor",
                  "deadline"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relay batch preview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "nonce": {
                          "type": "string"
                        },
                        "digest": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Relay batch preview",
                  "result": {
                    "nonce": "0",
                    "digest": "0x<64 hex characters>"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: a body that is not valid JSON. E04: a field that fails a rule."
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": "E01:."
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/webauthn/challenge": {
      "get": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return a challenge for a passkey assertion",
        "description": "Returns a challenge for a passkey assertion. The challenge has 32 random bytes in base64url form without padding (43 characters). Access: Public.",
        "operationId": "getRelayerWebauthnChallenge",
        "responses": {
          "200": {
            "description": "WebAuthn challenge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "challenge": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "WebAuthn challenge",
                  "result": {
                    "challenge": "<43 characters>"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v2/relayer/webauthn/recover": {
      "post": {
        "tags": [
          "Relayer"
        ],
        "summary": "Return the wallet that belongs to a passkey",
        "description": "Returns the wallet that belongs to a passkey. The caller proves that it holds the passkey. The route does not set a session cookie. Use 'POST /auth/webauthn/verify' to sign in. The request body and the assertion rules are the same as for 'POST /auth/webauthn/verify'. All four fields are required: 'credentialId', 'authenticatorData', 'clientDataJSON' and 'signature'. Access: Public.",
        "operationId": "postRelayerWebauthnRecover",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "credentialId": {
                    "type": "string",
                    "description": "The credential ID that the wallet registered."
                  },
                  "authenticatorData": {
                    "type": "string",
                    "description": "Base64url. Padded and unpadded forms work. At least 37 bytes after decoding."
                  },
                  "clientDataJSON": {
                    "type": "string",
                    "description": "Base64url. The type must be 'webauthn.get'. The origin must be on the allowed origin list."
                  },
                  "signature": {
                    "type": "string",
                    "description": "Base64url, DER-encoded ECDSA P-256 signature."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wallet recovered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "description": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "keyHash": {
                          "type": "string"
                        },
                        "publicKeyX": {
                          "type": "string"
                        },
                        "publicKeyY": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "description"
                  ]
                },
                "example": {
                  "ok": true,
                  "description": "Wallet recovered",
                  "result": {
                    "address": "0x1111111111111111111111111111111111111111",
                    "keyHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
                    "publicKeyX": "1",
                    "publicKeyY": "2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02 or E04: The body is not valid JSON, or a field is missing."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E15: The assertion is not valid."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "E07: No active credential has this credentialId."
          }
        },
        "security": []
      }
    },
    "/api/v2/pools/{address}/reviews": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "Return the visible reviews of a pool, newest first",
        "description": "Returns the visible reviews of a pool, newest first. Each page has at most 20 reviews. Access: Public.",
        "operationId": "getPoolsByAddressReviews",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "stars",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "description": "From 1 to 5. The filter applies to the list only. 'counts', 'total' and 'average' cover all visible reviews."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "A review 'id'. Returns reviews with a lower 'id'. Use the 'next' value of the previous response."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "reviews": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Review"
                          },
                          "description": "Review objects."
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "1": {
                              "type": "integer"
                            },
                            "2": {
                              "type": "integer"
                            },
                            "3": {
                              "type": "integer"
                            },
                            "4": {
                              "type": "integer"
                            },
                            "5": {
                              "type": "integer"
                            }
                          },
                          "description": "The number of reviews for each star value. The keys are '\"1\"' to '\"5\"'."
                        },
                        "total": {
                          "type": "integer"
                        },
                        "average": {
                          "type": "number",
                          "description": "'0' when there are no reviews."
                        },
                        "next": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "The 'before' value for the next page."
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "reviews": [
                      {
                        "id": 12,
                        "stars": 5,
                        "comment": "Good service",
                        "reply": null
                      }
                    ],
                    "counts": {
                      "1": 0,
                      "2": 0,
                      "3": 0,
                      "4": 0,
                      "5": 1
                    },
                    "total": 1,
                    "average": 5,
                    "next": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address. stars is not an integer from 1 to 5, or before is not a valid number."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The pool does not exist."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests",
            "description": "E11: The rate limit is exceeded."
          }
        },
        "security": []
      }
    },
    "/api/v2/pools/{address}/reviews/me": {
      "get": {
        "tags": [
          "Pools"
        ],
        "summary": "Get the review rights of the caller for a pool",
        "description": "Returns what the caller can do with the reviews of this pool. Access: User session.",
        "operationId": "getPoolsByAddressReviewsMe",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "responses": {
          "200": {
            "description": "What the caller can do with the reviews.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "isOwner": {
                          "type": "boolean"
                        },
                        "editableUntil": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "review": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/Review"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "hidden": {
                          "type": "boolean"
                        },
                        "editableReplyIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "flaggedReviewIds": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E04: address is not a valid hex address."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The pool does not exist."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "The pool is not on the configured chain, or the transfer index is not available."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Pools"
        ],
        "summary": "Create or replace a review",
        "description": "Creates or replaces the review of the caller. Access: User session. The caller must be a reviewer with a swap in the last 7 days.",
        "operationId": "putPoolsByAddressReviewsMe",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stars": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "From 1 to 5."
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The server trims the value. At most 2000 characters."
                  }
                },
                "required": [
                  "stars"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The review was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not a valid hex address. stars or comment is outside the rules."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token, owns the pool, has a hidden review, has no swap in the last 7 days, or the edit window closed. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The pool does not exist."
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable",
            "description": "The pool is not on the configured chain, or the transfer index is not available."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pools/{address}/reviews/{id}/reply": {
      "put": {
        "tags": [
          "Pools"
        ],
        "summary": "Set the reply of the owner on a review",
        "description": "Sets the reply of the owner on a review. A new reply replaces the old reply of the same owner. Access: User session. The caller must be the current pool owner.",
        "operationId": "putPoolsByAddressReviewsByIdReply",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reply": {
                    "type": "string",
                    "description": "Required. The server trims it. From 1 to 2000 characters."
                  }
                },
                "required": [
                  "reply"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reply was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "E02: The body is not valid JSON. E04: address is not a valid hex address. id is not valid, or reply is empty or too long."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: No valid session. E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller is not the current pool owner, or uses a service token. E10: The caller uses a service token."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "The pool or the review does not exist, the review is hidden, or another account wrote the reply."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    },
    "/api/v2/pools/{address}/reviews/{id}/flag": {
      "post": {
        "tags": [
          "Pools"
        ],
        "summary": "Report a review to the moderators",
        "description": "Reports a review to the moderators. A second flag from the same owner on the same review has no effect and still returns success. Access: User session. The caller must be the current pool owner.",
        "operationId": "postPoolsByAddressReviewsByIdFlag",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A hex address."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "A positive review ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "Required. The server trims it. From 1 to 500 characters."
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The flag was saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "saved": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true,
                  "result": {
                    "saved": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "E06: The credential is missing or not valid."
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "E10: The caller uses a service token."
          }
        },
        "security": [
          {
            "cookieAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Authorization": {
        "type": "object",
        "properties": {
          "chainId": {
            "type": "string",
            "description": "Decimal number. Must equal the chain of the service."
          },
          "contractAddress": {
            "type": "string",
            "description": "Checksummed address. Must be the Calibur address."
          },
          "nonce": {
            "type": "string",
            "description": "Decimal number. The EOA nonce from 'GET /api/v2/relayer/nonce/:address'."
          },
          "yParity": {
            "type": "number",
            "description": "'0' or '1'."
          },
          "r": {
            "type": "string",
            "description": "'0x' and 64 hex characters."
          },
          "s": {
            "type": "string",
            "description": "'0x' and 64 hex characters."
          }
        },
        "required": [
          "chainId",
          "contractAddress",
          "nonce",
          "r",
          "s"
        ]
      },
      "BatchedCall": {
        "type": "object",
        "properties": {
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Call"
            },
            "minItems": 1,
            "maxItems": 16,
            "description": "1 to 16 calls. The relayer runs them in order."
          },
          "revertOnFailure": {
            "type": "boolean",
            "description": "If 'true', the whole batch reverts when one call fails."
          }
        },
        "required": [
          "calls"
        ]
      },
      "Call": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Checksummed address."
          },
          "value": {
            "type": "string",
            "description": "Decimal number of wei."
          },
          "data": {
            "type": "string",
            "description": "Must start with '0x'."
          }
        },
        "required": [
          "to",
          "value",
          "data"
        ]
      },
      "Catalog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Catalog ID. The ID is the stable public identity. Names do not need to be unique."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional text."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute 'http' or 'https' URL."
          },
          "locationName": {
            "type": "string",
            "description": "Place name."
          },
          "geoLat": {
            "type": "number",
            "description": "Latitude."
          },
          "geoLng": {
            "type": "number",
            "description": "Longitude."
          },
          "ownerAddress": {
            "type": "string",
            "description": "Account address of the owner."
          },
          "poolCount": {
            "type": "number",
            "description": "Number of pools in the catalog."
          },
          "voucherCount": {
            "type": "number",
            "description": "Number of active vouchers in the catalog."
          },
          "distanceMeters": {
            "type": [
              "number",
              "null"
            ],
            "description": "Distance from the caller. The value is not null only in 'nearby=true' list results."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags in sorted order. The array is empty when the catalog has no tags."
          },
          "createdAt": {
            "type": "string",
            "description": "RFC 3339 time."
          },
          "updatedAt": {
            "type": "string",
            "description": "RFC 3339 time."
          }
        }
      },
      "CatalogMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Internal ID of the pool or voucher. Use this ID in the membership routes."
          },
          "chainId": {
            "type": "number",
            "description": "Chain ID."
          },
          "address": {
            "type": "string",
            "description": "Contract address."
          },
          "name": {
            "type": "string",
            "description": "Display name, or the name, or the address when no name exists."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pool image or voucher icon."
          }
        }
      },
      "DeployedPool": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "otxId": {
            "type": "integer"
          },
          "platformContractId": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "decimals": {
            "type": "integer"
          },
          "tokenRegistryAddress": {
            "type": "string"
          },
          "limiterAddress": {
            "type": "string"
          },
          "feePolicyAddress": {
            "type": "string"
          },
          "quoterAddress": {
            "type": "string"
          },
          "quoterType": {
            "type": "string"
          },
          "protocolFeeControllerAddress": {
            "type": "string"
          },
          "feesDecoupled": {
            "type": "boolean"
          },
          "feePpm": {
            "description": "The value can be null."
          },
          "feeAddress": {
            "description": "The value can be null."
          },
          "admin": {
            "type": "string"
          },
          "description": {
            "description": "The value can be null."
          },
          "unitOfAccount": {
            "description": "The value can be null."
          },
          "website": {
            "description": "The value can be null."
          },
          "email": {
            "description": "The value can be null."
          },
          "phone": {
            "description": "The value can be null."
          },
          "terms": {
            "description": "The value can be null."
          },
          "locationName": {
            "description": "The value can be null."
          },
          "geoLat": {
            "description": "The value can be null."
          },
          "geoLng": {
            "description": "The value can be null."
          },
          "imageUrl": {
            "description": "The value can be null."
          },
          "bannerUrl": {
            "description": "The value can be null."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {}
          },
          "trackingId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DeployedToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "otxId": {
            "type": "integer"
          },
          "platformContractId": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "decimals": {
            "type": "integer"
          },
          "admin": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The value can be null."
          },
          "email": {
            "description": "The value can be null."
          },
          "phone": {
            "description": "The value can be null."
          },
          "terms": {
            "description": "The value can be null."
          },
          "voucherUoa": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucherValue": {
            "type": [
              "number",
              "null"
            ]
          },
          "locationName": {
            "type": [
              "string",
              "null"
            ]
          },
          "geoLat": {
            "type": [
              "number",
              "null"
            ]
          },
          "geoLng": {
            "type": [
              "number",
              "null"
            ]
          },
          "iconUrl": {
            "description": "The value can be null."
          },
          "bannerUrl": {
            "description": "The value can be null."
          },
          "markerIcon": {
            "type": [
              "string",
              "null"
            ]
          },
          "markerColor": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "trackingId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "KeyRotationSIWEProof": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "SIWE message whose statement is \"Replace sign-in card <old address> with <new address>\"."
          },
          "signature": {
            "type": "string",
            "description": "SIWE signature."
          }
        },
        "required": [
          "message",
          "signature"
        ]
      },
      "KeyRotationResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "integer"
              },
              "role": {
                "type": "string"
              },
              "address": {
                "type": "string",
                "description": "The account's new address."
              },
              "oldAddress": {
                "type": "string"
              },
              "movedPasskeys": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "credentialId": {
                      "type": "string"
                    },
                    "publicKeyX": {
                      "type": "string"
                    },
                    "publicKeyY": {
                      "type": "string"
                    }
                  }
                }
              },
              "replayed": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "ok",
          "description"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Body of every error response.",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false,
            "description": "Always false for an error."
          },
          "description": {
            "type": "string",
            "description": "Message for people. Do not parse it."
          },
          "code": {
            "type": "string",
            "description": "Error code. Use it with the HTTP status. Some review routes send an empty string. E01 Internal error. E02 The body is not valid JSON or has the wrong shape. E03 The route does not exist. E04 Validation failed. E05 The method is not allowed. E06 Authentication failed. E07 No record found. E08 The body is too large. E09 The request timed out. E10 The caller is not allowed to do this. E11 A rate limit or quota is exceeded. E12 The relayer is disabled. E13 An EIP-7702 authorization is required. E14 The relayer executor does not match. E15 WebAuthn verification failed. E16 The request conflicts with existing data. E17 The email is linked to another account. E18 The phone number is linked to another account. E19 A private share or a confirmed send is not available. E20 The sign-in card was replaced. E21 The passkey waits for the new card to register it."
          },
          "result": {
            "type": "object",
            "additionalProperties": true,
            "description": "Data that the client can use. Only a few errors have it."
          }
        },
        "required": [
          "ok",
          "description",
          "code"
        ],
        "example": {
          "ok": false,
          "description": "validation failed",
          "code": "E04"
        }
      },
      "FederationTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "txId": {
            "type": "integer"
          },
          "logIndex": {
            "type": "integer"
          },
          "txHash": {
            "type": "string"
          },
          "t": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "voucher": {
            "type": "string",
            "description": "Voucher address."
          },
          "voucherName": {
            "type": "string",
            "description": "Name from the local catalog. An empty string if the catalog does not know the voucher."
          },
          "voucherSymbol": {
            "type": "string",
            "description": "Symbol from the local catalog. An empty string if the catalog does not know the voucher."
          },
          "voucherDecimals": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Decimals from the catalog. 'null' if the catalog has no value."
          },
          "from": {
            "type": "string",
            "description": "Sender. For a mint, the minter. For a burn, the account that burns."
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recipient. 'null' for a burn."
          },
          "amount": {
            "type": "string",
            "description": "Amount in the smallest unit, as a decimal string."
          }
        }
      },
      "KeysetPage": {
        "type": "object",
        "description": "Position of a page in a list that uses numeric keyset pagination.",
        "properties": {
          "first": {
            "type": "integer",
            "description": "ID of the first row. The value is 0 when the page is empty."
          },
          "last": {
            "type": "integer",
            "description": "ID of the last row. The value is 0 when the page is empty."
          }
        }
      },
      "OKResponse": {
        "type": "object",
        "description": "Body of a success response. The shape of result depends on the route.",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "description": {
            "type": "string",
            "description": "Message for people."
          },
          "result": {
            "type": "object",
            "additionalProperties": true,
            "description": "Data of the route."
          }
        },
        "required": [
          "ok",
          "description"
        ]
      },
      "Offering": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Offering ID."
          },
          "sourceId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID in the import source."
          },
          "voucherId": {
            "type": "integer",
            "description": "Voucher ID."
          },
          "voucherAddress": {
            "type": "string",
            "description": "Voucher address."
          },
          "voucherName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the voucher."
          },
          "voucherSymbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucherUoa": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit of account of the voucher."
          },
          "priceInUnitOfAccount": {
            "type": [
              "string",
              "null"
            ],
            "description": "'price' multiplied by the voucher value, as decimal text. The value is 'null' unless the price, the unit, the voucher value and the unit of account are all set and positive."
          },
          "voucherDecimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "voucherImageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'."
          },
          "voucherLocationName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'."
          },
          "voucherGeoLat": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'."
          },
          "voucherGeoLng": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'."
          },
          "sellerAddress": {
            "type": "string",
            "description": "The seller."
          },
          "commodityName": {
            "type": "string",
            "description": "Name of the offering."
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "description": "Decimal text. New offerings have '\"1\"'."
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "frequency": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal text."
          },
          "available": {
            "type": "boolean"
          },
          "locationName": {
            "type": [
              "string",
              "null"
            ]
          },
          "geoLat": {
            "type": [
              "number",
              "null"
            ]
          },
          "geoLng": {
            "type": [
              "number",
              "null"
            ]
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveLocationName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'. The offering value, or the voucher value when the offering has none."
          },
          "effectiveGeoLat": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'. Same fallback."
          },
          "effectiveGeoLng": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings'. Same fallback."
          },
          "distanceMeters": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only 'GET /api/v2/offerings' with 'nearby=true'."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sorted. Empty array when none."
          },
          "createdAt": {
            "type": "string",
            "description": "RFC 3339 time."
          },
          "updatedAt": {
            "type": "string",
            "description": "RFC 3339 time."
          }
        }
      },
      "Otx": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "OTX record ID."
          },
          "trackingId": {
            "type": "string",
            "description": "Tracking UUID."
          },
          "otxType": {
            "type": "string",
            "description": "Operation type."
          },
          "signerAccount": {
            "type": "string",
            "description": "Address of the account that signed the transaction."
          },
          "rawTx": {
            "type": "string",
            "description": "Signed transaction as hex."
          },
          "txHash": {
            "type": "string",
            "description": "Transaction hash."
          },
          "nonce": {
            "type": "number",
            "description": "Nonce of the signer account."
          },
          "replaced": {
            "type": "boolean",
            "description": "'true' if a later transaction replaced this one."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 times."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 times."
          },
          "status": {
            "type": "string",
            "description": "Dispatch status."
          }
        }
      },
      "Pool": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "chainId": {
            "type": "integer"
          },
          "address": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name, or the contract name."
          },
          "contractName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name stored on the contract."
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownerAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "feePpm": {
            "type": [
              "number",
              "null"
            ]
          },
          "feeAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "tokenRegistryAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "limiterAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "quoterAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "quoterType": {
            "type": [
              "string",
              "null"
            ],
            "description": "'decimal', 'oracle' or 'relative'. 'null' for an imported pool."
          },
          "feePolicyAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocolFeeControllerAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "feesDecoupled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "decimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "unitOfAccount": {
            "type": [
              "string",
              "null"
            ]
          },
          "locationName": {
            "type": [
              "string",
              "null"
            ]
          },
          "geoLat": {
            "type": [
              "number",
              "null"
            ]
          },
          "geoLng": {
            "type": [
              "number",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "bannerUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "defaultVoucherId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "platformContractId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "voucherCount": {
            "type": "integer",
            "description": "The number of allowed, active vouchers."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sorted. Empty array when none."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 time."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 time."
          }
        }
      },
      "PoolVoucher": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Voucher ID."
          },
          "chainId": {
            "type": "integer",
            "description": "Chain ID."
          },
          "address": {
            "type": "string",
            "description": "Voucher address."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name."
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ],
            "description": "Symbol."
          },
          "active": {
            "type": "boolean",
            "description": "'false' for a retired voucher."
          },
          "isAllowed": {
            "type": "boolean",
            "description": "'true' when the pool allows the voucher."
          },
          "tags": {
            "type": "array",
            "items": {},
            "description": "Tags."
          }
        }
      },
      "Post": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Post ID."
          },
          "title": {
            "type": "string",
            "description": "Title."
          },
          "description": {
            "type": "string",
            "description": "Summary."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cover image. The value is null when the stored value is not an 'http' or 'https' URL."
          },
          "geoLat": {
            "type": [
              "number",
              "null"
            ],
            "description": "Latitude."
          },
          "geoLng": {
            "type": [
              "number",
              "null"
            ],
            "description": "Longitude."
          },
          "periodFrom": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 time."
          },
          "periodTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 time."
          },
          "markerIcon": {
            "type": "string",
            "enum": [
              "post",
              "event",
              "announcement"
            ],
            "description": "Map marker icon."
          },
          "markerColor": {
            "type": "string",
            "enum": [
              "blue",
              "purple",
              "orange",
              "pink",
              "cyan",
              "brown"
            ],
            "description": "Map marker color."
          },
          "authorAddress": {
            "type": "string",
            "description": "The account of the original author. It never changes and appears only in managed user and admin responses, never public responses."
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "APPROVED",
              "REJECTED"
            ],
            "description": "'DRAFT', 'SUBMITTED', 'APPROVED', or 'REJECTED'. Present only in managed user and admin responses."
          },
          "createdAt": {
            "type": "string",
            "description": "RFC 3339 time."
          },
          "updatedAt": {
            "type": "string",
            "description": "RFC 3339 time."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags in sorted order."
          },
          "vouchers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "chainId": {
                  "type": "integer"
                },
                "address": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "symbol": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "description": "Linked vouchers."
          },
          "pools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "chainId": {
                  "type": "integer"
                },
                "address": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                }
              }
            },
            "description": "Linked pools."
          },
          "body": {
            "type": "string",
            "description": "Markdown text. Omitted when empty."
          },
          "hostName": {
            "type": "string",
            "description": "Free text. Omitted when not set."
          },
          "participants": {
            "type": "string",
            "description": "Free text. Omitted when not set."
          },
          "timeTaken": {
            "type": "string",
            "description": "Free text. Omitted when not set."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "width": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "height": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maxWidth": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maxHeight": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "byteSize": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "caption": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "description": "Images. The key is absent when the post has none."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "FILE",
                    "EMBED"
                  ]
                },
                "url": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "byteSize": {
                  "type": "integer"
                }
              }
            },
            "description": "Other media. The key is absent when the post has none."
          }
        }
      },
      "Recipient": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "user",
              "pool"
            ],
            "description": "Type of the recipient."
          },
          "name": {
            "type": "string",
            "description": "For a user, the username. Profile names are never returned. For a pool: the display name or the name."
          },
          "alias": {
            "type": "string",
            "description": "The username, or for a pool the display name or the name."
          },
          "address": {
            "type": "string",
            "description": "Account address."
          },
          "chainId": {
            "type": "number",
            "description": "Chain ID. For a user, the chain ID of the service."
          }
        }
      },
      "ResourceLimit": {
        "type": "object",
        "properties": {
          "used": {
            "type": "number",
            "description": "Current use."
          },
          "limit": {
            "type": "number",
            "description": "The limit of the user."
          },
          "unlimited": {
            "type": "boolean",
            "description": "'true' for an 'ADMIN' or 'SUPERADMIN' user."
          },
          "canCreate": {
            "type": "boolean"
          }
        }
      },
      "Review": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "stars": {
            "type": "integer",
            "description": "1 to 5."
          },
          "comment": {
            "type": "string"
          },
          "reply": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reply of the resource owner."
          }
        }
      },
      "SignedBatch": {
        "type": "object",
        "properties": {
          "batchedCall": {
            "$ref": "#/components/schemas/BatchedCall",
            "description": "A batched call."
          },
          "nonce": {
            "type": "string",
            "description": "Decimal number. Use the 'nonce' from 'POST /api/v2/relayer/relay/preview'."
          },
          "keyHash": {
            "type": "string",
            "description": "'0x' and 64 hex characters. All zeros for the root key."
          },
          "executor": {
            "type": "string",
            "description": "Checksummed address. Must be the 'relayerAddress' or the zero address."
          },
          "deadline": {
            "type": "string",
            "description": "Decimal number. Unix seconds. '\"0\"' means no deadline."
          }
        },
        "required": [
          "batchedCall",
          "nonce",
          "keyHash",
          "executor",
          "deadline"
        ]
      },
      "TagUsage": {
        "type": "object",
        "properties": {
          "deployedTokens": {
            "type": "integer"
          },
          "deployedPools": {
            "type": "integer"
          },
          "vouchers": {
            "type": "integer"
          },
          "pools": {
            "type": "integer"
          },
          "posts": {
            "type": "integer"
          },
          "offerings": {
            "type": "integer"
          },
          "catalogs": {
            "type": "integer"
          }
        }
      },
      "TokenBalance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "tokenAddress": {
            "type": "string"
          },
          "tokenSymbol": {
            "type": "string"
          },
          "tokenName": {
            "type": "string"
          },
          "tokenDecimals": {
            "type": "integer"
          },
          "balance": {
            "type": "string"
          },
          "lastDateBlock": {
            "type": "string",
            "format": "date-time"
          },
          "catalogActive": {
            "type": "boolean"
          },
          "voucherValue": {
            "type": "string",
            "description": "Decimal number. The value of one voucher in 'voucherUoa'. Not present if the catalog has none."
          },
          "voucherUoa": {
            "type": "string",
            "description": "Unit of account of 'voucherValue'. Not present if the catalog has none."
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Account ID."
          },
          "ethereumAddress": {
            "type": "string",
            "description": "Account address."
          },
          "username": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public username."
          },
          "name": {
            "type": "string",
            "description": "Name."
          },
          "email": {
            "type": "string",
            "description": "Email. The value is an empty string when the account has none."
          },
          "phone": {
            "type": "string",
            "description": "Phone number. The value is an empty string when the account has none."
          },
          "country": {
            "type": "string",
            "description": "Country code. The value is an empty string when the account has none."
          },
          "role": {
            "type": "string",
            "enum": [
              "USER",
              "ADMIN",
              "SUPERADMIN"
            ],
            "description": "Role of the user."
          },
          "status": {
            "type": "string",
            "description": "'PENDING', 'APPROVED' or 'REJECTED'."
          },
          "maxPools": {
            "type": "integer",
            "description": "Pool limit."
          },
          "maxTokens": {
            "type": "integer",
            "description": "Voucher limit."
          },
          "maxCatalogs": {
            "type": "integer",
            "description": "Catalog limit."
          },
          "maxOffers": {
            "type": "integer",
            "description": "Offering limit per voucher."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 time."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 time."
          }
        }
      },
      "Voucher": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "As in the list."
          },
          "chainId": {
            "type": "integer",
            "description": "As in the list."
          },
          "address": {
            "type": "string",
            "description": "As in the list."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name, or the contract name."
          },
          "contractName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name stored on the contract."
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "decimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ownerAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucherUoa": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit of account."
          },
          "voucherValue": {
            "type": [
              "string",
              "null"
            ],
            "description": "The value of one voucher in 'voucherUoa', as decimal text."
          },
          "locationName": {
            "type": [
              "string",
              "null"
            ]
          },
          "geoLat": {
            "type": [
              "number",
              "null"
            ],
            "description": "Can be 'null' on this route."
          },
          "geoLng": {
            "type": [
              "number",
              "null"
            ],
            "description": "Can be 'null' on this route."
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "iconUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "bannerUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Never 'null'."
          },
          "kind": {
            "type": "string",
            "description": "Always 'voucher'."
          },
          "markerIcon": {
            "type": [
              "string",
              "null"
            ]
          },
          "markerColor": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "'false' for a retired voucher."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is not valid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The credential is missing or not valid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller is not allowed to do this.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "The route or the record does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with existing data.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Gone": {
        "description": "The sign-in card was replaced by a key rotation (E20).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "The request body is larger than 1 MB.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "A rate limit or a quota is exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before the next request.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "InternalError": {
        "description": "An internal error occurred.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The request is well formed but the service cannot process it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BadGateway": {
        "description": "The upstream service failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The service is not available.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__clc_auth",
        "description": "Session cookie. The sign-in routes set it. It holds a user JWT."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Send the token in the Authorization header. A service JWT or a user JWT is accepted where the route allows it."
      }
    }
  }
}
