{
 "openapi": "3.1.0",
 "info": {
  "title": "Treasury (Accounting)",
  "version": "20261030b",
  "description": "The treasury service of Accounting: 8 operation(s)."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {}
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/treasury/position": {
   "get": {
    "summary": "Position",
    "operationId": "action_treasury_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/capture": {
   "post": {
    "summary": "Capture",
    "operationId": "action_treasury_0_5",
    "description": "Body keys: date, reportingCurrency",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/forecast/build": {
   "post": {
    "summary": "Forecast build",
    "operationId": "action_treasury_0_6",
    "description": "Body keys: horizonFrom, currency, revenueShiftPct, fxShiftPct, name, horizonDays, grain, scenario, collectionDelayDays, paymentDelayDays; grain one of day|week|month|quarter; scenario one of base|optimistic|pessimistic|stress|what_if",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/forecast/{id}/curve": {
   "get": {
    "summary": "Forecast curve",
    "operationId": "action_treasury_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/pools/{id}/sweep": {
   "post": {
    "summary": "Pools sweep",
    "operationId": "action_treasury_0_7",
    "description": "Body keys: sweepDate",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/instruments/{id}/schedule": {
   "post": {
    "summary": "Instruments schedule",
    "operationId": "action_treasury_0_7",
    "description": "Body keys: amortising",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/covenants/test": {
   "post": {
    "summary": "Covenants test",
    "operationId": "action_treasury_0_6",
    "description": "Body keys: testDate, covenantId",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/treasury/debt-maturity": {
   "get": {
    "summary": "Debt maturity",
    "operationId": "action_treasury_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}