{
 "openapi": "3.1.0",
 "info": {
  "title": "E-invoicing Profiles (Accounting)",
  "version": "20261030b",
  "description": "How this company issues structured e-invoices: the country, the format (Peppol BIS, XRechnung, Factur-X, FatturaPA, KSeF, CFDI 4.0), the seller’s identifiers and how documents leave. A company with no active profile issues no e-invoices."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "einvoice-profiles": {
    "type": "object",
    "required": [
     "name",
     "country",
     "format"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "profile_no": {
      "type": "string",
      "description": "Profile no",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "country": {
      "type": "string",
      "description": "Country (ISO code)"
     },
     "format": {
      "type": "string",
      "description": "Format",
      "enum": [
       "peppol-bis-3",
       "xrechnung-ubl",
       "xrechnung-cii",
       "factur-x",
       "fatturapa",
       "ksef-fa2",
       "ksef-fa3",
       "cfdi-40",
       "zatca",
       "zatca-ubl"
      ]
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "is_default": {
      "type": "boolean",
      "description": "Default format for this company"
     },
     "seller_name": {
      "type": "string",
      "description": "Seller name"
     },
     "seller_vat_id": {
      "type": "string",
      "description": "Seller VAT id (BT-31)"
     },
     "seller_tax_reg_id": {
      "type": "string",
      "description": "Seller tax number (BT-32)"
     },
     "seller_legal_id": {
      "type": "string",
      "description": "Seller registration number (BT-30)"
     },
     "seller_street": {
      "type": "string",
      "description": "Street"
     },
     "seller_city": {
      "type": "string",
      "description": "City"
     },
     "seller_postal_code": {
      "type": "string",
      "description": "Postcode"
     },
     "seller_subdivision": {
      "type": "string",
      "description": "Region or province"
     },
     "contact_name": {
      "type": "string",
      "description": "Contact name"
     },
     "contact_phone": {
      "type": "string",
      "description": "Contact phone"
     },
     "contact_email": {
      "type": "string",
      "description": "Contact email"
     },
     "peppol_scheme": {
      "type": "string",
      "description": "Peppol endpoint scheme"
     },
     "peppol_id": {
      "type": "string",
      "description": "Peppol endpoint id"
     },
     "it_regime_fiscale": {
      "type": "string",
      "description": "Regime fiscale (Italy)"
     },
     "it_codice_fiscale": {
      "type": "string",
      "description": "Codice fiscale (Italy)"
     },
     "it_progressivo_prefix": {
      "type": "string",
      "description": "Progressivo invio prefix (Italy)"
     },
     "mx_rfc": {
      "type": "string",
      "description": "RFC (Mexico)"
     },
     "mx_regimen_fiscal": {
      "type": "string",
      "description": "Régimen fiscal (Mexico)"
     },
     "mx_lugar_expedicion": {
      "type": "string",
      "description": "Lugar de expedición (Mexico)"
     },
     "mx_serie": {
      "type": "string",
      "description": "Serie (Mexico)"
     },
     "pl_nip": {
      "type": "string",
      "description": "NIP (Poland)"
     },
     "payment_means_code": {
      "type": "string",
      "description": "Payment means (UNCL 4461)"
     },
     "iban": {
      "type": "string",
      "description": "IBAN"
     },
     "bic": {
      "type": "string",
      "description": "BIC"
     },
     "transport": {
      "type": "string",
      "description": "Sends by",
      "enum": [
       "file",
       "http"
      ]
     },
     "connection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Connection"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "auto_submit": {
      "type": "boolean",
      "description": "Submit automatically when an invoice posts"
     },
     "retry_max_attempts": {
      "type": "integer",
      "description": "Attempts before a person is needed"
     },
     "retry_backoff_minutes": {
      "type": "integer",
      "description": "First retry after (minutes, doubled each time)"
     },
     "invoice_template_id": {
      "type": "string",
      "format": "uuid",
      "description": "Invoice printed on"
     },
     "credit_note_template_id": {
      "type": "string",
      "format": "uuid",
      "description": "Credit note printed on"
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/einvoice-profiles": {
   "get": {
    "summary": "list einvoice-profiles",
    "operationId": "list_einvoice_profiles_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create einvoice-profiles",
    "operationId": "create_einvoice_profiles_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/einvoice-profiles/{id}": {
   "get": {
    "summary": "get einvoice-profiles",
    "operationId": "get_einvoice_profiles_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change einvoice-profiles",
    "operationId": "change_einvoice_profiles_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete einvoice-profiles",
    "operationId": "delete_einvoice_profiles_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/einvoice-profiles/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_einvoice_profiles_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}