{"openapi":"3.1.0","info":{"title":"Openfactura (BYOK) API","version":"0.1.0","description":"Openfactura (BYOK) lets an AI assistant read your own Openfactura data through the Openfactura API with a key you supply (Openfactura API key). Read-only: 7 tools (get_organization, get_available_folios, get_taxpayer, get_daily_sales_register, get_monthly_sales_register, get_daily_purchase_register, get_monthly_purchase_register). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-openfactura.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-openfactura/docs"},"termsOfService":"https://connectorbay.com/byok-openfactura/terms"},"servers":[{"url":"https://byok-openfactura.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-openfactura/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_organization":{"post":{"operationId":"get_organization","summary":"Show the taxpayer (company) the API key belongs to: RUT, legal and trade name, address, SII resolution and economic acti","description":"Show the taxpayer (company) the API key belongs to: RUT, legal and trade name, address, SII resolution and economic activities. Use for \"Which company is my Openfactura API key connected to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_organizationArguments","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_available_folios":{"post":{"operationId":"get_available_folios","summary":"Show, per tax document type (33 invoice, 34 exempt invoice, 39 receipt, 61 credit note ...), how many folios remain and ","description":"Show, per tax document type (33 invoice, 34 exempt invoice, 39 receipt, 61 credit note ...), how many folios remain and when they expire. Use for \"How many invoice folios do I have left in Openfactura\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_available_foliosArguments","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_taxpayer":{"post":{"operationId":"get_taxpayer","summary":"Look up basic public SII data of a Chilean taxpayer by RUT: legal name, address, commune and economic activities. Use fo","description":"Look up basic public SII data of a Chilean taxpayer by RUT: legal name, address, commune and economic activities. Use for \"What is the legal name and activity of RUT 76795561-8\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"rut":{"description":"Chilean RUT with check digit, for example 76795561-8.","maxLength":200,"title":"Rut","type":"string"}},"required":["rut"],"title":"get_taxpayerArguments","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_daily_sales_register":{"post":{"operationId":"get_daily_sales_register","summary":"Get the sales register of one day: number of documents and net, exempt, VAT and total amounts per document type (CLP). U","description":"Get the sales register of one day: number of documents and net, exempt, VAT and total amounts per document type (CLP). Use for \"How many invoices and receipts did I issue on 14 October 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"description":"Four-digit year, for example 2026.","maximum":2100,"minimum":2000,"title":"Year","type":"integer"},"month":{"description":"Month number 1 to 12.","maximum":12,"minimum":1,"title":"Month","type":"integer"},"day":{"description":"Day of the month, 1 to 31.","maximum":31,"minimum":1,"title":"Day","type":"integer"}},"required":["year","month","day"],"title":"get_daily_sales_registerArguments","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_monthly_sales_register":{"post":{"operationId":"get_monthly_sales_register","summary":"Get the sales register of one month: number of documents and net, exempt, VAT and total amounts per document type (CLP).","description":"Get the sales register of one month: number of documents and net, exempt, VAT and total amounts per document type (CLP). Use for \"What were my total sales by document type in October 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"description":"Four-digit year, for example 2026.","maximum":2100,"minimum":2000,"title":"Year","type":"integer"},"month":{"description":"Month number 1 to 12.","maximum":12,"minimum":1,"title":"Month","type":"integer"}},"required":["year","month"],"title":"get_monthly_sales_registerArguments","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_daily_purchase_register":{"post":{"operationId":"get_daily_purchase_register","summary":"Get the purchase register of one day: received documents grouped by state (pending, registered, excluded, reclaimed) and","description":"Get the purchase register of one day: received documents grouped by state (pending, registered, excluded, reclaimed) and document type with amounts (CLP). Use for \"Which purchase documents did I receive on 1 October 2026 and what is pending\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"description":"Four-digit year, for example 2026.","maximum":2100,"minimum":2000,"title":"Year","type":"integer"},"month":{"description":"Month number 1 to 12.","maximum":12,"minimum":1,"title":"Month","type":"integer"},"day":{"description":"Day of the month, 1 to 31.","maximum":31,"minimum":1,"title":"Day","type":"integer"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated statuses of received documents: pending, registered, exclude, reclaimed (default: all four).","title":"Status"}},"required":["year","month","day"],"title":"get_daily_purchase_registerArguments","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_monthly_purchase_register":{"post":{"operationId":"get_monthly_purchase_register","summary":"Get the purchase register of one month: received documents grouped by state and document type with amounts (CLP). Use fo","description":"Get the purchase register of one month: received documents grouped by state and document type with amounts (CLP). Use for \"What did I receive from suppliers in October 2026 by state\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"description":"Four-digit year, for example 2026.","maximum":2100,"minimum":2000,"title":"Year","type":"integer"},"month":{"description":"Month number 1 to 12.","maximum":12,"minimum":1,"title":"Month","type":"integer"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated statuses of received documents: pending, registered, exclude, reclaimed (default: all four).","title":"Status"}},"required":["year","month"],"title":"get_monthly_purchase_registerArguments","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}}}}