{"openapi":"3.1.0","info":{"title":"Facturapi (BYOK) API","version":"0.1.0","description":"Facturapi (BYOK) lets an AI assistant read your own Facturapi data through the Facturapi API with a key you supply (Facturapi secret key (sk_live_... or sk_test_...; the key can also issue and cancel invoices, this connector only reads)). Read-only: 7 tools (list_invoices, get_invoice, list_receipts, get_receipt, list_customers, list_products, get_product). The BYOK key travels with each request,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-facturapi.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-facturapi/docs"},"termsOfService":"https://connectorbay.com/byok-facturapi/terms"},"servers":[{"url":"https://byok-facturapi.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-facturapi/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/list_invoices":{"post":{"operationId":"list_invoices","summary":"List CFDI invoices, newest first, with type, status, UUID, series and folio, total, currency, payment form and method, c","description":"List CFDI invoices, newest first, with type, status, UUID, series and folio, total, currency, payment form and method, cancellation status and customer name. Tax ids and addresses are left out. Use for \"Which invoices did I issue in Facturapi this month and what are unpaid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in item descriptions, customer legal name, id, UUID, folio or total.","title":"Q"},"customer":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices for this customer id.","title":"Customer"},"type":{"anyOf":[{"enum":["I","E","P","N","T"],"type":"string"},{"type":"null"}],"default":null,"description":"Invoice type: I income, E credit note, P payment, N payroll, T transfer.","title":"Type"},"payment_method":{"anyOf":[{"enum":["PUE","PPD"],"type":"string"},{"type":"null"}],"default":null,"description":"Payment method.","title":"Payment Method"},"payment_status":{"anyOf":[{"enum":["paid","unpaid"],"type":"string"},{"type":"null"}],"default":null,"description":"Payment status.","title":"Payment Status"},"series":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Exact series.","title":"Series"},"folio_number":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Exact folio number.","title":"Folio Number"},"issuer_type":{"anyOf":[{"enum":["issuing","receiving"],"type":"string"},{"type":"null"}],"default":null,"description":"Issued or received invoices.","title":"Issuer Type"},"date_gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices dated on or after this time (ISO 8601).","title":"Date Gte"},"date_lte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices dated on or before this time (ISO 8601).","title":"Date Lte"},"page":{"anyOf":[{"maximum":3000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (page times limit may not exceed 3,000 results).","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Results per page (1 to 100).","title":"Limit"}},"title":"list_invoicesArguments","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_invoice":{"post":{"operationId":"get_invoice","summary":"Get one invoice by id with type, status, UUID, folio, total, currency, payment method and cancellation status. Use for \"","description":"Get one invoice by id with type, status, UUID, folio, total, currency, payment method and cancellation status. Use for \"Show Facturapi invoice 590ce6c56d04f840aa8438af\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"invoice_id":{"description":"Invoice id.","maxLength":200,"title":"Invoice Id","type":"string"}},"required":["invoice_id"],"title":"get_invoiceArguments","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_receipts":{"post":{"operationId":"list_receipts","summary":"List sales receipts (tickets for self-invoicing) with status, total, expiry, linked invoice and customer ids. Use for \"W","description":"List sales receipts (tickets for self-invoicing) with status, total, expiry, linked invoice and customer ids. Use for \"Which Facturapi receipts are still open for self-invoicing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in receipt item descriptions or SKU.","title":"Q"},"customer":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts for this customer id.","title":"Customer"},"payment_form":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"SAT payment form code, for example 03.","title":"Payment Form"},"date_gte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts created on or after this time (ISO 8601).","title":"Date Gte"},"date_lte":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only receipts created on or before this time (ISO 8601).","title":"Date Lte"},"page":{"anyOf":[{"maximum":3000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (page times limit may not exceed 3,000 results).","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Results per page (1 to 100).","title":"Limit"}},"title":"list_receiptsArguments","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_receipt":{"post":{"operationId":"get_receipt","summary":"Get one receipt by id with status, total, expiry and linked invoice and customer ids. Use for \"Show Facturapi receipt 59","description":"Get one receipt by id with status, total, expiry and linked invoice and customer ids. Use for \"Show Facturapi receipt 590ce6c56d04f840aa8438af\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"receipt_id":{"description":"Receipt id.","maxLength":200,"title":"Receipt Id","type":"string"}},"required":["receipt_id"],"title":"get_receiptArguments","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_customers":{"post":{"operationId":"list_customers","summary":"List customers with legal name, tax system, default invoice use, validation date and city. Tax id, email, phone and stre","description":"List customers with legal name, tax system, default invoice use, validation date and city. Tax id, email, phone and street address are left out. Use for \"Who are my Facturapi customers\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in the legal name or tax id.","title":"Q"},"page":{"anyOf":[{"maximum":3000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (page times limit may not exceed 3,000 results).","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Results per page (1 to 100).","title":"Limit"}},"title":"list_customersArguments","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_products":{"post":{"operationId":"list_products","summary":"List catalog products with description, SAT product and unit keys, price, tax-included flag and SKU. Use for \"What produ","description":"List catalog products with description, SAT product and unit keys, price, tax-included flag and SKU. Use for \"What products are in my Facturapi catalog\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in the product description or SKU.","title":"Q"},"sku":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Exact SKU.","title":"Sku"},"page":{"anyOf":[{"maximum":3000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (page times limit may not exceed 3,000 results).","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Results per page (1 to 100).","title":"Limit"}},"title":"list_productsArguments","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_product":{"post":{"operationId":"get_product","summary":"Get one catalog product by id with SAT keys, price and SKU. Use for \"Show Facturapi product 590ce6c56d04f840aa8438af\".","description":"Get one catalog product by id with SAT keys, price and SKU. Use for \"Show Facturapi product 590ce6c56d04f840aa8438af\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"product_id":{"description":"Product id.","maxLength":200,"title":"Product Id","type":"string"}},"required":["product_id"],"title":"get_productArguments","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}}}}