{
  "openapi" : "3.1.0",
  "info" : {
    "contact" : {
      "email" : "developers@einvo.ae",
      "name" : "einvo developer support",
      "url" : "https://www.einvo.ae/developers/"
    },
    "description" : "UAE e-invoicing API of einvo (Peppol PINT AE, FTA reporting) by Gate Hills Technology FZCO.\n\nSubmit PINT AE UBL documents or create and issue invoices through the billing API, receive documents from the Peppol network and get webhooks for every status change. Authenticate with a company API key (`Authorization: Bearer ek_live_...`); sandbox keys (`ek_test_...`) validate documents without sending them to Peppol or the FTA.",
    "title" : "einvo API",
    "version" : "v1"
  },
  "externalDocs" : {
    "description" : "Guides",
    "url" : "https://www.einvo.ae/developers/"
  },
  "servers" : [ {
    "url" : "https://api.einvo.ae",
    "description" : "Production"
  } ],
  "security" : [ {
    "apiKey" : [ ]
  }, {
    "oauth2" : [ ]
  } ],
  "tags" : [ {
    "description" : "Send and track PINT AE invoices and credit notes",
    "name" : "Invoices"
  }, {
    "description" : "Online card payments of invoices on the seller's N-Genius outlet",
    "name" : "Payment links"
  }, {
    "description" : "Fetch and acknowledge received documents",
    "name" : "Inbox"
  }, {
    "description" : "Create PINT AE invoices without an ERP",
    "name" : "Invoicing"
  } ],
  "paths" : {
    "/api/v1/billing/customers" : {
      "get" : {
        "operationId" : "billingCustomers",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingCustomerDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Customers",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "billingCreateCustomer",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingCustomerForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingCustomerDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create customer",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/customers/{id}" : {
      "put" : {
        "operationId" : "billingUpdateCustomer",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingCustomerForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingCustomerDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update customer",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/customers/{id}/prices" : {
      "get" : {
        "operationId" : "priceListCustomerPrices",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PriceListCustomerPriceForm"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Customer prices",
        "tags" : [ "Price lists" ]
      },
      "put" : {
        "operationId" : "priceListSaveCustomerPrices",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/PriceListCustomerPriceForm"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PriceListCustomerPriceForm"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Save customer prices",
        "tags" : [ "Price lists" ]
      }
    },
    "/api/v1/billing/customers/{id}/statement" : {
      "get" : {
        "operationId" : "receivablesStatement",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Statement of account of a customer (PDF, EN/AR)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/customers/{id}/statement/email" : {
      "post" : {
        "operationId" : "receivablesEmailStatement",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReceivablesEmailTo"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : {
                    "type" : "string",
                    "format" : "uuid"
                  }
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "Email statement",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/customers/{id}/supplier" : {
      "put" : {
        "operationId" : "purchaseOrderMarkSupplier",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "object",
                "additionalProperties" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingCustomer"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Mark supplier",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/delivery-notes" : {
      "get" : {
        "operationId" : "deliveryNoteList",
        "parameters" : [ {
          "in" : "query",
          "name" : "status",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelDeliveryNoteNoteListItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List",
        "tags" : [ "Delivery notes" ]
      },
      "post" : {
        "operationId" : "deliveryNoteCreate",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeliveryNoteNoteForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/from/{documentId}" : {
      "post" : {
        "operationId" : "deliveryNoteFrom",
        "parameters" : [ {
          "in" : "path",
          "name" : "documentId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "From",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}" : {
      "delete" : {
        "operationId" : "deliveryNoteDelete",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete",
        "tags" : [ "Delivery notes" ]
      },
      "get" : {
        "operationId" : "deliveryNoteGet",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Get",
        "tags" : [ "Delivery notes" ]
      },
      "put" : {
        "operationId" : "deliveryNoteUpdate",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeliveryNoteNoteForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}/cancel" : {
      "post" : {
        "operationId" : "deliveryNoteCancel",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Cancel",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}/delivered" : {
      "post" : {
        "operationId" : "deliveryNoteDelivered",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeliveryNoteDeliveredForm"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Delivered",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}/invoice" : {
      "post" : {
        "operationId" : "deliveryNoteCreateInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : {
                    "type" : "string",
                    "format" : "uuid"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Create invoice",
        "tags" : [ "Delivery notes" ]
      },
      "put" : {
        "operationId" : "deliveryNoteLink",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "object",
                "additionalProperties" : {
                  "type" : "string",
                  "format" : "uuid"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Link",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}/issue" : {
      "post" : {
        "operationId" : "deliveryNoteIssue",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteNoteDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Issue",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/delivery-notes/{id}/pdf" : {
      "get" : {
        "operationId" : "deliveryNotePdf",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Pdf",
        "tags" : [ "Delivery notes" ]
      }
    },
    "/api/v1/billing/import" : {
      "post" : {
        "operationId" : "billingImportInvoices",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "type" : "object",
                "properties" : {
                  "file" : {
                    "type" : "string",
                    "format" : "binary"
                  }
                },
                "required" : [ "file" ]
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceImportImportResult"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Create invoice drafts from a CSV or Excel file (all or nothing)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices" : {
      "get" : {
        "operationId" : "billingInvoices",
        "parameters" : [ {
          "in" : "query",
          "name" : "status",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelBillingInvoiceListItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Invoices",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "billingCreateInvoice",
        "parameters" : [ {
          "in" : "query",
          "name" : "kind",
          "required" : false,
          "schema" : {
            "type" : "string",
            "default" : "INVOICE"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingInvoiceForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create an invoice draft",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/advance-candidates" : {
      "get" : {
        "operationId" : "billingAdvanceCandidates",
        "parameters" : [ {
          "in" : "query",
          "name" : "customerId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingInvoiceListItem"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Issued invoices of a customer, to reference as advance payments in a final invoice",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}" : {
      "delete" : {
        "operationId" : "billingDeleteInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete invoice",
        "tags" : [ "Invoicing" ]
      },
      "get" : {
        "operationId" : "billingInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Invoice",
        "tags" : [ "Invoicing" ]
      },
      "put" : {
        "operationId" : "billingUpdateInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingInvoiceForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update invoice",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/credit-note" : {
      "post" : {
        "operationId" : "billingCreditNote",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingCreditNoteRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create a credit-note draft for an issued invoice",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/email" : {
      "post" : {
        "operationId" : "billingEmailInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingEmailInvoiceRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EmailDto"
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "E-mail an issued invoice (PDF + UBL attached) to the customer or another address",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/emails" : {
      "get" : {
        "operationId" : "billingInvoiceEmails",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/EmailDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "E-mails sent for an invoice",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/issue" : {
      "post" : {
        "description" : "Returns the issued invoice. With a sandbox API key nothing is issued: the response is a SandboxIssue (provisional number, sandbox document id, validation findings) and the draft stays a draft.",
        "operationId" : "billingIssue",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "sendEmail",
          "required" : false,
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/BillingInvoiceDto"
                  }, {
                    "$ref" : "#/components/schemas/BillingSandboxIssue"
                  } ]
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Issue a draft: number, PINT AE UBL, validation, Peppol delivery and FTA reporting",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/paylinks" : {
      "delete" : {
        "operationId" : "payLinkCancel",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Close the open payment links of an invoice",
        "tags" : [ "Payment links" ]
      },
      "get" : {
        "operationId" : "payLinkList",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PayLinkDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Payment links of an invoice (newest first) with their gateway orders",
        "tags" : [ "Payment links" ]
      },
      "post" : {
        "operationId" : "payLinkCreate",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PayLinkCreateRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PayLinkDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create a payment link for what is outstanding (or a partial amount)",
        "tags" : [ "Payment links" ]
      }
    },
    "/api/v1/billing/invoices/{id}/paylinks/check" : {
      "post" : {
        "operationId" : "payLinkCheck",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PayLinkDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read the open payment orders from the gateway now",
        "tags" : [ "Payment links" ]
      }
    },
    "/api/v1/billing/invoices/{id}/payments" : {
      "get" : {
        "operationId" : "receivablesPayments",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingPaymentDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Payments",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "receivablesAddPayment",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingPaymentForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Record a (partial) payment received for an issued invoice",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/pdf" : {
      "get" : {
        "operationId" : "billingPdf",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Bilingual PDF (issued: from the sent UBL; draft: preview with DRAFT watermark)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/remind" : {
      "post" : {
        "operationId" : "receivablesRemind",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReceivablesEmailTo"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : {
                    "type" : "string",
                    "format" : "uuid"
                  }
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "E-mail a payment reminder now",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/reminders" : {
      "get" : {
        "operationId" : "receivablesReminders",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingReminderDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Reminders",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/retention-release" : {
      "post" : {
        "operationId" : "billingRetentionRelease",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingRetentionRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Release a contract retention: new draft invoice for the amount released",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/invoices/{id}/whatsapp" : {
      "get" : {
        "operationId" : "whatsAppList",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/WhatsAppMessageDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "WhatsApp messages sent for an invoice, with their delivery status",
        "tags" : [ "WhatsApp" ]
      },
      "post" : {
        "operationId" : "whatsAppSend",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WhatsAppSendRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppMessageDto"
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "Send the invoice PDF to the customer's WhatsApp number",
        "tags" : [ "WhatsApp" ]
      }
    },
    "/api/v1/billing/mappings" : {
      "get" : {
        "operationId" : "mappingList",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/MappingProfileDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List",
        "tags" : [ "Mapping profiles" ]
      },
      "post" : {
        "operationId" : "mappingCreate",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/MappingProfileForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MappingProfileDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create",
        "tags" : [ "Mapping profiles" ]
      }
    },
    "/api/v1/billing/mappings/preview" : {
      "post" : {
        "operationId" : "mappingPreview",
        "parameters" : [ {
          "in" : "query",
          "name" : "format",
          "required" : false,
          "schema" : {
            "type" : "string",
            "default" : "CSV"
          }
        }, {
          "in" : "query",
          "name" : "config",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "type" : "object",
                "properties" : {
                  "file" : {
                    "type" : "string",
                    "format" : "binary"
                  }
                },
                "required" : [ "file" ]
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MappingPreviewDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Applies a mapping (config as JSON) to a sample file without creating anything",
        "tags" : [ "Mapping profiles" ]
      }
    },
    "/api/v1/billing/mappings/{id}" : {
      "delete" : {
        "operationId" : "mappingDelete",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete",
        "tags" : [ "Mapping profiles" ]
      },
      "put" : {
        "operationId" : "mappingUpdate",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/MappingProfileForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MappingProfileDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update",
        "tags" : [ "Mapping profiles" ]
      }
    },
    "/api/v1/billing/mappings/{id}/import" : {
      "post" : {
        "operationId" : "mappingImportFile",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "type" : "object",
                "properties" : {
                  "file" : {
                    "type" : "string",
                    "format" : "binary"
                  }
                },
                "required" : [ "file" ]
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MappingImportResult"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Creates invoice drafts from a CSV / XML file with a saved mapping profile (all or nothing)",
        "tags" : [ "Mapping profiles" ]
      }
    },
    "/api/v1/billing/payments/{paymentId}" : {
      "delete" : {
        "operationId" : "receivablesDeletePayment",
        "parameters" : [ {
          "in" : "path",
          "name" : "paymentId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete payment",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/peppol-directory/checks" : {
      "get" : {
        "operationId" : "peppolDirectoryChecks",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PeppolDirectoryCheckDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Checks",
        "tags" : [ "Peppol directory" ]
      }
    },
    "/api/v1/billing/peppol-directory/invitations" : {
      "get" : {
        "operationId" : "peppolDirectoryInvitations",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PeppolDirectoryInvitationDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Invitations",
        "tags" : [ "Peppol directory" ]
      },
      "post" : {
        "operationId" : "peppolDirectoryInvite",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PeppolDirectoryInviteForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PeppolDirectoryInviteResult"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "E-mails suppliers an invitation to register on e-invoicing",
        "tags" : [ "Peppol directory" ]
      }
    },
    "/api/v1/billing/peppol-directory/search" : {
      "get" : {
        "operationId" : "peppolDirectorySearch",
        "parameters" : [ {
          "in" : "query",
          "name" : "q",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "country",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PeppolDirectorySearchDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Searches participants by name, Peppol ID (0235:...), TIN or TRN",
        "tags" : [ "Peppol directory" ]
      }
    },
    "/api/v1/billing/peppol-directory/verify" : {
      "post" : {
        "operationId" : "peppolDirectoryVerify",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PeppolDirectoryVerifyForm"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PeppolDirectoryVerifyReport"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Checks customers on the SMP: registered for the PINT AE invoice? Optionally updates peppolEnabled",
        "tags" : [ "Peppol directory" ]
      }
    },
    "/api/v1/billing/preview" : {
      "post" : {
        "operationId" : "billingPreview",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/BillingLineForm"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingTotals"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Compute totals of draft lines (same rounding as issuing)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/price-lists" : {
      "get" : {
        "operationId" : "priceListLists",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PriceListListDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Lists",
        "tags" : [ "Price lists" ]
      },
      "post" : {
        "operationId" : "priceListCreate",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PriceListListForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PriceListListDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create",
        "tags" : [ "Price lists" ]
      }
    },
    "/api/v1/billing/price-lists/{id}" : {
      "delete" : {
        "operationId" : "priceListDelete",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete",
        "tags" : [ "Price lists" ]
      },
      "put" : {
        "operationId" : "priceListUpdate",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PriceListListForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PriceListListDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update",
        "tags" : [ "Price lists" ]
      }
    },
    "/api/v1/billing/prices/resolve" : {
      "get" : {
        "operationId" : "priceListResolve",
        "parameters" : [ {
          "in" : "query",
          "name" : "customerId",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "productId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "quantity",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PriceListResolved"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Resolve",
        "tags" : [ "Price lists" ]
      }
    },
    "/api/v1/billing/products" : {
      "get" : {
        "operationId" : "billingProducts",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingProductDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Products",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "billingCreateProduct",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingProductForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingProductDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create product",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/products/{id}" : {
      "put" : {
        "operationId" : "billingUpdateProduct",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingProductForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingProductDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update product",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/purchase-orders" : {
      "get" : {
        "operationId" : "purchaseOrderList",
        "parameters" : [ {
          "in" : "query",
          "name" : "status",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelPurchaseOrderOrderListItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List",
        "tags" : [ "Purchase orders" ]
      },
      "post" : {
        "operationId" : "purchaseOrderCreate",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PurchaseOrderOrderForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}" : {
      "delete" : {
        "operationId" : "purchaseOrderDelete",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete",
        "tags" : [ "Purchase orders" ]
      },
      "get" : {
        "operationId" : "purchaseOrderGet",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Get",
        "tags" : [ "Purchase orders" ]
      },
      "put" : {
        "operationId" : "purchaseOrderUpdate",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PurchaseOrderOrderForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/cancel" : {
      "post" : {
        "operationId" : "purchaseOrderCancel",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Cancel",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/candidates" : {
      "get" : {
        "operationId" : "purchaseOrderCandidates",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PurchaseOrderCandidateDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Candidates",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/close" : {
      "post" : {
        "operationId" : "purchaseOrderClose",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Close",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/invoices/{documentId}" : {
      "delete" : {
        "operationId" : "purchaseOrderUnmatch",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "path",
          "name" : "documentId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Unmatch",
        "tags" : [ "Purchase orders" ]
      },
      "post" : {
        "operationId" : "purchaseOrderMatch",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "path",
          "name" : "documentId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Match",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/pdf" : {
      "get" : {
        "operationId" : "purchaseOrderPdf",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Pdf",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/purchase-orders/{id}/send" : {
      "post" : {
        "operationId" : "purchaseOrderSend",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PurchaseOrderSendForm"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchaseOrderOrderDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Send",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/billing/quotes" : {
      "get" : {
        "operationId" : "receivablesQuotes",
        "parameters" : [ {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelBillingInvoiceListItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Quotes",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "receivablesCreateQuote",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingInvoiceForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create a quotation draft",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/quotes/{id}/accept" : {
      "post" : {
        "operationId" : "receivablesAccept",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Accept",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/quotes/{id}/convert" : {
      "post" : {
        "operationId" : "receivablesConvert",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create an invoice draft from the quote",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/quotes/{id}/decline" : {
      "post" : {
        "operationId" : "receivablesDecline",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Decline",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/quotes/{id}/send" : {
      "post" : {
        "operationId" : "receivablesSendQuote",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "email",
          "required" : false,
          "schema" : {
            "type" : "boolean",
            "default" : true
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReceivablesEmailTo"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingInvoiceDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Number the quote and mark it sent; optionally e-mail the PDF",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/recurring" : {
      "get" : {
        "operationId" : "receivablesRecurring",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingRecurringDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Recurring",
        "tags" : [ "Invoicing" ]
      },
      "post" : {
        "operationId" : "receivablesCreateRecurring",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingRecurringForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "string",
                  "format" : "uuid"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create recurring",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/recurring/{id}" : {
      "delete" : {
        "operationId" : "receivablesDeleteRecurring",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete recurring",
        "tags" : [ "Invoicing" ]
      },
      "put" : {
        "operationId" : "receivablesUpdateRecurring",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BillingRecurringForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "string",
                  "format" : "uuid"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update recurring",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/export.xlsx" : {
      "get" : {
        "operationId" : "receivablesExport",
        "parameters" : [ {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Export",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/summary" : {
      "get" : {
        "operationId" : "receivablesSummary",
        "parameters" : [ {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ReportSummary"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Summary",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat" : {
      "get" : {
        "operationId" : "receivablesVat",
        "parameters" : [ {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ReportVatSummary"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Vat",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201" : {
      "get" : {
        "operationId" : "vat201Get",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Vat201"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "VAT return (VAT 201) of a company for a tax period: every box, with the documents behind it",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/companies" : {
      "get" : {
        "operationId" : "vat201Companies",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Vat201Company"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Companies a VAT return can be prepared for",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/export.pdf" : {
      "get" : {
        "operationId" : "vat201Pdf",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Pdf",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/export.xlsx" : {
      "get" : {
        "operationId" : "vat201Xlsx",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Xlsx",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/file" : {
      "post" : {
        "operationId" : "vat201File",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Vat201FileForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Vat201"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Record that the return was filed on EmaraTax (date and FTA reference) and freeze it",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/history" : {
      "get" : {
        "operationId" : "vat201History",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Vat201ReturnSummary"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Saved VAT returns of a company",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/manual" : {
      "put" : {
        "operationId" : "vat201SaveManual",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Vat201ManualForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Vat201"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Save the boxes einvo cannot know (tourist refunds, imports, documents outside einvo)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/reports/vat201/reopen" : {
      "post" : {
        "operationId" : "vat201Reopen",
        "parameters" : [ {
          "in" : "query",
          "name" : "legalEntityId",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Vat201"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Reopen a filed return (back to draft)",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/sellers" : {
      "get" : {
        "operationId" : "billingSellers",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingSellerDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Sellers",
        "tags" : [ "Invoicing" ]
      }
    },
    "/api/v1/billing/suppliers" : {
      "get" : {
        "operationId" : "purchaseOrderSuppliers",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/BillingCustomer"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Suppliers",
        "tags" : [ "Purchase orders" ]
      }
    },
    "/api/v1/cashbook/ap/invoices" : {
      "get" : {
        "operationId" : "apInvoices",
        "parameters" : [ {
          "in" : "query",
          "name" : "includeExported",
          "required" : false,
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApExportInvoiceList"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Invoices",
        "tags" : [ "Aps" ]
      }
    },
    "/api/v1/cashbook/ap/invoices/acknowledge" : {
      "post" : {
        "operationId" : "apAcknowledge",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ApExportAcknowledgeForm"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApExportAcknowledgeResult"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Acknowledge",
        "tags" : [ "Aps" ]
      }
    },
    "/api/v1/inbox" : {
      "get" : {
        "operationId" : "getInbox",
        "parameters" : [ {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelInboxItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Received, validated documents not yet acknowledged (oldest first)",
        "tags" : [ "Inbox" ]
      }
    },
    "/api/v1/inbox/{id}/ack" : {
      "post" : {
        "operationId" : "inboxAck",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InboxItem"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Confirm the document was imported; idempotent",
        "tags" : [ "Inbox" ]
      }
    },
    "/api/v1/invoices" : {
      "get" : {
        "operationId" : "invoiceList",
        "parameters" : [ {
          "in" : "query",
          "name" : "direction",
          "required" : false,
          "schema" : {
            "type" : "string",
            "default" : "OUTBOUND",
            "enum" : [ "OUTBOUND", "INBOUND" ]
          }
        }, {
          "in" : "query",
          "name" : "status",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "RECEIVED", "VALIDATED", "REJECTED", "ROUTED", "UNDELIVERABLE", "SENT", "SEND_FAILED", "DELIVERED", "RECIPIENT_REJECTED", "NOT_EXCHANGED" ]
          }
        }, {
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0
          }
        }, {
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedModelDocumentDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List documents visible to the caller",
        "tags" : [ "Invoices" ]
      },
      "post" : {
        "operationId" : "jsonInvoiceSubmit",
        "parameters" : [ {
          "in" : "header",
          "name" : "Idempotency-Key",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/JsonInvoice"
              }
            },
            "application/xml" : {
              "schema" : {
                "type" : "string",
                "format" : "byte"
              }
            },
            "text/xml" : {
              "schema" : {
                "type" : "string",
                "format" : "byte"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DocumentDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Submit an invoice or credit note as simplified JSON; einvo generates the PINT AE UBL",
        "tags" : [ "Invoices" ]
      }
    },
    "/api/v1/invoices/validate" : {
      "post" : {
        "operationId" : "invoiceValidate",
        "requestBody" : {
          "content" : {
            "application/xml" : {
              "schema" : {
                "type" : "string",
                "format" : "byte"
              }
            },
            "text/xml" : {
              "schema" : {
                "type" : "string",
                "format" : "byte"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ValidationResultDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Validate a document against PINT AE / UAE TDD rules without sending it",
        "tags" : [ "Invoices" ]
      }
    },
    "/api/v1/invoices/{id}" : {
      "get" : {
        "operationId" : "invoiceGet",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DocumentDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Get a document with its status and validation findings",
        "tags" : [ "Invoices" ]
      }
    },
    "/api/v1/invoices/{id}/pdf" : {
      "get" : {
        "operationId" : "invoicePdf",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Bilingual (EN/AR) PDF copy of an invoice or credit note, rendered from its UBL",
        "tags" : [ "Invoices" ]
      }
    },
    "/api/v1/invoices/{id}/ubl" : {
      "get" : {
        "operationId" : "invoiceUbl",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "application/xml" : {
                "schema" : {
                  "type" : "string",
                  "format" : "byte"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Download the UBL XML of a document",
        "tags" : [ "Invoices" ]
      }
    },
    "/api/v1/me" : {
      "get" : {
        "operationId" : "getMe",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Me"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Me",
        "tags" : [ "Session" ]
      }
    },
    "/api/v1/webhooks" : {
      "get" : {
        "operationId" : "webhookList",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/WebhookEndpointDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List",
        "tags" : [ "Webhooks" ]
      },
      "post" : {
        "operationId" : "webhookCreate",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WebhookCreateEndpoint"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookCreatedEndpoint"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Create",
        "tags" : [ "Webhooks" ]
      }
    },
    "/api/v1/webhooks/{id}" : {
      "delete" : {
        "operationId" : "webhookDelete",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          }
        },
        "summary" : "Delete",
        "tags" : [ "Webhooks" ]
      }
    },
    "/api/v1/webhooks/{id}/events" : {
      "get" : {
        "operationId" : "webhookEvents",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/WebhookEventDto"
                  }
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Events",
        "tags" : [ "Webhooks" ]
      }
    },
    "/api/v1/webhooks/{id}/test" : {
      "post" : {
        "operationId" : "webhookTest",
        "parameters" : [ {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookEventDto"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Test",
        "tags" : [ "Webhooks" ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "ApExportAcknowledgeForm" : {
        "properties" : {
          "documentIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            }
          },
          "references" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "target" : {
            "type" : "string"
          }
        }
      },
      "ApExportAcknowledgeResult" : {
        "properties" : {
          "batchId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "exported" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "ApExportInvoiceList" : {
        "properties" : {
          "count" : {
            "type" : "integer",
            "format" : "int32"
          },
          "invoices" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApInvoice"
            }
          },
          "schema" : {
            "type" : "string"
          }
        }
      },
      "ApInvoice" : {
        "properties" : {
          "approval" : {
            "$ref" : "#/components/schemas/ApInvoiceApproval"
          },
          "buyerName" : {
            "type" : "string"
          },
          "buyerTrn" : {
            "type" : "string"
          },
          "currency" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "dueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "exchangeRate" : {
            "type" : "number"
          },
          "export" : {
            "$ref" : "#/components/schemas/ApInvoiceExport"
          },
          "iban" : {
            "type" : "string"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApInvoiceLine"
            }
          },
          "number" : {
            "type" : "string"
          },
          "paymentTerms" : {
            "type" : "string"
          },
          "purchaseOrders" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "receivedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "schema" : {
            "type" : "string"
          },
          "supplier" : {
            "$ref" : "#/components/schemas/ApInvoiceSupplier"
          },
          "totals" : {
            "$ref" : "#/components/schemas/ApInvoiceTotals"
          },
          "totalsAed" : {
            "$ref" : "#/components/schemas/ApInvoiceTotals"
          },
          "typeCode" : {
            "type" : "string"
          },
          "ublUrl" : {
            "type" : "string"
          },
          "vatBreakdown" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApInvoiceVat"
            }
          }
        }
      },
      "ApInvoiceApproval" : {
        "properties" : {
          "approvedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "approvedBy" : {
            "type" : "string"
          },
          "autoApproved" : {
            "type" : "boolean"
          },
          "levels" : {
            "type" : "integer",
            "format" : "int32"
          },
          "matchOverrideReason" : {
            "type" : "string"
          },
          "matchStatus" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          }
        }
      },
      "ApInvoiceExport" : {
        "properties" : {
          "exported" : {
            "type" : "boolean"
          },
          "exportedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "reference" : {
            "type" : "string"
          },
          "target" : {
            "type" : "string"
          }
        }
      },
      "ApInvoiceLine" : {
        "properties" : {
          "accountCode" : {
            "type" : "string"
          },
          "accountName" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "lineNo" : {
            "type" : "integer",
            "format" : "int32"
          },
          "name" : {
            "type" : "string"
          },
          "net" : {
            "type" : "number"
          },
          "quantity" : {
            "type" : "number"
          },
          "taxAmount" : {
            "type" : "number"
          },
          "taxCategory" : {
            "type" : "string"
          },
          "taxRate" : {
            "type" : "number"
          },
          "unitCode" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "ApInvoiceSupplier" : {
        "properties" : {
          "city" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "endpoint" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "street" : {
            "type" : "string"
          },
          "trn" : {
            "type" : "string"
          }
        }
      },
      "ApInvoiceTotals" : {
        "properties" : {
          "gross" : {
            "type" : "number"
          },
          "net" : {
            "type" : "number"
          },
          "payable" : {
            "type" : "number"
          },
          "tax" : {
            "type" : "number"
          }
        }
      },
      "ApInvoiceVat" : {
        "properties" : {
          "category" : {
            "type" : "string"
          },
          "rate" : {
            "type" : "number"
          },
          "tax" : {
            "type" : "number"
          },
          "taxAed" : {
            "type" : "number"
          },
          "taxable" : {
            "type" : "number"
          },
          "taxableAed" : {
            "type" : "number"
          }
        }
      },
      "BillingCreditNoteRequest" : {
        "properties" : {
          "reasonCode" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "DL8\\.61\\.1\\.[A-E]|VD"
          }
        },
        "required" : [ "reasonCode" ]
      },
      "BillingCustomer" : {
        "properties" : {
          "city" : {
            "type" : "string"
          },
          "countryCode" : {
            "type" : "string"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "defaultNote" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "emirate" : {
            "type" : "string"
          },
          "endpointId" : {
            "type" : "string"
          },
          "endpointScheme" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalIdAuthority" : {
            "type" : "string"
          },
          "legalIdType" : {
            "type" : "string"
          },
          "legalName" : {
            "type" : "string"
          },
          "legalNameAr" : {
            "type" : "string"
          },
          "new" : {
            "type" : "boolean"
          },
          "passportCountry" : {
            "type" : "string"
          },
          "paymentTermsDays" : {
            "type" : "integer",
            "format" : "int32"
          },
          "peppolEnabled" : {
            "type" : "boolean"
          },
          "priceListId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "street" : {
            "type" : "string"
          },
          "supplier" : {
            "type" : "boolean"
          },
          "taxId" : {
            "type" : "string"
          },
          "taxIdScheme" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tradeLicense" : {
            "type" : "string"
          },
          "trn" : {
            "type" : "string"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "vatGroupMember" : {
            "type" : "boolean"
          },
          "version" : {
            "type" : "integer",
            "format" : "int64"
          },
          "whatsappNumber" : {
            "type" : "string"
          }
        }
      },
      "BillingCustomerDto" : {
        "properties" : {
          "city" : {
            "type" : "string"
          },
          "countryCode" : {
            "type" : "string"
          },
          "defaultNote" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "emirate" : {
            "type" : "string"
          },
          "endpointId" : {
            "type" : "string"
          },
          "endpointScheme" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalIdAuthority" : {
            "type" : "string"
          },
          "legalIdType" : {
            "type" : "string"
          },
          "legalName" : {
            "type" : "string"
          },
          "legalNameAr" : {
            "type" : "string"
          },
          "passportCountry" : {
            "type" : "string"
          },
          "paymentTermsDays" : {
            "type" : "integer",
            "format" : "int32"
          },
          "peppolEnabled" : {
            "type" : "boolean"
          },
          "priceListId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "street" : {
            "type" : "string"
          },
          "taxId" : {
            "type" : "string"
          },
          "taxIdScheme" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tradeLicense" : {
            "type" : "string"
          },
          "trn" : {
            "type" : "string"
          },
          "vatGroupMember" : {
            "type" : "boolean"
          },
          "whatsappNumber" : {
            "type" : "string"
          }
        }
      },
      "BillingCustomerForm" : {
        "properties" : {
          "city" : {
            "type" : "string",
            "maxLength" : 128,
            "minLength" : 0
          },
          "countryCode" : {
            "type" : "string",
            "pattern" : "[A-Z]{2}"
          },
          "defaultNote" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "email" : {
            "type" : "string",
            "maxLength" : 320,
            "minLength" : 0
          },
          "emirate" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "endpointId" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "endpointScheme" : {
            "type" : "string",
            "pattern" : "\\d{4}"
          },
          "legalIdAuthority" : {
            "type" : "string",
            "maxLength" : 100,
            "minLength" : 0
          },
          "legalIdType" : {
            "type" : "string",
            "pattern" : "TL|EID|PAS|CD"
          },
          "legalName" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "legalNameAr" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "passportCountry" : {
            "type" : "string",
            "pattern" : "[A-Z]{2}"
          },
          "paymentTermsDays" : {
            "type" : "integer",
            "format" : "int32",
            "maximum" : 365,
            "minimum" : 0
          },
          "peppolEnabled" : {
            "type" : "boolean"
          },
          "priceListId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "street" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "taxId" : {
            "type" : "string",
            "maxLength" : 32,
            "minLength" : 0
          },
          "taxIdScheme" : {
            "type" : "string",
            "pattern" : "\\d{4}"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tradeLicense" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "trn" : {
            "type" : "string",
            "pattern" : "1\\d{12}03"
          },
          "vatGroupMember" : {
            "type" : "boolean"
          },
          "whatsappNumber" : {
            "type" : "string",
            "maxLength" : 32,
            "minLength" : 0
          }
        },
        "required" : [ "legalName" ]
      },
      "BillingEmailInvoiceRequest" : {
        "properties" : {
          "cc" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "email",
              "maxLength" : 320,
              "minLength" : 0
            },
            "maxItems" : 5,
            "minItems" : 0
          },
          "message" : {
            "type" : "string",
            "maxLength" : 2000,
            "minLength" : 0
          },
          "to" : {
            "type" : "string",
            "format" : "email",
            "maxLength" : 320,
            "minLength" : 0
          }
        }
      },
      "BillingInvoiceDto" : {
        "properties" : {
          "advanceInvoiceIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            }
          },
          "amountCredited" : {
            "type" : "number"
          },
          "amountPaid" : {
            "type" : "number"
          },
          "beneficiaryId" : {
            "type" : "string"
          },
          "buyerReference" : {
            "type" : "string"
          },
          "convertedInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "correctedInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "creditReasonCode" : {
            "type" : "string"
          },
          "currency" : {
            "type" : "string"
          },
          "customerEmail" : {
            "type" : "string"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "customerName" : {
            "type" : "string"
          },
          "customerTrn" : {
            "type" : "string"
          },
          "deliveryCity" : {
            "type" : "string"
          },
          "deliveryCountry" : {
            "type" : "string"
          },
          "deliveryStreet" : {
            "type" : "string"
          },
          "deliverySubdivision" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "dueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "exchangeRate" : {
            "type" : "number"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "incoterms" : {
            "type" : "string"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "issuedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "kind" : {
            "type" : "string"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BillingLineDto"
            }
          },
          "note" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "outstanding" : {
            "type" : "number"
          },
          "paymentMeansCode" : {
            "type" : "string"
          },
          "paymentStatus" : {
            "type" : "string"
          },
          "periodEnd" : {
            "type" : "string",
            "format" : "date"
          },
          "periodStart" : {
            "type" : "string",
            "format" : "date"
          },
          "principalId" : {
            "type" : "string"
          },
          "recurringId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "retentionOf" : {
            "type" : "string",
            "format" : "uuid"
          },
          "sellerName" : {
            "type" : "string"
          },
          "sourceQuoteId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "status" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "totals" : {
            "$ref" : "#/components/schemas/BillingTotals"
          },
          "transactionFlags" : {
            "type" : "string"
          },
          "validUntil" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "BillingInvoiceForm" : {
        "properties" : {
          "advanceInvoiceIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            },
            "maxItems" : 10,
            "minItems" : 0
          },
          "beneficiaryId" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "buyerReference" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "creditReasonCode" : {
            "type" : "string",
            "maxLength" : 16,
            "minLength" : 0
          },
          "currency" : {
            "type" : "string",
            "pattern" : "[A-Z]{3}"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "deliveryCity" : {
            "type" : "string",
            "maxLength" : 128,
            "minLength" : 0
          },
          "deliveryCountry" : {
            "type" : "string",
            "pattern" : "[A-Z]{2}"
          },
          "deliveryStreet" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "deliverySubdivision" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "dueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "exchangeRate" : {
            "type" : "number",
            "minimum" : 0
          },
          "incoterms" : {
            "type" : "string",
            "maxLength" : 8,
            "minLength" : 0
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BillingLineForm"
            },
            "minItems" : 1
          },
          "note" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "paymentMeansCode" : {
            "type" : "string",
            "pattern" : "1|10|30|31|42|48|49|54|55|57|58|59|97"
          },
          "periodEnd" : {
            "type" : "string",
            "format" : "date"
          },
          "periodStart" : {
            "type" : "string",
            "format" : "date"
          },
          "principalId" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "transactionFlags" : {
            "type" : "string",
            "pattern" : "[01]{8}"
          },
          "validUntil" : {
            "type" : "string",
            "format" : "date"
          }
        },
        "required" : [ "customerId", "legalEntityId", "lines" ]
      },
      "BillingInvoiceListItem" : {
        "properties" : {
          "convertedInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currency" : {
            "type" : "string"
          },
          "customerName" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "dueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "kind" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "outstanding" : {
            "type" : "number"
          },
          "paymentStatus" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          },
          "totalPayable" : {
            "type" : "number"
          },
          "validUntil" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "BillingLineDto" : {
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "discount" : {
            "type" : "number"
          },
          "exemptionCode" : {
            "type" : "string"
          },
          "exemptionText" : {
            "type" : "string"
          },
          "gtin" : {
            "type" : "string"
          },
          "hsCode" : {
            "type" : "string"
          },
          "itemType" : {
            "type" : "string"
          },
          "lineNo" : {
            "type" : "integer",
            "format" : "int32"
          },
          "lotId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "natureCode" : {
            "type" : "string"
          },
          "net" : {
            "type" : "number"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "tax" : {
            "type" : "number"
          },
          "taxCategory" : {
            "type" : "string"
          },
          "taxRate" : {
            "type" : "number"
          },
          "unitCode" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "BillingLineForm" : {
        "properties" : {
          "description" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "discount" : {
            "type" : "number",
            "minimum" : 0
          },
          "exemptionCode" : {
            "type" : "string",
            "maxLength" : 32,
            "minLength" : 0
          },
          "exemptionText" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "gtin" : {
            "type" : "string",
            "pattern" : "(\\d{8}|\\d{12,14})?"
          },
          "hsCode" : {
            "type" : "string",
            "maxLength" : 16,
            "minLength" : 0
          },
          "itemType" : {
            "type" : "string",
            "pattern" : "[GS]"
          },
          "lotId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "natureCode" : {
            "type" : "string",
            "pattern" : "(DL8\\.48\\.3\\.[123]|DL8\\.48\\.8\\.[123])?"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number",
            "minimum" : 0
          },
          "taxCategory" : {
            "type" : "string",
            "pattern" : "S|Z|E|AE|O|N"
          },
          "taxRate" : {
            "type" : "number",
            "minimum" : 0
          },
          "unitCode" : {
            "type" : "string",
            "maxLength" : 8,
            "minLength" : 0
          },
          "unitPrice" : {
            "type" : "number",
            "minimum" : 0
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        },
        "required" : [ "itemType", "name", "quantity", "taxCategory", "taxRate", "unitCode", "unitPrice" ]
      },
      "BillingPaymentDto" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "method" : {
            "type" : "string"
          },
          "note" : {
            "type" : "string"
          },
          "paidOn" : {
            "type" : "string",
            "format" : "date"
          },
          "reference" : {
            "type" : "string"
          }
        }
      },
      "BillingPaymentForm" : {
        "properties" : {
          "accountId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "amount" : {
            "type" : "number",
            "minimum" : 0.01
          },
          "method" : {
            "type" : "string",
            "pattern" : "BANK_TRANSFER|CARD|CASH|CHEQUE|OTHER"
          },
          "note" : {
            "type" : "string",
            "maxLength" : 500,
            "minLength" : 0
          },
          "paidOn" : {
            "type" : "string",
            "format" : "date"
          },
          "reference" : {
            "type" : "string",
            "maxLength" : 128,
            "minLength" : 0
          }
        },
        "required" : [ "amount", "method", "paidOn" ]
      },
      "BillingProductDto" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "code" : {
            "type" : "string"
          },
          "costPrice" : {
            "type" : "number"
          },
          "description" : {
            "type" : "string"
          },
          "exemptionCode" : {
            "type" : "string"
          },
          "gtin" : {
            "type" : "string"
          },
          "hsCode" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "itemType" : {
            "type" : "string"
          },
          "minStock" : {
            "type" : "number"
          },
          "name" : {
            "type" : "string"
          },
          "nameAr" : {
            "type" : "string"
          },
          "natureCode" : {
            "type" : "string"
          },
          "taxCategory" : {
            "type" : "string"
          },
          "taxRate" : {
            "type" : "number"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "trackLots" : {
            "type" : "boolean"
          },
          "trackStock" : {
            "type" : "boolean"
          },
          "unitCode" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "BillingProductForm" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "code" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "costPrice" : {
            "type" : "number",
            "minimum" : 0
          },
          "description" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "exemptionCode" : {
            "type" : "string",
            "maxLength" : 32,
            "minLength" : 0
          },
          "gtin" : {
            "type" : "string",
            "pattern" : "(\\d{8}|\\d{12,14})?"
          },
          "hsCode" : {
            "type" : "string",
            "maxLength" : 16,
            "minLength" : 0
          },
          "itemType" : {
            "type" : "string",
            "pattern" : "[GS]"
          },
          "minStock" : {
            "type" : "number",
            "minimum" : 0
          },
          "name" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "nameAr" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "natureCode" : {
            "type" : "string",
            "pattern" : "(DL8\\.48\\.3\\.[123]|DL8\\.48\\.8\\.[123])?"
          },
          "taxCategory" : {
            "type" : "string",
            "pattern" : "S|Z|E|AE|O|N"
          },
          "taxRate" : {
            "type" : "number",
            "minimum" : 0
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "trackLots" : {
            "type" : "boolean"
          },
          "trackStock" : {
            "type" : "boolean"
          },
          "unitCode" : {
            "type" : "string",
            "maxLength" : 8,
            "minLength" : 0
          },
          "unitPrice" : {
            "type" : "number",
            "minimum" : 0
          }
        },
        "required" : [ "itemType", "name", "taxCategory", "taxRate", "unitCode", "unitPrice" ]
      },
      "BillingRecurringDto" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "amount" : {
            "type" : "number"
          },
          "autoEmail" : {
            "type" : "boolean"
          },
          "autoIssue" : {
            "type" : "boolean"
          },
          "currency" : {
            "type" : "string"
          },
          "customerName" : {
            "type" : "string"
          },
          "endDate" : {
            "type" : "string",
            "format" : "date"
          },
          "frequency" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "intervalCount" : {
            "type" : "integer",
            "format" : "int32"
          },
          "lastError" : {
            "type" : "string"
          },
          "lastInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lastRun" : {
            "type" : "string",
            "format" : "date"
          },
          "nextRun" : {
            "type" : "string",
            "format" : "date"
          },
          "templateInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "BillingRecurringForm" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "autoEmail" : {
            "type" : "boolean"
          },
          "autoIssue" : {
            "type" : "boolean"
          },
          "endDate" : {
            "type" : "string",
            "format" : "date"
          },
          "frequency" : {
            "type" : "string",
            "pattern" : "WEEKLY|MONTHLY|QUARTERLY|YEARLY"
          },
          "intervalCount" : {
            "type" : "integer",
            "format" : "int32",
            "maximum" : 12,
            "minimum" : 1
          },
          "nextRun" : {
            "type" : "string",
            "format" : "date"
          },
          "templateInvoiceId" : {
            "type" : "string",
            "format" : "uuid"
          }
        },
        "required" : [ "frequency", "nextRun", "templateInvoiceId" ]
      },
      "BillingReminderDto" : {
        "properties" : {
          "emailId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "sentAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "stage" : {
            "type" : "string"
          }
        }
      },
      "BillingRetentionRequest" : {
        "properties" : {
          "amount" : {
            "type" : "number",
            "minimum" : 0.01
          },
          "description" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          }
        },
        "required" : [ "amount" ]
      },
      "BillingSandboxIssue" : {
        "properties" : {
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "documentStatus" : {
            "type" : "string",
            "enum" : [ "RECEIVED", "VALIDATED", "REJECTED", "ROUTED", "UNDELIVERABLE", "SENT", "SEND_FAILED", "DELIVERED", "RECIPIENT_REJECTED", "NOT_EXCHANGED" ]
          },
          "findings" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "invoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceStatus" : {
            "type" : "string"
          },
          "provisionalNumber" : {
            "type" : "string"
          },
          "sandbox" : {
            "type" : "boolean"
          }
        }
      },
      "BillingSellerDto" : {
        "properties" : {
          "autoEmailInvoice" : {
            "type" : "boolean"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalName" : {
            "type" : "string"
          },
          "peppolReady" : {
            "type" : "boolean"
          },
          "profileComplete" : {
            "type" : "boolean"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tin" : {
            "type" : "string"
          }
        }
      },
      "BillingSubtotalDto" : {
        "properties" : {
          "category" : {
            "type" : "string"
          },
          "rate" : {
            "type" : "number"
          },
          "tax" : {
            "type" : "number"
          },
          "taxable" : {
            "type" : "number"
          }
        }
      },
      "BillingTotals" : {
        "properties" : {
          "breakdown" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BillingSubtotalDto"
            }
          },
          "net" : {
            "type" : "number"
          },
          "payable" : {
            "type" : "number"
          },
          "tax" : {
            "type" : "number"
          }
        }
      },
      "DeliveryNoteDeliveredForm" : {
        "properties" : {
          "deliveredOn" : {
            "type" : "string",
            "format" : "date"
          },
          "receivedBy" : {
            "type" : "string"
          }
        }
      },
      "DeliveryNoteLineDto" : {
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lineNo" : {
            "type" : "integer",
            "format" : "int32"
          },
          "lotId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lotNumber" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "stock" : {
            "type" : "boolean"
          },
          "trackLots" : {
            "type" : "boolean"
          },
          "unitCode" : {
            "type" : "string"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "DeliveryNoteLineForm" : {
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "lotId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "unitCode" : {
            "type" : "string"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "DeliveryNoteNoteDto" : {
        "properties" : {
          "carrier" : {
            "type" : "string"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "customerName" : {
            "type" : "string"
          },
          "customerReference" : {
            "type" : "string"
          },
          "deliveredAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "deliveryAddress" : {
            "type" : "string"
          },
          "deliveryDate" : {
            "type" : "string",
            "format" : "date"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceNumber" : {
            "type" : "string"
          },
          "invoiceStatus" : {
            "type" : "string"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalEntityName" : {
            "type" : "string"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DeliveryNoteLineDto"
            }
          },
          "moveStock" : {
            "type" : "boolean"
          },
          "note" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "quoteId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quoteNumber" : {
            "type" : "string"
          },
          "receivedBy" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          },
          "stockMoved" : {
            "type" : "boolean"
          },
          "stockWillMove" : {
            "type" : "boolean"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "DeliveryNoteNoteForm" : {
        "properties" : {
          "carrier" : {
            "type" : "string"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "customerReference" : {
            "type" : "string"
          },
          "deliveryAddress" : {
            "type" : "string"
          },
          "deliveryDate" : {
            "type" : "string",
            "format" : "date"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DeliveryNoteLineForm"
            }
          },
          "moveStock" : {
            "type" : "boolean"
          },
          "note" : {
            "type" : "string"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "DeliveryNoteNoteListItem" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "customerName" : {
            "type" : "string"
          },
          "deliveryDate" : {
            "type" : "string",
            "format" : "date"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoiceNumber" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          },
          "stockMoved" : {
            "type" : "boolean"
          }
        }
      },
      "DocumentDto" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currency" : {
            "type" : "string"
          },
          "direction" : {
            "type" : "string",
            "enum" : [ "OUTBOUND", "INBOUND" ]
          },
          "ftaReports" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DocumentDtoFtaReport"
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "issues" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DocumentDtoIssue"
            }
          },
          "kind" : {
            "type" : "string",
            "enum" : [ "INVOICE", "CREDIT_NOTE", "SELF_BILLING_INVOICE", "SELF_BILLING_CREDIT_NOTE", "TAX_DATA_DOCUMENT", "OTHER" ]
          },
          "mls" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DocumentDtoMls"
            }
          },
          "number" : {
            "type" : "string"
          },
          "receiver" : {
            "type" : "string"
          },
          "ruleset" : {
            "type" : "string"
          },
          "sandbox" : {
            "type" : "boolean"
          },
          "sender" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "RECEIVED", "VALIDATED", "REJECTED", "ROUTED", "UNDELIVERABLE", "SENT", "SEND_FAILED", "DELIVERED", "RECIPIENT_REJECTED", "NOT_EXCHANGED" ]
          },
          "taxAmount" : {
            "type" : "number"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "totalAmount" : {
            "type" : "number"
          },
          "transmissions" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DocumentDtoAttempt"
            }
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "DocumentDtoAttempt" : {
        "properties" : {
          "attempt" : {
            "type" : "integer",
            "format" : "int32"
          },
          "endpointUrl" : {
            "type" : "string"
          },
          "errorMessage" : {
            "type" : "string"
          },
          "finishedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "outcome" : {
            "type" : "string",
            "enum" : [ "SUCCESS", "TRANSIENT_ERROR", "PERMANENT_ERROR" ]
          },
          "startedAt" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "DocumentDtoFtaReport" : {
        "properties" : {
          "attempts" : {
            "type" : "integer",
            "format" : "int32"
          },
          "reference" : {
            "type" : "string"
          },
          "responseCode" : {
            "type" : "string"
          },
          "responseMessage" : {
            "type" : "string"
          },
          "role" : {
            "type" : "string",
            "enum" : [ "C2", "C3" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUBMITTED", "ACCEPTED", "REJECTED", "FAILED" ]
          },
          "submittedAt" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "DocumentDtoIssue" : {
        "properties" : {
          "location" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "ruleId" : {
            "type" : "string"
          },
          "severity" : {
            "type" : "string",
            "enum" : [ "INFO", "WARNING", "ERROR", "FATAL" ]
          }
        }
      },
      "DocumentDtoMls" : {
        "properties" : {
          "code" : {
            "type" : "string",
            "enum" : [ "AP", "AB", "RE" ]
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "details" : {
            "type" : "string"
          },
          "direction" : {
            "type" : "string",
            "enum" : [ "SENT", "RECEIVED" ]
          }
        }
      },
      "EmailDto" : {
        "properties" : {
          "attachments" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "category" : {
            "type" : "string"
          },
          "cc" : {
            "type" : "string"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "type" : "string"
          },
          "delivery" : {
            "type" : "string"
          },
          "deliveryDetail" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lastError" : {
            "type" : "string"
          },
          "provider" : {
            "type" : "string"
          },
          "recipient" : {
            "type" : "string"
          },
          "referenceId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "referenceType" : {
            "type" : "string"
          },
          "sentAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "status" : {
            "type" : "string"
          },
          "subject" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "InboxItem" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "kind" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "receivedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "receiver" : {
            "type" : "string"
          },
          "sender" : {
            "type" : "string"
          },
          "totalAmount" : {
            "type" : "number"
          }
        }
      },
      "InvoiceImportImportResult" : {
        "properties" : {
          "draftIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            }
          },
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceImportRowError"
            }
          },
          "invoices" : {
            "type" : "integer",
            "format" : "int32"
          },
          "lines" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "InvoiceImportRowError" : {
        "properties" : {
          "message" : {
            "type" : "string"
          },
          "row" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "JsonInvoice" : {
        "properties" : {
          "buyer" : {
            "$ref" : "#/components/schemas/JsonInvoiceParty"
          },
          "buyerReference" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "correctedInvoiceDate" : {
            "type" : "string",
            "format" : "date"
          },
          "correctedInvoiceNumber" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "creditReasonCode" : {
            "type" : "string",
            "pattern" : "DL8\\.61\\.1\\.[A-E]|VD"
          },
          "currency" : {
            "type" : "string",
            "pattern" : "[A-Z]{3}"
          },
          "delivery" : {
            "$ref" : "#/components/schemas/JsonInvoiceDelivery"
          },
          "dueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "iban" : {
            "type" : "string",
            "maxLength" : 34,
            "minLength" : 0
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "kind" : {
            "type" : "string",
            "pattern" : "INVOICE|CREDIT_NOTE"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/JsonInvoiceLine"
            },
            "minItems" : 1
          },
          "note" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "number" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "paymentMeansCode" : {
            "type" : "string",
            "pattern" : "1|10|30|31|42|48|49|54|55|57|58|59|97"
          },
          "sellerTin" : {
            "type" : "string",
            "minLength" : 1,
            "pattern" : "\\d{10}"
          },
          "transactionFlags" : {
            "type" : "string",
            "pattern" : "[01]{8}"
          }
        },
        "required" : [ "buyer", "issueDate", "kind", "lines", "number", "sellerTin" ]
      },
      "JsonInvoiceDelivery" : {
        "properties" : {
          "city" : {
            "type" : "string"
          },
          "countryCode" : {
            "type" : "string",
            "pattern" : "[A-Z]{2}"
          },
          "incoterms" : {
            "type" : "string"
          },
          "street" : {
            "type" : "string"
          },
          "subdivision" : {
            "type" : "string"
          }
        }
      },
      "JsonInvoiceLine" : {
        "properties" : {
          "description" : {
            "type" : "string",
            "maxLength" : 1000,
            "minLength" : 0
          },
          "discount" : {
            "type" : "number",
            "minimum" : 0
          },
          "exemptionCode" : {
            "type" : "string",
            "maxLength" : 32,
            "minLength" : 0
          },
          "exemptionText" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "hsCode" : {
            "type" : "string",
            "maxLength" : 16,
            "minLength" : 0
          },
          "itemType" : {
            "type" : "string",
            "pattern" : "[GS]"
          },
          "name" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "quantity" : {
            "type" : "number",
            "minimum" : 0
          },
          "taxCategory" : {
            "type" : "string",
            "pattern" : "S|Z|E|AE|O"
          },
          "taxRate" : {
            "type" : "number",
            "minimum" : 0
          },
          "unitCode" : {
            "type" : "string",
            "maxLength" : 8,
            "minLength" : 0
          },
          "unitPrice" : {
            "type" : "number",
            "minimum" : 0
          }
        },
        "required" : [ "itemType", "name", "quantity", "taxCategory", "taxRate", "unitCode", "unitPrice" ]
      },
      "JsonInvoiceParty" : {
        "properties" : {
          "city" : {
            "type" : "string",
            "maxLength" : 128,
            "minLength" : 0
          },
          "countryCode" : {
            "type" : "string",
            "pattern" : "[A-Z]{2}"
          },
          "emirate" : {
            "type" : "string",
            "pattern" : "AE-(AZ|AJ|DU|FU|RK|SH|UQ)"
          },
          "endpointId" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "endpointScheme" : {
            "type" : "string",
            "pattern" : "\\d{4}"
          },
          "legalName" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "street" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "tradeLicense" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          },
          "trn" : {
            "type" : "string",
            "pattern" : "1\\d{12}03"
          }
        },
        "required" : [ "endpointId", "legalName" ]
      },
      "MappingConfig" : {
        "properties" : {
          "customerMatch" : {
            "type" : "string"
          },
          "dateFormat" : {
            "type" : "string"
          },
          "decimalComma" : {
            "type" : "boolean"
          },
          "defaults" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "delimiter" : {
            "type" : "string"
          },
          "fields" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/MappingConfigFieldMapping"
            }
          },
          "groupBy" : {
            "type" : "string"
          },
          "invoicePath" : {
            "type" : "string"
          },
          "linePath" : {
            "type" : "string"
          },
          "namespaces" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "vatCategoryMap" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          }
        }
      },
      "MappingConfigFieldMapping" : {
        "properties" : {
          "constant" : {
            "type" : "string"
          },
          "source" : {
            "type" : "string"
          },
          "values" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          }
        }
      },
      "MappingEngineRowError" : {
        "properties" : {
          "invoiceRef" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "row" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "MappingImportResult" : {
        "properties" : {
          "draftIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            }
          },
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MappingEngineRowError"
            }
          },
          "invoices" : {
            "type" : "integer",
            "format" : "int32"
          },
          "lines" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "MappingPreviewDto" : {
        "properties" : {
          "columns" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MappingEngineRowError"
            }
          },
          "headerFields" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "invoices" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MappingPreviewInvoice"
            }
          },
          "lineFields" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "sampleRows" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string"
              }
            }
          }
        }
      },
      "MappingPreviewInvoice" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "customer" : {
            "type" : "string"
          },
          "customerFound" : {
            "type" : "boolean"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "lines" : {
            "type" : "integer",
            "format" : "int32"
          },
          "netTotal" : {
            "type" : "number"
          },
          "ref" : {
            "type" : "string"
          },
          "row" : {
            "type" : "integer",
            "format" : "int32"
          },
          "transactionFlags" : {
            "type" : "string"
          }
        }
      },
      "MappingProfileDto" : {
        "properties" : {
          "config" : {
            "$ref" : "#/components/schemas/MappingConfig"
          },
          "format" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "MappingProfileForm" : {
        "properties" : {
          "config" : {
            "$ref" : "#/components/schemas/MappingConfig"
          },
          "format" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          }
        }
      },
      "Me" : {
        "properties" : {
          "accountantFirm" : {
            "type" : "string"
          },
          "actingAsAccountant" : {
            "type" : "boolean"
          },
          "locale" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "permissions" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "enum" : [ "NONE", "READ", "WRITE" ]
            }
          },
          "roles" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "uniqueItems" : true
          },
          "subject" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tenantName" : {
            "type" : "string"
          },
          "tenantType" : {
            "type" : "string",
            "enum" : [ "PLATFORM", "PARTNER", "CUSTOMER", "ACCOUNTANT" ]
          }
        }
      },
      "PageMetadata" : {
        "properties" : {
          "number" : {
            "type" : "integer",
            "format" : "int64"
          },
          "size" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalElements" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int64"
          }
        },
        "required" : [ "number", "size", "totalElements", "totalPages" ]
      },
      "PagedModelBillingInvoiceListItem" : {
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BillingInvoiceListItem"
            }
          },
          "page" : {
            "$ref" : "#/components/schemas/PageMetadata"
          }
        },
        "required" : [ "content", "page" ]
      },
      "PagedModelDeliveryNoteNoteListItem" : {
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DeliveryNoteNoteListItem"
            }
          },
          "page" : {
            "$ref" : "#/components/schemas/PageMetadata"
          }
        },
        "required" : [ "content", "page" ]
      },
      "PagedModelDocumentDto" : {
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DocumentDto"
            }
          },
          "page" : {
            "$ref" : "#/components/schemas/PageMetadata"
          }
        },
        "required" : [ "content", "page" ]
      },
      "PagedModelInboxItem" : {
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InboxItem"
            }
          },
          "page" : {
            "$ref" : "#/components/schemas/PageMetadata"
          }
        },
        "required" : [ "content", "page" ]
      },
      "PagedModelPurchaseOrderOrderListItem" : {
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderOrderListItem"
            }
          },
          "page" : {
            "$ref" : "#/components/schemas/PageMetadata"
          }
        },
        "required" : [ "content", "page" ]
      },
      "PayLinkCreateRequest" : {
        "properties" : {
          "amount" : {
            "type" : "number",
            "minimum" : 0.01
          }
        }
      },
      "PayLinkDto" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "type" : "string"
          },
          "currency" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "orders" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PayLinkOrderDto"
            }
          },
          "status" : {
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "PayLinkOrderDto" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currency" : {
            "type" : "string"
          },
          "gateway" : {
            "type" : "string"
          },
          "gatewayState" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "message" : {
            "type" : "string"
          },
          "orderRef" : {
            "type" : "string"
          },
          "paidAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "paymentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "status" : {
            "type" : "string"
          }
        }
      },
      "PeppolDirectoryCheckDto" : {
        "properties" : {
          "action" : {
            "type" : "string"
          },
          "checkedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "customerName" : {
            "type" : "string"
          },
          "docTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "message" : {
            "type" : "string"
          },
          "participant" : {
            "type" : "string"
          },
          "peppolEnabled" : {
            "type" : "boolean"
          },
          "status" : {
            "type" : "string"
          }
        }
      },
      "PeppolDirectoryInvitationDto" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "email" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invitedBy" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          }
        }
      },
      "PeppolDirectoryInviteForm" : {
        "properties" : {
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "message" : {
            "type" : "string"
          },
          "recipients" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PeppolDirectoryRecipient"
            }
          }
        }
      },
      "PeppolDirectoryInviteResult" : {
        "properties" : {
          "sent" : {
            "type" : "integer",
            "format" : "int32"
          },
          "skipped" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "PeppolDirectoryParticipantDto" : {
        "properties" : {
          "countryCode" : {
            "type" : "string"
          },
          "docTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "identifier" : {
            "type" : "string"
          },
          "inDirectory" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "names" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "pintAe" : {
            "type" : "boolean"
          },
          "scheme" : {
            "type" : "string"
          },
          "smpStatus" : {
            "type" : "string"
          }
        }
      },
      "PeppolDirectoryRecipient" : {
        "properties" : {
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "email" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          }
        }
      },
      "PeppolDirectorySearchDto" : {
        "properties" : {
          "directoryUrl" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "participants" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PeppolDirectoryParticipantDto"
            }
          },
          "query" : {
            "type" : "string"
          },
          "total" : {
            "type" : "integer",
            "format" : "int64"
          }
        }
      },
      "PeppolDirectoryVerifyForm" : {
        "properties" : {
          "customerIds" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            }
          },
          "disableUnregistered" : {
            "type" : "boolean"
          },
          "enableRegistered" : {
            "type" : "boolean"
          }
        }
      },
      "PeppolDirectoryVerifyReport" : {
        "properties" : {
          "checked" : {
            "type" : "integer",
            "format" : "int32"
          },
          "customers" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PeppolDirectoryCheckDto"
            }
          },
          "disabled" : {
            "type" : "integer",
            "format" : "int32"
          },
          "enabled" : {
            "type" : "integer",
            "format" : "int32"
          },
          "errors" : {
            "type" : "integer",
            "format" : "int32"
          },
          "noEndpoint" : {
            "type" : "integer",
            "format" : "int32"
          },
          "notRegistered" : {
            "type" : "integer",
            "format" : "int32"
          },
          "otherDocTypes" : {
            "type" : "integer",
            "format" : "int32"
          },
          "pintAe" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "PriceListCustomerPriceForm" : {
        "properties" : {
          "minQuantity" : {
            "type" : "number"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "unitPrice" : {
            "type" : "number"
          },
          "validFrom" : {
            "type" : "string",
            "format" : "date"
          },
          "validTo" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "PriceListItemForm" : {
        "properties" : {
          "discountPercent" : {
            "type" : "number"
          },
          "minQuantity" : {
            "type" : "number"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "PriceListListDto" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "currency" : {
            "type" : "string"
          },
          "customers" : {
            "type" : "integer",
            "format" : "int64"
          },
          "discountPercent" : {
            "type" : "number"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PriceListItemForm"
            }
          },
          "name" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "validFrom" : {
            "type" : "string",
            "format" : "date"
          },
          "validTo" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "PriceListListForm" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "discountPercent" : {
            "type" : "number"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PriceListItemForm"
            }
          },
          "name" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "validFrom" : {
            "type" : "string",
            "format" : "date"
          },
          "validTo" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "PriceListResolved" : {
        "properties" : {
          "basePrice" : {
            "type" : "number"
          },
          "priceListName" : {
            "type" : "string"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "source" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderCandidateDto" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "number" : {
            "type" : "string"
          },
          "reason" : {
            "type" : "string"
          },
          "sender" : {
            "type" : "string"
          },
          "total" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderLineDto" : {
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoicedQuantity" : {
            "type" : "number"
          },
          "lineNo" : {
            "type" : "integer",
            "format" : "int32"
          },
          "name" : {
            "type" : "string"
          },
          "net" : {
            "type" : "number"
          },
          "openQuantity" : {
            "type" : "number"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "receivedQuantity" : {
            "type" : "number"
          },
          "stock" : {
            "type" : "boolean"
          },
          "taxCategory" : {
            "type" : "string"
          },
          "taxRate" : {
            "type" : "number"
          },
          "trackLots" : {
            "type" : "boolean"
          },
          "unitCode" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderLineForm" : {
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "productId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "quantity" : {
            "type" : "number"
          },
          "taxCategory" : {
            "type" : "string"
          },
          "taxRate" : {
            "type" : "number"
          },
          "unitCode" : {
            "type" : "string"
          },
          "unitPrice" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderMatchDto" : {
        "properties" : {
          "difference" : {
            "type" : "number"
          },
          "invoicedNet" : {
            "type" : "number"
          },
          "orderedNet" : {
            "type" : "number"
          },
          "receivedNet" : {
            "type" : "number"
          },
          "status" : {
            "type" : "string"
          }
        }
      },
      "PurchaseOrderMatchedInvoiceDto" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoicedNet" : {
            "type" : "number"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "number" : {
            "type" : "string"
          },
          "sender" : {
            "type" : "string"
          },
          "total" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderOrderDto" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currency" : {
            "type" : "string"
          },
          "deliveryAddress" : {
            "type" : "string"
          },
          "expectedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "invoices" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderMatchedInvoiceDto"
            }
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalEntityName" : {
            "type" : "string"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderLineDto"
            }
          },
          "match" : {
            "$ref" : "#/components/schemas/PurchaseOrderMatchDto"
          },
          "note" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "orderDate" : {
            "type" : "string",
            "format" : "date"
          },
          "receipts" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderReceiptDto"
            }
          },
          "sentAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "status" : {
            "type" : "string"
          },
          "supplierEmail" : {
            "type" : "string"
          },
          "supplierId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "supplierName" : {
            "type" : "string"
          },
          "supplierReference" : {
            "type" : "string"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "totalGross" : {
            "type" : "number"
          },
          "totalNet" : {
            "type" : "number"
          },
          "totalTax" : {
            "type" : "number"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "PurchaseOrderOrderForm" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "deliveryAddress" : {
            "type" : "string"
          },
          "expectedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderLineForm"
            }
          },
          "note" : {
            "type" : "string"
          },
          "orderDate" : {
            "type" : "string",
            "format" : "date"
          },
          "supplierId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "supplierReference" : {
            "type" : "string"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "PurchaseOrderOrderListItem" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "currency" : {
            "type" : "string"
          },
          "expectedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "matchStatus" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "orderDate" : {
            "type" : "string",
            "format" : "date"
          },
          "status" : {
            "type" : "string"
          },
          "supplierName" : {
            "type" : "string"
          },
          "totalGross" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderReceiptDto" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PurchaseOrderReceiptLineDto"
            }
          },
          "note" : {
            "type" : "string"
          },
          "receivedOn" : {
            "type" : "string",
            "format" : "date"
          },
          "reference" : {
            "type" : "string"
          },
          "warehouseCode" : {
            "type" : "string"
          },
          "warehouseId" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "PurchaseOrderReceiptLineDto" : {
        "properties" : {
          "expiryDate" : {
            "type" : "string",
            "format" : "date"
          },
          "lineId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lotNumber" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "quantity" : {
            "type" : "number"
          }
        }
      },
      "PurchaseOrderSendForm" : {
        "properties" : {
          "email" : {
            "type" : "boolean"
          },
          "message" : {
            "type" : "string"
          },
          "to" : {
            "type" : "string"
          }
        }
      },
      "ReceivablesEmailTo" : {
        "properties" : {
          "message" : {
            "type" : "string",
            "maxLength" : 2000,
            "minLength" : 0
          },
          "to" : {
            "type" : "string",
            "format" : "email",
            "maxLength" : 320,
            "minLength" : 0
          }
        }
      },
      "ReportDebtor" : {
        "properties" : {
          "customerId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "customerName" : {
            "type" : "string"
          },
          "openInvoices" : {
            "type" : "integer",
            "format" : "int32"
          },
          "outstanding" : {
            "type" : "number"
          },
          "overdue" : {
            "type" : "number"
          }
        }
      },
      "ReportMonthRow" : {
        "properties" : {
          "month" : {
            "type" : "string"
          },
          "purchaseCount" : {
            "type" : "integer",
            "format" : "int32"
          },
          "purchaseNet" : {
            "type" : "number"
          },
          "purchaseVat" : {
            "type" : "number"
          },
          "salesCount" : {
            "type" : "integer",
            "format" : "int32"
          },
          "salesNet" : {
            "type" : "number"
          },
          "salesVat" : {
            "type" : "number"
          }
        }
      },
      "ReportReceivables" : {
        "properties" : {
          "current" : {
            "type" : "number"
          },
          "d1to30" : {
            "type" : "number"
          },
          "d31to60" : {
            "type" : "number"
          },
          "d61to90" : {
            "type" : "number"
          },
          "debtors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ReportDebtor"
            }
          },
          "openInvoices" : {
            "type" : "integer",
            "format" : "int32"
          },
          "outstanding" : {
            "type" : "number"
          },
          "over90" : {
            "type" : "number"
          },
          "overdue" : {
            "type" : "number"
          }
        }
      },
      "ReportSummary" : {
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "from" : {
            "type" : "string",
            "format" : "date"
          },
          "months" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ReportMonthRow"
            }
          },
          "purchaseNet" : {
            "type" : "number"
          },
          "purchaseVat" : {
            "type" : "number"
          },
          "receivables" : {
            "$ref" : "#/components/schemas/ReportReceivables"
          },
          "salesNet" : {
            "type" : "number"
          },
          "salesVat" : {
            "type" : "number"
          },
          "to" : {
            "type" : "string",
            "format" : "date"
          },
          "truncated" : {
            "type" : "boolean"
          }
        }
      },
      "ReportVatRow" : {
        "properties" : {
          "category" : {
            "type" : "string"
          },
          "documents" : {
            "type" : "integer",
            "format" : "int32"
          },
          "rate" : {
            "type" : "number"
          },
          "side" : {
            "type" : "string"
          },
          "tax" : {
            "type" : "number"
          },
          "taxable" : {
            "type" : "number"
          }
        }
      },
      "ReportVatSummary" : {
        "properties" : {
          "documents" : {
            "type" : "integer",
            "format" : "int32"
          },
          "from" : {
            "type" : "string",
            "format" : "date"
          },
          "inputVat" : {
            "type" : "number"
          },
          "netVat" : {
            "type" : "number"
          },
          "outputVat" : {
            "type" : "number"
          },
          "rows" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ReportVatRow"
            }
          },
          "to" : {
            "type" : "string",
            "format" : "date"
          },
          "truncated" : {
            "type" : "boolean"
          },
          "unreadable" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "ValidationIssue" : {
        "properties" : {
          "layer" : {
            "type" : "string"
          },
          "location" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "ruleId" : {
            "type" : "string"
          },
          "severity" : {
            "type" : "string",
            "enum" : [ "INFO", "WARNING", "ERROR", "FATAL" ]
          }
        }
      },
      "ValidationResultDto" : {
        "properties" : {
          "durationMillis" : {
            "type" : "integer",
            "format" : "int64"
          },
          "issues" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ValidationIssue"
            }
          },
          "kind" : {
            "type" : "string",
            "enum" : [ "INVOICE", "CREDIT_NOTE", "SELF_BILLING_INVOICE", "SELF_BILLING_CREDIT_NOTE", "TAX_DATA_DOCUMENT", "OTHER" ]
          },
          "ruleset" : {
            "type" : "string"
          },
          "valid" : {
            "type" : "boolean"
          }
        }
      },
      "Vat201" : {
        "properties" : {
          "boxes" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Vat201CalculatorBox"
            }
          },
          "documents" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dueTax" : {
            "type" : "number"
          },
          "emirate" : {
            "type" : "string"
          },
          "filedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "from" : {
            "type" : "string",
            "format" : "date"
          },
          "frozen" : {
            "type" : "boolean"
          },
          "ftaReference" : {
            "type" : "string"
          },
          "legalEntityId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalName" : {
            "type" : "string"
          },
          "legalNameAr" : {
            "type" : "string"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Vat201CalculatorLine"
            }
          },
          "manual" : {
            "$ref" : "#/components/schemas/Vat201CalculatorManual"
          },
          "notes" : {
            "type" : "string"
          },
          "outOfScope" : {
            "type" : "number"
          },
          "payableTax" : {
            "type" : "number"
          },
          "recoverableTax" : {
            "type" : "number"
          },
          "status" : {
            "type" : "string"
          },
          "to" : {
            "type" : "string",
            "format" : "date"
          },
          "trn" : {
            "type" : "string"
          },
          "truncated" : {
            "type" : "boolean"
          },
          "unreadable" : {
            "type" : "integer",
            "format" : "int32"
          },
          "warnings" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "Vat201CalculatorBox" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "code" : {
            "type" : "string"
          },
          "documents" : {
            "type" : "integer",
            "format" : "int32"
          },
          "einvoAmount" : {
            "type" : "number"
          },
          "einvoVat" : {
            "type" : "number"
          },
          "manualAmount" : {
            "type" : "number"
          },
          "manualVat" : {
            "type" : "number"
          },
          "vat" : {
            "type" : "number"
          }
        }
      },
      "Vat201CalculatorLine" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "box" : {
            "type" : "string"
          },
          "category" : {
            "type" : "string"
          },
          "counterparty" : {
            "type" : "string"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "issueDate" : {
            "type" : "string",
            "format" : "date"
          },
          "kind" : {
            "type" : "string"
          },
          "number" : {
            "type" : "string"
          },
          "rate" : {
            "type" : "number"
          },
          "vat" : {
            "type" : "number"
          }
        }
      },
      "Vat201CalculatorManual" : {
        "properties" : {
          "box10Amount" : {
            "type" : "number"
          },
          "box10Vat" : {
            "type" : "number"
          },
          "box2Amount" : {
            "type" : "number"
          },
          "box2Vat" : {
            "type" : "number"
          },
          "box3Amount" : {
            "type" : "number"
          },
          "box3Vat" : {
            "type" : "number"
          },
          "box6Amount" : {
            "type" : "number"
          },
          "box6Vat" : {
            "type" : "number"
          },
          "box7Amount" : {
            "type" : "number"
          },
          "box7Vat" : {
            "type" : "number"
          },
          "box9Amount" : {
            "type" : "number"
          },
          "box9Vat" : {
            "type" : "number"
          }
        }
      },
      "Vat201Company" : {
        "properties" : {
          "emirate" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "legalName" : {
            "type" : "string"
          },
          "trn" : {
            "type" : "string"
          }
        }
      },
      "Vat201FileForm" : {
        "properties" : {
          "filedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "ftaReference" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 0
          }
        },
        "required" : [ "filedDate", "ftaReference" ]
      },
      "Vat201ManualForm" : {
        "properties" : {
          "box10Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box10Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box2Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box2Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box3Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box3Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box6Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box6Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box7Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box7Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box9Amount" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "box9Vat" : {
            "type" : "number",
            "maximum" : 999999999999999,
            "minimum" : -999999999999999
          },
          "notes" : {
            "type" : "string",
            "maxLength" : 2000,
            "minLength" : 0
          }
        },
        "required" : [ "box10Amount", "box10Vat", "box2Amount", "box2Vat", "box3Amount", "box3Vat", "box6Amount", "box6Vat", "box7Amount", "box7Vat", "box9Amount", "box9Vat" ]
      },
      "Vat201ReturnSummary" : {
        "properties" : {
          "filedDate" : {
            "type" : "string",
            "format" : "date"
          },
          "from" : {
            "type" : "string",
            "format" : "date"
          },
          "ftaReference" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "status" : {
            "type" : "string"
          },
          "to" : {
            "type" : "string",
            "format" : "date"
          }
        }
      },
      "WebhookCreateEndpoint" : {
        "properties" : {
          "description" : {
            "type" : "string",
            "maxLength" : 255,
            "minLength" : 0
          },
          "events" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "minItems" : 1,
            "uniqueItems" : true
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "url" : {
            "type" : "string",
            "maxLength" : 1024,
            "minLength" : 0
          }
        },
        "required" : [ "events", "url" ]
      },
      "WebhookCreatedEndpoint" : {
        "properties" : {
          "endpoint" : {
            "$ref" : "#/components/schemas/WebhookEndpointDto"
          },
          "secret" : {
            "type" : "string"
          }
        }
      },
      "WebhookEndpointDto" : {
        "properties" : {
          "active" : {
            "type" : "boolean"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "description" : {
            "type" : "string"
          },
          "events" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "uniqueItems" : true
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tenantId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "WebhookEventDto" : {
        "properties" : {
          "attempts" : {
            "type" : "integer",
            "format" : "int32"
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "deliveredAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "documentId" : {
            "type" : "string",
            "format" : "uuid"
          },
          "eventType" : {
            "type" : "string"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lastError" : {
            "type" : "string"
          },
          "lastStatusCode" : {
            "type" : "integer",
            "format" : "int32"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "DELIVERED", "FAILED" ]
          }
        }
      },
      "WhatsAppMessageDto" : {
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "type" : "string"
          },
          "deliveredAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "error" : {
            "type" : "string"
          },
          "failedAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "language" : {
            "type" : "string"
          },
          "readAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "sentAt" : {
            "type" : "string",
            "format" : "date-time"
          },
          "status" : {
            "type" : "string"
          },
          "template" : {
            "type" : "string"
          },
          "toNumber" : {
            "type" : "string"
          }
        }
      },
      "WhatsAppSendRequest" : {
        "properties" : {
          "language" : {
            "type" : "string",
            "pattern" : "en|ar"
          }
        }
      }
    },
    "securitySchemes" : {
      "apiKey" : {
        "bearerFormat" : "ek_live_... / ek_test_...",
        "description" : "Company API key created in the portal (Administration > API keys). The X-API-Key header is accepted as well.",
        "scheme" : "bearer",
        "type" : "http"
      },
      "oauth2" : {
        "description" : "OAuth 2.0 client credentials (API clients registered by einvo or a partner)",
        "flows" : {
          "clientCredentials" : {
            "scopes" : { },
            "tokenUrl" : "https://auth.einvo.ae/oauth2/token"
          }
        },
        "type" : "oauth2"
      }
    }
  }
}
