{
  "openapi": "3.1.0",
  "info": {
    "title": "LIQUID platform API",
    "version": "1.0.0-sandbox",
    "description": "Companies, banks and SBP on one API. Banks keep the money; PRISM+ settles; LIQUID records each promise and checks every record agrees. **Sandbox: simulated banks, no real money.**",
    "contact": {
      "name": "LIQUID Documentation",
      "url": "https://docs.liquid.bridgeintelligence.cloud"
    }
  },
  "servers": [
    {
      "url": "https://api.liquid.bridgeintelligence.cloud",
      "description": "Sandbox"
    }
  ],
  "security": [
    {
      "clientCredentials": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "Machines sign in with **OAuth 2.0 client credentials**: one client per organisation and role. Ask the token URL for a token, send it as `authorization: Bearer <token>`, and reuse it until it expires (300 s).\n\n```bash\ncurl -s https://id.liquid.bridgeintelligence.cloud/realms/liquid/protocol/openid-connect/token \\\n  -d grant_type=client_credentials -d client_id=$LIQUID_CLIENT_ID --data-urlencode client_secret=$LIQUID_CLIENT_SECRET\n```\n\nThen `GET /v1/me` tells you who you are: your role and your organisation."
    },
    {
      "name": "Organisations",
      "description": "A company on LIQUID, the people and roles inside it, its companies and projects, and its approval rules. A company is approved by its sponsoring bank (KYB) before it can move money. Every change is in the audit trail."
    },
    {
      "name": "Counterparties",
      "description": "The buyers, contractors and suppliers a company pays or collects from, each with their bank and IBAN."
    },
    {
      "name": "Bank accounts",
      "description": "Bank accounts a company connects to LIQUID. The bank consents first; after that the balances are live. The money stays at the bank."
    },
    {
      "name": "Positions & forecast",
      "description": "Cash across banks now, money committed in and out over the next 30 days, money held, approvals waiting, and a forecast from agreed contracts."
    },
    {
      "name": "Banks & SBP",
      "description": "For bank and SBP clients only. A bank sees its corporate clients, the money held at it under LIQUID, and connection requests waiting for its consent. SBP sees the network: organisations, money held by bank, interbank flows and alerts. A joining bank's systems send their ISO 20022 status and entries to the inbox."
    },
    {
      "name": "Payments",
      "description": "Payments follow **maker-checker**. A maker asks for a payment; it waits in approvals until a different person checks it (and approves it, if the policy needs two). Then the payer's bank pays and PRISM+ settles.\n\n**Idempotency-Key is not de-duplicated yet** (program#148). Send one on every payment, but sending the same request twice creates two requests. After a timeout or a 5xx, check the payments list before you try again."
    },
    {
      "name": "Approvals",
      "description": "Everything waiting for a decision: payments, releases, refunds, pay orders. Record a `check`, `approve` or `reject` step. The person who made a request can never approve it: that call gets a **403**."
    },
    {
      "name": "Escrow",
      "description": "Money held at the payer's bank as a digital deposit until a condition is met: a milestone certified, goods delivered, a deadline passed. It can keep earning profit or interest while held. Releasing or refunding follows maker-checker."
    },
    {
      "name": "Contracts",
      "description": "Agreements with a schedule of instalments. Each instalment can be put into escrow and released when its milestone is certified."
    },
    {
      "name": "Pay orders",
      "description": "Digital pay orders, bid securities and performance securities: money held for a beneficiary such as a tender authority. The beneficiary encashes it or gives it back. Issuing one follows maker-checker."
    },
    {
      "name": "Checking a pay order",
      "description": "Anyone can check a pay order with its code, without a token. Limited to 600 calls a minute across all callers."
    },
    {
      "name": "Sweeps",
      "description": "Ask your bank to move idle cash above a floor into a fund, conventional or Islamic. Outside PRISM+ hours, requests queue until it opens."
    },
    {
      "name": "Deposit rates",
      "description": "Each bank's published deposit rates, conventional and Islamic, used for profit or interest on held money."
    },
    {
      "name": "Webhooks",
      "description": "Events posted to your HTTPS endpoint, **signed**: `liquid-signature: t=<unix seconds>,v1=<hex>`, where v1 = HMAC-SHA256(secret, \"<t>.<raw body>\"). Check the signature on the raw body, reject timestamps older than 5 minutes, answer 2xx within 5 s, and skip event ids you have already handled. Retries: 10 s, 30 s, 2 min, 10 min, 30 min, 2 h, 6 h. The secret is shown once, when you add the webhook."
    },
    {
      "name": "Events",
      "description": "Everything LIQUID does for you is an event. Read them after a sequence number, or follow them live (server-sent events). You see only events about your own records."
    },
    {
      "name": "Rate limits",
      "description": "Set at the gateway (sandbox): **60 requests a minute per client**; this is the real control. Behind it, shared safety limits of 6,000 a minute in total and 600 a minute for calls without a token (checking a pay order). Every answer carries `x-ratelimit-limit`, `x-ratelimit-remaining` and `x-ratelimit-reset`; over the limit you get **429**, which is safe to retry after the reset."
    },
    {
      "name": "Errors",
      "description": "Errors are JSON with one plain sentence: `{ \"error\": \"Your bank hasn't approved your organisation yet.\" }`\n\n| Status | Meaning |\n|---|---|\n| 400 | Something in the request is missing or not valid |\n| 401 | No token, or the token is wrong, expired or for another audience |\n| 403 | Your role or organisation can't do this (for example, approving your own request) |\n| 404 | Not found, not yours to see, or not part of the public API |\n| 409 | It conflicts with the current state (for example, already released) |\n| 429 | Rate limit reached: wait for the reset |\n| 502, 503 | A bank or service didn't answer: try again shortly (reads only; check before retrying a write) |\n\nEvery answer has an `x-request-id`. Quote it when you ask us about a call."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Getting started",
      "tags": [
        "Authentication"
      ]
    },
    {
      "name": "Organisations & people",
      "tags": [
        "Organisations",
        "Counterparties"
      ]
    },
    {
      "name": "Accounts & positions",
      "tags": [
        "Bank accounts",
        "Positions & forecast",
        "Banks & SBP"
      ]
    },
    {
      "name": "Payments & approvals",
      "tags": [
        "Payments",
        "Approvals"
      ]
    },
    {
      "name": "Escrow & conditional payments",
      "tags": [
        "Escrow",
        "Contracts"
      ]
    },
    {
      "name": "Pay orders",
      "tags": [
        "Pay orders",
        "Checking a pay order"
      ]
    },
    {
      "name": "Treasury",
      "tags": [
        "Sweeps",
        "Deposit rates"
      ]
    },
    {
      "name": "Webhooks",
      "tags": [
        "Webhooks",
        "Events"
      ]
    },
    {
      "name": "Errors & limits",
      "tags": [
        "Rate limits",
        "Errors"
      ]
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "summary": "Who is calling",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": {
                  "userId": "b444a056-7080-429c-815c-2f03955dd31a",
                  "name": "Simulated Test Co (txn-sim) finance maker API (SIMULATED)",
                  "email": "person@example.com",
                  "role": "finance_maker",
                  "orgId": "c2833668-70dd-4502-a264-7e2ecb51ccf8",
                  "institutionId": null,
                  "kind": "org",
                  "customerRef": null,
                  "orgStatus": "active",
                  "signupSource": "invite"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1Me"
      }
    },
    "/v1/orgs": {
      "get": {
        "summary": "Organisations I can see",
        "tags": [
          "Organisations"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "c2833668-70dd-4502-a264-7e2ecb51ccf8",
                    "name": "Simulated Test Co (txn-sim)",
                    "legal_name": "Simulated Test Co (txn-sim) (SIMULATED, txn-sim test company)",
                    "sector": "Testing (simulated)",
                    "registration_no": null,
                    "sponsor_bank": "bank-a",
                    "status": "active",
                    "applied_at": "2026-11-19T09:15:56.941Z",
                    "kyb_decided_at": "2026-11-19T09:15:56.955Z",
                    "kyb_decided_by": "Farah Hashmi",
                    "kyb_note": "Simulated test company for txn-sim (program#141)",
                    "simulated": true,
                    "self_signup": false,
                    "ntn": null,
                    "address": null,
                    "contact_name": null,
                    "contact_phone": null,
                    "contact_email": null,
                    "submitted_at": null,
                    "kyb_recommendation": null,
                    "kyb_recommended_by": null,
                    "kyb_recommended_at": null,
                    "kyb_recommend_note": null,
                    "kyb_decided_by_user": null,
                    "sponsor_name": "Bank A"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1Orgs"
      },
      "post": {
        "summary": "A bank onboards a corporate client",
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "legalName",
                  "sector",
                  "owner"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "legalName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "sector": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "registrationNo": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "owner": {
                    "type": "object",
                    "required": [
                      "name",
                      "email"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 200
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Orgs"
      }
    },
    "/v1/orgs/{orgId}": {
      "get": {
        "summary": "Organisation, people, entities, approval rules",
        "tags": [
          "Organisations"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": {
                  "org": {
                    "id": "c2833668-70dd-4502-a264-7e2ecb51ccf8",
                    "name": "Simulated Test Co (txn-sim)",
                    "legal_name": "Simulated Test Co (txn-sim) (SIMULATED, txn-sim test company)",
                    "sector": "Testing (simulated)",
                    "registration_no": null,
                    "sponsor_bank": "bank-a",
                    "status": "active",
                    "applied_at": "2026-11-19T09:15:56.941Z",
                    "kyb_decided_at": "2026-11-19T09:15:56.955Z",
                    "kyb_decided_by": "Farah Hashmi",
                    "kyb_note": "Simulated test company for txn-sim (program#141)",
                    "simulated": true,
                    "self_signup": false,
                    "ntn": null,
                    "address": null,
                    "contact_name": null,
                    "contact_phone": null,
                    "contact_email": null,
                    "submitted_at": null,
                    "kyb_recommendation": null,
                    "kyb_recommended_by": null,
                    "kyb_recommended_at": null,
                    "kyb_recommend_note": null,
                    "kyb_decided_by_user": null,
                    "sponsor_name": "Bank A"
                  },
                  "users": [
                    {
                      "id": "47cd9a6c-b740-4fcf-926f-c8834c02501d",
                      "name": "Simulated Test Co owner",
                      "email": "person@example.com",
                      "role": "owner",
                      "status": "active",
                      "created_at": "2026-11-19T09:15:56.941Z"
                    }
                  ],
                  "entities": [],
                  "policies": [
                    {
                      "id": "de6f886a-052d-4c80-b41e-d45acc01d2c3",
                      "action": "encash_pay_order",
                      "min_amount": 0,
                      "max_amount": null,
                      "checkers_required": 1,
                      "approver_role": "approver"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgId"
      }
    },
    "/v1/orgs/{orgId}/accounts": {
      "get": {
        "summary": "Connected bank accounts with live balances",
        "tags": [
          "Bank accounts"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "30173e20-1926-472d-8f22-a1a1772dbd02",
                    "bank_id": "bank-a",
                    "iban": "PK76SIMA5887084443816989",
                    "account_ref": "bd7781bf-82d9-4b4a-856c-98c612ec4b5c",
                    "title": "Bank A operating account",
                    "purpose": "operating",
                    "status": "active",
                    "consent_ref": "CNS-2AF6CD90",
                    "consented_at": "2026-11-19T09:15:57.006Z",
                    "consented_by": "Sana Malik",
                    "balance": {
                      "ledger": 997965,
                      "available": 997965,
                      "held": 0
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdAccounts"
      }
    },
    "/v1/orgs/{orgId}/approvals": {
      "get": {
        "summary": "Approvals",
        "tags": [
          "Approvals"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "c71f563b-3837-44ae-ae33-e56cc0c9b16c",
                    "org_id": "c2833668-70dd-4502-a264-7e2ecb51ccf8",
                    "action": "pay",
                    "subject_type": "payment",
                    "subject_id": "e9201ba4-95d0-4aaf-9ba7-80db5656f6e9",
                    "amount": 2035,
                    "summary": "Pay Simulated Supplier (txn-sim) PKR 2,035 (txn-sim 1c347b74 (simulated))",
                    "checkers_required": 1,
                    "approver_role": "approver",
                    "status": "executed",
                    "requested_by": "b444a056-7080-429c-815c-2f03955dd31a",
                    "requested_at": "2026-11-19T11:30:48.113Z",
                    "steps": [
                      {
                        "at": "2026-11-19T11:33:09.929Z",
                        "by": "0be315fc-1901-4bfc-a377-47754e14f1bf",
                        "name": "Simulated Checker TxnSim",
                        "role": "finance_checker",
                        "step": "check"
                      }
                    ],
                    "payload": {},
                    "result": "done",
                    "decided_at": "2026-11-19T11:33:58.995Z",
                    "requested_by_name": "Simulated Test Co (txn-sim) finance maker API (SIMULATED)",
                    "next": null,
                    "canAct": false
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdApprovals"
      }
    },
    "/v1/orgs/{orgId}/audit": {
      "get": {
        "summary": "Audit trail",
        "tags": [
          "Organisations"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "seq": 555,
                    "at": "2026-11-19T11:34:16.779Z",
                    "actor_name": "Simulated Approver TxnSim",
                    "actor_role": "approver",
                    "action": "payment.done",
                    "subject": "P-C2644059",
                    "detail": {}
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdAudit"
      }
    },
    "/v1/orgs/{orgId}/contracts": {
      "get": {
        "summary": "Contracts with their schedules",
        "tags": [
          "Contracts"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdContracts"
      }
    },
    "/v1/orgs/{orgId}/counterparties": {
      "get": {
        "summary": "Counterparties",
        "tags": [
          "Counterparties"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "af4b1ac0-b12a-4d3e-b676-e3ec34e5ae87",
                    "name": "Simulated Supplier (txn-sim)",
                    "kind": "company",
                    "role": "supplier",
                    "bank_id": "bank-b",
                    "iban": "PK53SIMB9550424645959490",
                    "email": null,
                    "invite_status": "invited",
                    "persona": null,
                    "created_at": "2026-11-19T09:15:57.131Z"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdCounterparties"
      }
    },
    "/v1/orgs/{orgId}/dashboard": {
      "get": {
        "summary": "Front page: cash, commitments, escrow, approvals, alerts",
        "tags": [
          "Positions & forecast"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": {
                  "cash": 1997965,
                  "accounts": [
                    {
                      "id": "30173e20-1926-472d-8f22-a1a1772dbd02",
                      "bank_id": "bank-a",
                      "iban": "PK76SIMA5887084443816989",
                      "account_ref": "bd7781bf-82d9-4b4a-856c-98c612ec4b5c",
                      "title": "Bank A operating account",
                      "purpose": "operating",
                      "status": "active",
                      "consent_ref": "CNS-2AF6CD90",
                      "consented_at": "2026-11-19T09:15:57.006Z",
                      "consented_by": "Sana Malik",
                      "balance": {
                        "ledger": 997965,
                        "available": 997965,
                        "held": 0
                      }
                    }
                  ],
                  "committedIn30": 0,
                  "committedOut30": 0,
                  "escrowHeld": 0,
                  "escrowCount": 0,
                  "payOrdersHeld": 0,
                  "payOrdersCount": 0,
                  "approvals": [
                    {
                      "id": "0dcb4b94-da09-4ece-a997-98b419c8dda5",
                      "summary": "Pay Simulated Supplier (txn-sim) PKR 473 (txn-sim 297ed271 (simulated))",
                      "amount": 473,
                      "steps": [],
                      "checkers_required": 1,
                      "requested_at": "2026-11-19T09:20:02.897Z"
                    }
                  ],
                  "alerts": [],
                  "consentsPending": [],
                  "activity": [
                    {
                      "seq": 555,
                      "at": "2026-11-19T11:34:16.779Z",
                      "actor_name": "Simulated Approver TxnSim",
                      "actor_role": "approver",
                      "action": "payment.done",
                      "subject": "P-C2644059"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdDashboard"
      }
    },
    "/v1/orgs/{orgId}/escrows": {
      "get": {
        "summary": "Escrows",
        "tags": [
          "Escrow"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdEscrows"
      }
    },
    "/v1/orgs/{orgId}/forecast": {
      "get": {
        "summary": "Cash forecast from agreed contracts",
        "tags": [
          "Positions & forecast"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": {
                  "start": 1997965,
                  "days": 90,
                  "series": [
                    {
                      "date": "2026-11-20",
                      "in": 0,
                      "out": 0,
                      "balance": 1997965
                    }
                  ],
                  "lowest": {
                    "date": "2026-11-20",
                    "in": 0,
                    "out": 0,
                    "balance": 1997965
                  },
                  "flows": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdForecast"
      }
    },
    "/v1/orgs/{orgId}/payments": {
      "get": {
        "summary": "Payments made",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "e9201ba4-95d0-4aaf-9ba7-80db5656f6e9",
                    "ref": "P-C2644059",
                    "org_id": "c2833668-70dd-4502-a264-7e2ecb51ccf8",
                    "contract_id": null,
                    "item_id": null,
                    "from_connection": "30173e20-1926-472d-8f22-a1a1772dbd02",
                    "payee_name": "Simulated Supplier (txn-sim)",
                    "payee_bank": "bank-b",
                    "payee_iban": "PK53SIMB9550424645959490",
                    "payee_account": "099ded23-98c2-4637-b5d4-2638ebfd5855",
                    "amount": 2035,
                    "note": "txn-sim 1c347b74 (simulated)",
                    "status": "done",
                    "refs": {
                      "e2e": "E2E-ENTPC2644059-MWNH2NG0",
                      "uetr": "ca3763de-7855-43f8-8576-ea0fd0103d6f",
                      "msgId": "SIMA202611191134041946",
                      "obligationRef": "0x39dc1847b309b8bbb462595e0d3d5c568753b63fe235ff1d4146ca7ddff0296e",
                      "settlementRef": "SIMPP-20261119-B585516ABC2B"
                    },
                    "txs": [
                      {
                        "at": "2026-11-19T11:34:04.080Z",
                        "tx": "0xe1726a5f20819cf0328a4e439b482d7056c9ec67b0c684d7d287f087a01de8aa",
                        "link": "https://explorer.liquid.bridgeintelligence.cloud/tx/0xe1726a5f20819cf0328a4e439b482d7056c9ec67b0c684d7d287f087a01de8aa",
                        "label": "Bank A promised to pay Bank B"
                      }
                    ],
                    "checks": [
                      {
                        "ok": true,
                        "name": "Bank A took it from Simulated Test Co (txn-sim)",
                        "value": "CONSUMED"
                      }
                    ],
                    "problem": null,
                    "created_by": "b444a056-7080-429c-815c-2f03955dd31a",
                    "created_at": "2026-11-19T11:30:48.112Z",
                    "closed_at": "2026-11-19T11:34:16.778Z",
                    "from_title": "Bank A operating account"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdPayments"
      }
    },
    "/v1/orgs/{orgId}/pay-orders": {
      "get": {
        "summary": "Digital pay orders and securities",
        "tags": [
          "Pay orders"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdPayOrders"
      }
    },
    "/v1/orgs/{orgId}/receivables": {
      "get": {
        "summary": "Money owed that a bank could finance against",
        "tags": [
          "Positions & forecast"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": {
                  "items": [],
                  "totals": {
                    "held": 0,
                    "agreed": 0,
                    "offered": 0,
                    "advance": 0
                  },
                  "simulated": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdReceivables"
      }
    },
    "/v1/orgs/{orgId}/sweeps": {
      "get": {
        "summary": "Treasury sweeps",
        "tags": [
          "Sweeps"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1OrgsOrgIdSweeps"
      }
    },
    "/v1/orgs/{orgId}/kyb": {
      "post": {
        "summary": "The sponsoring bank decides KYB",
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approve"
                ],
                "properties": {
                  "approve": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1OrgsOrgIdKyb"
      }
    },
    "/v1/accounts": {
      "post": {
        "summary": "Ask a bank to connect an account",
        "tags": [
          "Bank accounts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "bank",
                  "iban",
                  "purpose"
                ],
                "properties": {
                  "bank": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "bank-a"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "bank-b"
                        ]
                      }
                    ]
                  },
                  "iban": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "purpose": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "operating"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "collections"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "escrow"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "payroll"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "treasury"
                        ]
                      }
                    ]
                  },
                  "entityId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Accounts"
      }
    },
    "/v1/contracts": {
      "post": {
        "summary": "Create a contract and its schedule",
        "tags": [
          "Contracts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "counterpartyId",
                  "direction",
                  "title",
                  "reference",
                  "connectionId",
                  "escrow",
                  "depositProduct",
                  "profitTo",
                  "items"
                ],
                "properties": {
                  "counterpartyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "direction": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "receivable"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "payable"
                        ]
                      }
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entityId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "escrow": {
                    "type": "boolean"
                  },
                  "depositProduct": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "current"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "qard"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "savings"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "term"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "mudarabah"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "wakalah"
                        ]
                      }
                    ]
                  },
                  "profitTo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "payer"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "payee"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "split"
                        ]
                      }
                    ]
                  },
                  "profitPayerPct": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "label",
                        "dueDate",
                        "amount",
                        "condition"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "dueDate": {
                          "type": "string",
                          "format": "date"
                        },
                        "amount": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 10000000000
                        },
                        "condition": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        }
                      }
                    },
                    "minItems": 1,
                    "maxItems": 120
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Contracts"
      }
    },
    "/v1/counterparties": {
      "post": {
        "summary": "Invite a buyer, contractor or supplier",
        "tags": [
          "Counterparties"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "kind",
                  "role",
                  "iban"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "individual"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "company"
                        ]
                      }
                    ]
                  },
                  "role": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "buyer"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "contractor"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "supplier"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "other"
                        ]
                      }
                    ]
                  },
                  "iban": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "persona": {
                    "type": "string",
                    "maxLength": 40
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Counterparties"
      }
    },
    "/v1/entities": {
      "post": {
        "summary": "Add a company or project",
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "kind"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "company"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "project"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Entities"
      }
    },
    "/v1/escrows/{id}/certify": {
      "post": {
        "summary": "Record that the condition is met",
        "tags": [
          "Escrow"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "certificate"
                ],
                "properties": {
                  "certificate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1EscrowsIdCertify"
      }
    },
    "/v1/escrows/{id}/release": {
      "post": {
        "summary": "Ask to release to us (maker-checker)",
        "tags": [
          "Escrow"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "demoDaysHeld": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3650
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  }
                }
              },
              "example": {
                "reason": "Milestone 2 certified by the site engineer"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1EscrowsIdRelease"
      }
    },
    "/v1/escrows/{id}/refund": {
      "post": {
        "summary": "Ask to return to the payer (maker-checker)",
        "tags": [
          "Escrow"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "demoDaysHeld": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3650
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  }
                }
              },
              "example": {
                "reason": "Delivery deadline passed"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1EscrowsIdRefund"
      }
    },
    "/v1/items/{itemId}/escrow": {
      "post": {
        "summary": "Ask the payer to put an instalment into escrow",
        "tags": [
          "Escrow"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "itemId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1ItemsItemIdEscrow"
      }
    },
    "/v1/payments": {
      "post": {
        "summary": "Pay a counterparty or a milestone (maker-checker)",
        "tags": [
          "Payments"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "itemId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "counterpartyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 140
                  }
                }
              },
              "example": {
                "connectionId": "30173e20-1926-472d-8f22-a1a1772dbd02",
                "counterpartyId": "af4b1ac0-b12a-4d3e-b676-e3ec34e5ae87",
                "amount": 250000,
                "note": "INV-1042 November supplies"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Payments"
      }
    },
    "/v1/pay-orders": {
      "post": {
        "summary": "Issue a digital pay order or bid security (maker-checker)",
        "tags": [
          "Pay orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "connectionId",
                  "beneficiaryIban",
                  "beneficiaryName",
                  "amount",
                  "purpose",
                  "validUntil"
                ],
                "properties": {
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "bid_security"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "pay_order"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "performance_security"
                        ]
                      }
                    ]
                  },
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "beneficiaryIban": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "beneficiaryName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  },
                  "purpose": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "validUntil": {
                    "type": "string",
                    "format": "date"
                  },
                  "depositProduct": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "current"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "qard"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "savings"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "term"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "mudarabah"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "wakalah"
                        ]
                      }
                    ]
                  }
                }
              },
              "example": {
                "kind": "bid_security",
                "connectionId": "30173e20-1926-472d-8f22-a1a1772dbd02",
                "beneficiaryIban": "PK53SIMB9550424645959490",
                "beneficiaryName": "Provincial Works Department (simulated)",
                "amount": 500000,
                "purpose": "Bid security, tender PWD-2026-114",
                "validUntil": "2027-02-28",
                "depositProduct": "current"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1PayOrders"
      }
    },
    "/v1/pay-orders/{id}/decision": {
      "post": {
        "summary": "The beneficiary called it (encash) or gave it back (release)",
        "tags": [
          "Pay orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "encash"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "release"
                        ]
                      }
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                }
              },
              "example": {
                "kind": "release",
                "reason": "Tender closed; bid not selected"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1PayOrdersIdDecision"
      }
    },
    "/v1/approvals/{id}": {
      "post": {
        "summary": "Check, approve or reject",
        "tags": [
          "Approvals"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "step"
                ],
                "properties": {
                  "step": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "check"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "approve"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "reject"
                        ]
                      }
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                }
              },
              "example": {
                "step": "check",
                "note": "Matches the invoice"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1ApprovalsId"
      }
    },
    "/v1/policies/{policyId}": {
      "patch": {
        "summary": "Change how many people must check",
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "checkers"
                ],
                "properties": {
                  "checkers": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "policyId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "patchV1PoliciesPolicyId"
      }
    },
    "/v1/sweeps": {
      "post": {
        "summary": "Ask the bank to sweep idle cash into a fund",
        "tags": [
          "Sweeps"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "connectionId",
                  "keepPkr",
                  "family"
                ],
                "properties": {
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "keepPkr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "family": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "conventional"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "islamic"
                        ]
                      }
                    ]
                  }
                }
              },
              "example": {
                "connectionId": "30173e20-1926-472d-8f22-a1a1772dbd02",
                "keepPkr": 200000,
                "family": "islamic"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Sweeps"
      }
    },
    "/v1/bank/clients": {
      "get": {
        "summary": "My bank's corporate clients on LIQUID",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1BankClients"
      }
    },
    "/v1/bank/held": {
      "get": {
        "summary": "Money held at my bank under LIQUID",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1BankHeld"
      }
    },
    "/v1/bank/consents": {
      "get": {
        "summary": "Connection requests waiting at my bank",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1BankConsents"
      }
    },
    "/v1/bank/consents/{id}": {
      "post": {
        "summary": "My bank consents to (or declines) a connection",
        "tags": [
          "Banks & SBP"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approve"
                ],
                "properties": {
                  "approve": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1BankConsentsId"
      }
    },
    "/v1/network": {
      "get": {
        "summary": "SBP: organisations, money held by bank, interbank flows, alerts",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1Network"
      }
    },
    "/v1/rates/{bank}": {
      "get": {
        "summary": "A bank's published deposit rates (conventional and Islamic)",
        "tags": [
          "Deposit rates"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "bank",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "bankCode": "SIMAPKKA",
                    "model": "CURRENT",
                    "family": "conventional",
                    "product": "Current account (conventional)",
                    "annualRatePct": 0,
                    "weightage": 1,
                    "effectiveRatePct": 0,
                    "basis": "ACT/365",
                    "simulated": true
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1RatesBank"
      }
    },
    "/v1/deposit-labels": {
      "get": {
        "summary": "Escrows and pay orders with the hold behind each digital deposit (register names)",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1DepositLabels"
      }
    },
    "/v1/engine/events": {
      "get": {
        "summary": "Engine room events after a sequence number",
        "tags": [
          "Events"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Example: a real sandbox answer (Simulated Test Co), trimmed to one item per list.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "seq": 474,
                    "at": "2026-11-18T08:20:58.787Z",
                    "org_id": null,
                    "flow": "OFR-AADB638C",
                    "kind": "TRIGGER",
                    "actor": "Bank A · Ali Raza",
                    "system": "marketplace",
                    "text": "Offer to lend PKR 20,000,000 intraday, 0.02 h at 11.5%, unsecured. Waiting for back office.",
                    "link": null,
                    "data": null
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1EngineEvents"
      }
    },
    "/v1/engine/stream": {
      "get": {
        "summary": "Engine room events, live (server-sent events)",
        "tags": [
          "Events"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "operationId": "getV1EngineStream"
      }
    },
    "/v1/verify/{code}": {
      "get": {
        "summary": "Check a digital pay order with its code",
        "tags": [
          "Checking a pay order"
        ],
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "code",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1VerifyCode"
      }
    },
    "/v1/webhooks": {
      "get": {
        "summary": "My webhooks",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1Webhooks"
      },
      "post": {
        "summary": "Add a webhook: events you may read are posted to your https URL, signed (secret shown once)",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "org"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "connect"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "counterparty"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "contract"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "escrow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "payment"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "payorder"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "market"
                          ]
                        }
                      ]
                    },
                    "maxItems": 8
                  }
                }
              },
              "example": {
                "url": "https://your-system.example/liquid/webhook",
                "types": [
                  "payment",
                  "escrow",
                  "payorder"
                ]
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1Webhooks"
      }
    },
    "/v1/webhooks/{id}": {
      "patch": {
        "summary": "Turn a webhook off or on",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "active"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      }
                    ]
                  }
                }
              },
              "example": {
                "status": "disabled"
              }
            }
          }
        },
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "patchV1WebhooksId"
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "summary": "Send a test delivery",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1WebhooksIdTest"
      }
    },
    "/v1/webhooks/{id}/deliveries": {
      "get": {
        "summary": "The last 50 deliveries and their results",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "getV1WebhooksIdDeliveries"
      }
    },
    "/v1/bank/integration/inbox": {
      "post": {
        "summary": "Step 7: the bank's systems send ISO 20022 status and entries here ({ message }, X-Liquid-Signature)",
        "tags": [
          "Banks & SBP"
        ],
        "security": [
          {
            "clientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorised"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          }
        },
        "operationId": "postV1BankIntegrationInbox"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "clientCredentials": {
        "type": "oauth2",
        "description": "Your client id and secret from the sandbox access request. Tokens last 5 minutes.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://id.liquid.bridgeintelligence.cloud/realms/liquid/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    },
    "responses": {
      "Unauthorised": {
        "description": "No token, or the token is wrong, expired or for another audience.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Your role or organisation can't do this.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooMany": {
        "description": "Rate limit reached. Wait for the minute to pass (see x-ratelimit-reset).",
        "headers": {
          "x-ratelimit-limit": {
            "schema": {
              "type": "string"
            }
          },
          "x-ratelimit-remaining": {
            "schema": {
              "type": "string"
            }
          },
          "x-ratelimit-reset": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong, in plain words."
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}