{
  "openapi": "3.1.0",
  "info": {
    "title": "ACube Gov AE API Platform",
    "description": "Official API documentation for the ACube Gov AE API",
    "version": "1.0.0",
    "x-logo": {
      "url": "https://assets.acubeapi.com/logo_rect_white.png"
    }
  },
  "servers": [
    {
      "url": "https://ae-sandbox.api.acubeapi.com",
      "description": "Sandbox"
    },
    {
      "url": "https://ae.api.acubeapi.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/credit-notes": {
      "get": {
        "operationId": "api_credit-notes_get_collection",
        "tags": [
          "Credit Note"
        ],
        "responses": {
          "200": {
            "description": "Credit Note collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Credit.Note.CreditNoteOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "Credit.Note.CreditNoteOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Credit.Note.CreditNoteOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Retrieves the collection of Credit Note resources.",
        "description": "Retrieves the collection of Credit Note resources.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tin",
            "in": "query",
            "description": "Filter by TIN with exact match.",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tin[]",
            "in": "query",
            "description": "Filter by TIN with exact match.",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "deepObject",
            "explode": true
          },
          {
            "name": "direction",
            "in": "query",
            "description": "Filter by direction (case-insensitive)",
            "required": false,
            "deprecated": false,
            "schema": {
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "direction[]",
            "in": "query",
            "description": "Filter by direction (case-insensitive)",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "incoming",
                  "outgoing"
                ]
              }
            },
            "style": "deepObject",
            "explode": true
          }
        ]
      }
    },
    "/credit-notes/outgoing": {
      "post": {
        "operationId": "api_credit-notesoutgoing_post",
        "tags": [
          "Credit Note"
        ],
        "responses": {
          "201": {
            "description": "Credit-note created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutgoingCreditNoteResource.CreditNoteOutput"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid request format or missing fields",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "Credit-note validation failed or business rule violation",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          },
          "404": {
            "description": "Legal entity not found"
          }
        },
        "summary": "Send a credit note in PINT AE UBL format",
        "description": "Accepts a PINT AE UBL XML document directly as request body.",
        "parameters": [],
        "requestBody": {
          "description": "XML payload of the invoice to send. Must be a valid PINT AE UBL document.",
          "content": {
            "application/xml": {
              "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<CreditNote xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\">\n    <!-- ... -->\n</CreditNote>"
            }
          },
          "required": true
        }
      }
    },
    "/credit-notes/{uuid}": {
      "get": {
        "operationId": "api_credit-notes_uuid_get",
        "tags": [
          "Credit Note"
        ],
        "responses": {
          "200": {
            "description": "Credit Note resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credit.Note.CreditNoteOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Credit.Note.CreditNoteOutput.jsonld"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Retrieves an credit note",
        "description": "Returns the full credit note resource for the authenticated owner.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Credit Note identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/credit-notes/{uuid}/source": {
      "get": {
        "operationId": "api_credit-notes_uuidsource_get",
        "tags": [
          "Credit Note"
        ],
        "responses": {
          "200": {
            "description": "Credit Note resource",
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Credit.Note.CreditNoteOutput.xml"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Get the original source document",
        "description": "You can retrieve the original source document in PINT AE UBL XML format.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Credit Note identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/invoices": {
      "get": {
        "operationId": "api_invoices_get_collection",
        "tags": [
          "Invoice"
        ],
        "responses": {
          "200": {
            "description": "Invoice collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice.InvoiceOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "Invoice.InvoiceOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Invoice.InvoiceOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Retrieves the collection of Invoice resources.",
        "description": "Retrieves the collection of Invoice resources.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tin",
            "in": "query",
            "description": "Filter by TIN with exact match.",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tin[]",
            "in": "query",
            "description": "Filter by TIN with exact match.",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "deepObject",
            "explode": true
          },
          {
            "name": "direction",
            "in": "query",
            "description": "Filter by direction (case-insensitive)",
            "required": false,
            "deprecated": false,
            "schema": {
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "direction[]",
            "in": "query",
            "description": "Filter by direction (case-insensitive)",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "incoming",
                  "outgoing"
                ]
              }
            },
            "style": "deepObject",
            "explode": true
          }
        ]
      }
    },
    "/invoices/outgoing": {
      "post": {
        "operationId": "api_invoicesoutgoing_post",
        "tags": [
          "Invoice"
        ],
        "responses": {
          "201": {
            "description": "Invoice created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutgoingInvoiceResource.InvoiceOutput"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid request format or missing fields",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "Invoice validation failed or business rule violation",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          },
          "404": {
            "description": "Legal entity not found"
          }
        },
        "summary": "Send a invoice in PINT AE UBL format",
        "description": "Accepts a PINT AE UBL XML document directly as request body.",
        "parameters": [],
        "requestBody": {
          "description": "XML payload of the invoice to send. Must be a valid PINT AE UBL document.",
          "content": {
            "application/xml": {
              "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\">\n    <!-- ... -->\n</Invoice>"
            }
          },
          "required": true
        }
      }
    },
    "/invoices/{uuid}": {
      "get": {
        "operationId": "api_invoices_uuid_get",
        "tags": [
          "Invoice"
        ],
        "responses": {
          "200": {
            "description": "Invoice resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice.InvoiceOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice.InvoiceOutput.jsonld"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Retrieves an invoice",
        "description": "Returns the full invoice resource for the authenticated owner.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Invoice identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/invoices/{uuid}/source": {
      "get": {
        "operationId": "api_invoices_uuidsource_get",
        "tags": [
          "Invoice"
        ],
        "responses": {
          "200": {
            "description": "Invoice resource",
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice.InvoiceOutput.xml"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Get the original source document",
        "description": "You can retrieve the original source document in XML format.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Invoice identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/legal-entities": {
      "get": {
        "operationId": "api_legal-entities_get_collection",
        "tags": [
          "Legal Entity"
        ],
        "responses": {
          "200": {
            "description": "List of enabled capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Legal.Entity.LegalEntityOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "Legal.Entity.LegalEntityOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Legal.Entity.LegalEntityOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get legal entities list",
        "description": "Returns the list of legal entities by owner.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          }
        ]
      }
    },
    "/legal-entities/{legalEntityId}": {
      "get": {
        "operationId": "api_legal-entities_legalEntityId_get",
        "tags": [
          "Legal Entity"
        ],
        "responses": {
          "200": {
            "description": "Legal entity details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.LegalEntityOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.LegalEntityOutput.jsonld"
                }
              }
            }
          },
          "404": {
            "description": "Legal entity not found in the local registry",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Get legal entity by its identifier",
        "description": "Returns the legal entity details.",
        "parameters": [
          {
            "name": "legalEntityId",
            "in": "path",
            "description": "The unique UUID v4 identifier of the legal entity",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      },
      "delete": {
        "operationId": "api_legal-entities_legalEntityId_delete",
        "tags": [
          "Legal Entity"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "503": {
            "description": "Peppol service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          }
        },
        "summary": "Delete legal entity by its identifier.",
        "description": "Removes the legal entity from the system.",
        "parameters": [
          {
            "name": "legalEntityId",
            "in": "path",
            "description": "The unique UUID v4 identifier of the legal entity",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/allowed-capabilities": {
      "get": {
        "operationId": "api_allowed-capabilities_get_collection",
        "tags": [
          "Legal Entity Capability"
        ],
        "responses": {
          "200": {
            "description": "List of allowed capabilities successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Legal.Entity.Capability.CapabilityOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "Legal.Entity.Capability.CapabilityOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Legal.Entity.Capability.CapabilityOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get allowed capabilities list",
        "description": "Returns the complete list of all PEPPOL capabilities supported and allowed by the platform.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          }
        ]
      }
    },
    "/legal-entities/{legalEntityId}/enabled-capabilities": {
      "get": {
        "operationId": "api_legal-entities_legalEntityIdenabled-capabilities_get_collection",
        "tags": [
          "Legal Entity Capability"
        ],
        "responses": {
          "200": {
            "description": "List of enabled capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "EnabledCapabilitiesResource.EnabledCapabilitiesOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Legal entity not found in the local registry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          }
        },
        "summary": "Get enabled capabilities for a legal entity",
        "description": "Returns the list of PEPPOL-enabled capabilities for the specified legal entity.",
        "parameters": [
          {
            "name": "legalEntityId",
            "in": "path",
            "description": "The unique UUID v4 identifier of the legal entity",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          },
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          }
        ]
      },
      "put": {
        "operationId": "api_legal-entities_legalEntityIdenabled-capabilities_put",
        "tags": [
          "Legal Entity Capability"
        ],
        "responses": {
          "200": {
            "description": "Capabilities updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid capabilities schema or keys provided",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Updates the receiving capabilities for a legal entity",
        "description": "Updates and synchronizes PEPPOL capabilities for the legal entity.",
        "parameters": [
          {
            "name": "legalEntityId",
            "in": "path",
            "description": "The unique UUID v4 identifier of the legal entity",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ],
        "requestBody": {
          "description": "The updated Legal Entity Capability resource",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesInput"
              }
            },
            "application/ld+json": {
              "schema": {
                "$ref": "#/components/schemas/EnabledCapabilitiesResource.EnabledCapabilitiesInput"
              }
            }
          },
          "required": true
        }
      }
    },
    "/legal-entities/{legalEntityId}/sync": {
      "post": {
        "operationId": "api_legal-entities_legalEntityIdsync_post",
        "tags": [
          "Legal Entity Capability"
        ],
        "responses": {
          "204": {
            "description": "Synchronization triggered successfully",
            "links": {}
          }
        },
        "summary": "Triggers a manual synchronization with Peppol",
        "description": "Reads the current capabilities of the Legal Entity and pushes them directly to the Peppol SMP network.",
        "parameters": [
          {
            "name": "legalEntityId",
            "in": "path",
            "description": "The unique UUID v4 identifier of the legal entity",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    },
    "/legal-entities/onboarding/init": {
      "post": {
        "operationId": "api_legal-entitiesonboardinginit_post",
        "tags": [
          "Legal Entity Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Onboarding initialization completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "Payload input doesn't respect the contract",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          },
          "409": {
            "description": "Conflict with the current onboarding state or existing legal entity data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          }
        },
        "summary": "Initialize onboarding process for a legal entity",
        "description": "Initializes or resumes the onboarding workflow by creating or loading the legal entity and attaching it to the current passport context.",
        "parameters": []
      }
    },
    "/legal-entities/onboarding/sync-central-registry": {
      "post": {
        "operationId": "api_legal-entitiesonboardingsync-central-registry_post",
        "tags": [
          "Legal Entity Onboarding"
        ],
        "responses": {
          "204": {
            "description": "Synchronization triggered successfully",
            "links": {}
          },
          "404": {
            "description": "Legal entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          },
          "503": {
            "description": "Central Registry service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          }
        },
        "summary": "Trigger Central Registry synchronization",
        "description": "Triggers a manual synchronization with Tax Authority Central Registry for the given legal entity.",
        "parameters": []
      }
    },
    "/legal-entities/onboarding/sync-smp": {
      "post": {
        "operationId": "api_legal-entitiesonboardingsync-smp_post",
        "tags": [
          "Legal Entity Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Synchronization triggered successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "404": {
            "description": "Legal entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          },
          "503": {
            "description": "Peppol SMP service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            }
          }
        },
        "summary": "Trigger SMP synchronization",
        "description": "Triggers a manual synchronization with Peppol SMP for the given legal entity.",
        "parameters": []
      }
    },
    "/legal-entities/onboarding/verify": {
      "post": {
        "operationId": "api_legal-entitiesonboardingverify_post",
        "tags": [
          "Legal Entity Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Taxpayer successfully verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingStepOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "Payload input doesn't respect the contract",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Verify a legal entity's onboarding eligibility using EmaraTax data",
        "description": "Verifies a taxpayer onboarding request against EmaraTax and returns taxpayer details if valid.",
        "parameters": [],
        "requestBody": {
          "description": "The new Legal Entity Onboarding resource",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingVerificationInput"
              }
            },
            "application/ld+json": {
              "schema": {
                "$ref": "#/components/schemas/Legal.Entity.Onboarding.OnboardingVerificationInput"
              }
            }
          },
          "required": true
        }
      }
    },
    "/event-destinations": {
      "get": {
        "operationId": "api_event-destinations_get_collection",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Webhooks collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhooks.EventDestinationOutput"
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object",
                  "description": "Webhooks.EventDestinationOutput.jsonld collection.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/HydraCollectionBaseSchema"
                    },
                    {
                      "type": "object",
                      "required": [
                        "member"
                      ],
                      "properties": {
                        "member": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Webhooks.EventDestinationOutput.jsonld"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List your event destinations",
        "description": "Returns the paginated list of your event destinations, each routing one event type to one target",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The collection page number",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "itemsPerPage",
            "in": "query",
            "description": "The number of items per page",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 0,
              "maximum": 100
            },
            "style": "form",
            "explode": true
          }
        ]
      },
      "post": {
        "operationId": "api_event-destinations_post",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "201": {
            "description": "Webhooks resource created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "An error occurred",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Create an event destination",
        "description": "Creates a new event destination with dedicated configuration",
        "parameters": [],
        "requestBody": {
          "description": "The new Webhooks resource",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhooks.EventDestinationCreateInput"
              }
            },
            "application/ld+json": {
              "schema": {
                "$ref": "#/components/schemas/Webhooks.EventDestinationCreateInput"
              }
            }
          },
          "required": true
        }
      }
    },
    "/event-destinations/{uuid}": {
      "get": {
        "operationId": "api_event-destinations_uuid_get",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Webhooks resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput.jsonld"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Get an event destination",
        "description": "Returns the corresponding event destination by UUID",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Webhooks identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      },
      "put": {
        "operationId": "api_event-destinations_uuid_put",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Webhooks resource updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks.EventDestinationOutput.jsonld"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          },
          "422": {
            "description": "An error occurred",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolation"
                }
              }
            },
            "links": {}
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Update an event destination",
        "description": "Update the configuration of the event destination matching UUID",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Webhooks identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ],
        "requestBody": {
          "description": "The updated Webhooks resource",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhooks.EventDestinationUpdateInput"
              }
            },
            "application/ld+json": {
              "schema": {
                "$ref": "#/components/schemas/Webhooks.EventDestinationUpdateInput"
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "operationId": "api_event-destinations_uuid_delete",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "204": {
            "description": "Webhooks resource deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error.jsonld"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "links": {}
          }
        },
        "summary": "Delete an event destination",
        "description": "Deletes the event destination matching UUID. This is a hard delete, the record will be removed and cannot be recovered.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "Webhooks identifier",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "style": "simple",
            "explode": false
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CapabilityOutput": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique capability identifier following the 'domain.service' format (e.g., billing.invoice)."
          },
          "domain": {
            "type": "string",
            "description": "The business domain of the capability (e.g., billing)."
          },
          "type": {
            "type": "string",
            "description": "The type of electronic document or service (e.g., invoice, credit_note)."
          },
          "docScheme": {
            "type": "string",
            "description": "The Peppol Document Object Identifier (Customization ID) scheme."
          },
          "docValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol document type specification."
          },
          "processScheme": {
            "type": "string",
            "description": "The Peppol Process Identifier (Profile ID) scheme."
          },
          "processValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol business process profile."
          }
        }
      },
      "CapabilityOutput.jsonld": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique capability identifier following the 'domain.service' format (e.g., billing.invoice)."
          },
          "domain": {
            "type": "string",
            "description": "The business domain of the capability (e.g., billing)."
          },
          "type": {
            "type": "string",
            "description": "The type of electronic document or service (e.g., invoice, credit_note)."
          },
          "docScheme": {
            "type": "string",
            "description": "The Peppol Document Object Identifier (Customization ID) scheme."
          },
          "docValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol document type specification."
          },
          "processScheme": {
            "type": "string",
            "description": "The Peppol Process Identifier (Profile ID) scheme."
          },
          "processValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol business process profile."
          }
        }
      },
      "ConstraintViolation": {
        "type": "object",
        "description": "Unprocessable entity",
        "properties": {
          "status": {
            "default": 422,
            "type": "integer"
          },
          "violations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "propertyPath": {
                  "type": "string",
                  "description": "The property path of the violation"
                },
                "message": {
                  "type": "string",
                  "description": "The message associated with the violation"
                },
                "code": {
                  "type": "string",
                  "description": "The code of the violation"
                },
                "hint": {
                  "type": "string",
                  "description": "An extra hint to understand the violation"
                },
                "payload": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The serialized payload of the violation"
                }
              },
              "required": [
                "propertyPath",
                "message"
              ]
            }
          },
          "detail": {
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "readOnly": true,
            "type": "string",
            "description": "The type of electronic document or service (e.g., invoice, credit_note)."
          },
          "title": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "instance": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConstraintViolation.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "default": 422,
                "type": "integer"
              },
              "violations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "propertyPath": {
                      "type": "string",
                      "description": "The property path of the violation"
                    },
                    "message": {
                      "type": "string",
                      "description": "The message associated with the violation"
                    },
                    "code": {
                      "type": "string",
                      "description": "The code of the violation"
                    },
                    "hint": {
                      "type": "string",
                      "description": "An extra hint to understand the violation"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The serialized payload of the violation"
                    }
                  },
                  "required": [
                    "propertyPath",
                    "message"
                  ]
                }
              },
              "detail": {
                "readOnly": true,
                "type": "string"
              },
              "description": {
                "readOnly": true,
                "type": "string"
              },
              "type": {
                "readOnly": true,
                "type": "string"
              },
              "title": {
                "readOnly": true,
                "type": [
                  "string",
                  "null"
                ]
              },
              "instance": {
                "readOnly": true,
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ],
        "description": "Unprocessable entity"
      },
      "ContactOutput": {
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered email of the Taxable Person's account admin in EmaraTax."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered mobile number of the Taxable Person’s Account Administrator in EmaraTax."
          }
        }
      },
      "ContactOutput.jsonld": {
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered email of the Taxable Person's account admin in EmaraTax."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered mobile number of the Taxable Person’s Account Administrator in EmaraTax."
          }
        }
      },
      "Credit.Note.CreditNoteOutput": {
        "type": "object",
        "properties": {
          "creditNoteId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "creditNoteNumber": {
            "type": "string"
          },
          "creditNoteDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Credit.Note.CreditNoteOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "creditNoteId": {
                "type": "string",
                "format": "uuid"
              },
              "ownerFiscalId": {
                "type": "string"
              },
              "legalEntityUuid": {
                "type": "string"
              },
              "documentType": {
                "type": "string",
                "enum": [
                  "invoice",
                  "credit-note",
                  "self-billed-invoice",
                  "self-billed-credit-note",
                  "mls",
                  "tax-data-document",
                  "tax-data-document-mls"
                ]
              },
              "documentTypeCode": {
                "type": "integer",
                "enum": [
                  380,
                  381,
                  389,
                  261,
                  480,
                  81
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "incoming",
                  "outgoing"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "new",
                  "received",
                  "valid",
                  "sending_started",
                  "sending_queued",
                  "sending_failed",
                  "processed",
                  "delivered",
                  "delivery_failed",
                  "withdrawn",
                  "action_required"
                ]
              },
              "senderName": {
                "type": "string"
              },
              "senderIdentifier": {
                "type": "string"
              },
              "recipientName": {
                "type": "string"
              },
              "recipientIdentifier": {
                "type": "string"
              },
              "creditNoteNumber": {
                "type": "string"
              },
              "creditNoteDate": {
                "type": "string",
                "format": "date-time"
              },
              "totalAmount": {
                "type": "string"
              },
              "totalAmountNet": {
                "type": "string"
              },
              "currencyCode": {
                "type": "string"
              },
              "externalReferenceId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "Credit.Note.CreditNoteOutput.xml": {
        "type": "object",
        "properties": {
          "creditNoteId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "creditNoteNumber": {
            "type": "string"
          },
          "creditNoteDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EnabledCapabilitiesResource.EnabledCapabilitiesInput": {
        "type": "object",
        "required": [
          "isEnabled",
          "keys"
        ],
        "properties": {
          "isEnabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Indicates whether the legal entity is active and enabled within the network."
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "An array of capability keys following the 'domain.service' format (e.g., billing.invoice) to be activated."
          }
        }
      },
      "EnabledCapabilitiesResource.EnabledCapabilitiesOutput": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Indicates whether the legal entity is active and enabled within the network."
          },
          "enabledCapabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapabilityOutput"
            },
            "description": "The list of currently active PEPPOL capabilities for this legal entity."
          }
        }
      },
      "EnabledCapabilitiesResource.EnabledCapabilitiesOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "isEnabled": {
                "type": "boolean"
              },
              "enabledCapabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CapabilityOutput.jsonld"
                }
              }
            }
          }
        ]
      },
      "Error": {
        "type": "object",
        "description": "A representation of common errors.",
        "properties": {
          "title": {
            "readOnly": true,
            "description": "A short, human-readable summary of the problem.",
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "readOnly": true,
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "examples": [
              404
            ],
            "default": 400
          },
          "instance": {
            "readOnly": true,
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "readOnly": true,
            "description": "The type of electronic document or service (e.g., invoice, credit_note).",
            "type": "string"
          }
        }
      },
      "Error.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "title": {
                "readOnly": true,
                "description": "A short, human-readable summary of the problem.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "detail": {
                "readOnly": true,
                "description": "A human-readable explanation specific to this occurrence of the problem.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "integer",
                  "null"
                ],
                "examples": [
                  404
                ],
                "default": 400
              },
              "instance": {
                "readOnly": true,
                "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "readOnly": true,
                "description": "A URI reference that identifies the problem type",
                "type": "string"
              },
              "description": {
                "readOnly": true,
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ],
        "description": "A representation of common errors."
      },
      "HydraCollectionBaseSchema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraCollectionBaseSchemaNoPagination"
          },
          {
            "type": "object",
            "properties": {
              "view": {
                "type": "object",
                "properties": {
                  "@id": {
                    "type": "string",
                    "format": "iri-reference"
                  },
                  "@type": {
                    "type": "string"
                  },
                  "first": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "iri-reference"
                  },
                  "last": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "iri-reference"
                  },
                  "previous": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "iri-reference"
                  },
                  "next": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "iri-reference"
                  }
                },
                "example": {
                  "@id": "string",
                  "@type": "string",
                  "first": "string",
                  "last": "string",
                  "previous": "string",
                  "next": "string"
                }
              }
            }
          }
        ]
      },
      "HydraCollectionBaseSchemaNoPagination": {
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "minimum": 0
          },
          "search": {
            "type": "object",
            "properties": {
              "@type": {
                "type": "string"
              },
              "template": {
                "type": "string"
              },
              "variableRepresentation": {
                "type": "string"
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "@type": {
                      "type": "string"
                    },
                    "variable": {
                      "type": "string"
                    },
                    "property": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "required": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "HydraItemBaseSchema": {
        "type": "object",
        "properties": {
          "@context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          }
        },
        "required": [
          "@id",
          "@type"
        ]
      },
      "Invoice.InvoiceOutput": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Invoice.InvoiceOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "invoiceId": {
                "type": "string",
                "format": "uuid"
              },
              "ownerFiscalId": {
                "type": "string"
              },
              "legalEntityUuid": {
                "type": "string"
              },
              "documentType": {
                "type": "string",
                "enum": [
                  "invoice",
                  "credit-note",
                  "self-billed-invoice",
                  "self-billed-credit-note",
                  "mls",
                  "tax-data-document",
                  "tax-data-document-mls"
                ]
              },
              "documentTypeCode": {
                "type": "integer",
                "enum": [
                  380,
                  381,
                  389,
                  261,
                  480,
                  81
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "incoming",
                  "outgoing"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "new",
                  "received",
                  "valid",
                  "sending_started",
                  "sending_queued",
                  "sending_failed",
                  "processed",
                  "delivered",
                  "delivery_failed",
                  "withdrawn",
                  "action_required"
                ]
              },
              "senderName": {
                "type": "string"
              },
              "senderIdentifier": {
                "type": "string"
              },
              "recipientName": {
                "type": "string"
              },
              "recipientIdentifier": {
                "type": "string"
              },
              "invoiceNumber": {
                "type": "string"
              },
              "invoiceDate": {
                "type": "string",
                "format": "date-time"
              },
              "totalAmount": {
                "type": "string"
              },
              "totalAmountNet": {
                "type": "string"
              },
              "currencyCode": {
                "type": "string"
              },
              "dueDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "externalReferenceId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "Invoice.InvoiceOutput.xml": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Legal.Entity": {
        "type": "object",
        "properties": {
          "legalEntityId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The unique UUID v4 identifier of the legal entity."
          }
        }
      },
      "Legal.Entity.Capability.CapabilityOutput": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique capability identifier following the 'domain.service' format (e.g., billing.invoice)."
          },
          "domain": {
            "type": "string",
            "description": "The business domain of the capability (e.g., billing)."
          },
          "type": {
            "type": "string",
            "description": "The type of electronic document or service (e.g., invoice, credit_note)."
          },
          "docScheme": {
            "type": "string",
            "description": "The Peppol Document Object Identifier (Customization ID) scheme."
          },
          "docValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol document type specification."
          },
          "processScheme": {
            "type": "string",
            "description": "The Peppol Process Identifier (Profile ID) scheme."
          },
          "processValue": {
            "type": "string",
            "description": "The identifier value of the specific Peppol business process profile."
          }
        }
      },
      "Legal.Entity.Capability.CapabilityOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "docScheme": {
                "type": "string"
              },
              "docValue": {
                "type": "string"
              },
              "processScheme": {
                "type": "string"
              },
              "processValue": {
                "type": "string"
              }
            }
          }
        ]
      },
      "Legal.Entity.LegalEntityOutput": {
        "type": "object",
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique UUID v4 identifier of the legal entity."
          },
          "tin": {
            "type": "string",
            "description": "The Tax Identification Number (TIN) of the taxable person."
          },
          "status": {
            "type": "string",
            "enum": [
              "Active",
              "Pending",
              "Inactive"
            ]
          },
          "legalType": {
            "type": [
              "string",
              "null"
            ],
            "description": "The legal classification of the taxpayer as registered in EmaraTax."
          },
          "nameEn": {
            "type": "string",
            "description": "The legal name of the taxpayer in English as registered in EmaraTax."
          },
          "nameAr": {
            "type": "string",
            "description": "The legal name of the taxpayer in Arabic as registered in EmaraTax."
          },
          "effectiveDate": {
            "type": "string",
            "format": "date-time",
            "description": "The effective date associated with the taxpayer’s current tax status."
          },
          "vatTrn": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 15-digit VAT Tax Registration Number (TRN) of the taxpayer."
          },
          "contact": {
            "$ref": "#/components/schemas/ContactOutput",
            "description": "The primary contact details of the legal entity."
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Indicates whether the legal entity is active and enabled within the network."
          },
          "enabledCapabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapabilityOutput"
            },
            "description": "The list of currently active PEPPOL capabilities for this legal entity."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the legal entity was registered in the system."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of the last local update."
          },
          "smpSyncAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The timestamp of the last successful synchronization with the Peppol network."
          },
          "registrySyncAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Legal.Entity.LegalEntityOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "legalEntityId": {
                "type": "string",
                "format": "uuid"
              },
              "tin": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Active",
                  "Pending",
                  "Inactive"
                ]
              },
              "legalType": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "nameEn": {
                "type": "string"
              },
              "nameAr": {
                "type": "string"
              },
              "effectiveDate": {
                "type": "string",
                "format": "date-time"
              },
              "vatTrn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact": {
                "$ref": "#/components/schemas/ContactOutput.jsonld"
              },
              "isEnabled": {
                "type": "boolean"
              },
              "enabledCapabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CapabilityOutput.jsonld"
                }
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "smpSyncAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "registrySyncAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        ]
      },
      "Legal.Entity.Onboarding.OnboardingStepOutput": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "LINK",
              "REVERIFY",
              "DELINK"
            ],
            "description": "The type of onboarding operation being performed in the End User Verification process. Allowed values: LINK, REVERIFY, DELINK"
          },
          "step": {
            "type": "string",
            "enum": [
              "INITIALIZATION",
              "SMP_SYNC",
              "CENTRAL_REGISTRY_SYNC"
            ]
          },
          "isCompleted": {
            "type": "boolean"
          },
          "legalEntity": {
            "$ref": "#/components/schemas/OnboardingDetailsOutput"
          },
          "passport": {
            "type": "string",
            "description": "JWT-based secure token containing verified onboarding claims and authorization context for the onboarding session"
          }
        }
      },
      "Legal.Entity.Onboarding.OnboardingStepOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "LINK",
                  "REVERIFY",
                  "DELINK"
                ]
              },
              "step": {
                "type": "string",
                "enum": [
                  "INITIALIZATION",
                  "SMP_SYNC",
                  "CENTRAL_REGISTRY_SYNC"
                ]
              },
              "isCompleted": {
                "type": "boolean"
              },
              "legalEntity": {
                "$ref": "#/components/schemas/OnboardingDetailsOutput.jsonld"
              },
              "passport": {
                "type": "string"
              }
            }
          }
        ]
      },
      "Legal.Entity.Onboarding.OnboardingVerificationInput": {
        "type": "object",
        "required": [
          "token",
          "action",
          "tin",
          "email"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "A unique EmaraTax-generated token that identifies the onboarding session."
          },
          "action": {
            "type": "string",
            "description": "The type of onboarding operation being performed in the End User Verification process. Allowed values: LINK, REVERIFY, DELINK"
          },
          "tin": {
            "pattern": "^(1\\d{9})$",
            "type": "string",
            "description": "The Tax Identification Number (TIN) of the taxable person."
          },
          "email": {
            "format": "email",
            "externalDocs": {
              "url": "https://schema.org/email"
            },
            "type": "string",
            "description": "The registered email of the Taxable Person's account admin in EmaraTax."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered mobile number of the Taxable Person’s Account Administrator in EmaraTax."
          },
          "reason": {
            "enum": [
              "CHANGE_IN_CIRCUMSTANCE",
              "PERIODIC_REVERIFICATION",
              "CLOSED_BUSINESS",
              "SWITCHING_ASP"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Legal.Entity.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "legalEntityId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          }
        ]
      },
      "OnboardingDetailsOutput": {
        "type": "object",
        "properties": {
          "tin": {
            "type": "string",
            "description": "The Tax Identification Number (TIN) of the taxable person."
          },
          "legalType": {
            "type": [
              "string",
              "null"
            ],
            "description": "The legal classification of the taxpayer as registered in EmaraTax."
          },
          "nameEn": {
            "type": "string",
            "description": "The legal name of the taxpayer in English as registered in EmaraTax."
          },
          "nameAr": {
            "type": "string",
            "description": "The legal name of the taxpayer in Arabic as registered in EmaraTax."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date associated with the taxpayer’s current tax status."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered email of the Taxable Person's account admin in EmaraTax."
          },
          "legalEntityId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The unique UUID v4 identifier of the legal entity."
          },
          "vatTrn": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 15-digit VAT Tax Registration Number (TRN) of the taxpayer."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered mobile number of the Taxable Person’s Account Administrator in EmaraTax."
          }
        }
      },
      "OnboardingDetailsOutput.jsonld": {
        "type": "object",
        "properties": {
          "tin": {
            "type": "string",
            "description": "The Tax Identification Number (TIN) of the taxable person."
          },
          "legalType": {
            "type": [
              "string",
              "null"
            ],
            "description": "The legal classification of the taxpayer as registered in EmaraTax."
          },
          "nameEn": {
            "type": "string",
            "description": "The legal name of the taxpayer in English as registered in EmaraTax."
          },
          "nameAr": {
            "type": "string",
            "description": "The legal name of the taxpayer in Arabic as registered in EmaraTax."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The effective date associated with the taxpayer’s current tax status."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered email of the Taxable Person's account admin in EmaraTax."
          },
          "legalEntityId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The unique UUID v4 identifier of the legal entity."
          },
          "vatTrn": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 15-digit VAT Tax Registration Number (TRN) of the taxpayer."
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "The registered mobile number of the Taxable Person’s Account Administrator in EmaraTax."
          }
        }
      },
      "OutgoingCreditNoteResource.CreditNoteOutput": {
        "type": "object",
        "properties": {
          "creditNoteId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "creditNoteNumber": {
            "type": "string"
          },
          "creditNoteDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OutgoingInvoiceResource.InvoiceOutput": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerFiscalId": {
            "type": "string"
          },
          "legalEntityUuid": {
            "type": "string"
          },
          "documentType": {
            "type": "string",
            "enum": [
              "invoice",
              "credit-note",
              "self-billed-invoice",
              "self-billed-credit-note",
              "mls",
              "tax-data-document",
              "tax-data-document-mls"
            ]
          },
          "documentTypeCode": {
            "type": "integer",
            "enum": [
              380,
              381,
              389,
              261,
              480,
              81
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "received",
              "valid",
              "sending_started",
              "sending_queued",
              "sending_failed",
              "processed",
              "delivered",
              "delivery_failed",
              "withdrawn",
              "action_required"
            ]
          },
          "senderName": {
            "type": "string"
          },
          "senderIdentifier": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientIdentifier": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "totalAmount": {
            "type": "string"
          },
          "totalAmountNet": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "externalReferenceId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Webhooks.EventDestinationCreateInput": {
        "type": "object",
        "properties": {
          "event": {
            "enum": [
              "document.delivered",
              "document.received",
              "legal_entity.synchronized"
            ],
            "type": "string"
          },
          "delivery": {
            "enum": [
              "webhook",
              "email",
              "aws_event_bridge"
            ],
            "type": "string"
          },
          "target": {
            "oneOf": [
              {
                "format": "uri"
              },
              {
                "format": "email"
              }
            ],
            "type": "string"
          },
          "authType": {
            "enum": [
              "none",
              "query",
              "header"
            ],
            "default": "none",
            "type": "string"
          },
          "authKey": {
            "description": "The key to use for authentication. If not provided, defaults to \"Authorization\" for `header` auth type and \"token\" for `query` auth type.",
            "type": [
              "string",
              "null"
            ]
          },
          "authToken": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "target",
          "authType"
        ]
      },
      "Webhooks.EventDestinationOutput": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "delivery": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "authType": {
            "type": "string"
          },
          "authKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "authToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "The timestamp when the legal entity was registered in the system."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The timestamp of the last local update."
          }
        }
      },
      "Webhooks.EventDestinationOutput.jsonld": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HydraItemBaseSchema"
          },
          {
            "type": "object",
            "properties": {
              "eventId": {
                "type": "string"
              },
              "event": {
                "type": "string"
              },
              "delivery": {
                "type": "string"
              },
              "target": {
                "type": "string"
              },
              "authType": {
                "type": "string"
              },
              "authKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "authToken": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "Webhooks.EventDestinationUpdateInput": {
        "type": "object",
        "properties": {
          "authType": {
            "enum": [
              "none",
              "query",
              "header"
            ],
            "type": "string"
          },
          "authKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "authToken": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "responses": {},
    "parameters": {},
    "examples": {},
    "requestBodies": {},
    "headers": {},
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Value for the Authorization header parameter.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "Credit Note",
      "description": "Resource 'Credit Note' operations."
    },
    {
      "name": "Webhooks",
      "description": "Resource 'Webhooks' operations."
    },
    {
      "name": "Invoice",
      "description": "Resource 'Invoice' operations."
    },
    {
      "name": "Legal Entity",
      "description": "Resource 'Legal Entity' operations."
    },
    {
      "name": "Legal Entity Capability",
      "description": "Resource 'Legal Entity Capability' operations."
    },
    {
      "name": "Legal Entity Onboarding",
      "description": "Resource 'Legal Entity Onboarding' operations."
    }
  ],
  "webhooks": {}
}
