{"openapi":"3.1.0","info":{"title":"Egypt e-Invoice Pre-flight Kit API","version":"0.1.0","description":"Offline pre-flight aid for the Egyptian Tax Authority e-invoicing system, built from the public ETA SDK pages for the Invoice v1.0 document (issuer, receiver, address, invoice lines, totals) read on 29 September 2026. It assembles a draft invoice JSON with the SDK's field names, checks a draft for missing, unknown or malformed fields, recomputes the documented totals (total sales, discounts, net...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://eg-eta-invoice-kit.connectorbay.com/mcp.\n\nDisclaimer: General information only, not legal, tax, accounting or payment advice. Egypt e-Invoice Pre-flight Kit is an independent tool: it is not affiliated with, endorsed by or operated by any government body, central bank, standards body or scheme operator. Rates, thresholds and rules change; check the cited official source and confirm with a qualified professional before you rely on a result.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/eg-eta-invoice-kit/docs"},"termsOfService":"https://connectorbay.com/eg-eta-invoice-kit/terms"},"servers":[{"url":"https://eg-eta-invoice-kit.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/eg-eta-invoice-kit/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/build_invoice_draft":{"post":{"operationId":"build_invoice_draft","summary":"Assemble a draft ETA Invoice v1.0 JSON with the SDK field names from issuer, receiver and lines, with recomputed line an","description":"Assemble a draft ETA Invoice v1.0 JSON with the SDK field names from issuer, receiver and lines, with recomputed line and invoice totals; draft only, unsigned. Use for \"Draft an ETA invoice for two widgets sold by my Cairo company to another Egyptian business\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"issuer":{"additionalProperties":true,"description":"Object with type (B business in Egypt, P natural person, F foreigner), id, name and address {country, governate, regionCity, street, buildingNumber; optional branchId (mandatory for an issuer of type B), postalCode, floor, room, landmark, additionalInformation}. Each text at most 300 characters.","title":"Issuer","type":"object"},"receiver":{"additionalProperties":true,"description":"Object with type (B business in Egypt, P natural person, F foreigner), id, name and address {country, governate, regionCity, street, buildingNumber; optional branchId (mandatory for an issuer of type B), postalCode, floor, room, landmark, additionalInformation}; for a natural person (P) id, name and address may be left out. Each text at most 300 characters.","title":"Receiver","type":"object"},"date_time_issued":{"description":"Issue date and time in UTC, ISO 8601, for example 2026-09-29T09:30:00Z (no future dates). At most 50 characters.","title":"Date Time Issued","type":"string"},"taxpayer_activity_code":{"description":"Activity code from the ETA activity types code table (at most 20 characters; a personal identifier number is refused)","title":"Taxpayer Activity Code","type":"string"},"internal_id":{"description":"Your own document number, linking back to the ERP document (at most 100 characters)","title":"Internal Id","type":"string"},"lines":{"description":"Lines: description, item_type (GS1 or EGS), item_code, unit_type, quantity, unit_price_egp (plain decimals, at most 5 decimals) and optional discount_amount or discount_rate (percent), tax_items [{tax_type, rate, amount}] where amount is the tax amount you have worked out (tax amounts are not computed); optional internal_code; at most 200 lines","items":{"additionalProperties":true,"type":"object"},"title":"Lines","type":"array"}},"required":["issuer","receiver","date_time_issued","taxpayer_activity_code","internal_id","lines"],"title":"build_invoice_draftArguments","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/validate_invoice_draft":{"post":{"operationId":"validate_invoice_draft","summary":"Check a draft against the Invoice v1.0 field tables: required fields, unknown names, allowed values, date format, line a","description":"Check a draft against the Invoice v1.0 field tables: required fields, unknown names, allowed values, date format, line arithmetic and totals. Use for \"Is this invoice draft missing anything before I hand it to my ERP or accountant?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document":{"additionalProperties":true,"description":"Draft document as a JSON object using the SDK field names (documentType, documentTypeVersion, dateTimeIssued, issuer, receiver, invoiceLines, totals ...). Each text at most 1,000 characters.","title":"Document","type":"object"}},"required":["document"],"title":"validate_invoice_draftArguments","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/compute_invoice_totals":{"post":{"operationId":"compute_invoice_totals","summary":"Recompute line totals, discounts and the invoice totals from the documented relationships, using the tax amounts you sup","description":"Recompute line totals, discounts and the invoice totals from the documented relationships, using the tax amounts you supply. Use for \"What are the total sales, net amount and total amount for these invoice lines?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lines":{"description":"Lines: description, item_type (GS1 or EGS), item_code, unit_type, quantity, unit_price_egp (plain decimals, at most 5 decimals) and optional discount_amount or discount_rate (percent), tax_items [{tax_type, rate, amount}] where amount is the tax amount you have worked out (tax amounts are not computed); optional internal_code; at most 200 lines","items":{"additionalProperties":true,"type":"object"},"title":"Lines","type":"array"}},"required":["lines"],"title":"compute_invoice_totalsArguments","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/check_item_code":{"post":{"operationId":"check_item_code","summary":"Check a GS1 item code (GTIN-8, 12, 13 or 14) by length and check digit, or note that the EGS format was not read. Use fo","description":"Check a GS1 item code (GTIN-8, 12, 13 or 14) by length and check digit, or note that the EGS format was not read. Use for \"Is this barcode a valid GS1 item code for an ETA invoice line?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"item_code":{"description":"Item code as printed; digits only for GS1 (at most 50 characters)","title":"Item Code","type":"string"},"item_type":{"default":"GS1","description":"GS1 or EGS. At most 20 characters.","title":"Item Type","type":"string"}},"required":["item_code"],"title":"check_item_codeArguments","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/plan_api_calls":{"post":{"operationId":"plan_api_calls","summary":"Pacing plan inside the published per-endpoint rate limits (for example Get Document 2 per second, Printout 1 per 5 secon","description":"Pacing plan inside the published per-endpoint rate limits (for example Get Document 2 per second, Printout 1 per 5 seconds). Use for \"I need to fetch 300 documents and 40 printouts per minute: is that inside the ETA limits?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"calls_per_minute":{"additionalProperties":true,"description":"Object of endpoint key to whole calls needed per minute; keys: get_recent_documents, get_document, get_document_printout, get_document_details, search_documents, search_my_egs_code_usage_requests, search_published_codes","title":"Calls Per Minute","type":"object"}},"required":["calls_per_minute"],"title":"plan_api_callsArguments","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/onboarding_checklist":{"post":{"operationId":"onboarding_checklist","summary":"The ETA onboarding steps in order and what the owner must obtain at each. Use for \"What do I need before my ERP can send","description":"The ETA onboarding steps in order and what the owner must obtain at each. Use for \"What do I need before my ERP can send invoices to the Egyptian Tax Authority?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"onboarding_checklistArguments","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}}}}