openapi: 3.0.4
info:
  title: Altoviz API
  description: "RESTful APIs for the Altoviz services\n\n## Deprecations\n\n### Product prices\n\nA product now stores its sale price both excluding and including tax, so both are\nreturned, along with the margin figures derived from them: `taxExcludedPrice`,\n`taxIncludedPrice`, `margin`, `markupRate` (margin over cost, FR « taux de marge ») and\n`marginRate` (margin over sale price, FR « taux de marque »).\n\nTwo fields are deprecated as a result:\n\n| Deprecated | Use instead |\n| --- | --- |\n| `unitPrice` | `taxExcludedPrice` |\n| `isUnitPriceTaxIncluded` | `taxIncludedPrice`, to send a tax-included price |\n\n**`unitPrice` is now always the tax-excluded price.** It previously held whichever half\nthe product was priced in, which `isUnitPriceTaxIncluded` told you. For a product priced\ntax-included, `unitPrice` therefore returns a different number than it used to, and\n`isUnitPriceTaxIncluded` is now always `false`. If you read the flag before using the\nprice, your result is unchanged. If you assumed the price was tax-included, read\n`taxIncludedPrice`.\n\nWriting is unaffected. Both fields are still accepted and behave exactly as before:\n`unitPrice` alone is read as tax-excluded, and setting `isUnitPriceTaxIncluded` to `true`\nstill means the price you are sending includes tax. `margin`, `markupRate` and\n`marginRate` are derived by the server and ignored if sent."
  contact:
    name: Altoviz
    email: contact@altoviz.com
  license:
    name: Altoviz license
    url: https://altoviz.com/license
  version: v1
  x-logo:
    url: https://altoviz.com/altoviz-logo-ext-violet-262x72.png
    altText: Altoviz logo
servers:
  - url: https://api.altoviz.com
    description: Altoviz
paths:
  /v1/BankAccounts/Providers:
    get:
      tags:
        - BankAccounts
      summary: List of supported bank account providers
      operationId: GET_BankAccounts_Providers
      parameters:
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankProvider'
  /v1/Classifications:
    get:
      tags:
        - Classifications
      summary: List all classifications
      operationId: GET_Classifications_List
      parameters:
        - name: type
          in: query
          description: Classification Type
          schema:
            $ref: '#/components/schemas/ClassificationType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Classification'
  /v1/Colleagues:
    get:
      tags:
        - Colleagues
      summary: List colleagues
      operationId: GET_Colleagues_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Colleague'
    post:
      tags:
        - Colleagues
      summary: Create a new colleague
      operationId: POST_Colleagues_Post
      requestBody:
        description: Colleague to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Colleague'
          text/json:
            schema:
              $ref: '#/components/schemas/Colleague'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Colleague'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Colleague'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Colleagues/Find:
    get:
      tags:
        - Colleagues
      summary: Find a colleague
      operationId: GET_Colleagues_Find
      parameters:
        - name: email
          in: query
          description: Colleague email
          schema:
            type: string
        - name: internalId
          in: query
          description: Colleague internal ID
          schema:
            type: string
        - name: number
          in: query
          description: Colleague internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Colleague'
  '/v1/Colleagues/GetByInternalId/{internalId}':
    get:
      tags:
        - Colleagues
      summary: Find a single colleague by its internal ID
      operationId: GET_Colleagues_GetByInternalId
      parameters:
        - name: internalId
          in: path
          description: Colleague internal ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Colleague'
  '/v1/Colleagues/{id}':
    get:
      tags:
        - Colleagues
      summary: Get a colleague by ID
      operationId: GET_Colleagues_Get
      parameters:
        - name: id
          in: path
          description: Colleague id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Colleague'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Colleagues
      summary: Update a colleague
      operationId: PUT_Colleagues_Update
      parameters:
        - name: id
          in: path
          description: Colleague ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Colleague'
          text/json:
            schema:
              $ref: '#/components/schemas/Colleague'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Colleague'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Colleague'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Colleagues
      summary: Delete a colleague
      operationId: DELETE_Colleagues_Delete
      parameters:
        - name: id
          in: path
          description: Colleague id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Contacts:
    get:
      tags:
        - Contacts
      summary: List Contacts
      operationId: GET_Contacts_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
    post:
      tags:
        - Contacts
      summary: Create a new Contact
      operationId: POST_Contacts_Post
      requestBody:
        description: Contact to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
          text/json:
            schema:
              $ref: '#/components/schemas/Contact'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Contacts/Find:
    get:
      tags:
        - Contacts
      summary: Find a Contact
      operationId: GET_Contacts_Find
      parameters:
        - name: email
          in: query
          description: Email
          schema:
            type: string
        - name: internalId
          in: query
          description: Internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
  '/v1/Contacts/{id}':
    get:
      tags:
        - Contacts
      summary: Get a Contact by ID
      operationId: GET_Contacts_Get
      parameters:
        - name: id
          in: path
          description: Contact id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Contacts
      summary: Update a Contact
      operationId: PUT_Contacts_Update
      parameters:
        - name: id
          in: path
          description: Contact ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
          text/json:
            schema:
              $ref: '#/components/schemas/Contact'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Contacts
      summary: Delete a Contact
      operationId: DELETE_Contacts_Delete
      parameters:
        - name: id
          in: path
          description: Contact id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
  /v1/CustomerFamilies:
    get:
      tags:
        - CustomerFamilies
      summary: List customer families
      operationId: GET_CustomerFamilies_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFamily'
    post:
      tags:
        - CustomerFamilies
      summary: Create a new customer family
      operationId: POST_CustomerFamilies_Post
      requestBody:
        description: Customer family to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerFamily'
          text/json:
            schema:
              $ref: '#/components/schemas/CustomerFamily'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CustomerFamily'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerFamily'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/CustomerFamilies/Find:
    get:
      tags:
        - CustomerFamilies
      summary: Find a customer family
      operationId: GET_CustomerFamilies_Find
      parameters:
        - name: number
          in: query
          description: Number
          schema:
            type: string
        - name: internalId
          in: query
          description: Internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFamily'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/CustomerFamilies/{id}':
    get:
      tags:
        - CustomerFamilies
      summary: Get a customer family by ID
      operationId: GET_CustomerFamilies_Get
      parameters:
        - name: id
          in: path
          description: Customer family id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerFamily'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - CustomerFamilies
      summary: Delete a customer family
      operationId: DELETE_CustomerFamilies_Delete
      parameters:
        - name: id
          in: path
          description: Customer family id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Customers:
    get:
      tags:
        - Customers
      summary: List customers
      operationId: GET_Customers_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
    post:
      tags:
        - Customers
      summary: Create a new customer
      operationId: POST_Customers_Post
      requestBody:
        description: Customer to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerCreate'
          text/json:
            schema:
              $ref: '#/components/schemas/CustomerCreate'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CustomerCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Customers/Find:
    get:
      tags:
        - Customers
      summary: Find a customer
      operationId: GET_Customers_Find
      parameters:
        - name: email
          in: query
          description: Customer email
          schema:
            type: string
        - name: internalId
          in: query
          description: Customer internal ID
          schema:
            type: string
        - name: number
          in: query
          description: Customer internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
  '/v1/Customers/GetByInternalId/{internalId}':
    get:
      tags:
        - Customers
      summary: Find a single customer by its internal ID
      operationId: GET_Customers_GetByInternalId
      parameters:
        - name: internalId
          in: path
          description: Customer internal ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
  '/v1/Customers/{id}':
    get:
      tags:
        - Customers
      summary: Get a customer by ID
      operationId: GET_Customers_Get
      parameters:
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Customers
      summary: Update a customer
      operationId: PUT_Customers_Update
      parameters:
        - name: id
          in: path
          description: Customer ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          text/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Customer'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Customers
      summary: Delete a customer
      operationId: DELETE_Customers_Delete
      parameters:
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/Customers/{id}/contacts':
    get:
      tags:
        - Customers
      summary: Get customer contacts
      operationId: GET_Customers_GetContacts
      parameters:
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThirdContact'
  /v1/Exports/SalesInvoices:
    get:
      tags:
        - Exports
      summary: Export sales invoices (and optionally credits).
      operationId: GET_Exports_SalesInvoices
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: customerId
          in: query
          description: Filter by customer ID.
          schema:
            type: integer
            format: int32
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/SalesQuotes:
    get:
      tags:
        - Exports
      summary: Export sales quotes.
      operationId: GET_Exports_SalesQuotes
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: customerId
          in: query
          description: Filter by customer ID.
          schema:
            type: integer
            format: int32
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/SalesCredits:
    get:
      tags:
        - Exports
      summary: Export sales credit notes.
      operationId: GET_Exports_SalesCredits
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: customerId
          in: query
          description: Filter by customer ID.
          schema:
            type: integer
            format: int32
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/Products:
    get:
      tags:
        - Exports
      summary: Export the product catalogue.
      operationId: GET_Exports_Products
      parameters:
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/Customers:
    get:
      tags:
        - Exports
      summary: Export customers.
      operationId: GET_Exports_Customers
      parameters:
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/Suppliers:
    get:
      tags:
        - Exports
      summary: Export suppliers.
      operationId: GET_Exports_Suppliers
      parameters:
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/ExpensesBook:
    get:
      tags:
        - Exports
      summary: Export the expenses accounting register.
      operationId: GET_Exports_ExpensesBook
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/ReceiptsBook:
    get:
      tags:
        - Exports
      summary: Export the receipts accounting register.
      operationId: GET_Exports_ReceiptsBook
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  '/v1/Exports/BankTransactions/{id}':
    get:
      tags:
        - Exports
      summary: Export bank transactions for a specific account.
      operationId: GET_Exports_BankTransactions
      parameters:
        - name: id
          in: path
          description: Bank account ID.
          required: true
          schema:
            type: integer
            format: int32
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/ExpenseCharges:
    get:
      tags:
        - Exports
      summary: Export purchase invoices (expense charges).
      operationId: GET_Exports_ExpenseCharges
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: supplierId
          in: query
          description: Filter by supplier ID.
          schema:
            type: integer
            format: int32
        - name: searchTerm
          in: query
          description: Full-text search.
          schema:
            type: string
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/ExpenseReports:
    get:
      tags:
        - Exports
      summary: Export expense reports.
      operationId: GET_Exports_ExpenseReports
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: colleagueId
          in: query
          description: Filter by colleague ID.
          schema:
            type: integer
            format: int32
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/Settlements:
    get:
      tags:
        - Exports
      summary: "Export settlements (customer receipts, supplier payments, colleague repayments).\nPass `types[]=CustomerReceipt&types[]=SupplierPayment` etc. to restrict by type."
      operationId: GET_Exports_Settlements
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /v1/Exports/Commitments:
    get:
      tags:
        - Exports
      summary: "Export commitments / due dates (customer, supplier, colleague).\nPass `types[]=Customer&types[]=Supplier` etc. to restrict by type."
      operationId: GET_Exports_Commitments
      parameters:
        - name: from
          in: query
          description: Start date (inclusive).
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (inclusive).
          schema:
            type: string
            format: date
        - name: sheets
          in: query
          description: Which sheets to include.
          schema:
            $ref: '#/components/schemas/ExportSheets'
        - name: format
          in: query
          description: Output format.
          schema:
            $ref: '#/components/schemas/ExportFileFormat'
      responses:
        '200':
          description: OK
  /Hello:
    get:
      tags:
        - Hello
      summary: Say hello to test api key
      operationId: GET_Hello_Get
      parameters:
        - name: api-version
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Hello'
            application/json:
              schema:
                $ref: '#/components/schemas/Hello'
            text/json:
              schema:
                $ref: '#/components/schemas/Hello'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/HomecareServices/tsa-groups:
    get:
      tags:
        - HomecareServices
      summary: List the TSA groups (regroupements)
      operationId: GET_HomecareServices_TsaGroups
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HomecareServiceTsaGroup'
  /v1/HomecareServices/activities:
    get:
      tags:
        - HomecareServices
      summary: List the SAP activities
      operationId: GET_HomecareServices_Activities
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HomecareServiceActivity'
  /v1/ProductFamilies:
    get:
      tags:
        - ProductFamilies
      summary: List product families
      operationId: GET_ProductFamilies_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProductFamily'
    post:
      tags:
        - ProductFamilies
      summary: Create a new product family
      operationId: POST_ProductFamilies_Post
      requestBody:
        description: Product family to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductFamily'
          text/json:
            schema:
              $ref: '#/components/schemas/ProductFamily'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ProductFamily'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductFamily'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  '/v1/ProductFamilies/{id}':
    get:
      tags:
        - ProductFamilies
      summary: Get a product family by ID
      operationId: GET_ProductFamilies_Get
      parameters:
        - name: id
          in: path
          description: Product family id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductFamily'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - ProductFamilies
      summary: Delete a product family
      operationId: DELETE_ProductFamilies_Delete
      parameters:
        - name: id
          in: path
          description: Product family id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/ProductImages/{productId}':
    post:
      tags:
        - ProductImages
      summary: Add or update the product image
      operationId: POST_ProductImages_Post
      parameters:
        - name: productId
          in: path
          description: Product id
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: file
                  format: binary
            encoding:
              file:
                style: form
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - ProductImages
      summary: Get a product image
      operationId: GET_ProductImages_Get
      parameters:
        - name: productId
          in: path
          description: Product id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/ProductImages/{id}':
    delete:
      tags:
        - ProductImages
      summary: Delete a product image
      operationId: DELETE_ProductImages_Delete
      parameters:
        - name: id
          in: path
          description: Product id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Products:
    get:
      tags:
        - Products
      summary: List products
      operationId: GET_Products_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
        - name: familyId
          in: query
          description: Family ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
    post:
      tags:
        - Products
      summary: Create a new product
      operationId: POST_Products_Post
      requestBody:
        description: Product to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Product'
          text/json:
            schema:
              $ref: '#/components/schemas/Product'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Product'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Products/Find:
    get:
      tags:
        - Products
      summary: Find a product
      operationId: GET_Products_Find
      parameters:
        - name: number
          in: query
          description: Number
          schema:
            type: string
        - name: internalId
          in: query
          description: Internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/Products/{id}':
    get:
      tags:
        - Products
      summary: Get a product by ID
      operationId: GET_Products_Get
      parameters:
        - name: id
          in: path
          description: Product id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Products
      summary: Update a product
      operationId: PUT_Products_Update
      parameters:
        - name: id
          in: path
          description: Product ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Product'
          text/json:
            schema:
              $ref: '#/components/schemas/Product'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Product'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Products
      summary: Delete a product
      operationId: DELETE_Products_Delete
      parameters:
        - name: id
          in: path
          description: Product id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/PurchaseInvoices/file:
    post:
      tags:
        - PurchaseInvoices
      summary: Creates new purchase invoice from file
      operationId: POST_PurchaseInvoices_CreateFromFile
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: file
                  format: binary
            encoding:
              file:
                style: form
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  '/v1/PurchaseInvoices/Download/{id}':
    get:
      tags:
        - PurchaseInvoices
      summary: Download the invoice as a PDF file
      operationId: GET_PurchaseInvoices_Download
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
                format: binary
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Receipts:
    get:
      tags:
        - Receipts
      summary: List receipts
      operationId: GET_Receipts_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Receipt'
    post:
      tags:
        - Receipts
      summary: Create a new receipt
      operationId: POST_Receipts_Post
      requestBody:
        description: Receipt to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Receipt'
          text/json:
            schema:
              $ref: '#/components/schemas/Receipt'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Receipt'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Receipt'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Receipts/Find:
    get:
      tags:
        - Receipts
      summary: Find a receipt by internal ID
      operationId: GET_Receipts_Find
      parameters:
        - name: internalId
          in: query
          description: Customer internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
  '/v1/Receipts/{id}':
    get:
      tags:
        - Receipts
      summary: Get a receipt by ID
      operationId: GET_Receipts_Get
      parameters:
        - name: id
          in: path
          description: Receipt id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Receipt'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Receipts
      summary: Update a receipt
      operationId: PUT_Receipts_Update
      parameters:
        - name: id
          in: path
          description: Receipt ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Receipt'
          text/json:
            schema:
              $ref: '#/components/schemas/Receipt'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Receipt'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Receipt'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Receipts
      summary: Delete a receipt
      operationId: DELETE_Receipts_Delete
      parameters:
        - name: id
          in: path
          description: Receipt id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleCredits:
    get:
      tags:
        - SaleCredits
      summary: List credits
      operationId: GET_SaleCredits_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: From
          in: query
          description: From
          schema:
            type: string
            format: date
        - name: To
          in: query
          description: To
          schema:
            type: string
            format: date
        - name: CustomerId
          in: query
          description: Customer ID
          schema:
            type: integer
            format: int32
        - name: Cancelled
          in: query
          description: "Cancelled credits: Excluded (default, when omitted) hides them, Only returns just cancelled credits,\nAll returns both."
          schema:
            $ref: '#/components/schemas/InclusionFilter'
        - name: Processed
          in: query
          description: "Processed credits — those whose terminal e-invoicing status was taken into account (\"traitées\"):\nExcluded (default, when omitted) hides them, Only returns just processed credits, All returns both."
          schema:
            $ref: '#/components/schemas/InclusionFilter'
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
    post:
      tags:
        - SaleCredits
      summary: Create a new draft credit
      operationId: POST_SaleCredits_Post
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Credit'
          text/json:
            schema:
              $ref: '#/components/schemas/Credit'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Credit'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                $ref: '#/components/schemas/Credit'
  '/v1/SaleCredits/{id}':
    get:
      tags:
        - SaleCredits
      summary: Get an credit by ID
      operationId: GET_SaleCredits_Get
      parameters:
        - name: id
          in: path
          description: Credit ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                $ref: '#/components/schemas/Credit'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - SaleCredits
      summary: Update a draft credit
      operationId: PUT_SaleCredits_Put
      parameters:
        - name: id
          in: path
          description: Credit ID>
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Credit'
          text/json:
            schema:
              $ref: '#/components/schemas/Credit'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Credit'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                $ref: '#/components/schemas/Credit'
    delete:
      tags:
        - SaleCredits
      summary: Delete a draft credit
      operationId: DELETE_SaleCredits_Delete
      parameters:
        - name: id
          in: path
          description: Draft credit ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleCredits/Find:
    get:
      tags:
        - SaleCredits
      summary: Find credits
      operationId: GET_SaleCredits_Find
      parameters:
        - name: internalId
          in: query
          description: Credit internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Credit'
  '/v1/SaleCredits/Finalize/{id}':
    post:
      tags:
        - SaleCredits
      summary: Finalize a draft credit
      operationId: POST_SaleCredits_Finalize
      parameters:
        - name: id
          in: path
          description: Draft credit ID
          required: true
          schema:
            type: integer
            format: int32
        - name: finalizationDate
          in: query
          description: Date the credit is finalized on. Defaults to the credit's own date.
          schema:
            type: string
            format: date
        - name: dateAdjustment
          in: query
          description: "How the credit date is recalculated when it prevents finalization, i.e. when it is earlier than\nthe last finalized credit or too far in the future.\nNone (default): keep the date, finalization fails.\nMinimumDate: use the date of the last finalized credit.\nToday: use today's date.\nWhen finalizationDate is also supplied, it is used first and this only applies if that date cannot\nbe finalized on. Due dates are recalculated from the resulting date."
          schema:
            $ref: '#/components/schemas/FinalizationDateAdjustment'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                $ref: '#/components/schemas/Credit'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleCredits/CheckEInvoicing/{id}':
    post:
      tags:
        - SaleCredits
      summary: Check a draft credit against the e-invoicing conformance rules
      description: "Submits the generated e-invoice (Factur-X / CII) to the e-invoicing platform's validator and returns\nthe findings. The credit is NOT finalized and NOT transmitted — call this before Finalize to find out\nwhether it would pass.\nDraft credits only: a finalized credit returns 409. The check re-renders the e-invoice from current\ndata, which is not the document archived and transmitted at finalization, so the answer would not mean\nwhat it appears to mean.\nRead isValid for the verdict: a credit can be non-conformant while every finding is only a warning,\nbecause the French BR-FR rules are reported as warnings."
      operationId: POST_SaleCredits_CheckEInvoicing
      parameters:
        - name: id
          in: path
          description: Draft credit ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
            application/json:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
            text/json:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
  '/v1/SaleCredits/Download/{id}':
    get:
      tags:
        - SaleCredits
      summary: Download the credit as a PDF file
      operationId: GET_SaleCredits_Download
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleCredits/Send/{id}':
    post:
      tags:
        - SaleCredits
      summary: Send an credit
      operationId: POST_SaleCredits_Send
      parameters:
        - name: id
          in: path
          description: Credit ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: Email addresses
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
          text/json:
            schema:
              type: array
              items:
                type: string
          application/*+json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleCredits/MarkAsRefunded:
    post:
      tags:
        - SaleCredits
      summary: Mark credit as refunded
      operationId: POST_SaleCredits_MarkAsRefunded
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundCredit'
          text/json:
            schema:
              $ref: '#/components/schemas/RefundCredit'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RefundCredit'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Credit'
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
            text/json:
              schema:
                $ref: '#/components/schemas/Credit'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleInvoices:
    get:
      tags:
        - SaleInvoices
      summary: List invoices
      operationId: GET_SaleInvoices_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: From
          in: query
          description: From
          schema:
            type: string
            format: date
        - name: To
          in: query
          description: To
          schema:
            type: string
            format: date
        - name: CustomerId
          in: query
          description: Customer ID
          schema:
            type: integer
            format: int32
        - name: Status
          in: query
          description: Status
          schema:
            $ref: '#/components/schemas/InvoiceStatusFilter'
        - name: Cancelled
          in: query
          description: "Cancelled invoices: Excluded (default, when omitted) hides them, Only returns just cancelled invoices,\nAll returns both."
          schema:
            $ref: '#/components/schemas/InclusionFilter'
        - name: Processed
          in: query
          description: "Processed invoices — those whose terminal e-invoicing status was taken into account (\"traitées\"):\nExcluded (default, when omitted) hides them, Only returns just processed invoices, All returns both."
          schema:
            $ref: '#/components/schemas/InclusionFilter'
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
    post:
      tags:
        - SaleInvoices
      summary: Create a new draft invoice
      operationId: POST_SaleInvoices_Post
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
          text/json:
            schema:
              $ref: '#/components/schemas/Invoice'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Invoice'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
  '/v1/SaleInvoices/{id}':
    get:
      tags:
        - SaleInvoices
      summary: Get an invoice by ID
      operationId: GET_SaleInvoices_Get
      parameters:
        - name: id
          in: path
          description: Invoice ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - SaleInvoices
      summary: Update a draft invoice
      operationId: PUT_SaleInvoices_Put
      parameters:
        - name: id
          in: path
          description: Invoice ID>
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
          text/json:
            schema:
              $ref: '#/components/schemas/Invoice'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Invoice'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
    delete:
      tags:
        - SaleInvoices
      summary: Delete a draft invoice
      operationId: DELETE_SaleInvoices_Delete
      parameters:
        - name: id
          in: path
          description: Draft invoice ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleInvoices/Find:
    get:
      tags:
        - SaleInvoices
      summary: Find invoices
      operationId: GET_SaleInvoices_Find
      parameters:
        - name: internalId
          in: query
          description: Invoice internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invoice'
  '/v1/SaleInvoices/Finalize/{id}':
    post:
      tags:
        - SaleInvoices
      summary: Finalize a draft invoice
      operationId: POST_SaleInvoices_Finalize
      parameters:
        - name: id
          in: path
          description: Draft invoice ID
          required: true
          schema:
            type: integer
            format: int32
        - name: finalizationDate
          in: query
          description: Date the invoice is finalized on. Defaults to the invoice's own date.
          schema:
            type: string
            format: date
        - name: dateAdjustment
          in: query
          description: "How the invoice date is recalculated when it prevents finalization, i.e. when it is earlier than\nthe last finalized invoice or too far in the future.\nNone (default): keep the date, finalization fails.\nMinimumDate: use the date of the last finalized invoice.\nToday: use today's date.\nWhen finalizationDate is also supplied, it is used first and this only applies if that date cannot\nbe finalized on. Due dates are recalculated from the resulting date."
          schema:
            $ref: '#/components/schemas/FinalizationDateAdjustment'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleInvoices/CheckEInvoicing/{id}':
    post:
      tags:
        - SaleInvoices
      summary: Check a draft invoice against the e-invoicing conformance rules
      description: "Submits the generated e-invoice (Factur-X / CII) to the e-invoicing platform's validator and returns\nthe findings. The invoice is NOT finalized and NOT transmitted — call this before Finalize to find out\nwhether it would pass.\nDraft invoices only: a finalized invoice returns 409. The check re-renders the e-invoice from current\ndata, which is not the document archived and transmitted at finalization, so the answer would not mean\nwhat it appears to mean.\nRead isValid for the verdict: an invoice can be non-conformant while every finding is only a warning,\nbecause the French BR-FR rules are reported as warnings."
      operationId: POST_SaleInvoices_CheckEInvoicing
      parameters:
        - name: id
          in: path
          description: Draft invoice ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
            application/json:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
            text/json:
              schema:
                $ref: '#/components/schemas/EInvoicingCheckResult'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/SaleInvoices/MarkAsPaid:
    post:
      tags:
        - SaleInvoices
      summary: Mark invoice as paid
      operationId: POST_SaleInvoices_MarkAsPaid
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayInvoice'
          text/json:
            schema:
              $ref: '#/components/schemas/PayInvoice'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PayInvoice'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleInvoices/Download/{id}':
    get:
      tags:
        - SaleInvoices
      summary: Download the invoice as a PDF file
      operationId: GET_SaleInvoices_Download
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleInvoices/Send/{id}':
    post:
      tags:
        - SaleInvoices
      summary: Send an invoice
      operationId: POST_SaleInvoices_Send
      parameters:
        - name: id
          in: path
          description: Invoice ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: Email addresses
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
          text/json:
            schema:
              type: array
              items:
                type: string
          application/*+json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleQuotes:
    get:
      tags:
        - SaleQuotes
      summary: List quotes
      operationId: GET_SaleQuotes_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: From
          in: query
          description: From
          schema:
            type: string
            format: date
        - name: To
          in: query
          description: To
          schema:
            type: string
            format: date
        - name: CustomerId
          in: query
          description: Customer ID
          schema:
            type: integer
            format: int32
        - name: Status.From
          in: query
          description: From
          schema:
            type: string
            format: date
        - name: Status.To
          in: query
          description: To
          schema:
            type: string
            format: date
        - name: Status.CustomerId
          in: query
          description: Customer ID
          schema:
            type: integer
            format: int32
        - name: Status.Status.From
          in: query
          description: From
          schema:
            type: string
            format: date
        - name: Status.Status.To
          in: query
          description: To
          schema:
            type: string
            format: date
        - name: Status.Status.CustomerId
          in: query
          description: Customer ID
          schema:
            type: integer
            format: int32
        - name: Status.Status.Status
          in: query
          description: Status
          schema:
            $ref: '#/components/schemas/SaleQuoteQueryFilter'
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
    post:
      tags:
        - SaleQuotes
      summary: Create a new quote
      operationId: POST_SaleQuotes_Post
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Quote'
          text/json:
            schema:
              $ref: '#/components/schemas/Quote'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Quote'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Quote'
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
            text/json:
              schema:
                $ref: '#/components/schemas/Quote'
  '/v1/SaleQuotes/{id}':
    get:
      tags:
        - SaleQuotes
      summary: Get an quote by ID
      operationId: GET_SaleQuotes_Get
      parameters:
        - name: id
          in: path
          description: Quote ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Quote'
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
            text/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - SaleQuotes
      summary: Delete a quote
      operationId: DELETE_SaleQuotes_Delete
      parameters:
        - name: id
          in: path
          description: Quote ID
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Invoice'
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
            text/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/SaleQuotes/Find:
    get:
      tags:
        - SaleQuotes
      summary: Find quotes
      operationId: GET_SaleQuotes_Find
      parameters:
        - name: internalId
          in: query
          description: Quote internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
  '/v1/SaleQuotes/Download/{id}':
    get:
      tags:
        - SaleQuotes
      summary: Download the quote as a PDF file
      operationId: GET_SaleQuotes_Download
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/SaleQuotes/Send/{id}':
    post:
      tags:
        - SaleQuotes
      summary: Send an quote
      operationId: POST_SaleQuotes_Send
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
          text/json:
            schema:
              type: array
              items:
                type: string
          application/*+json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Settings:
    get:
      tags:
        - Settings
      summary: Get settings
      operationId: GET_Settings_Get
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Settings'
  /v1/Statistics/CashFlowByPeriodicity:
    get:
      tags:
        - Statistics
      summary: 'Settled, outstanding and projected cash flow bucketed over a period'
      operationId: GET_Statistics_CashFlowByPeriodicity
      parameters:
        - name: from
          in: query
          description: 'First day of the period. Combined with to, takes precedence over year.'
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: 'Last day of the period, included'
          schema:
            type: string
            format: date
        - name: year
          in: query
          description: Shorthand for a whole calendar year (defaults to the current one). Ignored when a range is given.
          schema:
            type: integer
            format: int32
        - name: periodicity
          in: query
          description: 'Bucket size: Daily, Weekly, Monthly (default), Quarterly or Annually'
          schema:
            $ref: '#/components/schemas/Periodicity'
        - name: cumulative
          in: query
          description: Return running totals instead of per-bucket values
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CashFlowResult'
            application/json:
              schema:
                $ref: '#/components/schemas/CashFlowResult'
            text/json:
              schema:
                $ref: '#/components/schemas/CashFlowResult'
  /v1/Statistics/TurnoverComparison:
    get:
      tags:
        - Statistics
      summary: "Turnover over a period, compared with the same period one year earlier and with the period\nof equal length immediately before it"
      operationId: GET_Statistics_TurnoverComparison
      parameters:
        - name: from
          in: query
          description: 'First day of the period. Combined with to, takes precedence over year.'
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: 'Last day of the period, included'
          schema:
            type: string
            format: date
        - name: year
          in: query
          description: Shorthand for a whole calendar year (defaults to the current one). Ignored when a range is given.
          schema:
            type: integer
            format: int32
        - name: expenses
          in: query
          description: Purchases instead of sales
          schema:
            type: boolean
            default: false
        - name: paid
          in: query
          description: "Count what was actually settled (encaissements) instead of what was invoiced. Always applied\nfor a micro-business, which is taxed on its encaissements — check company.isMicroBusiness in\nthe settings before choosing."
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TurnoverComparisonResult'
            application/json:
              schema:
                $ref: '#/components/schemas/TurnoverComparisonResult'
            text/json:
              schema:
                $ref: '#/components/schemas/TurnoverComparisonResult'
  /v1/Statistics/GlobalTurnover:
    get:
      tags:
        - Statistics
      summary: All-time total turnover
      operationId: GET_Statistics_GlobalTurnover
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GlobalTurnoverResult'
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalTurnoverResult'
            text/json:
              schema:
                $ref: '#/components/schemas/GlobalTurnoverResult'
  /v1/Statistics/TurnoverEvolution:
    get:
      tags:
        - Statistics
      summary: 'Turnover over a period, bucketed, optionally compared against the same period in previous years'
      operationId: GET_Statistics_TurnoverEvolution
      parameters:
        - name: from
          in: query
          description: 'First day of the period. Combined with to, takes precedence over year.'
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: 'Last day of the period, included'
          schema:
            type: string
            format: date
        - name: year
          in: query
          description: Shorthand for a whole calendar year (defaults to the current one). Ignored when a range is given.
          schema:
            type: integer
            format: int32
        - name: periodicity
          in: query
          description: 'Bucket size: Daily, Weekly, Monthly (default), Quarterly or Annually'
          schema:
            $ref: '#/components/schemas/Periodicity'
        - name: compare
          in: query
          description: 'Number of previous periods to return alongside, each one calendar year further back (0–2, defaults to 0)'
          schema:
            type: integer
            format: int32
        - name: type
          in: query
          description: Dimension to break down by
          schema:
            $ref: '#/components/schemas/TurnoverEvolutionType'
        - name: cumulative
          in: query
          description: Return running totals instead of per-bucket values
          schema:
            type: boolean
            default: false
        - name: customerId
          in: query
          description: Filter by customer ID
          schema:
            type: integer
            format: int32
        - name: supplierId
          in: query
          description: Filter by supplier ID
          schema:
            type: integer
            format: int32
        - name: colleagueId
          in: query
          description: Filter by colleague ID
          schema:
            type: integer
            format: int32
        - name: productId
          in: query
          description: Filter by product ID
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TurnoverEvolutionResult'
            application/json:
              schema:
                $ref: '#/components/schemas/TurnoverEvolutionResult'
            text/json:
              schema:
                $ref: '#/components/schemas/TurnoverEvolutionResult'
  /v1/Statistics/PaymentDelay:
    get:
      tags:
        - Statistics
      summary: "How long payments actually take over a period: average and median days from the document date\nand from the due date, plus the share paid late"
      description: "Answers \"do my customers pay me on time, and how late are they?\". Read the medians rather than\nthe averages — the mean is dragged by a small tail of very late payers, so it can report a\nmonth's delay where the typical invoice is paid on time."
      operationId: GET_Statistics_PaymentDelay
      parameters:
        - name: from
          in: query
          description: 'First day of the period. Combined with to, takes precedence over year.'
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: 'Last day of the period, included'
          schema:
            type: string
            format: date
        - name: year
          in: query
          description: Shorthand for a whole calendar year (defaults to the current one). Ignored when a range is given.
          schema:
            type: integer
            format: int32
        - name: periodicity
          in: query
          description: 'Bucket size: Daily, Weekly, Monthly (default), Quarterly or Annually'
          schema:
            $ref: '#/components/schemas/Periodicity'
        - name: side
          in: query
          description: Customers (default) or suppliers
          schema:
            $ref: '#/components/schemas/PaymentDelaySide'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PaymentDelayResult'
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentDelayResult'
            text/json:
              schema:
                $ref: '#/components/schemas/PaymentDelayResult'
  /v1/Statistics/UnpaidInvoices:
    get:
      tags:
        - Statistics
      summary: 'Aged balance of money owed by customers, bucketed by how far each échéance is from today'
      description: 'Answers "who owes me money, and how late is it?" as totals per age bucket.'
      operationId: GET_Statistics_UnpaidInvoices
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
  /v1/Statistics/UnpaidExpenses:
    get:
      tags:
        - Statistics
      summary: 'Aged balance of money owed to suppliers, bucketed by how far each échéance is from today'
      description: The payables mirror of M:Altoviz.Api.Controllers.StatisticsController.UnpaidInvoices(Altoviz.Api.Services.InvoicingClientService); subtract one from the other for a net position.
      operationId: GET_Statistics_UnpaidExpenses
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnpaidCommitmentBucket'
  /v1/Statistics/TopOverdueCustomers:
    get:
      tags:
        - Statistics
      summary: 'Customers with overdue échéances, ranked by outstanding amount'
      description: "Answers \"who should I chase first?\". Includes the age of each customer's oldest unpaid\néchéance and when they were last reminded, so \"never chased\" can be told from \"chased and\nstill not paying\"."
      operationId: GET_Statistics_TopOverdueCustomers
      parameters:
        - name: take
          in: query
          description: 'How many customers to return (1–20, defaults to 5)'
          schema:
            type: integer
            format: int32
            default: 5
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OverdueCustomer'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OverdueCustomer'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OverdueCustomer'
  /v1/Statistics/EinvoicingReady:
    get:
      tags:
        - Statistics
      summary: 'E-invoicing readiness: suppliers and customers configured, and those with issues'
      operationId: GET_Statistics_EinvoicingReady
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/EinvoicingReadyResult'
            application/json:
              schema:
                $ref: '#/components/schemas/EinvoicingReadyResult'
            text/json:
              schema:
                $ref: '#/components/schemas/EinvoicingReadyResult'
  /v1/Suppliers:
    get:
      tags:
        - Suppliers
      summary: List suppliers
      operationId: GET_Suppliers_List
      parameters:
        - name: PageIndex
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: OrderBy
          in: query
          schema:
            type: string
        - name: query
          in: query
          description: query (full text search)
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            x-page-prev:
              description: Relative URL of previous page when available
              schema:
                type: string
            x-page-next:
              description: Relative URL of next page when available
              schema:
                type: string
            x-page-count:
              description: Total number of pages
              schema:
                type: integer
                format: int32
            x-record-count:
              description: Total number of matching records
              schema:
                type: integer
                format: int32
            x-page-index:
              description: Current page index
              schema:
                type: integer
                format: int32
            x-page-size:
              description: Current page size
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Supplier'
    post:
      tags:
        - Suppliers
      summary: Create a new supplier
      operationId: POST_Suppliers_Post
      requestBody:
        description: Supplier to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Supplier'
          text/json:
            schema:
              $ref: '#/components/schemas/Supplier'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Supplier'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/Suppliers/Find:
    get:
      tags:
        - Suppliers
      summary: Find a customer by email
      operationId: GET_Suppliers_Find
      parameters:
        - name: email
          in: query
          description: Supplier email
          schema:
            type: string
        - name: internalId
          in: query
          description: Supplier internal ID
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Supplier'
  '/v1/Suppliers/GetByInternalId/{internalId}':
    get:
      tags:
        - Suppliers
      summary: Find a single supplier by its internal ID
      operationId: GET_Suppliers_GetByInternalId
      parameters:
        - name: internalId
          in: path
          description: Supplier internal ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
  '/v1/Suppliers/{id}':
    get:
      tags:
        - Suppliers
      summary: Get a supplier by ID
      operationId: GET_Suppliers_Get
      parameters:
        - name: id
          in: path
          description: Supplier id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Suppliers
      summary: Update a supplier
      operationId: PUT_Suppliers_Update
      parameters:
        - name: id
          in: path
          description: Supplier ID
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Supplier'
          text/json:
            schema:
              $ref: '#/components/schemas/Supplier'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Supplier'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Suppliers
      summary: Delete a supplier
      operationId: DELETE_Suppliers_Delete
      parameters:
        - name: id
          in: path
          description: Supplier id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/v1/Suppliers/{id}/contacts':
    get:
      tags:
        - Suppliers
      summary: Get supplier contacts
      operationId: GET_Suppliers_GetContacts
      parameters:
        - name: id
          in: path
          description: Supplier id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThirdContact'
  /v1/Units:
    get:
      tags:
        - Units
      summary: List all units
      operationId: GET_Units_List
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Unit'
  /v1/Users/me:
    get:
      tags:
        - Users
      summary: User
      operationId: GET_Users_GetMe
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Users/whoami:
    get:
      tags:
        - Users
      summary: User
      operationId: GET_Users_GetMe
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/Vats:
    get:
      tags:
        - Vats
      summary: List all vats
      operationId: GET_Vats_List
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Vat'
  /v1/Webhooks:
    get:
      tags:
        - Webhooks
      summary: List all webhooks
      operationId: GET_Webhooks_List
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
    post:
      tags:
        - Webhooks
      summary: Register a new webhook
      operationId: POST_Webhooks_Post
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
          text/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
          application/*+json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Webhooks
      summary: Unregister a webhook
      operationId: DELETE_Webhooks_Delete
      parameters:
        - name: id
          in: query
          description: Webhook ID
          schema:
            type: integer
            format: int32
        - name: url
          in: query
          description: Webhook URL
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    AccountingSettingsDto:
      type: object
      properties:
        accountNumberLength:
          type: integer
          format: int32
        customerAccountFormat:
          type: string
          nullable: true
        customerCollectiveAccount:
          type: string
          nullable: true
        expensesImportVatReverseAccountNumber:
          type: string
          nullable: true
        expensesJournalCode:
          type: string
          nullable: true
        expensesSubcontractingVatReverseAccountNumber:
          type: string
          nullable: true
        feesAccountingAccountNumber:
          type: string
          nullable: true
        generateCustomerAccount:
          type: boolean
        generateSupplierAccount:
          type: boolean
        miscJournalCode:
          type: string
          nullable: true
        salesDepositAccountingAccountNumber:
          type: string
          nullable: true
        salesJournalCode:
          type: string
          nullable: true
        salesShippingAccountNumber:
          type: string
          nullable: true
        salesVatCollectionAccountingAccountNumber:
          type: string
          nullable: true
        supplierAccountFormat:
          type: string
          nullable: true
        supplierCollectiveAccount:
          type: string
          nullable: true
        uncertainAccountNumberRoot:
          type: string
          nullable: true
      additionalProperties: false
    AddressFields:
      type: object
      properties:
        city:
          type: string
          nullable: true
        countryIso:
          type: string
          nullable: true
        countryName:
          type: string
          nullable: true
          readOnly: true
        formattedAddress:
          type: string
          nullable: true
          readOnly: true
        inlineAddress:
          type: string
          nullable: true
          readOnly: true
        street:
          type: string
          nullable: true
        zipcode:
          type: string
          nullable: true
      additionalProperties: false
    BankProvider:
      type: object
      properties:
        beta:
          type: boolean
          description: Beta
          nullable: true
        branchName:
          type: string
          description: Bank provider branch name
          nullable: true
        countryCodes:
          type: array
          items:
            type: string
          description: Bank provider country codes
          nullable: true
        id:
          type: string
          description: Bank provider Id
          nullable: true
        logoUri:
          type: string
          description: Bank provider logo URI
          nullable: true
        markets:
          type: array
          items:
            type: string
          description: Bank provider markets
          nullable: true
        name:
          type: string
          description: Bank provider name
          nullable: true
      additionalProperties: false
      description: Bank provider
    BillingOptions:
      type: object
      properties:
        allowed:
          type: boolean
          description: Allowed
          nullable: true
        bankAccountId:
          type: integer
          description: Bank account ID
          format: int32
          nullable: true
        buyerReference:
          type: string
          description: Buyer reference
          nullable: true
        colleagueId:
          type: integer
          description: Colleague ID
          format: int32
          nullable: true
        discount:
          $ref: '#/components/schemas/Discount'
        initialCommitmentAmount:
          type: number
          description: Intial commitment amount
          format: double
          nullable: true
        initialCommitmentDate:
          type: string
          description: Initial commitment date
          format: date
          nullable: true
        initialCommitmentStatus:
          $ref: '#/components/schemas/CommitmentStatus'
        liableToVat:
          type: boolean
          description: Indicates whether the document is liable to VAT
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        sendDocumentAsAttachment:
          type: boolean
          description: Send document as attachment
          nullable: true
        settlementTermId:
          type: integer
          description: Settlement term ID
          format: int32
          nullable: true
        useTaxIncludedPrices:
          type: boolean
          description: Use tax included prices
          nullable: true
        vatReverseCharge:
          type: boolean
          description: Indicates VAT should be included in sales
          nullable: true
        vendorReference:
          type: string
          description: Vendor reference. Used to be print on sales
          nullable: true
      additionalProperties: false
      description: Billing options
    CashFlowResult:
      type: object
      properties:
        expenses:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Amounts actually paid out
          nullable: true
        periodicity:
          $ref: '#/components/schemas/Periodicity'
        profits:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Receipts minus expenses
          nullable: true
        projectedExpenses:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Paid plus still outstanding
          nullable: true
        projectedProfits:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Projected receipts minus projected expenses
          nullable: true
        projectedReceipts:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Received plus still outstanding
          nullable: true
        range:
          $ref: '#/components/schemas/DateRangeModel'
        receipts:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Amounts actually received
          nullable: true
        unpaidExpenses:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Payables still outstanding
          nullable: true
        unpaidProfits:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Outstanding receivables minus outstanding payables
          nullable: true
        unpaidReceipts:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: Receivables still outstanding
          nullable: true
      additionalProperties: false
      description: "Cash flow bucketed over a period: what was settled, what is still outstanding, and the two\nadded together. Every list shares the same buckets, so index N is the same period throughout."
    Classification:
      type: object
      properties:
        accountNumber:
          type: string
          description: Account number
          nullable: true
          readOnly: true
        defaultVat:
          $ref: '#/components/schemas/Vat'
        description:
          type: string
          description: Description
          nullable: true
          readOnly: true
        id:
          type: integer
          description: Classification ID
          format: int32
        isProduct:
          type: boolean
          description: Indicates whether classification is product (should be defined when type is 'Sale')
          readOnly: true
        isService:
          type: boolean
          description: Indicates whether classification is service (should be defined when type is 'Sale')
          readOnly: true
        label:
          type: string
          description: Label
          nullable: true
          readOnly: true
        microBusinessDeclarationType:
          $ref: '#/components/schemas/MicroBusinessDeclarationTypes'
        type:
          $ref: '#/components/schemas/ClassificationType'
      additionalProperties: false
      description: Classification
    ClassificationDto:
      type: object
      properties:
        accountNumber:
          type: string
          nullable: true
        defaultVat:
          $ref: '#/components/schemas/VatDto'
        defaultVatId:
          type: integer
          format: int32
          nullable: true
        description:
          type: string
          nullable: true
        id:
          type: integer
          format: int32
          nullable: true
        isProduct:
          type: boolean
        isService:
          type: boolean
        label:
          type: string
          nullable: true
        metadatas:
          type: object
          additionalProperties:
            type: string
            nullable: true
          nullable: true
        microBusinessDeclarationType:
          $ref: '#/components/schemas/MicroBusinessDeclarationTypes'
        type:
          $ref: '#/components/schemas/ClassificationType'
      additionalProperties: false
    ClassificationType:
      enum:
        - Sale
        - Expense
        - Other
      type: string
    Colleague:
      type: object
      properties:
        cellPhone:
          type: string
          description: Cell phone number
          nullable: true
        email:
          type: string
          description: Email
          nullable: true
        firstName:
          type: string
          description: First name
          nullable: true
        homecareServiceNumber:
          type: string
          description: Homecare service number associated with the colleague
          nullable: true
        id:
          type: integer
          description: Colleague Id
          format: int32
        initialPartnerBalance:
          type: number
          description: Initial balance for the partner
          format: double
        internalId:
          type: string
          description: Internal identifier for the colleague
          nullable: true
        isPartner:
          type: boolean
          description: Indicates if the colleague is a partner
        lastName:
          type: string
          description: Last name
          nullable: true
        metadatas:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata associated with the colleague
          nullable: true
        name:
          type: string
          description: Colleague Name
          nullable: true
        number:
          type: string
          description: Colleague Number
          nullable: true
        phone:
          type: string
          description: Phone number
          nullable: true
        title:
          type: string
          description: Title
          nullable: true
        userId:
          type: string
          description: User identifier associated with the colleague
          nullable: true
      additionalProperties: false
      description: Colleague
    Commitment:
      type: object
      properties:
        amount:
          type: number
          description: Gets the total amount of the commitment.
          format: double
          readOnly: true
        date:
          type: string
          description: Gets the date of the commitment.
          format: date
          readOnly: true
        dueAmount:
          type: number
          description: Gets the amount that is due for the commitment.
          format: double
          readOnly: true
        id:
          type: integer
          description: Gets the unique identifier for the commitment.
          format: int32
          readOnly: true
        thirdId:
          type: number
          description: Gets the identifier of the third party associated with the commitment.
          format: double
          readOnly: true
      additionalProperties: false
      description: 'Represents a financial commitment with associated details such as date, amount, due amount, and third party identifier.'
    CommitmentStatus:
      enum:
        - Unpaid
        - Paid
        - PartiallyPaid
        - Balanced
      type: string
    CompanyInfo:
      type: object
      properties:
        effectiveElectronicAddress:
          type: string
          nullable: true
        electronicAddress:
          type: string
          nullable: true
        siret:
          type: string
          nullable: true
        vatNumber:
          type: string
          nullable: true
      additionalProperties: false
    CompanyInfoLinkProvider:
      enum:
        - Pappers
        - Infogreffe
        - Manageo
        - Verif
      type: string
    CompanySettingsDto:
      type: object
      properties:
        ape:
          type: string
          nullable: true
        businessName:
          type: string
          nullable: true
        capital:
          type: number
          format: double
          nullable: true
        cgaMember:
          type: boolean
        contact:
          $ref: '#/components/schemas/ContactFields'
        electronicAddress:
          type: string
          nullable: true
        emailLogoUri:
          type: string
          nullable: true
        guarantees:
          type: string
          nullable: true
        headOfficeAddress:
          $ref: '#/components/schemas/AddressFields'
        invoicingAddress:
          $ref: '#/components/schemas/AddressFields'
        isMicroBusiness:
          type: boolean
        legalMentions:
          type: string
          nullable: true
        legalStatus:
          type: string
          nullable: true
        logoUri:
          type: string
          nullable: true
        mediator:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        registrationNumber:
          type: string
          nullable: true
        reportLogoUri:
          type: string
          nullable: true
        siret:
          type: string
          nullable: true
        summary:
          type: string
          nullable: true
        summaryHtml:
          type: string
          nullable: true
        urlCompanyName:
          type: string
          nullable: true
        useInvoicingAddressAsHeadOfficeAddress:
          type: boolean
        vatNumber:
          type: string
          nullable: true
        website:
          type: string
          nullable: true
      additionalProperties: false
    ConditionType:
      enum:
        - Net
        - EndMonth
      type: string
    Contact:
      type: object
      properties:
        cellPhone:
          type: string
          nullable: true
        companyName:
          type: string
          nullable: true
        displayName:
          type: string
          nullable: true
          readOnly: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        function:
          type: string
          nullable: true
        id:
          type: integer
          description: Contact ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        invertedDisplayName:
          type: string
          nullable: true
          readOnly: true
        lastName:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        service:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
      additionalProperties: false
      description: Contact
    ContactFields:
      type: object
      properties:
        cellPhone:
          type: string
          nullable: true
        companyName:
          type: string
          nullable: true
        displayName:
          type: string
          nullable: true
          readOnly: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        function:
          type: string
          nullable: true
        invertedDisplayName:
          type: string
          nullable: true
          readOnly: true
        lastName:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        service:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
      additionalProperties: false
    ContactNameDisplay:
      enum:
        - LastNameFirstName
        - FirstNameLastName
      type: string
    Credit:
      type: object
      properties:
        balance:
          type: number
          description: Balance
          format: double
          readOnly: true
        billingAddress:
          $ref: '#/components/schemas/AddressFields'
        billingContact:
          $ref: '#/components/schemas/ContactFields'
        cancellationInvoiceId:
          type: integer
          description: ID of the invoice that cancelled this credit
          format: int32
          nullable: true
          readOnly: true
        cancellationInvoiceNumber:
          type: string
          description: Number of the invoice that cancelled this credit
          nullable: true
          readOnly: true
        cancelledInvoicetId:
          type: integer
          description: Invoice ID which this credit cancelled
          format: int32
          nullable: true
          readOnly: true
        cancelledInvoicetNumber:
          type: string
          description: Invoice number which this credit cancelled
          nullable: true
          readOnly: true
        commitments:
          type: array
          items:
            $ref: '#/components/schemas/Commitment'
          description: Commitments
          nullable: true
          readOnly: true
        customerElectronicAddress:
          type: string
          description: Customer electronic address
          nullable: true
        customerId:
          type: integer
          description: Customer ID
          format: int32
          nullable: true
        customerName:
          type: string
          description: Customer name
          nullable: true
        customerNumber:
          type: string
          description: Customer number
          nullable: true
        customerOrderReference:
          type: string
          description: Customer order reference
          nullable: true
        customerSiret:
          type: string
          description: Customer SIRET
          nullable: true
        customerType:
          $ref: '#/components/schemas/CustomerType'
        customerVatNumber:
          type: string
          description: Customer VAT number
          nullable: true
        date:
          type: string
          description: Date
          format: date
          nullable: true
        footerNotes:
          type: string
          description: Footer notes to be print
          nullable: true
        globalDiscount:
          $ref: '#/components/schemas/Discount'
        grossTaxExcludedAmount:
          type: number
          description: Gross tax excluded amount
          format: double
          readOnly: true
        headerNotes:
          type: string
          description: Header notes to be print
          nullable: true
        id:
          type: integer
          description: Invoice ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        isCancelled:
          type: boolean
          description: True when this credit has itself been cancelled by an invoice
          readOnly: true
        isDraft:
          type: boolean
          description: Indicates whether invoice is draft. Otherwise invoice cannot be modified
          readOnly: true
        isPaid:
          type: boolean
          description: Indicates whether invoice is paid
          readOnly: true
        liableToVat:
          type: boolean
          description: Indicates whether the document is liable to VAT
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/SaleDocumentLine'
          description: Invoice lines
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
        overdue:
          type: number
          description: Overdue
          format: double
          readOnly: true
        pdfUrl:
          type: string
          description: Pdf url
          nullable: true
          readOnly: true
        publicLink:
          type: string
          description: Public link
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
        replacedBy:
          type: integer
          description: ID of the corrected credit that replaces this one
          format: int32
          nullable: true
          readOnly: true
        sentAt:
          type: string
          description: Sent at
          format: date-time
          nullable: true
          readOnly: true
        shippingAddress:
          $ref: '#/components/schemas/AddressFields'
        shippingAmount:
          type: number
          description: Shipping amount
          format: double
        shippingContact:
          $ref: '#/components/schemas/ContactFields'
        shippingVat:
          $ref: '#/components/schemas/Vat'
        subject:
          type: string
          description: Subject
          nullable: true
        taxAmount:
          type: number
          description: Total tax amount
          format: double
          readOnly: true
        taxExcludedAmount:
          type: number
          description: Tax excluded amount (discount included)
          format: double
          readOnly: true
        taxIncludedAmount:
          type: number
          description: Tax included amount
          format: double
          readOnly: true
        useTaxIncludedPrices:
          type: boolean
          description: Indicates whether invoice prices and amount are tax included
        vatMode:
          $ref: '#/components/schemas/VatMode'
        vatNote:
          type: string
          description: VAT note to print
          nullable: true
        vatReverseCharge:
          type: boolean
          description: VAT reverse charge
        vats:
          type: array
          items:
            $ref: '#/components/schemas/VatSummary'
          description: Vats
          nullable: true
          readOnly: true
        vendorReference:
          type: string
          description: Vendor reference to be print
          nullable: true
      additionalProperties: false
      description: Credit
    CreditSettingsDto:
      type: object
      properties:
        validityDuration:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    Customer:
      type: object
      properties:
        active:
          type: boolean
          description: Active
        billingAddress:
          $ref: '#/components/schemas/AddressFields'
        billingOptions:
          $ref: '#/components/schemas/BillingOptions'
        cellPhone:
          type: string
          description: Cell phone number
          nullable: true
        companyInformations:
          $ref: '#/components/schemas/CompanyInfo'
        companyName:
          type: string
          description: Company name
          nullable: true
        email:
          type: string
          description: Email
          nullable: true
        family:
          $ref: '#/components/schemas/CustomerFamily'
        firstName:
          type: string
          description: First name
          nullable: true
        id:
          type: integer
          description: Customer ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in information system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        lastName:
          type: string
          description: Last name
          nullable: true
        name:
          type: string
          description: Name
          nullable: true
          readOnly: true
        number:
          type: string
          description: Number
          nullable: true
        phone:
          type: string
          description: Phone number
          nullable: true
        shippingAddress:
          $ref: '#/components/schemas/AddressFields'
        title:
          type: string
          description: Title
          nullable: true
        type:
          $ref: '#/components/schemas/CustomerType'
      additionalProperties: false
      description: Customer
    CustomerCreate:
      type: object
      properties:
        active:
          type: boolean
          description: Active
        billingAddress:
          $ref: '#/components/schemas/AddressFields'
        billingOptions:
          $ref: '#/components/schemas/BillingOptions'
        cellPhone:
          type: string
          description: Cell phone number
          nullable: true
        companyInformations:
          $ref: '#/components/schemas/CompanyInfo'
        companyName:
          type: string
          description: Company name
          nullable: true
        email:
          type: string
          description: Email
          nullable: true
        family:
          $ref: '#/components/schemas/CustomerFamily'
        firstName:
          type: string
          description: First name
          nullable: true
        internalId:
          type: string
          description: ID used in information system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        lastName:
          type: string
          description: Last name
          nullable: true
        name:
          type: string
          description: Name
          nullable: true
          readOnly: true
        number:
          type: string
          description: Number
          nullable: true
        phone:
          type: string
          description: Phone number
          nullable: true
        shippingAddress:
          $ref: '#/components/schemas/AddressFields'
        title:
          type: string
          description: Title
          nullable: true
        type:
          $ref: '#/components/schemas/CustomerType'
      additionalProperties: false
      description: Customer
    CustomerFamily:
      type: object
      properties:
        id:
          type: integer
          description: ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: Internal ID
          nullable: true
        label:
          type: string
          description: Label
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
      additionalProperties: false
      description: Customer family
    CustomerType:
      enum:
        - Business
        - Consumer
        - Government
      type: string
    DateRangeModel:
      type: object
      properties:
        from:
          type: string
          description: First day of the period
          format: date
        to:
          type: string
          description: 'Last day of the period, included'
          format: date
      additionalProperties: false
      description: An inclusive date range
    DelayType:
      enum:
        - Days
        - Months
      type: string
    Discount:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DiscountType'
        value:
          type: number
          format: double
      additionalProperties: false
    DiscountType:
      enum:
        - Percent
        - Fixed
      type: string
    EInvoicingCheckResult:
      type: object
      properties:
        findings:
          type: array
          items:
            $ref: '#/components/schemas/EInvoicingFinding'
          description: Structured findings. Empty when the document is conformant.
          nullable: true
          readOnly: true
        isValid:
          type: boolean
          description: "Whether the document is conformant. This is the verdict: a result can be invalid while every finding\nis only a warning, because the French BR-FR rules are reported as warnings."
          readOnly: true
        messages:
          type: array
          items:
            type: string
          description: 'The same findings rendered as flat one-line messages, for simple display'
          nullable: true
          readOnly: true
      additionalProperties: false
      description: "Result of an e-invoicing conformance check. The document is neither finalized nor transmitted: the\ne-invoice is rendered and submitted to the platform's validator only."
    EInvoicingFinding:
      type: object
      properties:
        location:
          type: string
          description: 'Location in the generated e-invoice XML, when the platform reported one'
          nullable: true
          readOnly: true
        severity:
          $ref: '#/components/schemas/EInvoicingFindingSeverity'
        source:
          $ref: '#/components/schemas/EInvoicingFindingSource'
        text:
          type: string
          description: 'Human-readable description of the problem, in French'
          nullable: true
          readOnly: true
        validator:
          type: string
          description: 'Name of the platform validator that produced the finding, when applicable'
          nullable: true
          readOnly: true
      additionalProperties: false
      description: A single e-invoicing conformance finding
    EInvoicingFindingSeverity:
      enum:
        - Error
        - Warning
      type: string
      description: How severe an e-invoicing conformance finding is
    EInvoicingFindingSource:
      enum:
        - Application
        - Directory
        - Platform
      type: string
      description: 'Which check produced a finding, i.e. where it can be fixed'
    EInvoicingProfile:
      enum:
        - Standard
        - Advanced
      type: string
    EInvoicingSettingsDto:
      type: object
      properties:
        autoAcknowledgeReceivedInvoices:
          type: boolean
        autoCreateReceiptFromIncomingPayment:
          type: boolean
        autoEmitPaymentReceived:
          type: boolean
        autoEmitPaymentSent:
          type: boolean
        autoProcessTerminalStatuses:
          type: boolean
        autoSendEReporting:
          type: boolean
        autoSubmitInvoicesOnFinalize:
          type: boolean
        includeTextLinesInXml:
          type: boolean
        profile:
          $ref: '#/components/schemas/EInvoicingProfile'
        validateAddressesBeforeSubmit:
          type: boolean
        validateBeforeSubmit:
          type: boolean
      additionalProperties: false
    EInvoicingStatusCode:
      enum:
        - api:uploaded
        - api:invalid
        - api:validated
        - api:sent
        - api:rejected
        - api:received
        - api:acknowledged
        - api:accepted
        - fr:200
        - fr:201
        - fr:202
        - fr:203
        - fr:204
        - fr:205
        - fr:206
        - fr:207
        - fr:208
        - fr:209
        - fr:210
        - fr:211
        - fr:212
        - fr:213
        - fr:501
        - fr:214
        - fr:220
        - fr:221
        - fr:224
        - fr:225
        - fr:226
        - fr:227
        - fr:228
        - aoz:autherror
        - aoz:error
        - aoz:invalid
        - aoz:processed
        - ppf:validated
        - ppf:validated-ack
        - ppf:validated-ack-error
        - ppf:validated-rejected
        - ppf:refused
        - ppf:refused-ack
        - ppf:refused-ack-error
        - ppf:refused-rejected
        - ppf:payment-received
        - ppf:payment-received-ack
        - ppf:payment-received-ack-error
        - ppf:payment-received-rejected
        - ppf:rejected
        - ppf:rejected-ack
        - ppf:rejected-ack-error
        - ppf:rejected-rejected
        - ppf:flow-1
        - ppf:flow-1-ack
        - ppf:flow-1-ack-error
        - ppf:flow-1-response-ok
        - ppf:flow-1-rejected
      type: string
    EinvoicingReadyResult:
      type: object
      properties:
        customerIssuesCount:
          type: integer
          description: Number of customers with e-invoicing configuration issues
          format: int32
        customersCount:
          type: integer
          description: Number of customers configured for e-invoicing
          format: int32
        supplierIssuesCount:
          type: integer
          description: Number of suppliers with e-invoicing configuration issues
          format: int32
        suppliersCount:
          type: integer
          description: Number of suppliers configured for e-invoicing
          format: int32
      additionalProperties: false
      description: E-invoicing readiness summary across suppliers and customers
    EmailAttachmentDto:
      type: object
      properties:
        fileId:
          type: integer
          format: int32
        fileName:
          type: string
          nullable: true
        fileSize:
          type: number
          format: double
      additionalProperties: false
    EmailCreditSettingsDto:
      type: object
      properties:
        defaultAttachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachmentDto'
          nullable: true
        defaultBccEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultCcEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultContentTemplate:
          type: string
          nullable: true
        defaultObjectTemplate:
          type: string
          nullable: true
        includeDocumentAttachment:
          type: boolean
        showAmount:
          type: boolean
      additionalProperties: false
    EmailHomecareServiceSettingsDto:
      type: object
      properties:
        defaultAttachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachmentDto'
          nullable: true
        defaultBccEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultCcEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultContentTemplate:
          type: string
          nullable: true
        defaultObjectTemplate:
          type: string
          nullable: true
      additionalProperties: false
    EmailInvoiceSettingsDto:
      type: object
      properties:
        defaultAttachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachmentDto'
          nullable: true
        defaultBccEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultCcEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultContentTemplate:
          type: string
          nullable: true
        defaultObjectTemplate:
          type: string
          nullable: true
        includeDocumentAttachment:
          type: boolean
        showAmount:
          type: boolean
      additionalProperties: false
    EmailQuoteSettingsDto:
      type: object
      properties:
        defaultAttachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachmentDto'
          nullable: true
        defaultBccEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultCcEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultContentTemplate:
          type: string
          nullable: true
        defaultObjectTemplate:
          type: string
          nullable: true
        includeDocumentAttachment:
          type: boolean
        showAmount:
          type: boolean
      additionalProperties: false
    EmailReminderSettingsDto:
      type: object
      properties:
        defaultAttachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachmentDto'
          nullable: true
        defaultBccEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultCcEmails:
          type: array
          items:
            type: string
          nullable: true
        defaultContentTemplate:
          type: string
          nullable: true
        defaultObjectTemplate:
          type: string
          nullable: true
        includeDocumentAttachment:
          type: boolean
      additionalProperties: false
    EmailStyleSettingsDto:
      type: object
      properties:
        backgroundColor:
          type: string
          nullable: true
        buttonColor:
          type: string
          nullable: true
        buttonTextColor:
          type: string
          nullable: true
        headerBackgroundColor:
          type: string
          nullable: true
        headerForeColor:
          type: string
          nullable: true
        outerColor:
          type: string
          nullable: true
        textColor:
          type: string
          nullable: true
      additionalProperties: false
    EmailingSettingsDto:
      type: object
      properties:
        credits:
          $ref: '#/components/schemas/EmailCreditSettingsDto'
        homecareServices:
          $ref: '#/components/schemas/EmailHomecareServiceSettingsDto'
        invoices:
          $ref: '#/components/schemas/EmailInvoiceSettingsDto'
        quotes:
          $ref: '#/components/schemas/EmailQuoteSettingsDto'
        reminders:
          $ref: '#/components/schemas/EmailReminderSettingsDto'
        style:
          $ref: '#/components/schemas/EmailStyleSettingsDto'
      additionalProperties: false
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: List of error messages
          nullable: true
        message:
          type: string
          description: Error message
          nullable: true
      additionalProperties: false
      description: Error
    ExpenseStatus:
      enum:
        - Done
        - Pending
        - Paid
      type: string
    ExportFileFormat:
      enum:
        - Excel
        - EuropeanCsv
        - AmericanCsv
        - Tsv
        - Json
        - Markdown
      type: string
      description: Output file format.
    ExportSheets:
      enum:
        - Summary
        - Detail
        - Analysis
        - All
      type: string
      description: Sheets to include in the export.
    FinalizationDateAdjustment:
      enum:
        - None
        - MinimumDate
        - Today
      type: string
    GeneralSettingsDto:
      type: object
      properties:
        autoCollapseMenu:
          type: boolean
        companyInfoLinkProvider:
          $ref: '#/components/schemas/CompanyInfoLinkProvider'
        contactDisplayFormat:
          $ref: '#/components/schemas/ContactNameDisplay'
        ipLinkProvider:
          $ref: '#/components/schemas/IPLinkProvider'
        mapLinkProvider:
          $ref: '#/components/schemas/MapLinkProvider'
        timezone:
          type: string
          nullable: true
      additionalProperties: false
    GlobalTurnoverResult:
      type: object
      properties:
        total:
          type: number
          description: Total turnover (tax excluded)
          format: double
      additionalProperties: false
      description: All-time total turnover
    Hello:
      type: object
      properties:
        apiKeyName:
          type: string
          description: API key name
          nullable: true
        companyName:
          type: string
          description: Company name
          nullable: true
        message:
          type: string
          description: Message
          nullable: true
        serverTimestamp:
          type: string
          description: Server timestamp
          format: date-time
        url:
          type: string
          description: Name
          nullable: true
      additionalProperties: false
      description: Hello
    HomecareServiceActivity:
      type: object
      properties:
        id:
          type: integer
          description: Activity id (immutable)
          format: int32
          readOnly: true
        name:
          type: string
          description: Activity name
          nullable: true
          readOnly: true
        tsaGroup:
          type: integer
          description: Id of the TSA group this activity belongs to
          format: int32
          readOnly: true
      additionalProperties: false
      description: Home-care "services à la personne" SAP activity
    HomecareServiceTsaGroup:
      type: object
      properties:
        id:
          type: integer
          description: TSA group id
          format: int32
          readOnly: true
        name:
          type: string
          description: TSA group name
          nullable: true
          readOnly: true
      additionalProperties: false
      description: TSA group (regroupement) of home-care "services à la personne" activities
    IPLinkProvider:
      enum:
        - IPInfo
        - DBIP
        - IPData
        - IPGeolocation
      type: string
    InclusionFilter:
      enum:
        - Only
        - Excluded
        - All
      type: string
      description: "Tri-state filter for an optional category of documents (e.g. cancelled): Excluded (also the default when the\nparameter is omitted) hides them, Only returns just that category, All returns both."
    Invoice:
      type: object
      properties:
        balance:
          type: number
          description: Balance
          format: double
          readOnly: true
        billingAddress:
          $ref: '#/components/schemas/AddressFields'
        billingContact:
          $ref: '#/components/schemas/ContactFields'
        cancellationCreditId:
          type: integer
          description: Credit ID which cancel this invoice
          format: int32
          nullable: true
          readOnly: true
        cancellationCreditNumber:
          type: string
          description: Credit number which cancel this invoice
          nullable: true
          readOnly: true
        cancelledCreditId:
          type: integer
          description: ID of the credit that THIS invoice cancels (set when the invoice was issued to offset a credit)
          format: int32
          nullable: true
          readOnly: true
        cancelledCreditNumber:
          type: string
          description: Number of the credit that THIS invoice cancels
          nullable: true
          readOnly: true
        commitments:
          type: array
          items:
            $ref: '#/components/schemas/Commitment'
          description: Commitments
          nullable: true
          readOnly: true
        customerElectronicAddress:
          type: string
          description: Customer electronic address
          nullable: true
        customerId:
          type: integer
          description: Customer ID
          format: int32
          nullable: true
        customerName:
          type: string
          description: Customer name
          nullable: true
        customerNumber:
          type: string
          description: Customer number
          nullable: true
        customerOrderReference:
          type: string
          description: Customer order reference
          nullable: true
        customerSiret:
          type: string
          description: Customer SIRET
          nullable: true
        customerType:
          $ref: '#/components/schemas/CustomerType'
        customerVatNumber:
          type: string
          description: Customer VAT number
          nullable: true
        date:
          type: string
          description: Date
          format: date
          nullable: true
        eInvoicingInvoiceId:
          type: string
          description: E-invoicing identifier assigned by the platform
          nullable: true
          readOnly: true
        eInvoicingProviderId:
          type: string
          description: E-invoicing platform (PDP) identifier
          nullable: true
          readOnly: true
        eInvoicingStatus:
          $ref: '#/components/schemas/EInvoicingStatusCode'
        footerNotes:
          type: string
          description: Footer notes to be print
          nullable: true
        globalDiscount:
          $ref: '#/components/schemas/Discount'
        grossTaxExcludedAmount:
          type: number
          description: Gross tax excluded amount
          format: double
          readOnly: true
        headerNotes:
          type: string
          description: Header notes to be print
          nullable: true
        id:
          type: integer
          description: Invoice ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        isCancelled:
          type: boolean
          description: Indicates whether invoice is cancelled
          readOnly: true
        isDraft:
          type: boolean
          description: Indicates whether invoice is draft. Otherwise invoice cannot be modified
          readOnly: true
        isPaid:
          type: boolean
          description: Indicates whether invoice is paid
          readOnly: true
        isProforma:
          type: boolean
          description: Indicates whether invoice is proforma
          readOnly: true
        liableToVat:
          type: boolean
          description: Indicates whether the document is liable to VAT
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/SaleDocumentLine'
          description: Invoice lines
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
        overdue:
          type: number
          description: Overdue
          format: double
          readOnly: true
        pdfUrl:
          type: string
          description: Pdf url
          nullable: true
          readOnly: true
        publicLink:
          type: string
          description: Public link
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
        replacedBy:
          type: integer
          description: Replacement invoice ID
          format: int32
          nullable: true
          readOnly: true
        sentAt:
          type: string
          description: Sent at
          format: date-time
          nullable: true
          readOnly: true
        shippingAddress:
          $ref: '#/components/schemas/AddressFields'
        shippingAmount:
          type: number
          description: Shipping amount
          format: double
        shippingContact:
          $ref: '#/components/schemas/ContactFields'
        shippingVat:
          $ref: '#/components/schemas/Vat'
        subject:
          type: string
          description: Subject
          nullable: true
        taxAmount:
          type: number
          description: Total tax amount
          format: double
          readOnly: true
        taxExcludedAmount:
          type: number
          description: Tax excluded amount (discount included)
          format: double
          readOnly: true
        taxIncludedAmount:
          type: number
          description: Tax included amount
          format: double
          readOnly: true
        useTaxIncludedPrices:
          type: boolean
          description: Indicates whether invoice prices and amount are tax included
        vatMode:
          $ref: '#/components/schemas/VatMode'
        vatNote:
          type: string
          description: VAT note to print
          nullable: true
        vatReverseCharge:
          type: boolean
          description: VAT reverse charge
        vats:
          type: array
          items:
            $ref: '#/components/schemas/VatSummary'
          description: Vats
          nullable: true
          readOnly: true
        vendorReference:
          type: string
          description: Vendor reference to be print
          nullable: true
      additionalProperties: false
      description: Invoice
    InvoiceSettingsDto:
      type: object
      properties:
        collectionCosts:
          type: string
          nullable: true
        earlyFinalizationDuration:
          type: integer
          format: int32
          nullable: true
        latePaymentPenalty:
          type: string
          nullable: true
        substractDepositFromTaxExcludedAmount:
          type: boolean
      additionalProperties: false
    InvoiceStatusFilter:
      enum:
        - Draft
        - Incoming
        - Expired
        - Paid
        - ToSend
      type: string
    LineType:
      enum:
        - Empty
        - Product
        - Service
        - Subtotal
        - Text
        - NewPage
      type: string
      description: Line type
    MapLinkProvider:
      enum:
        - GoogleMaps
        - BingMaps
        - OpenStreetMap
      type: string
    MicroBusinessDeclarationTypes:
      enum:
        - Products
        - Services
        - OtherServices
        - Renting
        - Cipav
      type: string
    OverdueCustomer:
      type: object
      properties:
        customerId:
          type: integer
          description: Customer identifier
          format: int32
        customerName:
          type: string
          description: Customer name at the time of the query
          nullable: true
        invoiceCount:
          type: integer
          description: How many échéances make up the amount
          format: int32
        lastReminderOn:
          type: string
          description: 'Most recent reminder sent to this customer, or null if never chased'
          format: date-time
          nullable: true
        oldestOverdueDays:
          type: integer
          description: Age in days of the oldest unpaid échéance
          format: int32
        overdueAmount:
          type: number
          description: Sum still due on échéances past their date
          format: double
      additionalProperties: false
      description: A customer with overdue échéances
    PayInvoice:
      type: object
      properties:
        allowUpdate:
          type: boolean
          description: "Indicates whether update can be done if invoice already paid.\nCan update metadata, status and payment reference"
        amount:
          type: number
          description: Amount to pay
          format: double
          nullable: true
        date:
          type: string
          description: Paid date
          format: date
        dateAdjustment:
          $ref: '#/components/schemas/FinalizationDateAdjustment'
        finalizationDate:
          type: string
          description: "Date the invoice is finalized on, when it has to be finalized.\nDefaults to the invoice's own date. Distinct from Altoviz.Api.Models.PayInvoice.Date, which is the payment date."
          format: date
          nullable: true
        finalizeInvoice:
          type: boolean
          description: Indicates whether the invoice has to be finalized if draft
        invoiceId:
          type: integer
          description: Invoice ID
          format: int32
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        paymentReference:
          type: string
          description: Payment reference
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatus'
      additionalProperties: false
      description: Pay invoice
    PaymentDelayResult:
      type: object
      properties:
        daysLate:
          $ref: '#/components/schemas/TurnoverEvolutionResult'
        daysToPayment:
          $ref: '#/components/schemas/TurnoverEvolutionResult'
        lateShare:
          type: number
          description: 'Share of the settled amount paid after its due date, 0..1'
          format: double
        medianDaysLate:
          type: number
          description: Median days from due date to payment. Null when nothing settled
          format: double
          nullable: true
        medianDaysToPayment:
          type: number
          description: Median days from document date to payment. Null when nothing settled
          format: double
          nullable: true
        settled:
          $ref: '#/components/schemas/TurnoverEvolutionResult'
        settledAmount:
          type: number
          description: Total settled over the period
          format: double
      additionalProperties: false
      description: How long payments actually take over a period.
    PaymentDelaySide:
      enum:
        - Customers
        - Suppliers
      type: string
      description: Which side of the ledger a payment delay is measured on
    PaymentMethod:
      enum:
        - Transfer
        - Order
        - Check
        - Cash
        - Card
        - Bill
        - Usec
        - Other
      type: string
    PaymentStatus:
      enum:
        - Success
        - Pending
        - Failed
      type: string
      description: Receipt Status
    PeriodBucketModel:
      type: object
      properties:
        partial:
          type: boolean
          description: "True when the calendar period was clipped by the requested range, so the bucket holds\nless than a full month/quarter/week of activity and must not be compared at face value."
        range:
          $ref: '#/components/schemas/DateRangeModel'
        value:
          type: number
          description: Amount (tax excluded)
          format: double
      additionalProperties: false
      description: 'One point of a series, covering a single bucket of the period'
    PeriodSeriesModel:
      type: object
      properties:
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/PeriodBucketModel'
          description: 'Values, one per bucket'
          nullable: true
        label:
          type: string
          description: 'Display label: the year for a whole calendar year, otherwise the bounds'
          nullable: true
        offset:
          type: integer
          description: '0 for the requested period, 1 for one calendar year earlier, and so on'
          format: int32
        range:
          $ref: '#/components/schemas/DateRangeModel'
      additionalProperties: false
      description: 'The requested period, or the same period in an earlier year'
    Periodicity:
      enum:
        - Daily
        - Weekly
        - Monthly
        - Quarterly
        - Annually
      type: string
    ProblemDetails:
      type: object
      properties:
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        title:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
      additionalProperties: { }
    Product:
      type: object
      properties:
        active:
          type: boolean
          description: Indicates whether the product is active
        defaultQuantity:
          type: number
          description: Default quantity
          format: double
        description:
          type: string
          description: Description
          nullable: true
        family:
          $ref: '#/components/schemas/ProductFamily'
        id:
          type: integer
          description: Product ID
          format: int32
          readOnly: true
        imageUrl:
          type: string
          description: Gets the product image URL
          nullable: true
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        isUnitPriceTaxIncluded:
          type: boolean
          description: "<b>Deprecated</b> — always false on read, because `unitPrice` is now always the\n            tax-excluded price. There is nothing left for it to select between.\n            \nOn write it is still honoured: setting it to true means the price you are sending is\n            tax-included, exactly as before. Send `taxIncludedPrice` instead."
          deprecated: true
        margin:
          type: number
          description: "Margin per unit, excluding tax: tax-excluded price less purchase price.\n\nDerived by the server on every save; a value sent here is ignored."
          format: double
        marginRate:
          type: number
          description: "Margin rate: the margin as a percentage of the sale price (FR « taux de marque »).\n\nDerived by the server on every save; a value sent here is ignored."
          format: double
        markupRate:
          type: number
          description: "Markup rate: the margin as a percentage of the purchase price (FR « taux de marge »).\n\nDerived by the server on every save; a value sent here is ignored."
          format: double
        name:
          type: string
          description: Name
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
        purchasePrice:
          type: number
          description: Purchase price
          format: double
        taxExcludedPrice:
          type: number
          description: Sale price excluding tax.
          format: double
        taxIncludedPrice:
          type: number
          description: Sale price including tax.
          format: double
        type:
          $ref: '#/components/schemas/ProductType'
        unit:
          $ref: '#/components/schemas/Unit'
        unitPrice:
          type: number
          description: "<b>Deprecated</b> — use `taxExcludedPrice`. Unit price, excluding tax: the same\n            value as `taxExcludedPrice`.\n            \nStill populated, and still read on write when neither new price field is sent, so no\n            existing integration has to change today.\nIt used to carry whichever half the product was edited in — the tax-included price when\n            `isUnitPriceTaxIncluded` was true — because only one price was stored. Both are stored\n            now, so this always reports the tax-excluded one and `isUnitPriceTaxIncluded` is always\n            false: a client that reads the flag keeps computing the same result."
          format: double
          deprecated: true
        vat:
          $ref: '#/components/schemas/Vat'
      additionalProperties: false
      description: Product
    ProductFamily:
      type: object
      properties:
        id:
          type: integer
          description: ID
          format: int32
          readOnly: true
        label:
          type: string
          description: Label
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
      additionalProperties: false
      description: Product family
    ProductType:
      enum:
        - Product
        - Service
        - Text
      type: string
    PurchaseInvoice:
      type: object
      properties:
        date:
          type: string
          description: Date
          format: date
        id:
          type: integer
          description: Expense ID
          format: int32
          readOnly: true
        notes:
          type: string
          description: Notes
          nullable: true
        pdfUrl:
          type: string
          description: Pdf url
          nullable: true
          readOnly: true
        reference:
          type: string
          description: Reference
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
        status:
          $ref: '#/components/schemas/ExpenseStatus'
        subject:
          type: string
          description: Subject
          nullable: true
        supplier:
          $ref: '#/components/schemas/Supplier'
        taxIncludedAmount:
          type: number
          description: Tax included amount
          format: double
        vatReverseCharge:
          type: boolean
          description: Vat reverse charge
      additionalProperties: false
      description: Purchase invoice
    Quote:
      type: object
      properties:
        acceptedAt:
          type: string
          description: Accepted date
          format: date-time
          nullable: true
        balance:
          type: number
          description: Balance
          format: double
          readOnly: true
        billingAddress:
          $ref: '#/components/schemas/AddressFields'
        billingContact:
          $ref: '#/components/schemas/ContactFields'
        customerElectronicAddress:
          type: string
          description: Customer electronic address
          nullable: true
        customerId:
          type: integer
          description: Customer ID
          format: int32
          nullable: true
        customerName:
          type: string
          description: Customer name
          nullable: true
        customerNumber:
          type: string
          description: Customer number
          nullable: true
        customerOrderReference:
          type: string
          description: Customer order reference
          nullable: true
        customerSiret:
          type: string
          description: Customer SIRET
          nullable: true
        customerType:
          $ref: '#/components/schemas/CustomerType'
        customerVatNumber:
          type: string
          description: Customer VAT number
          nullable: true
        date:
          type: string
          description: Date
          format: date
          nullable: true
        deposit:
          $ref: '#/components/schemas/Discount'
        footerNotes:
          type: string
          description: Footer notes to be print
          nullable: true
        globalDiscount:
          $ref: '#/components/schemas/Discount'
        grossTaxExcludedAmount:
          type: number
          description: Gross tax excluded amount
          format: double
          readOnly: true
        headerNotes:
          type: string
          description: Header notes to be print
          nullable: true
        id:
          type: integer
          description: Invoice ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        liableToVat:
          type: boolean
          description: Indicates whether the document is liable to VAT
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/SaleDocumentLine'
          description: Invoice lines
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
        pdfUrl:
          type: string
          description: Pdf url
          nullable: true
          readOnly: true
        publicLink:
          type: string
          description: Public link
          nullable: true
        refusedAt:
          type: string
          description: Refused date
          format: date-time
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
        sentAt:
          type: string
          description: Sent at
          format: date-time
          nullable: true
          readOnly: true
        shippingAddress:
          $ref: '#/components/schemas/AddressFields'
        shippingAmount:
          type: number
          description: Shipping amount
          format: double
        shippingContact:
          $ref: '#/components/schemas/ContactFields'
        shippingVat:
          $ref: '#/components/schemas/Vat'
        status:
          $ref: '#/components/schemas/QuoteStatus'
        subject:
          type: string
          description: Subject
          nullable: true
        taxAmount:
          type: number
          description: Total tax amount
          format: double
          readOnly: true
        taxExcludedAmount:
          type: number
          description: Tax excluded amount (discount included)
          format: double
          readOnly: true
        taxIncludedAmount:
          type: number
          description: Tax included amount
          format: double
          readOnly: true
        useTaxIncludedPrices:
          type: boolean
          description: Indicates whether invoice prices and amount are tax included
        validityDate:
          type: string
          description: Validity date
          format: date
          nullable: true
        vatNote:
          type: string
          description: VAT note to print
          nullable: true
        vatReverseCharge:
          type: boolean
          description: VAT reverse charge
        vats:
          type: array
          items:
            $ref: '#/components/schemas/VatSummary'
          description: Vats
          nullable: true
          readOnly: true
        vendorReference:
          type: string
          description: Vendor reference to be print
          nullable: true
      additionalProperties: false
      description: Quote
    QuoteSettingsDto:
      type: object
      properties:
        depositDefaultValue:
          type: number
          format: double
        validityDuration:
          type: integer
          format: int32
      additionalProperties: false
    QuoteStatus:
      enum:
        - Pending
        - Accepted
        - Refused
        - Closed
        - Sent
        - Invoiced
      type: string
    Receipt:
      type: object
      properties:
        amount:
          type: number
          description: Amount
          format: double
        customerId:
          type: integer
          description: Customer ID
          format: int32
          nullable: true
        customerInternalId:
          type: string
          description: Customer number
          nullable: true
        customerName:
          type: string
          description: Customer name
          nullable: true
          readOnly: true
        customerNumber:
          type: string
          description: Customer number
          nullable: true
        date:
          type: string
          description: Date
          format: date
        id:
          type: integer
          description: ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: Internal ID
          nullable: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/ReceiptLink'
          description: Links used to mark documents as paid
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        notes:
          type: string
          description: Notes
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        reference:
          type: string
          description: Reference
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatus'
      additionalProperties: false
      description: Receipt
    ReceiptLink:
      type: object
      properties:
        amount:
          type: number
          description: Amount
          format: double
          nullable: true
        id:
          type: integer
          description: Linked document ID
          format: int32
        type:
          $ref: '#/components/schemas/ReceiptLinkType'
      additionalProperties: false
      description: ReceiptLink
    ReceiptLinkType:
      enum:
        - Commitment
        - Invoice
        - Credit
      type: string
      description: Receipt Link type
    RefundCredit:
      type: object
      properties:
        amount:
          type: number
          description: Amount to pay
          format: double
          nullable: true
        creditId:
          type: integer
          description: Invoice ID
          format: int32
        date:
          type: string
          description: Paid date
          format: date
        dateAdjustment:
          $ref: '#/components/schemas/FinalizationDateAdjustment'
        finalizationDate:
          type: string
          description: "Date the credit is finalized on, when it has to be finalized.\nDefaults to the credit's own date. Distinct from Altoviz.Api.Models.RefundCredit.Date, which is the refund date."
          format: date
          nullable: true
        finalizeCredit:
          type: boolean
          description: Indicates whether the invoice has to be finalized if draft
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        refundReference:
          type: string
          description: Payment reference
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentStatus'
      additionalProperties: false
      description: Pay invoice
    SaleDocumentLine:
      type: object
      properties:
        classificationId:
          type: integer
          description: Classification ID (used if no product is set)
          format: int32
          nullable: true
        date:
          type: string
          description: Date
          format: date
          nullable: true
        description:
          type: string
          description: Description (can be html)
          nullable: true
        discount:
          $ref: '#/components/schemas/Discount'
        id:
          type: integer
          description: Invoice line ID
          format: int32
          readOnly: true
        marginAmount:
          type: number
          description: Margin amount
          format: double
        markupRate:
          type: number
          description: "Markup rate: the margin as a percentage of the purchase price (FR « taux de marge »).\n\nRenamed from `marginRate`: it has always divided by the purchase price."
          format: double
        product:
          $ref: '#/components/schemas/Product'
        productId:
          type: integer
          description: Product ID
          format: int32
          nullable: true
        productInternalId:
          type: string
          description: Product internal ID
          nullable: true
        productNumber:
          type: string
          description: Product number
          nullable: true
        purchasePrice:
          type: number
          description: Purchase price
          format: double
          nullable: true
        quantity:
          type: number
          description: Quantity
          format: double
          nullable: true
        taxExcludedAmount:
          type: number
          description: Tax excluded amount
          format: double
          nullable: true
          readOnly: true
        taxExcludedPrice:
          type: number
          description: Tax excluded price
          format: double
          nullable: true
        taxIncludedAmount:
          type: number
          description: Tax included amount
          format: double
          nullable: true
          readOnly: true
        taxIncludedPrice:
          type: number
          description: Tax included price
          format: double
          nullable: true
        type:
          $ref: '#/components/schemas/LineType'
        unit:
          $ref: '#/components/schemas/Unit'
        vat:
          $ref: '#/components/schemas/Vat'
      additionalProperties: false
      description: Invoice line
    SaleQuoteQueryFilter:
      type: object
      properties:
        customerId:
          type: integer
          description: Customer ID
          format: int32
          nullable: true
        from:
          type: string
          description: From
          format: date
          nullable: true
        status:
          $ref: '#/components/schemas/SaleQuoteQueryFilter'
        to:
          type: string
          description: To
          format: date
          nullable: true
      additionalProperties: false
      description: Sale quote filter
    SalesSettingsDto:
      type: object
      properties:
        allowInlineDate:
          type: boolean
        btoBSettlementTerm:
          $ref: '#/components/schemas/SettlementTermDto'
        btoBSettlementTermId:
          type: integer
          format: int32
          nullable: true
        btoCSettlementTerm:
          $ref: '#/components/schemas/SettlementTermDto'
        btoCSettlementTermId:
          type: integer
          format: int32
          nullable: true
        credits:
          $ref: '#/components/schemas/CreditSettingsDto'
        customersLiableToEInvoicing:
          type: boolean
        customersLiableToVat:
          type: boolean
        defaultProductClassification:
          $ref: '#/components/schemas/ClassificationDto'
        defaultServiceClassification:
          $ref: '#/components/schemas/ClassificationDto'
        defaultShippingClassification:
          $ref: '#/components/schemas/ClassificationDto'
        generalTermsFile:
          $ref: '#/components/schemas/SharedFileDto'
        generalTermsFileId:
          type: integer
          format: int32
          nullable: true
        invoices:
          $ref: '#/components/schemas/InvoiceSettingsDto'
        mainActivity:
          $ref: '#/components/schemas/ProductType'
        outstandingLimit:
          type: number
          format: double
          nullable: true
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        quotes:
          $ref: '#/components/schemas/QuoteSettingsDto'
        useTaxIncluded:
          type: boolean
        vatReverseCharge:
          type: boolean
      additionalProperties: false
    Settings:
      type: object
      properties:
        accounting:
          $ref: '#/components/schemas/AccountingSettingsDto'
        company:
          $ref: '#/components/schemas/CompanySettingsDto'
        eInvoicing:
          $ref: '#/components/schemas/EInvoicingSettingsDto'
        emailing:
          $ref: '#/components/schemas/EmailingSettingsDto'
        general:
          $ref: '#/components/schemas/GeneralSettingsDto'
        sales:
          $ref: '#/components/schemas/SalesSettingsDto'
        socials:
          $ref: '#/components/schemas/Socials'
        vat:
          $ref: '#/components/schemas/VatSettingsDto'
      additionalProperties: false
      description: Application Settings
    SettlementTermConditionDto:
      type: object
      properties:
        dayOfMonth:
          type: integer
          format: int32
          nullable: true
        delay:
          type: integer
          format: int32
        delayType:
          $ref: '#/components/schemas/DelayType'
        id:
          type: integer
          format: int32
        percent:
          type: number
          format: double
        type:
          $ref: '#/components/schemas/ConditionType'
      additionalProperties: false
    SettlementTermDto:
      type: object
      properties:
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/SettlementTermConditionDto'
          nullable: true
        id:
          type: integer
          format: int32
        isCustom:
          type: boolean
        name:
          type: string
          nullable: true
      additionalProperties: false
    SharedFileDto:
      type: object
      properties:
        description:
          type: string
          nullable: true
        externalLinkHash:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        folderId:
          type: integer
          format: int32
          nullable: true
        id:
          type: integer
          format: int32
        metadatas:
          type: object
          additionalProperties:
            type: string
            nullable: true
          nullable: true
        size:
          type: number
          format: double
        system:
          type: boolean
        uploadedAt:
          type: string
          format: date-time
      additionalProperties: false
    Socials:
      type: object
      properties:
        facebook:
          type: string
          nullable: true
        instagram:
          type: string
          nullable: true
        linkedIn:
          type: string
          nullable: true
        pinterest:
          type: string
          nullable: true
        twitter:
          type: string
          nullable: true
        youtube:
          type: string
          nullable: true
      additionalProperties: false
    Supplier:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the supplier is active
        address:
          $ref: '#/components/schemas/AddressFields'
        cellPhone:
          type: string
          description: Cell phone number
          nullable: true
        companyInformations:
          $ref: '#/components/schemas/CompanyInfo'
        createdAt:
          type: string
          description: Created date
          format: date-time
          nullable: true
        createdById:
          type: string
          description: Created by user ID
          nullable: true
        defaultPaymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        email:
          type: string
          description: Email
          nullable: true
        firstName:
          type: string
          description: First name
          nullable: true
        id:
          type: integer
          description: Supplier ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: Internal Id
          nullable: true
        internalNotes:
          type: string
          description: Internal notes
          nullable: true
        lastName:
          type: string
          description: Last name
          nullable: true
        name:
          type: string
          description: Company name
          nullable: true
        number:
          type: string
          description: Number
          nullable: true
        phone:
          type: string
          description: Phone number
          nullable: true
        title:
          type: string
          description: Title
          nullable: true
        updatedAt:
          type: string
          description: Updated date
          format: date-time
          nullable: true
        updatedById:
          type: string
          description: Updated by user ID
          nullable: true
      additionalProperties: false
      description: Supplier
    ThirdContact:
      type: object
      properties:
        cellPhone:
          type: string
          nullable: true
        companyName:
          type: string
          nullable: true
        displayName:
          type: string
          nullable: true
          readOnly: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        function:
          type: string
          nullable: true
        id:
          type: integer
          description: Contact ID
          format: int32
          readOnly: true
        internalId:
          type: string
          description: ID used in your system
          nullable: true
        invertedDisplayName:
          type: string
          nullable: true
          readOnly: true
        isMain:
          type: boolean
          description: Indicates if the contact is the main third contact
        lastName:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        service:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
      additionalProperties: false
      description: Third contact
    TurnoverComparisonResult:
      type: object
      properties:
        current:
          $ref: '#/components/schemas/TurnoverPeriodValue'
        precedingPeriod:
          $ref: '#/components/schemas/TurnoverPeriodValue'
        previousYear:
          $ref: '#/components/schemas/TurnoverPeriodValue'
      additionalProperties: false
      description: "A period against the two references that make it readable: the same period one year earlier,\nand the period of equal length immediately before it."
    TurnoverEvolutionResult:
      type: object
      properties:
        periodicity:
          $ref: '#/components/schemas/Periodicity'
        range:
          $ref: '#/components/schemas/DateRangeModel'
        series:
          type: array
          items:
            $ref: '#/components/schemas/PeriodSeriesModel'
          description: 'The requested period first, then any comparison periods'
          nullable: true
      additionalProperties: false
      description: "Turnover bucketed over a period. Every series holds the same number of buckets and bucket\nN of each series covers the same period shifted by its `offset` in years, so series can\nbe compared index by index."
    TurnoverEvolutionType:
      enum:
        - Sales
        - Expenses
        - Customer
        - Supplier
        - Product
        - Colleague
        - Margin
        - Discount
      type: string
      description: Dimension used to break down turnover evolution
    TurnoverPeriodValue:
      type: object
      properties:
        label:
          type: string
          description: 'Display label: the year for a whole calendar year, otherwise the bounds'
          nullable: true
        range:
          $ref: '#/components/schemas/DateRangeModel'
        value:
          type: number
          description: Total turnover amount (tax excluded)
          format: double
      additionalProperties: false
      description: A turnover total over a period
    Unit:
      type: object
      properties:
        code:
          type: string
          description: Code
          nullable: true
        conversion:
          type: number
          description: Conversion
          format: double
          readOnly: true
        decimals:
          type: number
          description: Decimals
          format: double
          nullable: true
          readOnly: true
        id:
          type: integer
          description: Unit Id
          format: int32
          nullable: true
          readOnly: true
        name:
          type: string
          description: Name
          nullable: true
          readOnly: true
        type:
          $ref: '#/components/schemas/UnitType'
      additionalProperties: false
      description: Unit
    UnitType:
      enum:
        - Time
        - Weight
        - Area
        - Volume
        - Dimension
        - Other
      type: string
    UnpaidCommitmentBucket:
      type: object
      properties:
        count:
          type: integer
          description: Number of échéances in this bucket
          format: int32
        period:
          type: integer
          description: "Negative is overdue, 0 is due today, positive is upcoming. -7 is more than 90 days late, 7 more\nthan 90 days ahead; the steps in between are 1, 7, 15, 30, 60 and 90 days."
          format: int32
        total:
          type: number
          description: Amount still due in this bucket
          format: double
      additionalProperties: false
      description: 'One bucket of an aged balance, keyed by distance from today'
    User:
      type: object
      properties:
        displayName:
          type: string
          description: Display name
          nullable: true
        email:
          type: string
          description: E-mail
          nullable: true
        firstName:
          type: string
          description: First name
          nullable: true
        lastName:
          type: string
          description: Last name
          nullable: true
        phone:
          type: string
          description: Phone
          nullable: true
        profile:
          $ref: '#/components/schemas/UserProfile'
        status:
          $ref: '#/components/schemas/UserStatus'
        userId:
          type: string
          description: User Id
          nullable: true
      additionalProperties: false
      description: User
    UserProfile:
      enum:
        - Admin
        - Standard
        - Accountant
        - Support
        - Api
        - Unknown
      type: string
    UserStatus:
      enum:
        - Inactive
        - InvitationSent
        - Active
        - Unknown
      type: string
    Vat:
      type: object
      properties:
        default:
          type: boolean
          description: Indicatess if this is the default VAT for the region
          readOnly: true
        id:
          type: integer
          description: Vat ID
          format: int32
          nullable: true
          readOnly: true
        label:
          type: string
          description: Label
          nullable: true
          readOnly: true
        rate:
          type: number
          description: Rate
          format: double
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
      additionalProperties: false
      description: Vat
    VatDeclarationPeriodicity:
      enum:
        - Monthly
        - Quarterly
      type: string
    VatDto:
      type: object
      properties:
        default:
          type: boolean
        id:
          type: integer
          format: int32
          nullable: true
        rate:
          type: number
          format: double
          nullable: true
        region:
          $ref: '#/components/schemas/VatRegion'
      additionalProperties: false
    VatMode:
      enum:
        - Auto
        - Debit
        - Collection
      type: string
    VatRegime:
      enum:
        - Franchise
        - Simplified
        - Normal
      type: string
    VatRegion:
      enum:
        - FR
        - EU
        - IE
        - DOM
        - Corse
        - Monaco
      type: string
    VatSettingsDto:
      type: object
      properties:
        liableToVat:
          type: boolean
        nonLiableTextToPrint:
          type: string
          nullable: true
        vatMode:
          $ref: '#/components/schemas/VatMode'
        vatPeriod:
          $ref: '#/components/schemas/VatDeclarationPeriodicity'
        vatRegime:
          $ref: '#/components/schemas/VatRegime'
      additionalProperties: false
    VatSummary:
      type: object
      properties:
        taxExcludedAmount:
          type: number
          description: Tax excluded amount
          format: double
        vat:
          $ref: '#/components/schemas/Vat'
        vatAmount:
          type: number
          description: Vat amount
          format: double
      additionalProperties: false
      description: Vat summary
    Webhook:
      required:
        - name
        - types
        - url
      type: object
      properties:
        id:
          type: integer
          description: Webhook ID
          format: int32
        name:
          minLength: 1
          type: string
          description: Name
        secretKey:
          type: string
          description: Secret key
          nullable: true
        types:
          type: array
          items:
            $ref: '#/components/schemas/WebhookType'
          description: ''
        url:
          minLength: 1
          type: string
          description: Webhook Uri
      additionalProperties: false
      description: Wehbook
    WebhookCreate:
      required:
        - name
        - types
        - url
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: Name
        secretKey:
          type: string
          description: Secret key
          nullable: true
        types:
          type: array
          items:
            $ref: '#/components/schemas/WebhookType'
          description: ''
        url:
          minLength: 1
          type: string
          description: Webhook Uri
      additionalProperties: false
      description: Wehbook
    WebhookType:
      enum:
        - CustomerCreated
        - InvoiceCreated
        - CustomerDeleted
        - CustomerUpdated
        - ProductCreated
        - ProductUpdated
        - ProductDeleted
        - InvoiceUpdated
        - ContactUpdated
        - ContactCreated
        - QuoteUpdated
        - QuoteCreated
        - ContactDeleted
        - QuoteDeleted
        - InvoiceDeleted
      type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      description: 'API KEY generated in application. Example: "X-API-KEY: {apiKey}"'
      name: X-API-KEY
      in: header
security:
  - { }
tags:
  - name: BankAccounts
    description: Bank accounts API
  - name: Classifications
    description: Classifications API
  - name: Colleagues
    description: Colleagues API
  - name: Contacts
    description: Contacts API
  - name: CustomerFamilies
    description: Customers API
  - name: Customers
    description: Customers API
  - name: Exports
    description: "Export API — download workbook data as Excel, CSV, TSV or JSON.\nAll endpoints accept the common filter params documented below.\nAdditional upstream filter params (status, colleagueId, types[], …)\ncan be appended to the query string and are forwarded transparently."
  - name: Hello
    description: User API
  - name: HomecareServices
    description: Home-care "services à la personne" reference data (TSA groups and SAP activities)
  - name: ProductFamilies
    description: Products API
  - name: ProductImages
    description: Product images API
  - name: Products
    description: Products API
  - name: PurchaseInvoices
    description: Purchase invoices API
  - name: Receipts
    description: Receipts API
  - name: SaleCredits
    description: Credits API
  - name: SaleInvoices
    description: Invoices API
  - name: SaleQuotes
    description: Quotes API
  - name: Settings
    description: Settings API
  - name: Statistics
    description: Statistics API
  - name: Suppliers
    description: Suppliers API
  - name: Units
    description: Units API
  - name: Users
    description: User API
  - name: Vats
    description: Vats API
  - name: Webhooks
    description: Classifications API