{"openapi":"3.1.0","info":{"title":"Wafeq Reports (BYOK) API","version":"0.1.0","description":"Wafeq Reports (BYOK) lets an AI assistant read your own Wafeq Reports data through the Wafeq Reports API with a key you supply (Wafeq API key (private integration)). Read-only: 6 tools (get_profit_and_loss, get_balance_sheet, get_cash_flow, get_trial_balance, list_amortizations, list_revenue_recognitions). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-wafeq-reports.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-wafeq-reports/docs"},"termsOfService":"https://connectorbay.com/byok-wafeq-reports/terms"},"servers":[{"url":"https://byok-wafeq-reports.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-wafeq-reports/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_profit_and_loss":{"post":{"operationId":"get_profit_and_loss","summary":"Get the profit and loss report for a period as columns (months or years), rows of sections and accounts with values, and","description":"Get the profit and loss report for a period as columns (months or years), rows of sections and accounts with values, and an overview. Dates must be the first day of the start month or year and the last day of the end month or year. Use for \"What was my profit and loss in Wafeq for the first half of 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_after":{"description":"First day of the period (YYYY-MM-DD), the first day of a month or year.","maxLength":200,"title":"Date After","type":"string"},"date_before":{"description":"Last day of the period (YYYY-MM-DD), the last day of a month or year.","maxLength":200,"title":"Date Before","type":"string"},"group_by":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}],"default":"month","description":"Group the columns by month (default) or year.","title":"Group By"},"currency":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Three-letter currency code of the report, for example AED, SAR or USD; defaults to the organization's base currency.","title":"Currency"}},"required":["date_after","date_before"],"title":"get_profit_and_lossArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_balance_sheet":{"post":{"operationId":"get_balance_sheet","summary":"Get the balance sheet as of a date, compared across up to 11 earlier periods, as columns, rows and an overview. Use for ","description":"Get the balance sheet as of a date, compared across up to 11 earlier periods, as columns, rows and an overview. Use for \"What does my Wafeq balance sheet look like on 30 September 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"description":"The as-of date (YYYY-MM-DD).","maxLength":200,"title":"Date","type":"string"},"period_count":{"description":"Number of periods to include, 0 to 11.","maximum":11,"minimum":0,"title":"Period Count","type":"integer"},"group_by":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}],"default":"month","description":"Group the columns by month (default) or year.","title":"Group By"},"currency":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Three-letter currency code of the report, for example AED, SAR or USD; defaults to the organization's base currency.","title":"Currency"}},"required":["date","period_count"],"title":"get_balance_sheetArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_cash_flow":{"post":{"operationId":"get_cash_flow","summary":"Get the cash flow report for a period as columns, rows and an overview, grouped by month or year. Use for \"What was my c","description":"Get the cash flow report for a period as columns, rows and an overview, grouped by month or year. Use for \"What was my cash flow in Wafeq this year\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date_after":{"description":"First day of the period (YYYY-MM-DD), the first day of a month or year.","maxLength":200,"title":"Date After","type":"string"},"date_before":{"description":"Last day of the period (YYYY-MM-DD), the last day of a month or year.","maxLength":200,"title":"Date Before","type":"string"},"group_by":{"anyOf":[{"enum":["month","year"],"type":"string"},{"type":"null"}],"default":"month","description":"Group the columns by month (default) or year.","title":"Group By"},"currency":{"anyOf":[{"maxLength":3,"type":"string"},{"type":"null"}],"default":null,"description":"Three-letter currency code of the report, for example AED, SAR or USD; defaults to the organization's base currency.","title":"Currency"}},"required":["date_after","date_before"],"title":"get_cash_flowArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_trial_balance":{"post":{"operationId":"get_trial_balance","summary":"Get the trial balance between two dates with sections, accounts and totals, optionally with profit and loss openings and","description":"Get the trial balance between two dates with sections, accounts and totals, optionally with profit and loss openings and zero-balance accounts. Use for \"Show my Wafeq trial balance for 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_date":{"description":"First date of the report (YYYY-MM-DD).","maxLength":200,"title":"From Date","type":"string"},"to_date":{"description":"Last date of the report (YYYY-MM-DD).","maxLength":200,"title":"To Date","type":"string"},"include_zero_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include accounts with a zero balance.","title":"Include Zero Balances"},"with_pnl_openings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include profit and loss opening balances.","title":"With Pnl Openings"}},"required":["from_date","to_date"],"title":"get_trial_balanceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_amortizations":{"post":{"operationId":"list_amortizations","summary":"List amortization schedules for bills with account, amount, remaining balance, currency, duration, recognition type, dat","description":"List amortization schedules for bills with account, amount, remaining balance, currency, duration, recognition type, dates and status. Use for \"Which Wafeq amortization schedules are still running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["AMORTIZING","DRAFT","ENDED_EARLY","FULLY_AMORTIZED","INACTIVE","SCHEDULED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules with this status.","title":"Status"},"recognition_type":{"anyOf":[{"enum":["DAILY","MONTHLY"],"type":"string"},{"type":"null"}],"default":null,"description":"Recognition schedule: DAILY or MONTHLY.","title":"Recognition Type"},"start_date_after":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules starting on or after this date (YYYY-MM-DD).","title":"Start Date After"},"start_date_before":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules starting on or before this date (YYYY-MM-DD).","title":"Start Date Before"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results per page (default 50).","title":"Page Size"}},"title":"list_amortizationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_revenue_recognitions":{"post":{"operationId":"list_revenue_recognitions","summary":"List revenue recognition schedules for invoices with account, amount, remaining balance, currency, duration, recognition","description":"List revenue recognition schedules for invoices with account, amount, remaining balance, currency, duration, recognition type, dates and status. Use for \"Which Wafeq revenue recognition schedules are still running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["DRAFT","ENDED_EARLY","FULLY_RECOGNIZED","INACTIVE","RECOGNIZING","SCHEDULED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules with this status.","title":"Status"},"recognition_type":{"anyOf":[{"enum":["DAILY","MONTHLY"],"type":"string"},{"type":"null"}],"default":null,"description":"Recognition schedule: DAILY or MONTHLY.","title":"Recognition Type"},"start_date_after":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules starting on or after this date (YYYY-MM-DD).","title":"Start Date After"},"start_date_before":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only schedules starting on or before this date (YYYY-MM-DD).","title":"Start Date Before"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results per page (default 50).","title":"Page Size"}},"title":"list_revenue_recognitionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}