openapi: 3.0.0
info:
  title: Teamleader API
  description: This is the documentation of the Teamleader Focus API. If you have any feedback, or are you missing functionality to support your use case? Let us know via [api@teamleader.eu](mailto:api@teamleader.eu).
  contact: {}
  version: 1.235.0
servers:
  - url: https://api.focus.teamleader.eu
    variables: {}
security:
  - httpBearer: []
tags:
  - name: departments
    description: |
      Departments are used to split quotations and invoices for different legal entities or within one organisation.

      ***Required scopes:*** `departments`
    x-displayName: Departments
  - name: users
    description: |
      Users are co-workers in a Teamleader account.

      ***Required scopes:*** `users`
    x-displayName: Users
  - name: teams
    description: |
      ***Required scopes:*** `users`
    x-displayName: Teams
  - name: custom_fields
    description: |
      Custom fields are used to add additional data/properties to entities within Teamleader.
    x-displayName: Custom Fields
  - name: work_types
    description: |
      Work types define the type of work for events or time tracking. Hourly rates can be added to work types, so that the work can be billed to a customer.
    x-displayName: Work Types
  - name: document_templates
    description: Document Templates
    x-displayName: Document Templates
  - name: currencies
    description: Currencies
    x-displayName: Currencies
  - name: notes
    description: Notes
    x-displayName: Notes
  - name: email_tracking
    description: Email Tracking
    x-displayName: Email Tracking
  - name: closing_days
    description: Closing Days
    x-displayName: Closing Days
  - name: day_off_types
    description: Day Off Types
    x-displayName: Day Off Types
  - name: days_off
    description: Days Off
    x-displayName: Days Off
  - name: contacts
    description: |
      Contacts are physical entities who are added to your CRM database. Contacts might be linked to one or more companies.

      ***Required scopes:*** `contacts`
    x-displayName: Contacts
  - name: companies
    description: |
      Companies are legal entities, usually linked to a VAT and/or local business number.

      ***Required scopes:*** `companies`
    x-displayName: Companies
  - name: business_types
    description: |
      Each country has a specific set of business types or range of legal entities. You can specify the business type when adding or updating a company.
    x-displayName: Business Types
  - name: tags
    description: |
      Tags are used to label contacts or companies, so that they can easily be filtered or grouped into segments.
    x-displayName: Tags
  - name: addresses
    description: |
      We provide a set of data which can be used to build addresses.
    x-displayName: Addresses
  - name: deals
    description: |
      Deals are sale opportunities, which need to be followed up by their responsible user. A deal can move through specific deal phases, and be marked as won or lost.

      ***Required scopes:*** `deals`
    x-displayName: Deals
  - name: deal_pipelines
    description: |
      Each deal belongs to a specific pipeline, in which it goes through the different deal phases.

      ***Required scopes:*** `deals`
    x-displayName: Deal Pipelines
  - name: deal_phases
    description: |
      Deal phases are the different phases a deal typically goes through. A deal can be moved to either a next or previous phase. A deal can be marked as won or lost independently from the deal phase.

      ***Required scopes:*** `deals`
    x-displayName: Deal Phases
  - name: deal_sources
    description: |
      Deal sources are used to track the origin of a deal.

      ***Required scopes:*** `deals`
    x-displayName: Deal Sources
  - name: quotations
    description: |
      A quotation is a sales offer for a specific customer. It is always attached to a deal. Quotations can be signed online via Cloudsign.

      ***Required scopes:*** `deals`
    x-displayName: Quotations
  - name: orders
    description: |
      ***Required scopes:*** `orders`
    x-displayName: Orders
  - name: meetings
    description: Meetings
    x-displayName: Meetings
  - name: calls
    description: Calls
    x-displayName: Calls
  - name: call_outcomes
    description: Call Outcomes
    x-displayName: Call Outcomes
  - name: calendar_events
    description: |
      Calendar events are scheduled events in your calendar. A calendar event involves a particular activity type: a task, meeting or call.

      ***Required scopes:*** `events`
    x-displayName: Calendar events
  - name: activity_types
    description: |
      Activity types identify the different types of events that take place within your organisation. 
      Currently only three activity types are available: `tasks`, `meetings` and `calls`.
    x-displayName: Activity Types
  - name: invoices
    description: |
      Teamleader provides a whole set of endpoints to make it easy to develop
      integrations with invoices. New invoices are created in accordance with this
      flow: `invoice.draft` → `invoice.book`. Invoices can also be updated,
      deleted or credited.

      ***Required scopes:*** `invoices`
    x-displayName: Invoices
  - name: credit_notes
    description: |
      Credit notes are created when certain products or services are not delivered
      according to their invoice. The credit note reduces the due amount of the
      credited invoice.

      ***Required scopes:*** `invoices`
    x-displayName: Credit Notes
  - name: subscriptions
    description: Subscriptions
    x-displayName: Subscriptions
  - name: tax_rates
    description: |
      Tax rates provide an overview of different taxation rates used to bill
      customers. Teamleader provides a default list of tax rates based on the
      country of residence of the company that’s using Teamleader. The end user
      also has the option to add additional tax rates.
    x-displayName: Tax Rates
  - name: payment_terms
    description: |
      Payment terms are the conditions under which an invoice need to be paid.
    x-displayName: Payment Terms
  - name: withholding_tax_rates
    description: |
      Withholding tax rates provide an overview of different taxation rates used
      to bill customers. Teamleader provides a default list of tax rates based on
      the country of residence of the company that’s using Teamleader. The
      countries that use withholding tax rates are Italy and Spain.
    x-displayName: Withholding Tax Rates
  - name: commercial_discounts
    description: Commercial Discounts
    x-displayName: Commercial Discounts
  - name: payment_methods
    x-displayName: Payment Methods
    description: Payment Methods
  - name: expenses
    description: Expenses
    x-displayName: Expenses
  - name: bookkeeping_submissions
    description: Bookkeeping Submissions
    x-displayName: Bookkeeping Submissions
  - name: incoming_credit_notes
    description: |
      Incoming credit notes are credit notes received from your suppliers. They
      can be added, approved, refused or sent to bookkeeping.
    x-displayName: Incoming Credit Notes
  - name: incoming_invoices
    description: |
      Incoming invoices are invoices received from your suppliers. They can be
      added, approved, refused or sent to bookkeeping.
    x-displayName: Incoming Invoices
  - name: receipts
    description: |
      Receipts are expenses for which you have a receipt, but no invoice. They can
      be added, approved, refused or sent to bookkeeping.
    x-displayName: Receipts
  - name: product_categories
    description: |
      Product categories are used to group specific products. They are used as a
      ledger account, which is important for accounting.

      ***Required scopes:*** `products`
    x-displayName: Product Categories
  - name: products
    description: |
      ***Required scopes:*** `products`
    x-displayName: Products
  - name: units_of_measure
    description: Units of Measure
    x-displayName: Units of Measure
  - name: price_lists
    description: Price Lists
    x-displayName: Price Lists
  - name: legacy_projects
    description: |
      Projects allow users to work together as a team on a single project. They
      consist of one or more milestones, have one or more participants and are
      limited in time and budget.

      ***Required scopes:*** `projects`
    x-displayName: Legacy Projects
  - name: legacy_milestones
    description: |
      Every projects consists of one or more milestones which are limited in time
      and budget. Budget is however not included in this endpoints (yet).

      *Required scopes: `projects`*
    x-displayName: Legacy Milestones
  - name: projects
    description: |
      > _This is the documentation of the new projects module. See the **Legacy
      Projects** documentation for the endpoints concerning our legacy projects
      module._


      > ⚠️ (July 2023) The projects module has been completely overhauled and is
      currently only available for new project users. Existing project users only
      have access to the old projects module.

      > Over the course of the next few months, next generation projects will also
      be made available to existing project users, including the migration of
      existing project data.


      > To avoid naming collisions, all endpoints of the new projects module can
      be found under `/projects-v2`, for example `/projects-v2/projects.list`.

      > To avoid confusing "new projects" with "creating a new project", we opted
      for "projects-v2" over "new" as the prefix.

      ***Required scopes:*** `projects`
    x-displayName: Projects
  - name: external_parties
    description: |
      > An external party is a contact or company that is added to a project with an optional function and/or sub function.

      ***Required scopes:*** `projects`
    x-displayName: External parties
  - name: project_lines
    description: |
      > A project line can be a group, a task, or a material.

      > The `projectLines.list` endpoint only returns `{id, type}` pairs of those
      lines.

      ***Required scopes:*** `projects`
    x-displayName: Project lines
  - name: groups
    description: |
      ***Required scopes:*** `projects`
    x-displayName: Groups
  - name: projects_v2_tasks
    description: |
      > _These endpoints are for (new) project tasks. For documentation on
      endpoints for tasks not linked to a project, see **Tasks** below._

      ***Required scopes:*** `projects`
    x-displayName: Tasks
  - name: materials
    description: |
      ***Required scopes:*** `projects`
    x-displayName: Materials
  - name: tasks
    description: Tasks
    x-displayName: Tasks
  - name: time_tracking
    description: |
      Time tracking allows users to record time spent on tasks or projects and the
      type of work. You are able to follow-up on the budgets of your projects and
      eventually you are able to invoice the billable time.
    x-displayName: Time Tracking
  - name: timers
    description: |
      Timers are an easy way to track time. You can start, stop or resume a timer
      any time. However, only one timer can run simultaneously per user. Every
      action will result in the creation or update of a time tracking.
    x-displayName: Timers
  - name: tickets
    description: |
      ***Required scopes:*** `tickets`
    x-displayName: Tickets
  - name: ticket_status
    description: Ticket Status
    x-displayName: Ticket Status
  - name: files
    description: Files
    x-displayName: Files
  - name: mail_templates
    description: Mail Templates
    x-displayName: Mail Templates
  - name: migrating
    description: |
      ⚠️ WARNING! These endpoints are not guaranteed to stay backwards compatible.

      Their only use is to allow older integrations to migrate their data to the
      new API.
    x-displayName: Migrating
  - name: webhooks
    description: Webhooks
    x-displayName: Webhooks
  - name: cloud_platforms
    description: Cloud Platforms
    x-displayName: Cloud Platforms
  - name: accounts
    description: Accounts
    x-displayName: Accounts
  - name: plannable_items
    description: Plannable items
    x-displayName: Plannable items
  - name: reservations
    description: Reservations
    x-displayName: Reservations
  - name: user_availability
    description: User availability
    x-displayName: User availability
paths:
  /departments.list:
    post:
      tags:
        - departments
      summary: departments.list
      description: Get a list of departments.
      operationId: departments.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/departments.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/departments.list.response'
                  - example:
                      data:
                        - id: 67c576e7-7e6f-465d-b6ab-a864f6e5e95b
                          name: Human Resources
                          vat_number: BE0899623035
                          currency: EUR
                          emails:
                            - type: primary
                              email: info@piedpiper.eu
                          status: active
              example:
                data:
                  - id: 67c576e7-7e6f-465d-b6ab-a864f6e5e95b
                    name: Human Resources
                    vat_number: BE0899623035
                    currency: EUR
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    status: active
      deprecated: false
  /departments.info:
    post:
      tags:
        - departments
      summary: departments.info
      description: Get details for a single department.
      operationId: departments.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/departments.info.request'
                - example:
                    id: 92296ad0-2d61-4179-b174-9f354ca2157f
            example:
              id: 92296ad0-2d61-4179-b174-9f354ca2157f
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/departments.info.response'
      deprecated: false
  /users.me:
    post:
      tags:
        - users
      summary: users.me
      description: Get the current authenticated user.
      operationId: users.me
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/users.me.response'
                  - example:
                      data:
                        id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        account:
                          type: account
                          id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                        first_name: John
                        last_name: Smith
                        email: john@teamleader.eu
                        email_verification_status: confirmed
                        telephones:
                          - type: phone
                            number: '092980615'
                        language: nl-BE
                        function: Sales
                        time_zone: Europe/Brussels
                        preferences:
                          invoiceable: true
                          historic_time_tracking_limit:
                            unit: hour
                            value: 24
                          whitelabeling: true
              example:
                data:
                  id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  account:
                    type: account
                    id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                  first_name: John
                  last_name: Smith
                  email: john@teamleader.eu
                  email_verification_status: confirmed
                  telephones:
                    - type: phone
                      number: '092980615'
                  language: nl-BE
                  function: Sales
                  time_zone: Europe/Brussels
                  preferences:
                    invoiceable: true
                    historic_time_tracking_limit:
                      unit: hour
                      value: 24
                    whitelabeling: true
      deprecated: false
  /users.list:
    post:
      tags:
        - users
      summary: users.list
      description: Get a list of all users.
      operationId: users.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/users.list.request'
                - example:
                    filter:
                      ids:
                        - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                      term: John
                      status:
                        - active
                        - deactivated
                    sort:
                      - field: first_name
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                term: John
                status:
                  - active
                  - deactivated
              sort:
                - field: first_name
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/users.list.response'
                  - example:
                      data:
                        - id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                          account:
                            type: account
                            id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                          first_name: John
                          last_name: Smith
                          email: john@teamleader.eu
                          telephones:
                            - type: phone
                              number: '092980615'
                          language: nl
                          function: Sales
                          status: active
                          teams:
                            - type: team
                              id: 6dd0069e-45da-0ec4-911a-afb351d968cd
              example:
                data:
                  - id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                    account:
                      type: account
                      id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                    first_name: John
                    last_name: Smith
                    email: john@teamleader.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    language: nl
                    function: Sales
                    status: active
                    teams:
                      - type: team
                        id: 6dd0069e-45da-0ec4-911a-afb351d968cd
      deprecated: false
  /users.info:
    post:
      tags:
        - users
      summary: users.info
      description: Get details for a single user.
      operationId: users.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/users.info.request'
                - example:
                    id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                    includes: external_rate
            example:
              id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
              includes: external_rate
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/users.info.response'
                  - example:
                      data:
                        id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        account:
                          type: account
                          id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                        first_name: John
                        last_name: Smith
                        email: john@teamleader.eu
                        telephones:
                          - type: phone
                            number: '092980615'
                        language: nl-BE
                        function: Sales
                        time_zone: Europe/Brussels
                        status: active
                        teams:
                          - type: team
                            id: 6dd0069e-45da-0ec4-911a-afb351d968cd
                        external_rate:
                          amount: 123.3
                          currency: EUR
              example:
                data:
                  id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  account:
                    type: account
                    id: 0fc55513-7f68-4865-aba0-de5da9e4e43d
                  first_name: John
                  last_name: Smith
                  email: john@teamleader.eu
                  telephones:
                    - type: phone
                      number: '092980615'
                  language: nl-BE
                  function: Sales
                  time_zone: Europe/Brussels
                  status: active
                  teams:
                    - type: team
                      id: 6dd0069e-45da-0ec4-911a-afb351d968cd
                  external_rate:
                    amount: 123.3
                    currency: EUR
      deprecated: false
  /users.listDaysOff:
    post:
      tags:
        - users
      summary: users.listDaysOff
      description: Returns information about days off of a given user.
      operationId: users.listDaysOff
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/users.listDaysOff.request'
                - example:
                    id: 87982c96-f2fe-4b05-838c-ff42c0525758
                    filter:
                      starts_after: '2023-10-01'
                      ends_before: '2023-10-30'
                    page:
                      size: 20
                      number: 1
            example:
              id: 87982c96-f2fe-4b05-838c-ff42c0525758
              filter:
                starts_after: '2023-10-01'
                ends_before: '2023-10-30'
              page:
                size: 20
                number: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/users.listDaysOff.response'
                  - example:
                      data:
                        - id: f611da79-90c2-02b1-b819-a810e0c77291
                          starts_at: '2023-10-01T09:00:00+01:00'
                          ends_at: '2023-10-20T18:00:00+01:00'
                          user:
                            type: user
                            id: b5094b3f-bb7a-0391-b01b-e709773f3509
                          leave_type:
                            type: dayOffType
                            id: f68b123c-4c36-0f5c-ac16-11f498e5dc01
                          status: approved
                      meta:
                        page:
                          size: 10
                          number: 2
                        matches: 12
              example:
                data:
                  - id: f611da79-90c2-02b1-b819-a810e0c77291
                    starts_at: '2023-10-01T09:00:00+01:00'
                    ends_at: '2023-10-20T18:00:00+01:00'
                    user:
                      type: user
                      id: b5094b3f-bb7a-0391-b01b-e709773f3509
                    leave_type:
                      type: dayOffType
                      id: f68b123c-4c36-0f5c-ac16-11f498e5dc01
                    status: approved
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 12
      deprecated: false
  /users.getWeekSchedule:
    post:
      tags:
        - users
      summary: users.getWeekSchedule
      description: |-
        Returns information about week schedule of a user. Only available with the *Weekly working schedule* feature.

        **Deprecated:** use `userSchedules.list` instead, which returns the working schedules of multiple users expanded per day over a date range.
      operationId: users.getWeekSchedule
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/users.getWeekSchedule.request'
                - example:
                    id: 87982c96-f2fe-4b05-838c-ff42c0525758
            example:
              id: 87982c96-f2fe-4b05-838c-ff42c0525758
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/users.getWeekSchedule.response'
                  - example:
                      data:
                        periods:
                          - type: working_hours
                            start:
                              day: monday
                              time: '09:00'
                            end:
                              day: monday
                              time: '17:00'
              example:
                data:
                  periods:
                    - type: working_hours
                      start:
                        day: monday
                        time: '09:00'
                      end:
                        day: monday
                        time: '17:00'
      deprecated: true
  /userSchedules.list:
    post:
      tags:
        - users
      summary: userSchedules.list
      description: Returns the working schedules of one or more users, expanded per day over a date range of at most 7 days. Only available with the *Weekly working schedule* feature.
      operationId: userSchedules.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/userSchedules.list.request'
                - example:
                    filter:
                      user_ids:
                        - 87982c96-f2fe-4b05-838c-ff42c0525758
                        - b5094b3f-bb7a-0391-b01b-e709773f3509
                      from: '2026-06-01'
                      until: '2026-06-07'
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                user_ids:
                  - 87982c96-f2fe-4b05-838c-ff42c0525758
                  - b5094b3f-bb7a-0391-b01b-e709773f3509
                from: '2026-06-01'
                until: '2026-06-07'
              page:
                size: 20
                number: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/userSchedules.list.response'
                  - example:
                      data:
                        - user:
                            type: user
                            id: 87982c96-f2fe-4b05-838c-ff42c0525758
                          schedule:
                            - date: '2026-06-01'
                              periods:
                                - type: working_hours
                                  start:
                                    time: '09:00'
                                  end:
                                    time: '12:00'
                                - type: lunch_break
                                  start:
                                    time: '12:00'
                                  end:
                                    time: '13:00'
                                - type: working_hours
                                  start:
                                    time: '13:00'
                                  end:
                                    time: '17:00'
                            - date: '2026-06-02'
                              periods:
                                - type: working_hours
                                  start:
                                    time: '09:00'
                                  end:
                                    time: '17:00'
                      meta:
                        page:
                          size: 20
                          number: 1
                        matches: 2
              example:
                data:
                  - user:
                      type: user
                      id: 87982c96-f2fe-4b05-838c-ff42c0525758
                    schedule:
                      - date: '2026-06-01'
                        periods:
                          - type: working_hours
                            start:
                              time: '09:00'
                            end:
                              time: '12:00'
                          - type: lunch_break
                            start:
                              time: '12:00'
                            end:
                              time: '13:00'
                          - type: working_hours
                            start:
                              time: '13:00'
                            end:
                              time: '17:00'
                      - date: '2026-06-02'
                        periods:
                          - type: working_hours
                            start:
                              time: '09:00'
                            end:
                              time: '17:00'
                meta:
                  page:
                    size: 20
                    number: 1
                  matches: 2
      deprecated: false
  /teams.list:
    post:
      tags:
        - teams
      summary: teams.list
      description: Gets a list of all teams.
      operationId: teams.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/teams.list.request'
                - example:
                    filter:
                      ids:
                        - 92296ad0-2d61-4179-b174-9f354ca2157f
                        - 53635682-c382-4fbf-9fd9-9506ca4fbcdd
                      term: Designers
                      team_lead_id: 6a9106c3-ed2a-46a2-a919-eb3d41165dd2
                    sort:
                      - field: name
            example:
              filter:
                ids:
                  - 92296ad0-2d61-4179-b174-9f354ca2157f
                  - 53635682-c382-4fbf-9fd9-9506ca4fbcdd
                term: Designers
                team_lead_id: 6a9106c3-ed2a-46a2-a919-eb3d41165dd2
              sort:
                - field: name
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/teams.list.response'
                  - example:
                      data:
                        - id: 4b5291aa-2d78-09d2-882c-6c1483f00d88
                          name: Designers
                          team_lead:
                            type: user
                            id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                          members:
                            - type: user
                              id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
              example:
                data:
                  - id: 4b5291aa-2d78-09d2-882c-6c1483f00d88
                    name: Designers
                    team_lead:
                      type: user
                      id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                    members:
                      - type: user
                        id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
      deprecated: false
  /customFieldDefinitions.create:
    post:
      tags:
        - custom_fields
      summary: customFieldDefinitions.create
      description: |
        Create a custom field definition.

        ***Required scopes:*** `settings`
      operationId: customFieldDefinitions.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/customFieldDefinitions.create.request'
                - example:
                    label: ''
                    type: single_line
                    context: contact
            example:
              label: ''
              type: single_line
              context: contact
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/customFieldDefinitions.create.response'
                  - example:
                      data:
                        type: customFieldDefinition
                        id: 526960d3-8d49-4a71-9f62-7b8b74aef058
              example:
                data:
                  type: customFieldDefinition
                  id: 526960d3-8d49-4a71-9f62-7b8b74aef058
      deprecated: false
  /customFieldDefinitions.list:
    post:
      tags:
        - custom_fields
      summary: customFieldDefinitions.list
      description: Get a list of all the definitions of custom fields.
      operationId: customFieldDefinitions.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/customFieldDefinitions.list.request'
                - example:
                    filter:
                      ids:
                        - 9c64570b-4ec1-4e03-9662-af904f78f7fa
                        - aa6d2560-63f9-4b2f-bf96-823dc7c34df7
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: label
            example:
              filter:
                ids:
                  - 9c64570b-4ec1-4e03-9662-af904f78f7fa
                  - aa6d2560-63f9-4b2f-bf96-823dc7c34df7
              page:
                size: 20
                number: 1
              sort:
                - field: label
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/customFieldDefinitions.list.response'
                  - example:
                      data:
                        - id: 74855f4a-2b61-429c-81d8-c79ad3675a76
                          context: contact
                          type: single_line
                          label: ''
                          group: ''
                          required: false
                          configuration:
                            options:
                              - id: 179e1564-493b-4305-8c54-a34fc80920fc
                                value: foo
                            extra_option_allowed: true
              example:
                data:
                  - id: 74855f4a-2b61-429c-81d8-c79ad3675a76
                    context: contact
                    type: single_line
                    label: ''
                    group: ''
                    required: false
                    configuration:
                      options:
                        - id: 179e1564-493b-4305-8c54-a34fc80920fc
                          value: foo
                      extra_option_allowed: true
      deprecated: false
  /customFieldDefinitions.info:
    post:
      tags:
        - custom_fields
      summary: customFieldDefinitions.info
      description: Get info about a specific custom field definition.
      operationId: customFieldDefinitions.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/customFieldDefinitions.info.request'
                - example:
                    id: 9c64570b-4ec1-4e03-9662-af904f78f7fa
            example:
              id: 9c64570b-4ec1-4e03-9662-af904f78f7fa
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/customFieldDefinitions.info.response'
                  - example:
                      data:
                        id: 57e851e2-3d3b-4523-82f8-fe77df5a5d6c
                        context: contact
                        type: single_line
                        label: ''
                        group: ''
                        required: false
                        configuration:
                          options:
                            - id: 179e1564-493b-4305-8c54-a34fc80920fc
                              value: foo
                          extra_option_allowed: true
              example:
                data:
                  id: 57e851e2-3d3b-4523-82f8-fe77df5a5d6c
                  context: contact
                  type: single_line
                  label: ''
                  group: ''
                  required: false
                  configuration:
                    options:
                      - id: 179e1564-493b-4305-8c54-a34fc80920fc
                        value: foo
                    extra_option_allowed: true
      deprecated: false
  /workTypes.list:
    post:
      tags:
        - work_types
      summary: workTypes.list
      description: Get a list of all work types, sorted alphabetically (on their name).
      operationId: workTypes.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/workTypes.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/workTypes.list.response'
                  - example:
                      data:
                        - id: 811a5825-96f4-4318-83c3-2840935c6003
                          name: Planning
              example:
                data:
                  - id: 811a5825-96f4-4318-83c3-2840935c6003
                    name: Planning
      deprecated: false
  /documentTemplates.list:
    post:
      tags:
        - document_templates
      summary: documentTemplates.list
      description: Get a list of all document templates.
      operationId: documentTemplates.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json;charset=utf-8:
            schema:
              allOf:
                - $ref: '#/components/schemas/documentTemplates.list.request'
                - example:
                    filter:
                      department_id: a344c251-2494-0013-b433-ccee8e8435e5
                      document_type: invoice
                      status:
                        - active
                        - archived
            example:
              filter:
                department_id: a344c251-2494-0013-b433-ccee8e8435e5
                document_type: invoice
                status:
                  - active
                  - archived
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json;charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/documentTemplates.list.response'
                  - example:
                      data:
                        - id: a344c251-2494-0013-b433-ccee8e8435e5
                          department:
                            type: department
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          document_type: invoice
                          is_default: true
                          name: new logo
                          status: active
              example:
                data:
                  - id: a344c251-2494-0013-b433-ccee8e8435e5
                    department:
                      type: department
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    document_type: invoice
                    is_default: true
                    name: new logo
                    status: active
      deprecated: false
  /currencies.exchangeRates:
    post:
      tags:
        - currencies
      summary: currencies.exchangeRates
      description: Get a list of exchange rates for a provided currency.
      operationId: currencies.exchangeRates
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/currencies.exchangeRates.request'
                - example:
                    base: EUR
            example:
              base: EUR
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/currencies.exchangeRates.response'
                  - example:
                      data:
                        - code: USD
                          symbol: $
                          name: US Dollar
                          exchange_rate: 1.1238
              example:
                data:
                  - code: USD
                    symbol: $
                    name: US Dollar
                    exchange_rate: 1.1238
      deprecated: false
  /notes.list:
    post:
      tags:
        - notes
      summary: notes.list
      description: Get a list of all notes.
      operationId: notes.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json;charset=utf-8:
            schema:
              allOf:
                - $ref: '#/components/schemas/notes.list.request'
                - example:
                    filter:
                      subject:
                        type: contact
                        id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                subject:
                  type: contact
                  id: 36386b05-936e-4cc0-9523-bd20d797ebf5
              page:
                size: 20
                number: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json;charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/notes.list.response'
                  - example:
                      data:
                        - id: a344c251-2494-0013-b433-ccee8e8435e5
                          content: new note content
                          subject:
                            type: contact
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          added_at: '2016-01-01T00:00:00+00:00'
              example:
                data:
                  - id: a344c251-2494-0013-b433-ccee8e8435e5
                    content: new note content
                    subject:
                      type: contact
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    added_at: '2016-01-01T00:00:00+00:00'
      deprecated: false
  /notes.create:
    post:
      tags:
        - notes
      summary: notes.create
      description: Create a new note.
      operationId: notes.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/notes.create.request'
                - example:
                    subject:
                      type: contact
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    content: new note content
                    notify:
                      - type: user
                        id: f29abf48-337d-44b4-aad4-585f5277a456
            example:
              subject:
                type: contact
                id: 36386b05-936e-4cc0-9523-bd20d797ebf5
              content: new note content
              notify:
                - type: user
                  id: f29abf48-337d-44b4-aad4-585f5277a456
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/notes.create.response'
                  - example:
                      data:
                        type: note
                        id: ee94b4c0-5786-0517-9d26-8dd1e6406f20
              example:
                data:
                  type: note
                  id: ee94b4c0-5786-0517-9d26-8dd1e6406f20
      deprecated: false
  /notes.update:
    post:
      tags:
        - notes
      summary: notes.update
      description: Update an existing note.
      operationId: notes.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/notes.update.request'
                - example:
                    id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    content: new note content
            example:
              id: 36386b05-936e-4cc0-9523-bd20d797ebf5
              content: new note content
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /notes.delete:
    post:
      tags:
        - notes
      summary: notes.delete
      description: Delete a note.
      operationId: notes.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/notes.delete.request'
                - example:
                    id: 36386b05-936e-4cc0-9523-bd20d797ebf5
            example:
              id: 36386b05-936e-4cc0-9523-bd20d797ebf5
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /emailTracking.list:
    post:
      tags:
        - email_tracking
      summary: emailTracking.list
      description: Get a list of all email tracking.
      operationId: emailTracking.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json;charset=utf-8:
            schema:
              allOf:
                - $ref: '#/components/schemas/emailTracking.list.request'
                - example:
                    filter:
                      subject:
                        type: contact
                        id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                subject:
                  type: contact
                  id: 36386b05-936e-4cc0-9523-bd20d797ebf5
              page:
                size: 20
                number: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json;charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/emailTracking.list.response'
                  - example:
                      data:
                        - id: a344c251-2494-0013-b433-ccee8e8435e5
                          title: an email subject
                          content: <p>the contents of the received email</p>
                          subject:
                            type: contact
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          added_at: '2016-01-01T00:00:00+00:00'
                          attachments:
                            - type: file
                              id: 0686d0da-1797-475b-ae94-27191b2eca4d
              example:
                data:
                  - id: a344c251-2494-0013-b433-ccee8e8435e5
                    title: an email subject
                    content: <p>the contents of the received email</p>
                    subject:
                      type: contact
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    added_at: '2016-01-01T00:00:00+00:00'
                    attachments:
                      - type: file
                        id: 0686d0da-1797-475b-ae94-27191b2eca4d
      deprecated: false
  /emailTracking.create:
    post:
      tags:
        - email_tracking
      summary: emailTracking.create
      description: Create a new email tracking.
      operationId: emailTracking.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/emailTracking.create.request'
                - example:
                    subject:
                      type: contact
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    title: an email subject
                    content: <p>the contents of the received email</p>
                    attachments:
                      - 4f4288b2-c21b-4dac-87f6-a97511309079
            example:
              subject:
                type: contact
                id: 36386b05-936e-4cc0-9523-bd20d797ebf5
              title: an email subject
              content: <p>the contents of the received email</p>
              attachments:
                - 4f4288b2-c21b-4dac-87f6-a97511309079
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/emailTracking.create.response'
                  - example:
                      data:
                        type: emailTracking
                        id: 91e99ae3-16f9-01d7-9046-9a501cb2155f
              example:
                data:
                  type: emailTracking
                  id: 91e99ae3-16f9-01d7-9046-9a501cb2155f
      deprecated: false
  /closingDays.list:
    post:
      tags:
        - closing_days
      summary: closingDays.list
      description: Returns information about closing days of the account
      operationId: closingDays.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/closingDays.list.request'
                - example:
                    filter:
                      date_before: '2023-12-31'
                      date_after: '2023-12-01'
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                date_before: '2023-12-31'
                date_after: '2023-12-01'
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/closingDays.list.response'
                  - example:
                      data:
                        - id: 05676ac4-c61d-42bf-a3ea-a420fc1ec017
                          date: '2023-12-21'
                      meta:
                        page:
                          size: 10
                          number: 2
                        matches: 12
              example:
                data:
                  - id: 05676ac4-c61d-42bf-a3ea-a420fc1ec017
                    date: '2023-12-21'
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 12
      deprecated: false
  /closingDays.add:
    post:
      tags:
        - closing_days
      summary: closingDays.add
      description: Adds a closing day for the account.
      operationId: closingDays.add
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/closingDays.add.request'
                - example:
                    day: '2024-02-01'
            example:
              day: '2024-02-01'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/closingDays.add.response'
                  - example:
                      data:
                        type: closingDay
                        id: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
              example:
                data:
                  type: closingDay
                  id: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
      deprecated: false
  /closingDays.delete:
    post:
      tags:
        - closing_days
      summary: closingDays.delete
      description: Removes a closing day for the account.
      operationId: closingDays.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/closingDays.delete.request'
                - example:
                    id: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
            example:
              id: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dayOffTypes.list:
    post:
      tags:
        - day_off_types
      summary: dayOffTypes.list
      description: Returns a list of day off types for the account
      operationId: dayOffTypes.list
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dayOffTypes.list.response'
                  - example:
                      data:
                        - id: 39263c14-9c16-022d-8513-60cf722ab088
                          name: Sick leave
              example:
                data:
                  - id: 39263c14-9c16-022d-8513-60cf722ab088
                    name: Sick leave
      deprecated: false
  /dayOffTypes.create:
    post:
      tags:
        - day_off_types
      summary: dayOffTypes.create
      description: Create a new day off type.
      operationId: dayOffTypes.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dayOffTypes.create.request'
                - example:
                    name: day off type
                    color: '#00B2B2'
                    date_validity:
                      from: '2024-04-04'
                      until: '2025-05-05'
            example:
              name: day off type
              color: '#00B2B2'
              date_validity:
                from: '2024-04-04'
                until: '2025-05-05'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dayOffTypes.create.response'
                  - example:
                      data:
                        type: dayOffType
                        id: cf307a90-d778-003c-b820-ab8415d1a524
              example:
                data:
                  type: dayOffType
                  id: cf307a90-d778-003c-b820-ab8415d1a524
      deprecated: false
  /dayOffTypes.update:
    post:
      tags:
        - day_off_types
      summary: dayOffTypes.update
      description: Update a day off type.
      operationId: dayOffTypes.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dayOffTypes.update.request'
                - example:
                    id: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
                    name: day off type
                    color: '#00B2B2'
                    date_validity:
                      from: '2024-04-04'
                      until: '2025-05-05'
            example:
              id: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
              name: day off type
              color: '#00B2B2'
              date_validity:
                from: '2024-04-04'
                until: '2025-05-05'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dayOffTypes.delete:
    post:
      tags:
        - day_off_types
      summary: dayOffTypes.delete
      description: Delete a day off type.
      operationId: dayOffTypes.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dayOffTypes.delete.request'
                - example:
                    id: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
            example:
              id: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /daysOff.import:
    post:
      tags:
        - days_off
      summary: daysOff.import
      description: Imports a list of days off for the given user. Each day is either timed, using `starts_at` and `ends_at`, or a full day, using `date` on its own.
      operationId: daysOff.import
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/daysOff.import.request'
                - example:
                    user_id: f29abf48-337d-44b4-aad4-585f5277a456
                    leave_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    days:
                      - starts_at: '2024-02-01T08:00:00+00:00'
                        ends_at: '2024-02-01T18:00:00+00:00'
                      - date: '2024-02-02'
            example:
              user_id: f29abf48-337d-44b4-aad4-585f5277a456
              leave_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
              days:
                - starts_at: '2024-02-01T08:00:00+00:00'
                  ends_at: '2024-02-01T18:00:00+00:00'
                - date: '2024-02-02'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /daysOff.bulkDelete:
    post:
      tags:
        - days_off
      summary: daysOff.bulkDelete
      description: Deletes a list of days off for the given user.
      operationId: daysOff.bulkDelete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/daysOff.bulkDelete.request'
                - example:
                    user_id: f29abf48-337d-44b4-aad4-585f5277a456
                    ids:
                      - 0a481ce9-0d2a-0913-9439-0fd8b469b566
                      - 5050789e-4385-02f6-bd3c-d051cc12f5cf
            example:
              user_id: f29abf48-337d-44b4-aad4-585f5277a456
              ids:
                - 0a481ce9-0d2a-0913-9439-0fd8b469b566
                - 5050789e-4385-02f6-bd3c-d051cc12f5cf
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.list:
    post:
      tags:
        - contacts
      summary: contacts.list
      description: Get a list of contacts.
      operationId: contacts.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.list.request'
                - example:
                    filter:
                      email:
                        type: primary
                        email: info@piedpiper.eu
                      ids:
                        - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                      company_id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                      term: James
                      updated_since: '2016-02-04T16:44:33+00:00'
                      tags:
                        - expo
                        - prospect
                      status: active
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: added_at
                    includes: custom_fields
            example:
              filter:
                email:
                  type: primary
                  email: info@piedpiper.eu
                ids:
                  - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                company_id: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                term: James
                updated_since: '2016-02-04T16:44:33+00:00'
                tags:
                  - expo
                  - prospect
                status: active
                marketing_mails_consent: true
              page:
                size: 20
                number: 1
              sort:
                - field: added_at
              includes: custom_fields
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/contacts.list.response'
                  - example:
                      data:
                        - id: 2a39e420-3ba3-4384-8024-fa702ef99c9f
                          first_name: Erlich
                          last_name: Bachman
                          status: active
                          salutation: Mr
                          emails:
                            - type: primary
                              email: info@piedpiper.eu
                          telephones:
                            - type: phone
                              number: '092980615'
                          website: https://piedpiper.com
                          primary_address:
                            line_1: Dok Noord 3A 101
                            postal_code: '9000'
                            city: Ghent
                            country: BE
                            area_level_two:
                              type: area_level_two
                              id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                          gender: unknown
                          birthdate: '1987-04-25'
                          iban: BE12123412341234
                          bic: BICBANK
                          national_identification_number: 86792345-L
                          language: en
                          payment_term:
                            type: cash
                          invoicing_preferences:
                            electronic_invoicing_address: null
                          tags:
                            - prospect
                            - expo
                          marketing_mails_consent: false
                          added_at: '2016-02-04T16:44:33+00:00'
                          updated_at: '2016-02-05T16:44:33+00:00'
                          web_url: https://focus.teamleader.eu/contact_detail.php?id=2a39e420-3ba3-4384-8024-fa702ef99c9f
                          custom_fields:
                            - definition:
                                type: customFieldDefinition
                                id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                              value: '092980616'
                          price_list:
                            type: priceList
                            id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              example:
                data:
                  - id: 2a39e420-3ba3-4384-8024-fa702ef99c9f
                    first_name: Erlich
                    last_name: Bachman
                    status: active
                    salutation: Mr
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: https://piedpiper.com
                    primary_address:
                      line_1: Dok Noord 3A 101
                      postal_code: '9000'
                      city: Ghent
                      country: BE
                      area_level_two:
                        type: area_level_two
                        id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    gender: unknown
                    birthdate: '1987-04-25'
                    iban: BE12123412341234
                    bic: BICBANK
                    national_identification_number: 86792345-L
                    language: en
                    payment_term:
                      type: cash
                    invoicing_preferences:
                      electronic_invoicing_address: null
                    tags:
                      - prospect
                      - expo
                    marketing_mails_consent: false
                    added_at: '2016-02-04T16:44:33+00:00'
                    updated_at: '2016-02-05T16:44:33+00:00'
                    web_url: https://focus.teamleader.eu/contact_detail.php?id=2a39e420-3ba3-4384-8024-fa702ef99c9f
                    custom_fields:
                      - definition:
                          type: customFieldDefinition
                          id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    price_list:
                      type: priceList
                      id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
      deprecated: false
  /contacts.info:
    post:
      tags:
        - contacts
      summary: contacts.info
      description: Get details for a single contact.
      operationId: contacts.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.info.request'
                - example:
                    id: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
            example:
              id: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/contacts.info.response'
                  - example:
                      data:
                        id: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
                        first_name: Erlich
                        last_name: Bachman
                        status: active
                        salutation: Mr
                        vat_number: BE0899623034
                        emails:
                          - type: primary
                            email: info@piedpiper.eu
                        telephones:
                          - type: phone
                            number: '092980615'
                        website: https://piedpiper.com
                        addresses:
                          - type: invoicing
                            address:
                              addressee: Teamleader HQ
                              line_1: Dok Noord 3A 101
                              postal_code: '9000'
                              city: Ghent
                              country: BE
                              area_level_two:
                                type: area_level_two
                                id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                        gender: unknown
                        birthdate: '1987-04-25'
                        iban: BE12123412341234
                        bic: BICBANK
                        national_identification_number: 00051730-A
                        companies:
                          - position: Developer
                            secondary_position: Technical lead
                            division: '''Engineering'''
                            decision_maker: true
                            company:
                              type: company
                              id: 40157f9d-1322-4f2e-b245-188efdc52cc2
                        language: en
                        payment_term:
                          type: cash
                        invoicing_preferences:
                          electronic_invoicing_address: null
                        remarks: First contact at expo
                        tags:
                          - prospect
                          - expo
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        marketing_mails_consent: false
                        added_at: '2016-02-04T16:44:33+00:00'
                        updated_at: '2016-02-05T16:44:33+00:00'
                        web_url: https://focus.teamleader.eu/contact_detail.php?id=cde0bc5f-8602-4e12-b5d3-f03436b54c0d
                        price_list:
                          type: priceList
                          id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              example:
                data:
                  id: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
                  first_name: Erlich
                  last_name: Bachman
                  status: active
                  salutation: Mr
                  vat_number: BE0899623034
                  emails:
                    - type: primary
                      email: info@piedpiper.eu
                  telephones:
                    - type: phone
                      number: '092980615'
                  website: https://piedpiper.com
                  addresses:
                    - type: invoicing
                      address:
                        addressee: Teamleader HQ
                        line_1: Dok Noord 3A 101
                        postal_code: '9000'
                        city: Ghent
                        country: BE
                        area_level_two:
                          type: area_level_two
                          id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                  gender: unknown
                  birthdate: '1987-04-25'
                  iban: BE12123412341234
                  bic: BICBANK
                  national_identification_number: 00051730-A
                  companies:
                    - position: Developer
                      secondary_position: Technical lead
                      division: '''Engineering'''
                      decision_maker: true
                      company:
                        type: company
                        id: 40157f9d-1322-4f2e-b245-188efdc52cc2
                  language: en
                  payment_term:
                    type: cash
                  invoicing_preferences:
                    electronic_invoicing_address: null
                  remarks: First contact at expo
                  tags:
                    - prospect
                    - expo
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  marketing_mails_consent: false
                  added_at: '2016-02-04T16:44:33+00:00'
                  updated_at: '2016-02-05T16:44:33+00:00'
                  web_url: https://focus.teamleader.eu/contact_detail.php?id=cde0bc5f-8602-4e12-b5d3-f03436b54c0d
                  price_list:
                    type: priceList
                    id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
      deprecated: false
  /contacts.add:
    post:
      tags:
        - contacts
      summary: contacts.add
      description: Add a new contact.
      operationId: contacts.add
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.add.request'
                - example:
                    first_name: John
                    last_name: Smith
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    salutation: Mr
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: http://example.com
                    addresses:
                      - type: invoicing
                        address:
                          addressee: Teamleader HQ
                          line_1: Dok Noord 3A 101
                          postal_code: '9000'
                          city: Ghent
                          country: BE
                          area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    language: en
                    gender: unknown
                    birthdate: '1989-08-19'
                    iban: BE12123412341234
                    bic: BICBANK
                    national_identification_number: 01234567-X
                    remarks: Met at expo
                    tags:
                      - prospect
                      - expo
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    marketing_mails_consent: false
                    price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
            example:
              first_name: John
              last_name: Smith
              emails:
                - type: primary
                  email: info@piedpiper.eu
              salutation: Mr
              telephones:
                - type: phone
                  number: '092980615'
              website: http://example.com
              addresses:
                - type: invoicing
                  address:
                    addressee: Teamleader HQ
                    line_1: Dok Noord 3A 101
                    postal_code: '9000'
                    city: Ghent
                    country: BE
                    area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
              language: en
              gender: unknown
              birthdate: '1989-08-19'
              iban: BE12123412341234
              bic: BICBANK
              national_identification_number: 01234567-X
              remarks: Met at expo
              tags:
                - prospect
                - expo
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              marketing_mails_consent: false
              price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/contacts.add.response'
                  - example:
                      data:
                        type: contact
                        id: 7c1d8672-f502-4333-9ea4-7a45add15115
              example:
                data:
                  type: contact
                  id: 7c1d8672-f502-4333-9ea4-7a45add15115
      deprecated: false
  /contacts.update:
    post:
      tags:
        - contacts
      summary: contacts.update
      description: Update a contact.
      operationId: contacts.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.update.request'
                - example:
                    id: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
                    first_name: John
                    last_name: Smith
                    salutation: Mr
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: http://example.com
                    addresses:
                      - type: invoicing
                        address:
                          addressee: Teamleader HQ
                          line_1: Dok Noord 3A 101
                          postal_code: '9000'
                          city: Ghent
                          country: BE
                          area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    language: en
                    gender: unknown
                    birthdate: '1989-08-19'
                    iban: BE12123412341234
                    bic: BICBANK
                    national_identification_number: 19346758-T
                    remarks: Met at expo
                    tags:
                      - prospect
                      - expo
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    marketing_mails_consent: false
                    price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
            example:
              id: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
              first_name: John
              last_name: Smith
              salutation: Mr
              emails:
                - type: primary
                  email: info@piedpiper.eu
              telephones:
                - type: phone
                  number: '092980615'
              website: http://example.com
              addresses:
                - type: invoicing
                  address:
                    addressee: Teamleader HQ
                    line_1: Dok Noord 3A 101
                    postal_code: '9000'
                    city: Ghent
                    country: BE
                    area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
              language: en
              gender: unknown
              birthdate: '1989-08-19'
              iban: BE12123412341234
              bic: BICBANK
              national_identification_number: 19346758-T
              remarks: Met at expo
              tags:
                - prospect
                - expo
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              marketing_mails_consent: false
              price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.delete:
    post:
      tags:
        - contacts
      summary: contacts.delete
      description: Delete a contact.
      operationId: contacts.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.delete.request'
                - example:
                    id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
            example:
              id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.tag:
    post:
      tags:
        - contacts
      summary: contacts.tag
      description: Add a new or existing tag to a contact.
      operationId: contacts.tag
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.tag.request'
                - example:
                    id: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
                    tags:
                      - prospect
                      - expo
            example:
              id: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
              tags:
                - prospect
                - expo
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.untag:
    post:
      tags:
        - contacts
      summary: contacts.untag
      description: Remove a tag from a contact.
      operationId: contacts.untag
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.untag.request'
                - example:
                    id: 518d2e5e-99bc-4c66-8509-78e6820a1418
                    tags:
                      - prospect
                      - expo
            example:
              id: 518d2e5e-99bc-4c66-8509-78e6820a1418
              tags:
                - prospect
                - expo
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.linkToCompany:
    post:
      tags:
        - contacts
      summary: contacts.linkToCompany
      description: Link a contact to a company.
      operationId: contacts.linkToCompany
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.linkToCompany.request'
                - example:
                    id: 75596038-b9c8-4a37-969d-61059e300a28
                    company_id: 4da20f00-0628-4336-b885-aa90e580dd85
                    position: CEO
                    decision_maker: true
            example:
              id: 75596038-b9c8-4a37-969d-61059e300a28
              company_id: 4da20f00-0628-4336-b885-aa90e580dd85
              position: CEO
              decision_maker: true
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.unlinkFromCompany:
    post:
      tags:
        - contacts
      summary: contacts.unlinkFromCompany
      description: Unlink a contact from a company.
      operationId: contacts.unlinkFromCompany
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.unlinkFromCompany.request'
                - example:
                    id: b4b3160a-b55e-4033-bdae-25b6d22949b4
                    company_id: 3f1c8650-4292-4187-bb02-4aa00bbe9632
            example:
              id: b4b3160a-b55e-4033-bdae-25b6d22949b4
              company_id: 3f1c8650-4292-4187-bb02-4aa00bbe9632
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.updateCompanyLink:
    post:
      tags:
        - contacts
      summary: contacts.updateCompanyLink
      description: Update contact to company link.
      operationId: contacts.updateCompanyLink
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.updateCompanyLink.request'
                - example:
                    id: 75596038-b9c8-4a37-969d-61059e300a28
                    company_id: 4da20f00-0628-4336-b885-aa90e580dd85
                    position: CEO
                    decision_maker: true
            example:
              id: 75596038-b9c8-4a37-969d-61059e300a28
              company_id: 4da20f00-0628-4336-b885-aa90e580dd85
              position: CEO
              decision_maker: true
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /contacts.uploadAvatar:
    post:
      tags:
        - contacts
      summary: contacts.uploadAvatar
      description: Update the avatar of a contact.
      operationId: contacts.uploadAvatar
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/contacts.uploadAvatar.request'
                - example:
                    id: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
                    image: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
            example:
              id: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
              image: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /companies.list:
    post:
      tags:
        - companies
      summary: companies.list
      description: Get a list of companies.
      operationId: companies.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.list.request'
                - example:
                    filter:
                      email:
                        type: primary
                        email: info@piedpiper.eu
                      ids:
                        - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                      term: Acme
                      updated_since: '2016-02-04T16:44:33+00:00'
                      tags:
                        - expo
                        - lead
                      vat_number: BE 0899.623.035
                      national_identification_number: '63326426'
                      status: active
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: name
                    includes: custom_fields
            example:
              filter:
                email:
                  type: primary
                  email: info@piedpiper.eu
                ids:
                  - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                term: Acme
                updated_since: '2016-02-04T16:44:33+00:00'
                tags:
                  - expo
                  - lead
                vat_number: BE 0899.623.035
                national_identification_number: '63326426'
                status: active
                marketing_mails_consent: true
              page:
                size: 20
                number: 1
              sort:
                - field: name
              includes: custom_fields
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/companies.list.response'
                  - example:
                      data:
                        - id: 96a38bbf-24ed-4083-8a5c-20db92aa471e
                          name: Pied Piper
                          status: active
                          business_type:
                            type: businessType
                            id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                          vat_number: BE0899623035
                          national_identification_number: '63326426'
                          emails:
                            - type: primary
                              email: info@piedpiper.eu
                          telephones:
                            - type: phone
                              number: '092980615'
                          website: https://piedpiper.com
                          primary_address:
                            line_1: Dok Noord 3A 101
                            postal_code: '9000'
                            city: Ghent
                            country: BE
                            area_level_two:
                              type: area_level_two
                              id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                          iban: BE12123412341234
                          bic: BICBANK
                          language: nl
                          preferred_currency: EUR
                          payment_term:
                            type: cash
                          invoicing_preferences:
                            electronic_invoicing_address: null
                          responsible_user:
                            type: user
                            id: 9b99d8f8-183b-4c7b-8354-9b98b47a192e
                          marketing_mails_consent: false
                          added_at: '2016-02-04T16:44:33+00:00'
                          updated_at: '2016-02-05T16:44:33+00:00'
                          web_url: https://focus.teamleader.eu/company_detail.php?id=96a38bbf-24ed-4083-8a5c-20db92aa471e
                          tags:
                            - prospect
                            - expo
                          custom_fields:
                            - definition:
                                type: customFieldDefinition
                                id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                              value: '092980616'
                          price_list:
                            type: priceList
                            id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              example:
                data:
                  - id: 96a38bbf-24ed-4083-8a5c-20db92aa471e
                    name: Pied Piper
                    status: active
                    business_type:
                      type: businessType
                      id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                    vat_number: BE0899623035
                    national_identification_number: '63326426'
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: https://piedpiper.com
                    primary_address:
                      line_1: Dok Noord 3A 101
                      postal_code: '9000'
                      city: Ghent
                      country: BE
                      area_level_two:
                        type: area_level_two
                        id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    iban: BE12123412341234
                    bic: BICBANK
                    language: nl
                    preferred_currency: EUR
                    payment_term:
                      type: cash
                    invoicing_preferences:
                      electronic_invoicing_address: null
                    responsible_user:
                      type: user
                      id: 9b99d8f8-183b-4c7b-8354-9b98b47a192e
                    marketing_mails_consent: false
                    added_at: '2016-02-04T16:44:33+00:00'
                    updated_at: '2016-02-05T16:44:33+00:00'
                    web_url: https://focus.teamleader.eu/company_detail.php?id=96a38bbf-24ed-4083-8a5c-20db92aa471e
                    tags:
                      - prospect
                      - expo
                    custom_fields:
                      - definition:
                          type: customFieldDefinition
                          id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    price_list:
                      type: priceList
                      id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
      deprecated: false
  /companies.info:
    post:
      tags:
        - companies
      summary: companies.info
      description: Get details for a single company.
      operationId: companies.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.info.request'
                - example:
                    id: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
                    includes: related_companies,related_contacts
            example:
              id: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
              includes: related_companies,related_contacts
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/companies.info.response'
                  - example:
                      data:
                        id: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
                        name: Pied Piper
                        status: active
                        business_type:
                          type: businessType
                          id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                        vat_number: BE0899623035
                        national_identification_number: '63326426'
                        emails:
                          - type: primary
                            email: info@piedpiper.eu
                        telephones:
                          - type: phone
                            number: '092980615'
                        website: https://piedpiper.com
                        addresses:
                          - type: invoicing
                            address:
                              addressee: Teamleader HQ
                              line_1: Dok Noord 3A 101
                              postal_code: '9000'
                              city: Ghent
                              country: BE
                              area_level_two:
                                type: area_level_two
                                id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                        iban: BE12123412341234
                        bic: BICBANK
                        language: nl
                        preferred_currency: EUR
                        payment_term:
                          type: cash
                        invoicing_preferences:
                          electronic_invoicing_address: null
                        responsible_user:
                          type: user
                          id: 7ba98a20-5e2b-4b46-81b9-a3364432d4f0
                        remarks: First contact at expo
                        added_at: '2016-02-04T16:44:33+00:00'
                        updated_at: '2016-02-05T16:44:33+00:00'
                        web_url: https://focus.teamleader.eu/company_detail.php?id=e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
                        tags:
                          - prospect
                          - expo
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        marketing_mails_consent: false
                        related_companies:
                          - type: company
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                        related_contacts:
                          - type: contact
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                            position: Developer
                            secondary_position: Technical lead
                            division: Engineering
                            is_decision_maker: false
                        price_list:
                          type: priceList
                          id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              example:
                data:
                  id: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
                  name: Pied Piper
                  status: active
                  business_type:
                    type: businessType
                    id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                  vat_number: BE0899623035
                  national_identification_number: '63326426'
                  emails:
                    - type: primary
                      email: info@piedpiper.eu
                  telephones:
                    - type: phone
                      number: '092980615'
                  website: https://piedpiper.com
                  addresses:
                    - type: invoicing
                      address:
                        addressee: Teamleader HQ
                        line_1: Dok Noord 3A 101
                        postal_code: '9000'
                        city: Ghent
                        country: BE
                        area_level_two:
                          type: area_level_two
                          id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                  iban: BE12123412341234
                  bic: BICBANK
                  language: nl
                  preferred_currency: EUR
                  payment_term:
                    type: cash
                  invoicing_preferences:
                    electronic_invoicing_address: null
                  responsible_user:
                    type: user
                    id: 7ba98a20-5e2b-4b46-81b9-a3364432d4f0
                  remarks: First contact at expo
                  added_at: '2016-02-04T16:44:33+00:00'
                  updated_at: '2016-02-05T16:44:33+00:00'
                  web_url: https://focus.teamleader.eu/company_detail.php?id=e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
                  tags:
                    - prospect
                    - expo
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  marketing_mails_consent: false
                  related_companies:
                    - type: company
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                  related_contacts:
                    - type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                      position: Developer
                      secondary_position: Technical lead
                      division: Engineering
                      is_decision_maker: false
                  price_list:
                    type: priceList
                    id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
      deprecated: false
  /companies.add:
    post:
      tags:
        - companies
      summary: companies.add
      description: Add a new company.
      operationId: companies.add
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.add.request'
                - example:
                    name: Pied Piper
                    business_type_id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                    vat_number: BE0899623035
                    national_identification_number: '63326426'
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: http://example.com
                    addresses:
                      - type: invoicing
                        address:
                          addressee: Teamleader HQ
                          line_1: Dok Noord 3A 101
                          postal_code: '9000'
                          city: Ghent
                          country: BE
                          area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    iban: BE12123412341234
                    bic: BICBANK
                    language: en
                    responsible_user_id: 2b12bd5d-d2d9-43ac-8755-36a1e00bd67f
                    remarks: Met at expo
                    tags:
                      - prospect
                      - expo
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    marketing_mails_consent: false
                    preferred_currency: EUR
                    price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
            example:
              name: Pied Piper
              business_type_id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
              vat_number: BE0899623035
              national_identification_number: '63326426'
              emails:
                - type: primary
                  email: info@piedpiper.eu
              telephones:
                - type: phone
                  number: '092980615'
              website: http://example.com
              addresses:
                - type: invoicing
                  address:
                    addressee: Teamleader HQ
                    line_1: Dok Noord 3A 101
                    postal_code: '9000'
                    city: Ghent
                    country: BE
                    area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
              iban: BE12123412341234
              bic: BICBANK
              language: en
              responsible_user_id: 2b12bd5d-d2d9-43ac-8755-36a1e00bd67f
              remarks: Met at expo
              tags:
                - prospect
                - expo
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              marketing_mails_consent: false
              preferred_currency: EUR
              price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/companies.add.response'
                  - example:
                      data:
                        type: company
                        id: 4784189d-610b-4488-b3a5-5f324f752417
              example:
                data:
                  type: company
                  id: 4784189d-610b-4488-b3a5-5f324f752417
      deprecated: false
  /companies.update:
    post:
      tags:
        - companies
      summary: companies.update
      description: Update a company.
      operationId: companies.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.update.request'
                - example:
                    id: 4784189d-610b-4488-b3a5-5f324f752417
                    name: Pied Piper
                    business_type_id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                    vat_number: BE0899623035
                    national_identification_number: '63326426'
                    emails:
                      - type: primary
                        email: info@piedpiper.eu
                    telephones:
                      - type: phone
                        number: '092980615'
                    website: http://example.com
                    addresses:
                      - type: invoicing
                        address:
                          addressee: Teamleader HQ
                          line_1: Dok Noord 3A 101
                          postal_code: '9000'
                          city: Ghent
                          country: BE
                          area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
                    iban: BE12123412341234
                    bic: BICBANK
                    language: en
                    responsible_user_id: 0ea94804-401d-4dbd-a577-c2d60998f798
                    remarks: Met at expo
                    tags:
                      - prospect
                      - expo
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    marketing_mails_consent: false
                    preferred_currency: EUR
                    price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
            example:
              id: 4784189d-610b-4488-b3a5-5f324f752417
              name: Pied Piper
              business_type_id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
              vat_number: BE0899623035
              national_identification_number: '63326426'
              emails:
                - type: primary
                  email: info@piedpiper.eu
              telephones:
                - type: phone
                  number: '092980615'
              website: http://example.com
              addresses:
                - type: invoicing
                  address:
                    addressee: Teamleader HQ
                    line_1: Dok Noord 3A 101
                    postal_code: '9000'
                    city: Ghent
                    country: BE
                    area_level_two_id: db232cf8-ad4a-024b-941f-15a7a74f0fd2
              iban: BE12123412341234
              bic: BICBANK
              language: en
              responsible_user_id: 0ea94804-401d-4dbd-a577-c2d60998f798
              remarks: Met at expo
              tags:
                - prospect
                - expo
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              marketing_mails_consent: false
              preferred_currency: EUR
              price_list_id: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /companies.uploadLogo:
    post:
      tags:
        - companies
      summary: companies.uploadLogo
      description: Update the logo of a company.
      operationId: companies.uploadLogo
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.uploadLogo.request'
                - example:
                    id: 4784189d-610b-4488-b3a5-5f324f752417
                    image: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
            example:
              id: 4784189d-610b-4488-b3a5-5f324f752417
              image: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /companies.delete:
    post:
      tags:
        - companies
      summary: companies.delete
      description: Delete a company.
      operationId: companies.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.delete.request'
                - example:
                    id: f3d67f3e-b8a9-45e8-99b1-17a3b14de8a6
            example:
              id: f3d67f3e-b8a9-45e8-99b1-17a3b14de8a6
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /companies.tag:
    post:
      tags:
        - companies
      summary: companies.tag
      description: Add a new or existing tag to a company.
      operationId: companies.tag
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.tag.request'
                - example:
                    id: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
                    tags:
                      - prospect
                      - expo
            example:
              id: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
              tags:
                - prospect
                - expo
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /companies.untag:
    post:
      tags:
        - companies
      summary: companies.untag
      description: Remove a tag from a company.
      operationId: companies.untag
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/companies.untag.request'
                - example:
                    id: 518d2e5e-99bc-4c66-8509-78e6820a1418
                    tags:
                      - prospect
                      - expo
            example:
              id: 518d2e5e-99bc-4c66-8509-78e6820a1418
              tags:
                - prospect
                - expo
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /businessTypes.list:
    post:
      tags:
        - business_types
      summary: businessTypes.list
      description: Get the names of business types (legal structures) a company can have within a certain country, sorted alphabetically.
      operationId: businessTypes.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/businessTypes.list.request'
                - example:
                    country: BE
            example:
              country: BE
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/businessTypes.list.response'
                  - example:
                      data:
                        - id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                          name: VZW/ASBL
                          country: BE
              example:
                data:
                  - id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                    name: VZW/ASBL
                    country: BE
      deprecated: false
  /tags.list:
    post:
      tags:
        - tags
      summary: tags.list
      description: Get a list of tags.
      operationId: tags.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tags.list.request'
                - example:
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: tag
                        order: asc
            example:
              page:
                size: 20
                number: 1
              sort:
                - field: tag
                  order: asc
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tags.list.response'
                  - example:
                      data:
                        - tag: campaign
              example:
                data:
                  - tag: campaign
      deprecated: false
  /levelTwoAreas.list:
    post:
      tags:
        - addresses
      summary: levelTwoAreas.list
      description: Get a list of level two areas (which correspond to provinces, departments or states in most countries).
      operationId: levelTwoAreas.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/levelTwoAreas.list.request'
                - example:
                    country: BE
                    language: nl
            example:
              country: BE
              language: nl
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/levelTwoAreas.list.response'
                  - example:
                      data:
                        - id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                          name: West-Vlaanderen
                          country: BE
              example:
                data:
                  - id: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
                    name: West-Vlaanderen
                    country: BE
      deprecated: false
  /deals.list:
    post:
      tags:
        - deals
      summary: deals.list
      description: Get a list of deals.
      operationId: deals.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/deals.list.response'
                  - example:
                      data:
                        - id: 6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                          title: Interesting deal
                          summary: Additional information
                          reference: 2017/2
                          status: won
                          lead:
                            customer:
                              type: company
                              id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                            contact_person:
                              type: contact
                              id: 74c6769e-815a-4774-87d7-dfab9b1a0abb
                          department:
                            type: department
                            id: 33121d39-44e2-426a-92ef-62178edeec8a
                          estimated_value:
                            amount: 123.3
                            currency: EUR
                          estimated_closing_date: '2017-05-09'
                          estimated_probability: 0.5
                          weighted_value:
                            amount: 123.3
                            currency: EUR
                          purchase_order_number: '000023'
                          current_phase:
                            type: dealPhase
                            id: 521a331d-60d1-4920-bde3-ccd01d09f9f1
                          responsible_user:
                            type: user
                            id: bac1c91b-bc86-489b-8590-9be9478f62bb
                          closed_at: '2017-05-09T11:31:30+00:00'
                          source:
                            type: dealSource
                            id: 52a4bbb2-d196-48d7-8e43-9ec2f44d06f9
                          lost_reason:
                            reason:
                              type: lostReason
                              id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                            remark: Too expensive
                          created_at: '2017-05-09T11:25:11+00:00'
                          updated_at: '2017-05-09T11:30:58+00:00'
                          web_url: https://focus.teamleader.eu/sale_detail.php?id=6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                          custom_fields:
                            - definition:
                                type: customFieldDefinition
                                id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                              value: '092980616'
                          currency_exchange_rate:
                            from: USD
                            to: EUR
                            rate: 1.1234
                          pipeline:
                            type: dealPipeline
                            id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
              example:
                data:
                  - id: 6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                    title: Interesting deal
                    summary: Additional information
                    reference: 2017/2
                    status: won
                    lead:
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                      contact_person:
                        type: contact
                        id: 74c6769e-815a-4774-87d7-dfab9b1a0abb
                    department:
                      type: department
                      id: 33121d39-44e2-426a-92ef-62178edeec8a
                    estimated_value:
                      amount: 123.3
                      currency: EUR
                    estimated_closing_date: '2017-05-09'
                    estimated_probability: 0.5
                    weighted_value:
                      amount: 123.3
                      currency: EUR
                    purchase_order_number: '000023'
                    current_phase:
                      type: dealPhase
                      id: 521a331d-60d1-4920-bde3-ccd01d09f9f1
                    responsible_user:
                      type: user
                      id: bac1c91b-bc86-489b-8590-9be9478f62bb
                    closed_at: '2017-05-09T11:31:30+00:00'
                    source:
                      type: dealSource
                      id: 52a4bbb2-d196-48d7-8e43-9ec2f44d06f9
                    lost_reason:
                      reason:
                        type: lostReason
                        id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                      remark: Too expensive
                    created_at: '2017-05-09T11:25:11+00:00'
                    updated_at: '2017-05-09T11:30:58+00:00'
                    web_url: https://focus.teamleader.eu/sale_detail.php?id=6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                    custom_fields:
                      - definition:
                          type: customFieldDefinition
                          id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    currency_exchange_rate:
                      from: USD
                      to: EUR
                      rate: 1.1234
                    pipeline:
                      type: dealPipeline
                      id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
      deprecated: false
  /deals.info:
    post:
      tags:
        - deals
      summary: deals.info
      description: Get details for a single deal.
      operationId: deals.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.info.request'
                - example:
                    id: f6871b06-6513-4750-b5e6-ff3503b5a029
            example:
              id: f6871b06-6513-4750-b5e6-ff3503b5a029
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/deals.info.response'
                  - example:
                      data:
                        id: f6871b06-6513-4750-b5e6-ff3503b5a029
                        title: Interesting deal
                        summary: Additional information
                        reference: 2017/2
                        status: won
                        lead:
                          customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          contact_person:
                            type: contact
                            id: 74c6769e-815a-4774-87d7-dfab9b1a0abb
                        department:
                          type: department
                          id: 92247818-643e-4f5a-bf87-25cd908e8ad9
                        estimated_value:
                          amount: 123.3
                          currency: EUR
                        estimated_closing_date: '2017-05-09'
                        estimated_probability: 0.5
                        weighted_value:
                          amount: 123.3
                          currency: EUR
                        purchase_order_number: '000023'
                        current_phase:
                          type: dealPhase
                          id: 676a6070-f7d3-43a6-bc08-cda0d32c27ab
                        responsible_user:
                          type: user
                          id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                        closed_at: '2017-05-09T11:31:30+00:00'
                        source:
                          type: dealSource
                          id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                        phase_history:
                          - phase:
                              type: dealPhase
                              id: d5a629f2-7b58-4748-aaca-acf9b6d62404
                            started_at: '2017-05-01 12:00:00'
                            started_by:
                              type: user
                              id: 4ec55a8c-2d80-472a-a9c2-5ff5ee7eac6a
                        quotations:
                          - id: e2314517-3cab-4aa9-8471-450e73449041
                            type: quotation
                        lost_reason:
                          reason:
                            type: lostReason
                            id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                          remark: Too expensive
                        created_at: '2017-05-09T11:25:11+00:00'
                        updated_at: '2017-05-09T11:30:58+00:00'
                        web_url: https://focus.teamleader.eu/sale_detail.php?id=f6871b06-6513-4750-b5e6-ff3503b5a029
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        currency_exchange_rate:
                          from: USD
                          to: EUR
                          rate: 1.1234
                        pipeline:
                          type: dealPipeline
                          id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
              example:
                data:
                  id: f6871b06-6513-4750-b5e6-ff3503b5a029
                  title: Interesting deal
                  summary: Additional information
                  reference: 2017/2
                  status: won
                  lead:
                    customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    contact_person:
                      type: contact
                      id: 74c6769e-815a-4774-87d7-dfab9b1a0abb
                  department:
                    type: department
                    id: 92247818-643e-4f5a-bf87-25cd908e8ad9
                  estimated_value:
                    amount: 123.3
                    currency: EUR
                  estimated_closing_date: '2017-05-09'
                  estimated_probability: 0.5
                  weighted_value:
                    amount: 123.3
                    currency: EUR
                  purchase_order_number: '000023'
                  current_phase:
                    type: dealPhase
                    id: 676a6070-f7d3-43a6-bc08-cda0d32c27ab
                  responsible_user:
                    type: user
                    id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                  closed_at: '2017-05-09T11:31:30+00:00'
                  source:
                    type: dealSource
                    id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                  phase_history:
                    - phase:
                        type: dealPhase
                        id: d5a629f2-7b58-4748-aaca-acf9b6d62404
                      started_at: '2017-05-01 12:00:00'
                      started_by:
                        type: user
                        id: 4ec55a8c-2d80-472a-a9c2-5ff5ee7eac6a
                  quotations:
                    - id: e2314517-3cab-4aa9-8471-450e73449041
                      type: quotation
                  lost_reason:
                    reason:
                      type: lostReason
                      id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
                    remark: Too expensive
                  created_at: '2017-05-09T11:25:11+00:00'
                  updated_at: '2017-05-09T11:30:58+00:00'
                  web_url: https://focus.teamleader.eu/sale_detail.php?id=f6871b06-6513-4750-b5e6-ff3503b5a029
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  currency_exchange_rate:
                    from: USD
                    to: EUR
                    rate: 1.1234
                  pipeline:
                    type: dealPipeline
                    id: 4e81f3c4-7dca-44cb-b126-6158bec392a2
      deprecated: false
  /deals.create:
    post:
      tags:
        - deals
      summary: deals.create
      description: Create a new deal for a customer.
      operationId: deals.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.create.request'
                - example:
                    lead:
                      customer:
                        type: company
                        id: 09e5d75f-f817-4872-9723-57fbb8ff710d
                      contact_person_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
                    title: Interesting business deal
                    summary: Additional information
                    source_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
                    department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
                    responsible_user_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    phase_id: 060687bb-a742-4882-a538-199a5e5feb60
                    estimated_value:
                      amount: 123.3
                      currency: EUR
                    estimated_probability: 0.75
                    estimated_closing_date: '2017-05-09'
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    currency:
                      code: EUR
                      exchange_rate: 1.1238
            example:
              lead:
                customer:
                  type: company
                  id: 09e5d75f-f817-4872-9723-57fbb8ff710d
                contact_person_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
              title: Interesting business deal
              summary: Additional information
              source_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
              department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
              responsible_user_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              phase_id: 060687bb-a742-4882-a538-199a5e5feb60
              estimated_value:
                amount: 123.3
                currency: EUR
              estimated_probability: 0.75
              estimated_closing_date: '2017-05-09'
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              currency:
                code: EUR
                exchange_rate: 1.1238
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/deals.create.response'
                  - example:
                      data:
                        type: deal
                        id: 65a35860-dcca-4850-9fd6-47ff08469e0c
              example:
                data:
                  type: deal
                  id: 65a35860-dcca-4850-9fd6-47ff08469e0c
      deprecated: false
  /deals.update:
    post:
      tags:
        - deals
      summary: deals.update
      description: Update a deal.
      operationId: deals.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.update.request'
                - example:
                    id: 65a35860-dcca-4850-9fd6-47ff08469e0c
                    lead:
                      customer:
                        type: contact
                        id: 09e5d75f-f817-4872-9723-57fbb8ff710d
                      contact_person_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
                    title: Interesting business deal
                    summary: Additional information
                    source_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
                    department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
                    responsible_user_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    estimated_value:
                      amount: 123.3
                      currency: EUR
                    estimated_probability: 0.75
                    estimated_closing_date: '2017-05-09'
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    currency:
                      code: EUR
                      exchange_rate: 1.1238
            example:
              id: 65a35860-dcca-4850-9fd6-47ff08469e0c
              lead:
                customer:
                  type: contact
                  id: 09e5d75f-f817-4872-9723-57fbb8ff710d
                contact_person_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
              title: Interesting business deal
              summary: Additional information
              source_id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
              department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
              responsible_user_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              estimated_value:
                amount: 123.3
                currency: EUR
              estimated_probability: 0.75
              estimated_closing_date: '2017-05-09'
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              currency:
                code: EUR
                exchange_rate: 1.1238
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /deals.move:
    post:
      tags:
        - deals
      summary: deals.move
      description: Move the deal to a different phase.
      operationId: deals.move
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.move.request'
                - example:
                    id: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
                    phase_id: 8776abee-d856-43c6-b98d-9ffc912e8b0b
            example:
              id: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
              phase_id: 8776abee-d856-43c6-b98d-9ffc912e8b0b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /deals.win:
    post:
      tags:
        - deals
      summary: deals.win
      description: Mark a deal as won.
      operationId: deals.win
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.win.request'
                - example:
                    id: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
            example:
              id: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /deals.lose:
    post:
      tags:
        - deals
      summary: deals.lose
      description: Mark a deal as lost.
      operationId: deals.lose
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.lose.request'
                - example:
                    id: 460df7b2-fe82-4c6c-b215-6d0a1bd3c742
                    reason_id: da4c902f-2ae5-4c1f-be6f-b50308aabc5c
                    extra_info: Not ready for a change, decision postponed
            example:
              id: 460df7b2-fe82-4c6c-b215-6d0a1bd3c742
              reason_id: da4c902f-2ae5-4c1f-be6f-b50308aabc5c
              extra_info: Not ready for a change, decision postponed
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /deals.delete:
    post:
      tags:
        - deals
      summary: deals.delete
      description: Delete a deal.
      operationId: deals.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/deals.delete.request'
                - example:
                    id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
            example:
              id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /lostReasons.list:
    post:
      tags:
        - deals
      summary: lostReasons.list
      description: Get a list of lost reasons for deals.
      operationId: lostReasons.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/lostReasons.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/lostReasons.list.response'
                  - example:
                      data:
                        - id: 6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                          name: Deal declined
              example:
                data:
                  - id: 6e7fe84d-d4b3-4723-abae-9bc082d8f65a
                    name: Deal declined
      deprecated: false
  /dealPipelines.list:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.list
      description: Get a list of all deal pipelines.
      operationId: dealPipelines.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealPipelines.list.response'
                  - example:
                      data:
                        - id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                          name: Main Pipeline
                      meta:
                        default: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                        page:
                          size: 10
                          number: 2
                        matches: 12
              example:
                data:
                  - id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                    name: Main Pipeline
                meta:
                  default: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                  page:
                    size: 10
                    number: 2
                  matches: 12
      deprecated: false
  /dealPipelines.create:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.create
      description: Create a new deal pipeline.
      operationId: dealPipelines.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.create.request'
                - example:
                    name: Primary Pipeline
            example:
              name: Primary Pipeline
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealPipelines.create.response'
                  - example:
                      data:
                        type: dealPipeline
                        id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
              example:
                data:
                  type: dealPipeline
                  id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
      deprecated: false
  /dealPipelines.update:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.update
      description: Update a single deal pipeline.
      operationId: dealPipelines.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.update.request'
                - example:
                    id: 254dc5ee-f8de-0791-9e31-a4f7817e64d2
                    name: Main Pipeline
            example:
              id: 254dc5ee-f8de-0791-9e31-a4f7817e64d2
              name: Main Pipeline
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealPipelines.markAsDefault:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.markAsDefault
      description: Mark a pipeline as default.
      operationId: dealPipelines.markAsDefault
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.markAsDefault.request'
                - example:
                    id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
            example:
              id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        required: true
      responses:
        '202':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealPipelines.duplicate:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.duplicate
      description: Create a new deal pipeline by duplicating an existing one.
      operationId: dealPipelines.duplicate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.duplicate.request'
                - example:
                    id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
            example:
              id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealPipelines.duplicate.response'
                  - example:
                      data:
                        type: dealPipeline
                        id: 5876126e-11c2-4731-b9e3-6e2fecd01d80
              example:
                data:
                  type: dealPipeline
                  id: 5876126e-11c2-4731-b9e3-6e2fecd01d80
      deprecated: false
  /dealPipelines.delete:
    post:
      tags:
        - deal_pipelines
      summary: dealPipelines.delete
      description: Delete a deal pipeline.
      operationId: dealPipelines.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPipelines.delete.request'
                - example:
                    id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                    migrate_phases:
                      - old_phase_id: 57785244-0d45-0f01-9c18-5ce1cb68e4c1
                        new_phase_id: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
            example:
              id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
              migrate_phases:
                - old_phase_id: 57785244-0d45-0f01-9c18-5ce1cb68e4c1
                  new_phase_id: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealPhases.list:
    post:
      tags:
        - deal_phases
      summary: dealPhases.list
      description: Get a list of all phases a deal can go through, sorted by their order in the flow.
      operationId: dealPhases.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPhases.list.request'
                - example:
                    filter:
                      ids:
                        - 53a7e592-a136-4bae-ae15-517befd3d75d
                        - bb50af79-55cd-4be0-8306-e9626c70a90f
                      deal_pipeline_id: 53a7e592-a136-4bae-ae15-517befd3d75d
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 53a7e592-a136-4bae-ae15-517befd3d75d
                  - bb50af79-55cd-4be0-8306-e9626c70a90f
                deal_pipeline_id: 53a7e592-a136-4bae-ae15-517befd3d75d
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealPhases.list.response'
                  - example:
                      data:
                        - id: 21efc56e-1ba8-469d-926a-e89502591b47
                          name: New
                          actions:
                            - create_event
                          requires_attention_after:
                            amount: 7
                            unit: days
                          probability: 0.75
              example:
                data:
                  - id: 21efc56e-1ba8-469d-926a-e89502591b47
                    name: New
                    actions:
                      - create_event
                    requires_attention_after:
                      amount: 7
                      unit: days
                    probability: 0.75
      deprecated: false
  /dealPhases.create:
    post:
      tags:
        - deal_phases
      summary: dealPhases.create
      description: Create a new deal phase.
      operationId: dealPhases.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPhases.create.request'
                - example:
                    name: Investigation
                    deal_pipeline_id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                    requires_attention_after:
                      amount: 7
                      unit: days
                    estimated_probability: 0.5
                    follow_up_actions:
                      - create_event
            example:
              name: Investigation
              deal_pipeline_id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
              requires_attention_after:
                amount: 7
                unit: days
              estimated_probability: 0.5
              follow_up_actions:
                - create_event
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealPhases.create.response'
                  - example:
                      data:
                        type: dealPhase
                        id: 22364cbf-971e-022c-811b-a76c28000257
              example:
                data:
                  type: dealPhase
                  id: 22364cbf-971e-022c-811b-a76c28000257
      deprecated: false
  /dealPhases.update:
    post:
      tags:
        - deal_phases
      summary: dealPhases.update
      description: Update a deal phase.
      operationId: dealPhases.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPhases.update.request'
                - example:
                    id: 22364cbf-971e-022c-811b-a76c28000257
                    name: Preparation
                    requires_attention_after:
                      amount: 7
                      unit: days
                    estimated_probability: 0.8
                    follow_up_actions:
                      - create_event
            example:
              id: 22364cbf-971e-022c-811b-a76c28000257
              name: Preparation
              requires_attention_after:
                amount: 7
                unit: days
              estimated_probability: 0.8
              follow_up_actions:
                - create_event
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealPhases.move:
    post:
      tags:
        - deal_phases
      summary: dealPhases.move
      description: Move a phase to a new position in the pipeline.
      operationId: dealPhases.move
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPhases.move.request'
                - example:
                    id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                    after_phase_id: 22364cbf-971e-022c-811b-a76c28000257
            example:
              id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
              after_phase_id: 22364cbf-971e-022c-811b-a76c28000257
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealPhases.delete:
    post:
      tags:
        - deal_phases
      summary: dealPhases.delete
      description: Delete a phase.
      operationId: dealPhases.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealPhases.delete.request'
                - example:
                    id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                    new_phase_id: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
            example:
              id: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
              new_phase_id: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /dealSources.list:
    post:
      tags:
        - deal_sources
      summary: dealSources.list
      description: Get a list of all deal sources, sorted alphabetically (on name).
      operationId: dealSources.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/dealSources.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dealSources.list.response'
                  - example:
                      data:
                        - id: b18c298b-0e6f-495d-8fcd-31dfecaea741
                          name: Referral
              example:
                data:
                  - id: b18c298b-0e6f-495d-8fcd-31dfecaea741
                    name: Referral
      deprecated: false
  /quotations.list:
    post:
      tags:
        - quotations
      summary: quotations.list
      description: Get a list of quotations.
      operationId: quotations.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.list.request'
                - example:
                    filter:
                      ids:
                        - 5b16f6ee-e302-0079-901b-50c26c4a55b1
                        - 2700006a-b351-070b-b311-fb45ed99abe2
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 5b16f6ee-e302-0079-901b-50c26c4a55b1
                  - 2700006a-b351-070b-b311-fb45ed99abe2
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/quotations.list.response'
                  - example:
                      data:
                        - id: 5b16f6ee-e302-0079-901b-50c26c4a55b1
                          deal:
                            type: deal
                            id: 53474a7a-f9b2-4dd4-88a8-40ce773c7a64
                          currency_exchange_rate:
                            from: USD
                            to: EUR
                            rate: 1.1234
                          total:
                            tax_exclusive:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive:
                              amount: 123.3
                              currency: EUR
                            taxes:
                              - rate: 0.21
                                taxable:
                                  amount: 123.3
                                  currency: EUR
                                tax:
                                  amount: 123.3
                                  currency: EUR
                            purchase_price:
                              amount: 123.3
                              currency: EUR
                          created_at: '2017-05-09T11:25:11+00:00'
                          updated_at: '2017-05-09T11:30:58+00:00'
                          status: open
                          name: Webdevelopment
                          expiry:
                            expires_after: '2023-04-05'
                            action_after_expiry: lock
              example:
                data:
                  - id: 5b16f6ee-e302-0079-901b-50c26c4a55b1
                    deal:
                      type: deal
                      id: 53474a7a-f9b2-4dd4-88a8-40ce773c7a64
                    currency_exchange_rate:
                      from: USD
                      to: EUR
                      rate: 1.1234
                    total:
                      tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      taxes:
                        - rate: 0.21
                          taxable:
                            amount: 123.3
                            currency: EUR
                          tax:
                            amount: 123.3
                            currency: EUR
                      purchase_price:
                        amount: 123.3
                        currency: EUR
                    created_at: '2017-05-09T11:25:11+00:00'
                    updated_at: '2017-05-09T11:30:58+00:00'
                    status: open
                    name: Webdevelopment
                    expiry:
                      expires_after: '2023-04-05'
                      action_after_expiry: lock
      deprecated: false
  /quotations.info:
    post:
      tags:
        - quotations
      summary: quotations.info
      description: Get a quotation.
      operationId: quotations.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.info.request'
                - example:
                    id: e7a3fe2b-2c75-480f-87b9-121816b5257b
            example:
              id: e7a3fe2b-2c75-480f-87b9-121816b5257b
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/quotations.info.response'
                  - example:
                      data:
                        id: e7a3fe2b-2c75-480f-87b9-121816b5257b
                        deal:
                          type: deal
                          id: 53474a7a-f9b2-4dd4-88a8-40ce773c7a64
                        grouped_lines:
                          - section:
                              title: ''
                            line_items:
                              - product:
                                  type: product
                                  id: e2314517-3cab-4aa9-8471-450e73449040
                                quantity: 3
                                description: An awesome product
                                extended_description: Some more information about this awesome product
                                unit:
                                  type: unitOfMeasure
                                  id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                                unit_price:
                                  amount: 123.3
                                  currency: EUR
                                  tax: excluding
                                tax:
                                  type: taxRate
                                  id: e2314517-3cab-4aa9-8471-450e73449042
                                discount:
                                  type: percentage
                                  value: 15
                                purchase_price:
                                  amount: 123.3
                                  currency: EUR
                                total:
                                  tax_exclusive:
                                    amount: 123.3
                                    currency: EUR
                                  tax_exclusive_before_discount:
                                    amount: 123.3
                                    currency: EUR
                                  tax_inclusive:
                                    amount: 123.3
                                    currency: EUR
                                  tax_inclusive_before_discount:
                                    amount: 123.3
                                    currency: EUR
                                periodicity:
                                  unit: week
                                  period: 2
                        currency: USD
                        currency_exchange_rate:
                          from: USD
                          to: EUR
                          rate: 1.1234
                        text: Quotation text
                        total:
                          tax_exclusive:
                            amount: 123.3
                            currency: EUR
                          tax_inclusive:
                            amount: 123.3
                            currency: EUR
                          taxes:
                            - rate: 0.21
                              taxable:
                                amount: 123.3
                                currency: EUR
                              tax:
                                amount: 123.3
                                currency: EUR
                          purchase_price:
                            amount: 123.3
                            currency: EUR
                        discounts:
                          - type: percentage
                            value: 15.5
                            description: winter promotion
                        created_at: '2017-05-09T11:25:11+00:00'
                        updated_at: '2017-05-09T11:30:58+00:00'
                        status: open
                        name: Webdevelopment
                        document_template:
                          type: documentTemplate
                          id: 179e1564-493b-4305-8c54-a34fc80920fc
                        expiry:
                          expires_after: '2023-04-05'
                          action_after_expiry: lock
              example:
                data:
                  id: e7a3fe2b-2c75-480f-87b9-121816b5257b
                  deal:
                    type: deal
                    id: 53474a7a-f9b2-4dd4-88a8-40ce773c7a64
                  grouped_lines:
                    - section:
                        title: ''
                      line_items:
                        - product:
                            type: product
                            id: e2314517-3cab-4aa9-8471-450e73449040
                          quantity: 3
                          description: An awesome product
                          extended_description: Some more information about this awesome product
                          unit:
                            type: unitOfMeasure
                            id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                          unit_price:
                            amount: 123.3
                            currency: EUR
                            tax: excluding
                          tax:
                            type: taxRate
                            id: e2314517-3cab-4aa9-8471-450e73449042
                          discount:
                            type: percentage
                            value: 15
                          purchase_price:
                            amount: 123.3
                            currency: EUR
                          total:
                            tax_exclusive:
                              amount: 123.3
                              currency: EUR
                            tax_exclusive_before_discount:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive_before_discount:
                              amount: 123.3
                              currency: EUR
                          periodicity:
                            unit: week
                            period: 2
                  currency: USD
                  currency_exchange_rate:
                    from: USD
                    to: EUR
                    rate: 1.1234
                  text: Quotation text
                  total:
                    tax_exclusive:
                      amount: 123.3
                      currency: EUR
                    tax_inclusive:
                      amount: 123.3
                      currency: EUR
                    taxes:
                      - rate: 0.21
                        taxable:
                          amount: 123.3
                          currency: EUR
                        tax:
                          amount: 123.3
                          currency: EUR
                    purchase_price:
                      amount: 123.3
                      currency: EUR
                  discounts:
                    - type: percentage
                      value: 15.5
                      description: winter promotion
                  created_at: '2017-05-09T11:25:11+00:00'
                  updated_at: '2017-05-09T11:30:58+00:00'
                  status: open
                  name: Webdevelopment
                  document_template:
                    type: documentTemplate
                    id: 179e1564-493b-4305-8c54-a34fc80920fc
                  expiry:
                    expires_after: '2023-04-05'
                    action_after_expiry: lock
      deprecated: false
  /quotations.download:
    post:
      tags:
        - quotations
      summary: quotations.download
      description: Download a quotation in a specific format.
      operationId: quotations.download
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.download.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    format: pdf
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              format: pdf
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/quotations.download.response'
                  - example:
                      data:
                        location: https://cdn.teamleader.eu/file
                        expires: '2018-02-05T16:44:33+00:00'
              example:
                data:
                  location: https://cdn.teamleader.eu/file
                  expires: '2018-02-05T16:44:33+00:00'
      deprecated: false
  /quotations.create:
    post:
      tags:
        - quotations
      summary: quotations.create
      description: Create a quotation.
      operationId: quotations.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.create.request'
                - example:
                    deal_id: cef01135-7e51-4f6f-a6eb-6e5e5a885ac8
                    currency:
                      code: EUR
                      exchange_rate: 1.1238
                    grouped_lines:
                      - section:
                          title: ''
                        line_items:
                          - quantity: 3
                            description: An awesome product
                            extended_description: Some more information about this awesome product
                            unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                            unit_price:
                              amount: 123.3
                              tax: excluding
                            tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                            discount:
                              value: 10
                              type: percentage
                            product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                            purchase_price:
                              amount: 123.3
                              currency: EUR
                            periodicity:
                              unit: week
                              period: 2
                    discounts:
                      - type: percentage
                        value: 15.5
                        description: winter promotion
                    text: Quotation text
                    document_template_id: 179e1564-493b-4305-8c54-a34fc80920fc
                    expiry:
                      expires_after: '2023-04-05'
                      action_after_expiry: lock
            example:
              deal_id: cef01135-7e51-4f6f-a6eb-6e5e5a885ac8
              currency:
                code: EUR
                exchange_rate: 1.1238
              grouped_lines:
                - section:
                    title: ''
                  line_items:
                    - quantity: 3
                      description: An awesome product
                      extended_description: Some more information about this awesome product
                      unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                      unit_price:
                        amount: 123.3
                        tax: excluding
                      tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                      discount:
                        value: 10
                        type: percentage
                      product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                      purchase_price:
                        amount: 123.3
                        currency: EUR
                      periodicity:
                        unit: week
                        period: 2
              discounts:
                - type: percentage
                  value: 15.5
                  description: winter promotion
              text: Quotation text
              document_template_id: 179e1564-493b-4305-8c54-a34fc80920fc
              expiry:
                expires_after: '2023-04-05'
                action_after_expiry: lock
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/quotations.create.response'
                  - example:
                      data:
                        type: quotation
                        id: e4bf74ca-e900-471f-84b1-276e5d3afae4
              example:
                data:
                  type: quotation
                  id: e4bf74ca-e900-471f-84b1-276e5d3afae4
      deprecated: false
  /quotations.send:
    post:
      tags:
        - quotations
      summary: quotations.send
      description: Send a quotation.
      operationId: quotations.send
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.send.request'
                - example:
                    quotations:
                      - 023a4609-eda4-006c-8d2c-314539ec5d85
                      - b42635b7-ccd3-0bfc-9628-e90940694845
                    from:
                      sender:
                        type: user
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                      email_address: info@teamleader.eu
                    recipients:
                      to:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email_address: info@teamleader.eu
                      cc:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email_address: info@teamleader.eu
                      bcc:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email_address: info@teamleader.eu
                    subject: An offer you cannot refuse
                    content: 'Sign your offer here #LINK'
                    attachments:
                      - e76d381a-f7ea-04d1-9a32-14aab27bc1e2
                    language: en
            example:
              quotations:
                - 023a4609-eda4-006c-8d2c-314539ec5d85
                - b42635b7-ccd3-0bfc-9628-e90940694845
              from:
                sender:
                  type: user
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                email_address: info@teamleader.eu
              recipients:
                to:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email_address: info@teamleader.eu
                cc:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email_address: info@teamleader.eu
                bcc:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email_address: info@teamleader.eu
              subject: An offer you cannot refuse
              content: 'Sign your offer here #LINK'
              attachments:
                - e76d381a-f7ea-04d1-9a32-14aab27bc1e2
              language: en
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /quotations.update:
    post:
      tags:
        - quotations
      summary: quotations.update
      description: Update a quotation.
      operationId: quotations.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.update.request'
                - example:
                    id: 5b16f6ee-e302-0079-901b-50c26c4a55b1
                    currency:
                      code: EUR
                      exchange_rate: 1.1238
                    grouped_lines:
                      - section:
                          title: ''
                        line_items:
                          - quantity: 3
                            description: An awesome product
                            extended_description: Some more information about this awesome product
                            unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                            unit_price:
                              amount: 123.3
                              tax: excluding
                            tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                            discount:
                              value: 10
                              type: percentage
                            product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                            purchase_price:
                              amount: 123.3
                              currency: EUR
                            periodicity:
                              unit: week
                              period: 2
                    discounts:
                      - type: percentage
                        value: 15.5
                        description: winter promotion
                    text: Quotation text
                    document_template_id: 179e1564-493b-4305-8c54-a34fc80920fc
                    expiry:
                      expires_after: '2023-04-05'
                      action_after_expiry: lock
            example:
              id: 5b16f6ee-e302-0079-901b-50c26c4a55b1
              currency:
                code: EUR
                exchange_rate: 1.1238
              grouped_lines:
                - section:
                    title: ''
                  line_items:
                    - quantity: 3
                      description: An awesome product
                      extended_description: Some more information about this awesome product
                      unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                      unit_price:
                        amount: 123.3
                        tax: excluding
                      tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                      discount:
                        value: 10
                        type: percentage
                      product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                      purchase_price:
                        amount: 123.3
                        currency: EUR
                      periodicity:
                        unit: week
                        period: 2
              discounts:
                - type: percentage
                  value: 15.5
                  description: winter promotion
              text: Quotation text
              document_template_id: 179e1564-493b-4305-8c54-a34fc80920fc
              expiry:
                expires_after: '2023-04-05'
                action_after_expiry: lock
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /quotations.accept:
    post:
      tags:
        - quotations
      summary: quotations.accept
      description: Mark a quotation as accepted.
      operationId: quotations.accept
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.accept.request'
                - example:
                    id: e7a3fe2b-2c75-480f-87b9-121816b5257b
            example:
              id: e7a3fe2b-2c75-480f-87b9-121816b5257b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /quotations.delete:
    post:
      tags:
        - quotations
      summary: quotations.delete
      description: Delete a quotation.
      operationId: quotations.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/quotations.delete.request'
                - example:
                    id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
            example:
              id: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /meetings.list:
    post:
      tags:
        - meetings
      summary: meetings.list
      description: Get a list of meetings.
      operationId: meetings.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/meetings.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/meetings.list.response'
                  - example:
                      data:
                        - id: f29abf48-337d-44b4-aad4-585f5277a456
                          title: My meeting
                          description: My meeting description
                          created_at: '2020-02-01T10:33:45+00:00'
                          created_by:
                            type: user
                            id: b5094b3f-bb7a-0391-b01b-e709773f3509
                          scheduled_at: '2020-02-04T16:44:33+00:00'
                          duration:
                            unit: min
                            value: 60
                          tracked_time:
                            total:
                              unit: min
                              value: 60
                          estimated_time:
                            total:
                              unit: min
                              value: 60
                          customer:
                            type: contact
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          project:
                            type: project
                            id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                          milestone:
                            type: milestone
                            id: bb8337d9-e669-0319-aa57-355ef6ff4f2d
                          attendees:
                            - type: user
                              id: b5094b3f-bb7a-0391-b01b-e709773f3509
                          status: open
                          recurrence:
                            type: recurrence
                            id: 1dfccc8e-68d0-0b83-8d1b-5cf1b0d99ab1
              example:
                data:
                  - id: f29abf48-337d-44b4-aad4-585f5277a456
                    title: My meeting
                    description: My meeting description
                    created_at: '2020-02-01T10:33:45+00:00'
                    scheduled_at: '2020-02-04T16:44:33+00:00'
                    duration:
                      unit: min
                      value: 60
                    tracked_time:
                      total:
                        unit: min
                        value: 60
                    estimated_time:
                      total:
                        unit: s
                        value: 60
                    customer:
                      type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    project:
                      type: project
                      id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                    milestone:
                      type: milestone
                      id: bb8337d9-e669-0319-aa57-355ef6ff4f2d
                    attendees:
                      - type: user
                        id: b5094b3f-bb7a-0391-b01b-e709773f3509
                    status: open
                    recurrence:
                      type: recurrence
                      id: 1dfccc8e-68d0-0b83-8d1b-5cf1b0d99ab1
      deprecated: false
  /meetings.info:
    post:
      tags:
        - meetings
      summary: meetings.info
      description: Get information about a meeting.
      operationId: meetings.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/meetings.info.request'
                - example:
                    id: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
                    includes: tracked_time
            example:
              id: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
              includes: tracked_time
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/meetings.info.response'
      deprecated: false
  /meetings.schedule:
    post:
      tags:
        - meetings
      summary: meetings.schedule
      description: Schedule a meeting.
      operationId: meetings.schedule
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/meetings.schedule.request'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/meetings.schedule.response'
                  - example:
                      data:
                        type: meeting
                        id: 00ed6266-a5bd-4aac-a292-2582017b6400
              example:
                data:
                  type: meeting
                  id: 00ed6266-a5bd-4aac-a292-2582017b6400
      deprecated: false
  /meetings.update:
    post:
      tags:
        - meetings
      summary: meetings.update
      description: Update a meeting.
      operationId: meetings.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/meetings.update.request'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /meetings.complete:
    post:
      tags:
        - meetings
      summary: meetings.complete
      description: Mark a meeting as complete.
      operationId: meetings.complete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/meetings.complete.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /meetings.delete:
    post:
      tags:
        - meetings
      summary: meetings.delete
      description: Deletes a meeting.
      operationId: meetings.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/meetings.delete.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /meetings.createReport:
    post:
      tags:
        - meetings
      summary: meetings.createReport
      description: Creates a report for a meeting.
      operationId: meetings.createReport
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/meetings.createReport.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    attach_to:
                      type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    summary: My meeting summary
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              attach_to:
                type: contact
                id: f29abf48-337d-44b4-aad4-585f5277a456
              summary: My meeting summary
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/meetings.createReport.response'
                  - example:
                      data:
                        type: meetingReport
                        id: f4baa515-c813-4ca2-bfc2-a646d985e58d
              example:
                data:
                  type: meetingReport
                  id: f4baa515-c813-4ca2-bfc2-a646d985e58d
      deprecated: false
  /calls.list:
    post:
      tags:
        - calls
      summary: calls.list
      description: Get a list of calls.
      operationId: calls.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.list.request'
                - example:
                    filter:
                      scheduled_after: '2021-11-21'
                      scheduled_before: '2022-05-13'
                      relates_to:
                        id: 415fa7e0-e319-0952-b973-f067f2b49d56
                        type: company
                      call_outcome_id: 6bd20dd8-dc3f-0e68-8919-dee0be6efe55
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                scheduled_after: '2021-11-21'
                scheduled_before: '2022-05-13'
                relates_to:
                  id: 415fa7e0-e319-0952-b973-f067f2b49d56
                  type: company
                call_outcome_id: 6bd20dd8-dc3f-0e68-8919-dee0be6efe55
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/calls.list.response'
                  - example:
                      data:
                        - id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          added_at: '2021-11-21T18:14:15+00:00'
                          participant:
                            customer:
                              type: company
                              id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                            contact:
                              type: contact
                              id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          description: Call with customer
                          outcome:
                            type: callOutcome
                            id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          outcome_summary: Called, but was not available
                          assignee:
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                            type: user
                          scheduled_at: '2021-11-21T19:14:15+00:00'
                          status: open
                          deal:
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                            type: deal
                      meta:
                        page:
                          size: 10
                          number: 2
                        matches: 12
              example:
                data:
                  - id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    added_at: '2021-11-21T18:14:15+00:00'
                    participant:
                      customer:
                        type: company
                        id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                      contact:
                        type: contact
                        id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    description: Call with customer
                    outcome:
                      type: callOutcome
                      id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    outcome_summary: Called, but was not available
                    assignee:
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                      type: user
                    scheduled_at: '2021-11-21T19:14:15+00:00'
                    status: open
                    deal:
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                      type: deal
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 12
      deprecated: false
  /calls.info:
    post:
      tags:
        - calls
      summary: calls.info
      description: Get information about a call.
      operationId: calls.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.info.request'
                - example:
                    id: 6fac0bf0-e803-424e-af67-76863a3d7d16
            example:
              id: 6fac0bf0-e803-424e-af67-76863a3d7d16
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/calls.info.response'
                  - example:
                      data:
                        id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                        added_at: '2016-02-01T16:44:33+00:00'
                        completed_at: '2016-02-04T16:44:33+00:00'
                        participant:
                          customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          contact:
                            type: contact
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                        description: Description of the call
                        outcome:
                          type: callOutcome
                          id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                        outcome_summary: Called, but was not available
                        assignee:
                          type: user
                          id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                        scheduled_at: '2016-02-04T16:00:00+00:00'
                        status: open
                        deal:
                          id: f29abf48-337d-44b4-aad4-585f5277a456
                          type: deal
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
              example:
                data:
                  id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                  added_at: '2016-02-01T16:44:33+00:00'
                  completed_at: '2016-02-04T16:44:33+00:00'
                  participant:
                    customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    contact:
                      type: contact
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                  description: Description of the call
                  outcome:
                    type: callOutcome
                    id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                  outcome_summary: Called, but was not available
                  assignee:
                    type: user
                    id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                  scheduled_at: '2016-02-04T16:00:00+00:00'
                  status: open
                  deal:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    type: deal
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
      deprecated: false
  /calls.add:
    post:
      tags:
        - calls
      summary: calls.add
      description: Add a new call.
      operationId: calls.add
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.add.request'
                - example:
                    description: Description of the call
                    participant:
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    due_at: '2016-02-04T16:00:00+00:00'
                    assignee:
                      type: user
                      id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    deal_id: f29abf48-337d-44b4-aad4-585f5277a456
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              description: Description of the call
              participant:
                customer:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              due_at: '2016-02-04T16:00:00+00:00'
              assignee:
                type: user
                id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              deal_id: f29abf48-337d-44b4-aad4-585f5277a456
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/calls.add.response'
                  - example:
                      data:
                        type: call
                        id: 65a35860-dcca-4850-9fd6-47ff08469e0c
              example:
                data:
                  type: call
                  id: 65a35860-dcca-4850-9fd6-47ff08469e0c
      deprecated: false
  /calls.update:
    post:
      tags:
        - calls
      summary: calls.update
      description: Update a new call.
      operationId: calls.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.update.request'
                - example:
                    id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    description: Description of the call
                    participant:
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    due_at: '2016-02-04T16:00:00+00:00'
                    assignee:
                      type: user
                      id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    deal_id: f29abf48-337d-44b4-aad4-585f5277a456
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: 32665afd-1818-0ed3-9e18-a603a3a21b95
              description: Description of the call
              participant:
                customer:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              due_at: '2016-02-04T16:00:00+00:00'
              assignee:
                type: user
                id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              deal_id: f29abf48-337d-44b4-aad4-585f5277a456
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /calls.complete:
    post:
      tags:
        - calls
      summary: calls.complete
      description: Mark a call as complete.
      operationId: calls.complete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.complete.request'
                - example:
                    id: 6fac0bf0-e803-424e-af67-76863a3d7d16
                    call_outcome_id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
                    outcome_summary: Called, but was not available
            example:
              id: 6fac0bf0-e803-424e-af67-76863a3d7d16
              call_outcome_id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
              outcome_summary: Called, but was not available
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /calls.delete:
    post:
      tags:
        - calls
      summary: calls.delete
      description: Deletes a call.
      operationId: calls.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/calls.delete.request'
                - example:
                    id: 6fac0bf0-e803-424e-af67-76863a3d7d16
            example:
              id: 6fac0bf0-e803-424e-af67-76863a3d7d16
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /callOutcomes.list:
    post:
      tags:
        - call_outcomes
      summary: callOutcomes.list
      description: Get a list of call outcomes.
      operationId: callOutcomes.list
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/callOutcomes.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/callOutcomes.list.response'
                  - example:
                      data:
                        - id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
                          name: Foo Bar
              example:
                data:
                  - id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
                    name: Foo Bar
      deprecated: false
  /events.list:
    post:
      tags:
        - calendar_events
      summary: events.list
      description: Get a list of calendar events.
      operationId: events.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/events.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/events.list.response'
                  - example:
                      data:
                        - id: 6d64488c-75d8-4de9-b140-2555566fa27d
                          creator:
                            type: user
                            id: e51d1a0e-452e-4d5d-a2a1-2c8f75dde560
                          task:
                            type: task
                            id: eb399573-e1ae-4377-bbaf-34358eb19831
                          activity_type:
                            type: activityType
                            id: 28158af3-2ef3-4178-ac8b-2542b1481af0
                          title: Erlich Bachman's birthday
                          description: ''
                          starts_at: '2016-02-04T16:00:00+00:00'
                          ends_at: '2016-02-04T18:00:00+00:00'
                          location: ''
                          attendees:
                            - type: contact
                              id: 8b3afad7-648d-4b4c-b38b-5726d3222282
                          links:
                            - type: company
                              id: c9258836-f9a5-40cb-aa2a-d55c22991b93
              example:
                data:
                  - id: 6d64488c-75d8-4de9-b140-2555566fa27d
                    creator:
                      type: user
                      id: e51d1a0e-452e-4d5d-a2a1-2c8f75dde560
                    task:
                      type: task
                      id: eb399573-e1ae-4377-bbaf-34358eb19831
                    activity_type:
                      type: activityType
                      id: 28158af3-2ef3-4178-ac8b-2542b1481af0
                    title: Erlich Bachman's birthday
                    description: ''
                    starts_at: '2016-02-04T16:00:00+00:00'
                    ends_at: '2016-02-04T18:00:00+00:00'
                    location: ''
                    attendees:
                      - type: contact
                        id: 8b3afad7-648d-4b4c-b38b-5726d3222282
                    links:
                      - type: company
                        id: c9258836-f9a5-40cb-aa2a-d55c22991b93
      deprecated: false
  /events.info:
    post:
      tags:
        - calendar_events
      summary: events.info
      description: Get details for a single calendar event.
      operationId: events.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/events.info.request'
                - example:
                    id: 9a5a3984-abfc-40cd-a880-f97683c6a99c
            example:
              id: 9a5a3984-abfc-40cd-a880-f97683c6a99c
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/events.info.response'
                  - example:
                      data:
                        id: 9a5a3984-abfc-40cd-a880-f97683c6a99c
                        title: Meeting with stakeholders
                        description: ''
                        creator:
                          type: user
                          id: 6f45600a-4402-40e0-9dcc-7665384bcd48
                        task:
                          type: task
                          id: be80d753-f2ee-426d-9596-2a2e1a23a82e
                        activity_type:
                          type: activityType
                          id: 4a1b1d8e-45da-4c5f-a986-3f93d174d352
                        starts_at: '2016-02-04T16:00:00+00:00'
                        ends_at: '2016-02-04T18:00:00+00:00'
                        location: ''
                        attendees:
                          - type: contact
                            id: 8b3afad7-648d-4b4c-b38b-5726d3222282
                        links:
                          - type: company
                            id: c9258836-f9a5-40cb-aa2a-d55c22991b93
              example:
                data:
                  id: 9a5a3984-abfc-40cd-a880-f97683c6a99c
                  title: Meeting with stakeholders
                  description: ''
                  creator:
                    type: user
                    id: 6f45600a-4402-40e0-9dcc-7665384bcd48
                  task:
                    type: task
                    id: be80d753-f2ee-426d-9596-2a2e1a23a82e
                  activity_type:
                    type: activityType
                    id: 4a1b1d8e-45da-4c5f-a986-3f93d174d352
                  starts_at: '2016-02-04T16:00:00+00:00'
                  ends_at: '2016-02-04T18:00:00+00:00'
                  location: ''
                  attendees:
                    - type: contact
                      id: 8b3afad7-648d-4b4c-b38b-5726d3222282
                  links:
                    - type: company
                      id: c9258836-f9a5-40cb-aa2a-d55c22991b93
      deprecated: false
  /events.create:
    post:
      tags:
        - calendar_events
      summary: events.create
      description: Create a new calendar event.
      operationId: events.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/events.create.request'
                - example:
                    title: Meeting with stakeholders
                    activity_type_id: b0a9ace5-fe82-4827-9d90-fc52f2c93050
                    starts_at: '2016-02-04T16:00:00+00:00'
                    ends_at: '2016-02-04T18:00:00+00:00'
                    work_type_id: b37e2bc7-dea0-4fda-88e9-c092fb65667d
                    attendees:
                      - type: user
                        id: 6ddd2666-65a0-497f-9f01-54c4343ec1a6
                    links:
                      - type: company
                        id: c9258836-f9a5-40cb-aa2a-d55c22991b93
            example:
              title: Meeting with stakeholders
              activity_type_id: b0a9ace5-fe82-4827-9d90-fc52f2c93050
              starts_at: '2016-02-04T16:00:00+00:00'
              ends_at: '2016-02-04T18:00:00+00:00'
              work_type_id: b37e2bc7-dea0-4fda-88e9-c092fb65667d
              attendees:
                - type: user
                  id: 6ddd2666-65a0-497f-9f01-54c4343ec1a6
              links:
                - type: company
                  id: c9258836-f9a5-40cb-aa2a-d55c22991b93
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/events.create.response'
                  - example:
                      data:
                        type: event
                        id: 9fc14045-5c6c-4ba8-8672-42ea3f26aa63
              example:
                data:
                  type: event
                  id: 9fc14045-5c6c-4ba8-8672-42ea3f26aa63
      deprecated: false
  /events.update:
    post:
      tags:
        - calendar_events
      summary: events.update
      description: Update a calendar event.
      operationId: events.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/events.update.request'
                - example:
                    id: f22fc69d-5d07-40cf-af46-015698a74b63
                    title: Meeting with stakeholders
                    starts_at: '2016-02-04T16:00:00+00:00'
                    ends_at: '2016-02-04T18:00:00+00:00'
                    work_type_id: b37e2bc7-dea0-4fda-88e9-c092fb65667d
                    attendees:
                      - type: user
                        id: 6ddd2666-65a0-497f-9f01-54c4343ec1a6
                    links:
                      - type: company
                        id: c9258836-f9a5-40cb-aa2a-d55c22991b93
            example:
              id: f22fc69d-5d07-40cf-af46-015698a74b63
              title: Meeting with stakeholders
              starts_at: '2016-02-04T16:00:00+00:00'
              ends_at: '2016-02-04T18:00:00+00:00'
              work_type_id: b37e2bc7-dea0-4fda-88e9-c092fb65667d
              attendees:
                - type: user
                  id: 6ddd2666-65a0-497f-9f01-54c4343ec1a6
              links:
                - type: company
                  id: c9258836-f9a5-40cb-aa2a-d55c22991b93
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /events.cancel:
    post:
      tags:
        - calendar_events
      summary: events.cancel
      description: Cancel a calendar event (for all attendees).
      operationId: events.cancel
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/events.cancel.request'
                - example:
                    id: b519491e-ca80-4efb-bb7b-3f08544936b0
            example:
              id: b519491e-ca80-4efb-bb7b-3f08544936b0
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /activityTypes.list:
    post:
      tags:
        - activity_types
      summary: activityTypes.list
      description: Get a list of all activity types.
      operationId: activityTypes.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/activityTypes.list.request'
                - example:
                    filter:
                      ids:
                        - 7fcf5609-25fe-47e2-97b2-dbd9c817796e
                        - 366b6100-7005-4b1b-a16a-7e88f445f496
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 7fcf5609-25fe-47e2-97b2-dbd9c817796e
                  - 366b6100-7005-4b1b-a16a-7e88f445f496
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/activityTypes.list.response'
                  - example:
                      data:
                        - id: 9feb5f61-c6dd-4f9d-9b37-2813ada4e343
                          name: ''
              example:
                data:
                  - id: 9feb5f61-c6dd-4f9d-9b37-2813ada4e343
                    name: ''
      deprecated: false
  /invoices.list:
    post:
      tags:
        - invoices
      summary: invoices.list
      description: Get a list of invoices.
      operationId: invoices.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.list.request'
                - example:
                    filter:
                      ids:
                        - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                        - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                      term: Interesting invoice
                      invoice_number: 2017 / 5
                      department_id: af48fe9e-d44c-0eac-8813-8be051b10921
                      deal_id: 4a219dae-7b80-4c79-97d2-bdadbab299ba
                      project_id: ba7d9731-c7d0-43d3-af95-fd7b3e818dbc
                      subscription_id: 8631bbbf-bead-4f6e-a2ab-58ec9bbd997a
                      status:
                        - draft
                        - outstanding
                        - matched
                      updated_since: '2016-02-04T16:44:33+00:00'
                      purchase_order_number: '000023'
                      payment_reference: +++084/2613/66074+++
                      invoice_date_after: '2020-01-01'
                      invoice_date_before: '2022-01-01'
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: invoice_number
                    includes: late_fees
            example:
              filter:
                ids:
                  - cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
                  - f8a57a6f-dd1e-41a3-b8d3-428663f1d09e
                term: Interesting invoice
                invoice_number: 2017 / 5
                department_id: af48fe9e-d44c-0eac-8813-8be051b10921
                deal_id: 4a219dae-7b80-4c79-97d2-bdadbab299ba
                project_id: ba7d9731-c7d0-43d3-af95-fd7b3e818dbc
                subscription_id: 8631bbbf-bead-4f6e-a2ab-58ec9bbd997a
                status:
                  - draft
                  - outstanding
                  - matched
                updated_since: '2016-02-04T16:44:33+00:00'
                purchase_order_number: '000023'
                payment_reference: +++084/2613/66074+++
                invoice_date_after: '2020-01-01'
                invoice_date_before: '2022-01-01'
                customer:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              page:
                size: 20
                number: 1
              sort:
                - field: invoice_number
              includes: late_fees
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.list.response'
                  - example:
                      data:
                        - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                          department:
                            type: department
                            id: 5e90eb0a-b502-4344-aa0f-3b8525af6186
                          invoice_number: 2017 / 5
                          invoice_date: '2016-02-04'
                          status: matched
                          due_on: '2016-03-03'
                          paid: true
                          paid_at: '2016-02-04T16:44:33+00:00'
                          sent: true
                          purchase_order_number: '000023'
                          payment_reference: +++084/2613/66074+++
                          invoicee:
                            name: De Rode Duivels
                            vat_number: BE0899623035
                            customer:
                              type: contact
                              id: 4b0f959a-27e3-4080-b1b2-a05b374863cb
                            for_attention_of:
                              name: Radja Nainggolan
                              contact:
                                type: contact
                                id: d4391f46-a32c-458c-b2ee-833fd27a348d
                          total:
                            tax_exclusive:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive:
                              amount: 123.3
                              currency: EUR
                            payable:
                              amount: 123.3
                              currency: EUR
                            taxes:
                              - rate: 0.21
                                taxable:
                                  amount: 123.3
                                  currency: EUR
                                tax:
                                  amount: 123.3
                                  currency: EUR
                            due:
                              amount: 123.3
                              currency: EUR
                            due_incasso_inclusive:
                              amount: 123.3
                              currency: EUR
                            fixed_late_fee:
                              amount: 123.3
                              currency: EUR
                            interest:
                              amount: 123.3
                              currency: EUR
                          currency_exchange_rate:
                            from: USD
                            to: EUR
                            rate: 1.1234
                          created_at: '2016-02-04T16:44:33+00:00'
                          updated_at: '2016-02-05T16:44:33+00:00'
                          web_url: https://focus.teamleader.eu/invoice_detail.php?id=2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                          file:
                            type: file
                            id: 39a02b79-b9a9-46e3-a44d-6c473b2fe350
                          deal:
                            type: deal
                            id: a8ef428a-0e70-48a5-8696-58be0c45a772
                          project:
                            type: project
                            id: 179e1564-493b-4305-8c54-a34fc80920fc
                          subscription:
                            type: subscription
                            id: 8631bbbf-bead-4f6e-a2ab-58ec9bbd997a
              example:
                data:
                  - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                    department:
                      type: department
                      id: 5e90eb0a-b502-4344-aa0f-3b8525af6186
                    invoice_number: 2017 / 5
                    invoice_date: '2016-02-04'
                    status: matched
                    due_on: '2016-03-03'
                    paid: true
                    paid_at: '2016-02-04T16:44:33+00:00'
                    sent: true
                    purchase_order_number: '000023'
                    payment_reference: +++084/2613/66074+++
                    invoicee:
                      name: De Rode Duivels
                      vat_number: BE0899623035
                      customer:
                        type: contact
                        id: 4b0f959a-27e3-4080-b1b2-a05b374863cb
                      for_attention_of:
                        name: Radja Nainggolan
                        contact:
                          type: contact
                          id: d4391f46-a32c-458c-b2ee-833fd27a348d
                    total:
                      tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      payable:
                        amount: 123.3
                        currency: EUR
                      taxes:
                        - rate: 0.21
                          taxable:
                            amount: 123.3
                            currency: EUR
                          tax:
                            amount: 123.3
                            currency: EUR
                      due:
                        amount: 123.3
                        currency: EUR
                      due_incasso_inclusive:
                        amount: 123.3
                        currency: EUR
                      fixed_late_fee:
                        amount: 123.3
                        currency: EUR
                      interest:
                        amount: 123.3
                        currency: EUR
                    currency_exchange_rate:
                      from: USD
                      to: EUR
                      rate: 1.1234
                    created_at: '2016-02-04T16:44:33+00:00'
                    updated_at: '2016-02-05T16:44:33+00:00'
                    web_url: https://focus.teamleader.eu/invoice_detail.php?id=2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                    file:
                      type: file
                      id: 39a02b79-b9a9-46e3-a44d-6c473b2fe350
                    deal:
                      type: deal
                      id: a8ef428a-0e70-48a5-8696-58be0c45a772
                    project:
                      type: project
                      id: 179e1564-493b-4305-8c54-a34fc80920fc
                    subscription:
                      type: subscription
                      id: 8631bbbf-bead-4f6e-a2ab-58ec9bbd997a
      deprecated: false
  /invoices.info:
    post:
      tags:
        - invoices
      summary: invoices.info
      description: Get details for a single invoice.
      operationId: invoices.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.info.request'
                - example:
                    id: 27300f09-6250-4a23-8557-d84c52f99ecf
                    includes: late_fees
            example:
              id: 27300f09-6250-4a23-8557-d84c52f99ecf
              includes: late_fees
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.info.response'
      deprecated: false
  /invoices.download:
    post:
      tags:
        - invoices
      summary: invoices.download
      description: Download an invoice in a specific format.
      operationId: invoices.download
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.download.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    format: pdf
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              format: pdf
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.download.response'
                  - example:
                      data:
                        location: https://cdn.teamleader.eu/file
                        expires: '2018-02-05T16:44:33+00:00'
              example:
                data:
                  location: https://cdn.teamleader.eu/file
                  expires: '2018-02-05T16:44:33+00:00'
      deprecated: false
  /invoices.draft:
    post:
      tags:
        - invoices
      summary: invoices.draft
      description: Draft a new invoice.
      operationId: invoices.draft
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.draft.request'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.draft.response'
                  - example:
                      data:
                        type: invoice
                        id: e4bf74ca-e900-471f-84b1-276e5d3afae4
              example:
                data:
                  type: invoice
                  id: e4bf74ca-e900-471f-84b1-276e5d3afae4
      deprecated: false
  /invoices.update:
    post:
      tags:
        - invoices
      summary: invoices.update
      description: Update a draft invoice. Booked invoices cannot be updated.
      operationId: invoices.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.update.request'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.updateBooked:
    post:
      tags:
        - invoices
      summary: invoices.updateBooked
      description: Update a booked invoice. Only available when editing booked invoices is allowed through the settings.
      operationId: invoices.updateBooked
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.updateBooked.request'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.copy:
    post:
      tags:
        - invoices
      summary: invoices.copy
      description: Creates a new draft invoice based on another invoice.
      operationId: invoices.copy
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.copy.request'
                - example:
                    id: b7023c11-455e-4fa5-bb96-87f37dbc7d07
            example:
              id: b7023c11-455e-4fa5-bb96-87f37dbc7d07
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.copy.response'
                  - example:
                      data:
                        type: invoice
                        id: e4bf74ca-e900-471f-84b1-276e5d3afae4
              example:
                data:
                  type: invoice
                  id: e4bf74ca-e900-471f-84b1-276e5d3afae4
      deprecated: false
  /invoices.book:
    post:
      tags:
        - invoices
      summary: invoices.book
      description: Book a draft invoice.
      operationId: invoices.book
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.book.request'
                - example:
                    id: 7abb325c-e063-42a4-8fb4-1b730759645a
                    'on': '2016-02-04'
            example:
              id: 7abb325c-e063-42a4-8fb4-1b730759645a
              'on': '2016-02-04'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.delete:
    post:
      tags:
        - invoices
      summary: invoices.delete
      description: Delete an existing invoice. Only possible for draft invoices or the last booked invoice.
      operationId: invoices.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.delete.request'
                - example:
                    id: 7517d21c-75c1-4b89-8956-0e67f46c8532
            example:
              id: 7517d21c-75c1-4b89-8956-0e67f46c8532
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.registerPayment:
    post:
      tags:
        - invoices
      summary: invoices.registerPayment
      description: Register a payment for an invoice.
      operationId: invoices.registerPayment
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.registerPayment.request'
                - example:
                    id: 7abb325c-e063-42a4-8fb4-1b730759645a
                    payment:
                      amount: 123.3
                      currency: EUR
                    paid_at: '2016-03-03T16:44:33+00:00'
                    payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
            example:
              id: 7abb325c-e063-42a4-8fb4-1b730759645a
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.removePayments:
    post:
      tags:
        - invoices
      summary: invoices.removePayments
      description: Marks an invoice as unpaid and removes all linked payments. This will also trigger a re-rendering of the invoice PDF.
      operationId: invoices.removePayments
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.removePayments.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.credit:
    post:
      tags:
        - invoices
      summary: invoices.credit
      description: Credit an invoice completely.
      operationId: invoices.credit
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.credit.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    credit_note_date: '2016-02-04'
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              credit_note_date: '2016-02-04'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.credit.response'
                  - example:
                      data:
                        type: creditNote
                        id: d885e5d5-bacb-4607-bde9-abc4a04a901c
              example:
                data:
                  type: creditNote
                  id: d885e5d5-bacb-4607-bde9-abc4a04a901c
      deprecated: false
  /invoices.creditPartially:
    post:
      tags:
        - invoices
      summary: invoices.creditPartially
      description: Credit an invoice partially.
      operationId: invoices.creditPartially
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.creditPartially.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    credit_note_date: '2016-02-04'
                    grouped_lines:
                      - section:
                          title: ''
                        line_items:
                          - quantity: 3
                            description: An awesome product
                            extended_description: Some more information about this awesome product
                            unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                            unit_price:
                              amount: 123.3
                              tax: excluding
                            tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                            withholding_tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585824
                            discount:
                              value: 10
                              type: percentage
                            product_category_id: e2314517-3cab-4aa9-8471-450e73449041
                            product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                    discounts:
                      - type: percentage
                        value: 15.5
                        description: winter promotion
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              credit_note_date: '2016-02-04'
              grouped_lines:
                - section:
                    title: ''
                  line_items:
                    - quantity: 3
                      description: An awesome product
                      extended_description: Some more information about this awesome product
                      unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                      unit_price:
                        amount: 123.3
                        tax: excluding
                      tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585823
                      withholding_tax_rate_id: c0c03f1e-77e3-402c-a713-30ea1c585824
                      discount:
                        value: 10
                        type: percentage
                      product_category_id: e2314517-3cab-4aa9-8471-450e73449041
                      product_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
              discounts:
                - type: percentage
                  value: 15.5
                  description: winter promotion
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/invoices.creditPartially.response'
                  - example:
                      data:
                        type: creditNote
                        id: d885e5d5-bacb-4607-bde9-abc4a04a901c
              example:
                data:
                  type: creditNote
                  id: d885e5d5-bacb-4607-bde9-abc4a04a901c
      deprecated: false
  /invoices.send:
    post:
      tags:
        - invoices
      summary: invoices.send
      description: Send an invoice via e-mail.
      operationId: invoices.send
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.send.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    content:
                      subject: Invoice
                      body: Please find your invoice attached to this mail
                      mail_template_id: 045cd6a9-7527-09c9-aa16-fd5ac7953e71
                    recipients:
                      to:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email: info@teamleader.eu
                      cc:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email: info@teamleader.eu
                      bcc:
                        - customer:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          email: info@teamleader.eu
                    attachments:
                      - e76d381a-f7ea-04d1-9a32-14aab27bc1e2
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              content:
                subject: Invoice
                body: Please find your invoice attached to this mail
                mail_template_id: 045cd6a9-7527-09c9-aa16-fd5ac7953e71
              recipients:
                to:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email: info@teamleader.eu
                cc:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email: info@teamleader.eu
                bcc:
                  - customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    email: info@teamleader.eu
              attachments:
                - e76d381a-f7ea-04d1-9a32-14aab27bc1e2
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /invoices.sendViaPeppol:
    post:
      tags:
        - invoices
      summary: invoices.sendViaPeppol
      description: Send an invoice via the Peppol network.
      operationId: invoices.sendViaPeppol
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/invoices.sendViaPeppol.request'
                - example:
                    id: 018d5965-19fb-701a-af11-e80451931551
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /creditNotes.list:
    post:
      tags:
        - credit_notes
      summary: creditNotes.list
      description: List credit notes.
      operationId: creditNotes.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/creditNotes.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/creditNotes.list.response'
                  - example:
                      data:
                        - id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
                          department:
                            type: department
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          credit_note_number: 2017/5
                          credit_note_date: '2016-02-04'
                          status: booked
                          invoice:
                            type: invoice
                            id: 53484141-8382-4948-9a4c-9cd7e79b30bd
                          paid: true
                          paid_at: '2016-03-03T16:44:33+00:00'
                          invoicee:
                            name: De Rode Duivels
                            vat_number: BE0899623035
                            customer:
                              type: contact
                              id: dc2a40bf-f050-4c8e-a002-872a051150b9
                          total:
                            tax_exclusive:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive:
                              amount: 123.3
                              currency: EUR
                            payable:
                              amount: 123.3
                              currency: EUR
                            taxes:
                              - rate: 0.21
                                taxable:
                                  amount: 123.3
                                  currency: EUR
                                tax:
                                  amount: 123.3
                                  currency: EUR
                          created_at: '2016-02-04T16:44:33+00:00'
                          updated_at: '2016-02-05T16:44:33+00:00'
              example:
                data:
                  - id: 2b43633b-22d1-41b6-b87b-e1fd742325d4
                    department:
                      type: department
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    credit_note_number: 2017/5
                    credit_note_date: '2016-02-04'
                    status: booked
                    invoice:
                      type: invoice
                      id: 53484141-8382-4948-9a4c-9cd7e79b30bd
                    paid: true
                    paid_at: '2016-03-03T16:44:33+00:00'
                    invoicee:
                      name: De Rode Duivels
                      vat_number: BE0899623035
                      customer:
                        type: contact
                        id: dc2a40bf-f050-4c8e-a002-872a051150b9
                    total:
                      tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      payable:
                        amount: 123.3
                        currency: EUR
                      taxes:
                        - rate: 0.21
                          taxable:
                            amount: 123.3
                            currency: EUR
                          tax:
                            amount: 123.3
                            currency: EUR
                    created_at: '2016-02-04T16:44:33+00:00'
                    updated_at: '2016-02-05T16:44:33+00:00'
      deprecated: false
  /creditNotes.info:
    post:
      tags:
        - credit_notes
      summary: creditNotes.info
      description: Get details for a single credit note
      operationId: creditNotes.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/creditNotes.info.request'
                - example:
                    id: 27300f09-6250-4a23-8557-d84c52f99ecf
            example:
              id: 27300f09-6250-4a23-8557-d84c52f99ecf
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/creditNotes.info.response'
                  - example:
                      data:
                        - id: 27300f09-6250-4a23-8557-d84c52f99ecf
                          department:
                            type: department
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          credit_note_number: 2017/5
                          credit_note_date: '2016-02-04'
                          status: booked
                          invoice:
                            type: invoice
                            id: 53484141-8382-4948-9a4c-9cd7e79b30bd
                          paid: true
                          paid_at: '2016-03-03T16:44:33+00:00'
                          invoicee:
                            name: De Rode Duivels
                            vat_number: BE0899623035
                            customer:
                              type: contact
                              id: dc2a40bf-f050-4c8e-a002-872a051150b9
                            email: duivels@test.com
                            national_identification_number: '123'
                          discounts:
                            - type: percentage
                              value: 15.5
                              description: winter promotion
                          total:
                            tax_exclusive:
                              amount: 123.3
                              currency: EUR
                            tax_inclusive:
                              amount: 123.3
                              currency: EUR
                            payable:
                              amount: 123.3
                              currency: EUR
                            taxes:
                              - rate: 0.21
                                taxable:
                                  amount: 123.3
                                  currency: EUR
                                tax:
                                  amount: 123.3
                                  currency: EUR
                          grouped_lines:
                            - section:
                                title: ''
                              line_items:
                                - product:
                                    type: product
                                    id: e2314517-3cab-4aa9-8471-450e73449040
                                  product_category:
                                    id: e2314517-3cab-4aa9-8471-450e73449041
                                    type: productCategory
                                  quantity: 3
                                  description: An awesome product
                                  extended_description: Some more information about this awesome product
                                  unit:
                                    type: unitOfMeasure
                                    id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                                  unit_price:
                                    amount: 123.3
                                    currency: EUR
                                    tax: excluding
                                  tax:
                                    type: taxRate
                                    id: e2314517-3cab-4aa9-8471-450e73449042
                                  discount:
                                    type: percentage
                                    value: 15
                                  total:
                                    tax_exclusive:
                                      amount: 123.3
                                      currency: EUR
                                    tax_exclusive_before_discount:
                                      amount: 123.3
                                      currency: EUR
                                    tax_inclusive:
                                      amount: 123.3
                                      currency: EUR
                                    tax_inclusive_before_discount:
                                      amount: 123.3
                                      currency: EUR
                          currency: USD
                          currency_exchange_rate:
                            from: USD
                            to: EUR
                            rate: 1.1234
                          created_at: '2016-02-04T16:44:33+00:00'
                          updated_at: '2016-02-05T16:44:33+00:00'
                          document_template:
                            type: documentTemplate
                            id: 179e1564-493b-4305-8c54-a34fc80920fc
              example:
                data:
                  - id: 27300f09-6250-4a23-8557-d84c52f99ecf
                    department:
                      type: department
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    credit_note_number: 2017/5
                    credit_note_date: '2016-02-04'
                    status: booked
                    invoice:
                      type: invoice
                      id: 53484141-8382-4948-9a4c-9cd7e79b30bd
                    paid: true
                    paid_at: '2016-03-03T16:44:33+00:00'
                    invoicee:
                      name: De Rode Duivels
                      vat_number: BE0899623035
                      customer:
                        type: contact
                        id: dc2a40bf-f050-4c8e-a002-872a051150b9
                      email: duivels@test.com
                      national_identification_number: '123'
                    discounts:
                      - type: percentage
                        value: 15.5
                        description: winter promotion
                    total:
                      tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      payable:
                        amount: 123.3
                        currency: EUR
                      taxes:
                        - rate: 0.21
                          taxable:
                            amount: 123.3
                            currency: EUR
                          tax:
                            amount: 123.3
                            currency: EUR
                    grouped_lines:
                      - section:
                          title: ''
                        line_items:
                          - product:
                              type: product
                              id: e2314517-3cab-4aa9-8471-450e73449040
                            product_category:
                              id: e2314517-3cab-4aa9-8471-450e73449041
                              type: productCategory
                            quantity: 3
                            description: An awesome product
                            extended_description: Some more information about this awesome product
                            unit:
                              type: unitOfMeasure
                              id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                            unit_price:
                              amount: 123.3
                              currency: EUR
                              tax: excluding
                            tax:
                              type: taxRate
                              id: e2314517-3cab-4aa9-8471-450e73449042
                            discount:
                              type: percentage
                              value: 15
                            total:
                              tax_exclusive:
                                amount: 123.3
                                currency: EUR
                              tax_exclusive_before_discount:
                                amount: 123.3
                                currency: EUR
                              tax_inclusive:
                                amount: 123.3
                                currency: EUR
                              tax_inclusive_before_discount:
                                amount: 123.3
                                currency: EUR
                    currency: USD
                    currency_exchange_rate:
                      from: USD
                      to: EUR
                      rate: 1.1234
                    created_at: '2016-02-04T16:44:33+00:00'
                    updated_at: '2016-02-05T16:44:33+00:00'
                    document_template:
                      type: documentTemplate
                      id: 179e1564-493b-4305-8c54-a34fc80920fc
      deprecated: false
  /creditNotes.download:
    post:
      tags:
        - credit_notes
      summary: creditNotes.download
      description: Download a credit note in a specific format.
      operationId: creditNotes.download
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/creditNotes.download.request'
                - example:
                    id: d885e5d5-bacb-4607-bde9-abc4a04a901b
                    format: pdf
            example:
              id: d885e5d5-bacb-4607-bde9-abc4a04a901b
              format: pdf
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/creditNotes.download.response'
                  - example:
                      data:
                        location: https://cdn.teamleader.eu/file
                        expires: '2018-02-05T16:44:33+00:00'
              example:
                data:
                  location: https://cdn.teamleader.eu/file
                  expires: '2018-02-05T16:44:33+00:00'
      deprecated: false
  /creditNotes.sendViaPeppol:
    post:
      tags:
        - credit_notes
      summary: creditNotes.sendViaPeppol
      description: Send a credit note via the Peppol network.
      operationId: creditNotes.sendViaPeppol
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/creditNotes.sendViaPeppol.request'
                - example:
                    id: 018d5965-19fb-701a-af11-e80451931551
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /subscriptions.list:
    post:
      tags:
        - subscriptions
      summary: subscriptions.list
      description: Get a list of subscriptions.
      operationId: subscriptions.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/subscriptions.list.request'
                - example:
                    filter:
                      ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
                        - 46156648-87c6-478d-8aa7-1dc3a00daca4
                      invoice_id: 60f03745-4289-4ae7-8c74-d797860bc887
                      deal_id: fddf42f9-bda1-0c49-a22b-0bf147cd1e3f
                      department_id: af48fe9e-d44c-0eac-8813-8be051b10921
                      customer:
                        type: contact
                        id: f29abf48-337d-44b4-aad4-585f5277a456
                      status:
                        - active
                        - deactivated
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: title
            example:
              filter:
                ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
                  - 46156648-87c6-478d-8aa7-1dc3a00daca4
                invoice_id: 60f03745-4289-4ae7-8c74-d797860bc887
                deal_id: fddf42f9-bda1-0c49-a22b-0bf147cd1e3f
                department_id: af48fe9e-d44c-0eac-8813-8be051b10921
                customer:
                  type: contact
                  id: f29abf48-337d-44b4-aad4-585f5277a456
                status:
                  - active
                  - deactivated
              page:
                size: 20
                number: 1
              sort:
                - field: title
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subscriptions.list.response'
      deprecated: false
  /subscriptions.info:
    post:
      tags:
        - subscriptions
      summary: subscriptions.info
      description: Get details for a single subscription.
      operationId: subscriptions.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/subscriptions.info.request'
                - example:
                    id: e2314517-3cab-4aa9-8471-450e73449041
            example:
              id: e2314517-3cab-4aa9-8471-450e73449041
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/subscriptions.info.response'
      deprecated: false
  /subscriptions.create:
    post:
      tags:
        - subscriptions
      summary: subscriptions.create
      description: Create a new subscription.
      operationId: subscriptions.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/subscriptions.create.request'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/subscriptions.create.response'
                  - example:
                      data:
                        type: subscription
                        id: e2314517-3cab-4aa9-8471-450e73449041
              example:
                data:
                  type: subscription
                  id: e2314517-3cab-4aa9-8471-450e73449041
      deprecated: false
  /subscriptions.update:
    post:
      tags:
        - subscriptions
      summary: subscriptions.update
      description: Update a subscription.
      operationId: subscriptions.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/subscriptions.update.request'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /subscriptions.deactivate:
    post:
      tags:
        - subscriptions
      summary: subscriptions.deactivate
      description: Deactivate a subscription.
      operationId: subscriptions.deactivate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/subscriptions.deactivate.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /taxRates.list:
    post:
      tags:
        - tax_rates
      summary: taxRates.list
      description: Get a list of available tax rates.
      operationId: taxRates.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/taxRates.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/taxRates.list.response'
                  - example:
                      data:
                        - id: c93ddb52-0af8-47d9-8551-441435be66a7
                          description: 21%
                          rate: 0.21
                          department:
                            type: department
                            id: 182af0a8-3f68-409b-8941-cf8caf8f28a0
              example:
                data:
                  - id: c93ddb52-0af8-47d9-8551-441435be66a7
                    description: 21%
                    rate: 0.21
                    department:
                      type: department
                      id: 182af0a8-3f68-409b-8941-cf8caf8f28a0
      deprecated: false
  /paymentTerms.list:
    post:
      tags:
        - payment_terms
      summary: paymentTerms.list
      description: Get a list of available payment terms.
      operationId: paymentTerms.list
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/paymentTerms.list.response'
                  - example:
                      data:
                        - id: c93ddb52-0af8-47d9-8551-441435be66a7
                          type: cash
                      meta:
                        default: c93ddb52-0af8-47d9-8551-441435be66a7
              example:
                data:
                  - id: c93ddb52-0af8-47d9-8551-441435be66a7
                    type: cash
                meta:
                  default: c93ddb52-0af8-47d9-8551-441435be66a7
      deprecated: false
  /withholdingTaxRates.list:
    post:
      tags:
        - withholding_tax_rates
      summary: withholdingTaxRates.list
      description: Get a list of available withholding tax rates.
      operationId: withholdingTaxRates.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/withholdingTaxRates.list.request'
                - example:
                    filter:
                      department_id: 080aac72-ff1a-4627-bfe3-146b6eee979c
            example:
              filter:
                department_id: 080aac72-ff1a-4627-bfe3-146b6eee979c
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/withholdingTaxRates.list.response'
                  - example:
                      data:
                        - id: c93ddb52-0af8-47d9-8551-441435be66a7
                          department:
                            type: department
                            id: 182af0a8-3f68-409b-8941-cf8caf8f28a0
                          description: Ritenuta d'acconto 23% su 20%
                          rate: 0.046
              example:
                data:
                  - id: c93ddb52-0af8-47d9-8551-441435be66a7
                    department:
                      type: department
                      id: 182af0a8-3f68-409b-8941-cf8caf8f28a0
                    description: Ritenuta d'acconto 23% su 20%
                    rate: 0.046
      deprecated: false
  /commercialDiscounts.list:
    post:
      tags:
        - commercial_discounts
      summary: commercialDiscounts.list
      description: Get a list of commercial discounts.
      operationId: commercialDiscounts.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/commercialDiscounts.list.request'
                - example:
                    filter:
                      department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
            example:
              filter:
                department_id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/commercialDiscounts.list.response'
                  - example:
                      data:
                        - id: f8f95182-3947-0a4a-b426-3adaa66fc32a
                          name: My holiday discount
                          department:
                            type: department
                            id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
              example:
                data:
                  - id: f8f95182-3947-0a4a-b426-3adaa66fc32a
                    name: My holiday discount
                    department:
                      type: department
                      id: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
      deprecated: false
  /paymentMethods.list:
    post:
      tags:
        - payment_methods
      summary: paymentMethods.list
      description: Get a list of payment methods.
      operationId: paymentMethods.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/paymentMethods.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/paymentMethods.list.response'
                  - example:
                      data:
                        - id: 49b403be-a32e-0901-9b1c-25214f9027c6
                          name: Coupons
                          status: active
              example:
                data:
                  - id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    name: Coupons
                    status: active
      deprecated: false
  /bookkeepingSubmissions.list:
    post:
      summary: bookkeepingSubmissions.list
      operationId: bookkeepingSubmissions.list
      description: List all bookkeeping submissions belonging to a specific financial document id and type
      tags:
        - bookkeeping_submissions
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            example:
              filter:
                subject:
                  id: 018d5965-19fb-701a-af11-e80451931551
                  type: incomingInvoice
            schema:
              type: object
              properties:
                filter:
                  type: object
                  properties:
                    subject:
                      type: object
                      properties:
                        id:
                          type: string
                          description: UUID of the financial document
                        type:
                          type: string
                          enum:
                            - incomingInvoice
                            - incomingCreditNote
                            - receipt
                  required:
                    - subject
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: UUID of the Bookkeeping Submission
                        subject:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - incomingInvoice
                                - incomingCreditNote
                                - receipt
                        email_address:
                          type: string
                          description: email address where the bookkeeping submission was sent
                        status:
                          type: string
                          enum:
                            - sending
                            - confirmed
                            - failed
                          description: the current status of the bookkeeping submission
                        created_at:
                          type: string
              example:
                data:
                  - id: 018d5965-19fb-701a-af11-e80451931551
                    subject:
                      id: 018d5965-19fb-701a-af11-e80451931551
                      type: incomingInvoice
                    email_address: john.doe@example.com
                    status: sending
                    created_at: '2025-02-26 15:56:40'
  /expenses.list:
    post:
      summary: expenses.list
      operationId: expenses.list
      description: Get a list of all expenses.
      tags:
        - expenses
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/expenses.list.request'
            example:
              filter:
                term: search terms
                source_types:
                  - incomingInvoice
                  - incomingCreditNote
                  - receipt
                review_statuses:
                  - pending
                  - approved
                  - refused
                bookkeeping_statuses:
                  - sent
                  - not_sent
                payment_statuses:
                  - paid
                  - not_paid
                department_ids:
                  - 018fcef1-4f96-7349-9f57-1c7857023c42
                supplier:
                  type: company
                  id: f29abf48-337d-44b4-aad4-585f5277a456
                document_date:
                  operator: is_empty
                  value: YYYY-MM-DD
                  start: YYYY-MM-DD
                  end: YYYY-MM-DD
                paid_at:
                  operator: between
                  start: YYYY-MM-DD
                  end: YYYY-MM-DD
              page:
                size: 20
                number: 1
              sort:
                - field: document_date
                  order: desc
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/expenses.list.response'
              example:
                data:
                  - source:
                      type: incomingInvoice
                      id: 018d5965-19fb-701a-af11-e80451931551
                    origin:
                      type: user
                      id: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
                    title: Cost
                    supplier:
                      type: company
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    document_number: DOC-2032039
                    document_date: '2024-05-11'
                    due_date: '2024-06-11'
                    currency:
                      code: EUR
                    total:
                      tax_exclusive:
                        amount: 100
                      tax_inclusive:
                        amount: 100
                    company_entity:
                      type: department
                      id: 018fcef1-4f96-7349-9f57-1c7857023c42
                    file:
                      type: file
                      id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
                    payment_reference: PR-12345
                    review_status: pending
                    bookkeeping_status: not_sent
                    iban_number: FR7630006000011234567890189
                    payment_status: paid
                    paid_amount: 100
                    paid_at: '2025-12-12'
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 12
  /incomingCreditNotes.add:
    post:
      summary: incomingCreditNotes.add
      operationId: incomingCreditNotes.add
      description: Adds an incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              title: Incoming credit note
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              invoice_date: '2024-05-11'
              due_date: '2024-06-11'
              currency:
                code: EUR
              total:
                tax_exclusive:
                  amount: 100
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
              payment_reference: REF-3578296
              iban_number: BE68539007547034
            schema:
              type: object
              properties:
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                invoice_date:
                  type: string
                  nullable: true
                due_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_exclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                  description: Default company entity will be used if not provided
                file_id:
                  type: string
                  nullable: true
                payment_reference:
                  type: string
                  nullable: true
                iban_number:
                  type: string
                  nullable: true
              required:
                - title
                - currency
      responses:
        '201':
          description: Created
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
              example:
                data:
                  type: incomingCreditNote
                  id: 018d5965-19fb-701a-af11-e80451931551
  /incomingCreditNotes.approve:
    post:
      summary: incomingCreditNotes.approve
      operationId: incomingCreditNotes.approve
      description: Approve an incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.delete:
    post:
      summary: incomingCreditNotes.delete
      operationId: incomingCreditNotes.delete
      description: Deletes an incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.info:
    post:
      summary: incomingCreditNotes.info
      operationId: incomingCreditNotes.info
      description: Get details for a single incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      origin:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - user
                              - peppolIncomingDocument
                          id:
                            type: string
                      supplier:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - company
                              - contact
                          id:
                            type: string
                        nullable: true
                      document_number:
                        type: string
                        nullable: true
                      invoice_date:
                        type: string
                        nullable: true
                      due_date:
                        type: string
                        nullable: true
                      currency:
                        type: object
                        properties:
                          code:
                            $ref: '#/components/schemas/CurrencyCode'
                      total:
                        type: object
                        properties:
                          tax_exclusive:
                            type: object
                            properties:
                              amount:
                                type: number
                            nullable: true
                          tax_inclusive:
                            type: object
                            properties:
                              amount:
                                type: number
                            nullable: true
                      company_entity:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                      file:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        nullable: true
                      payment_reference:
                        type: string
                        nullable: true
                      review_status:
                        type: string
                        enum:
                          - pending
                          - approved
                          - refused
                      iban_number:
                        type: string
                        nullable: true
                      payment_status:
                        type: string
                        enum:
                          - unknown
                          - paid
                          - not_paid
              example:
                data:
                  id: 018d5965-19fb-701a-af11-e80451931551
                  title: Incoming credit note
                  origin:
                    type: user
                    id: 018d5965-19fb-701a-af11-e80451931551
                  supplier:
                    type: company
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                  document_number: DOC-2032039
                  invoice_date: '2024-05-11'
                  due_date: '2024-06-11'
                  currency:
                    code: EUR
                  total:
                    tax_exclusive:
                      amount: 100
                    tax_inclusive:
                      amount: 100
                  company_entity:
                    type: department
                    id: 018fcef1-4f96-7349-9f57-1c7857023c42
                  file:
                    type: file
                    id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
                  payment_reference: REF-3578296
                  review_status: pending
                  iban_number: BE68539007547034
                  payment_status: not_paid
  /incomingCreditNotes.listPayments:
    post:
      summary: incomingCreditNotes.listPayments
      operationId: incomingCreditNotes.listPayments
      description: List payments for an incoming credit note.
      tags:
        - incoming_credit_notes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingCreditNotes.listPayments.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/incomingCreditNotes.listPayments.response'
              example:
                data:
                  - id: 018d5965-19fb-701a-af11-e80451931551
                    payment:
                      amount: 123.3
                      currency: EUR
                    paid_at: '2016-03-03T16:44:33+00:00'
                    payment_method:
                      type: paymentMethod
                      id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
                    remark: This is a remark
                meta:
                  total:
                    amount: 123.3
                    currency: EUR
  /incomingCreditNotes.markAsPendingReview:
    post:
      summary: incomingCreditNotes.markAsPendingReview
      operationId: incomingCreditNotes.markAsPendingReview
      description: Mark an incoming credit note as pending review.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.refuse:
    post:
      summary: incomingCreditNotes.refuse
      operationId: incomingCreditNotes.refuse
      description: Refuse an incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              refusal_reason_code: DUPLICATE_INVOICE
            schema:
              type: object
              properties:
                id:
                  type: string
                refusal_reason_code:
                  type: string
                  description: The reason the document is refused. Required under the French e-invoicing reform when refusing an expense received as an electronic invoice; not needed for expenses uploaded manually or via OCR.
                  enum:
                    - INCORRECT_VAT_RATE
                    - INCORRECT_TOTAL_AMOUNT
                    - CALCULATION_ERROR
                    - MISSING_LEGAL_INFORMATION
                    - DUPLICATE_INVOICE
                    - WRONG_RECIPIENT
                    - UNKNOWN_TRANSACTION
                    - UNKNOWN_ISSUER
                    - CONTRACT_ENDED
                    - DOUBLE_INVOICING
                    - ORDER_NUMBER_ERROR
                    - WRONG_ELECTRONIC_BILLING_ADDRESS
                    - MISSING_CONTRACTUAL_REFERENCE
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.registerPayment:
    post:
      summary: incomingCreditNotes.registerPayment
      operationId: incomingCreditNotes.registerPayment
      description: Register a payment for an incoming credit note.
      tags:
        - incoming_credit_notes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingCreditNotes.registerPayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is a remark
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/incomingCreditNotes.registerPayment.response'
              example:
                data:
                  id: 88268bc5-86bc-43cb-8c9f-fdcf125e1ad0
                  type: financialTransaction
  /incomingCreditNotes.removePayment:
    post:
      summary: incomingCreditNotes.removePayment
      operationId: incomingCreditNotes.removePayment
      description: Remove a payment from an incoming credit note.
      tags:
        - incoming_credit_notes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingCreditNotes.removePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '204':
          description: No Content
  /incomingCreditNotes.sendToBookkeeping:
    post:
      summary: incomingCreditNotes.sendToBookkeeping
      operationId: incomingCreditNotes.sendToBookkeeping
      description: Send an incoming credit note to bookkeeping.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.update:
    post:
      summary: incomingCreditNotes.update
      operationId: incomingCreditNotes.update
      description: Updates an incoming credit note.
      tags:
        - incoming_credit_notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              title: Incoming credit note
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              invoice_date: '2024-05-11'
              due_date: '2024-06-11'
              currency:
                code: EUR
              total:
                tax_exclusive:
                  amount: 100
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
              payment_reference: REF-3578296
              iban_number: BE68539007547034
            schema:
              type: object
              properties:
                id:
                  type: string
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                invoice_date:
                  type: string
                  nullable: true
                due_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_exclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                file_id:
                  type: string
                  nullable: true
                payment_reference:
                  type: string
                  nullable: true
                iban_number:
                  type: string
                  nullable: true
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingCreditNotes.updatePayment:
    post:
      summary: incomingCreditNotes.updatePayment
      operationId: incomingCreditNotes.updatePayment
      description: Update a payment for an incoming credit note.
      tags:
        - incoming_credit_notes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingCreditNotes.updatePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: aa7e7d42-a951-4cde-85b8-ae447a2f1ac4
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is an updated remark
      responses:
        '204':
          description: No Content
          content:
            application/json: {}
  /incomingInvoices.add:
    post:
      summary: incomingInvoices.add
      operationId: incomingInvoices.add
      description: Adds an incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              title: Incoming invoice
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              invoice_date: '2024-05-11'
              due_date: '2024-06-11'
              currency:
                code: EUR
              total:
                tax_exclusive:
                  amount: 100
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
              payment_reference: REF-3578296
              iban_number: BE68539007547034
            schema:
              type: object
              properties:
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                invoice_date:
                  type: string
                  nullable: true
                due_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_exclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                  description: Default company entity will be used if not provided
                file_id:
                  type: string
                  nullable: true
                payment_reference:
                  type: string
                  nullable: true
                iban_number:
                  type: string
                  nullable: true
              required:
                - title
                - currency
      responses:
        '201':
          description: Created
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
              example:
                data:
                  type: incomingInvoice
                  id: 018d5965-19fb-701a-af11-e80451931551
  /incomingInvoices.approve:
    post:
      summary: incomingInvoices.approve
      operationId: incomingInvoices.approve
      description: Approve an incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.delete:
    post:
      summary: incomingInvoices.delete
      operationId: incomingInvoices.delete
      description: Deletes an incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.info:
    post:
      summary: incomingInvoices.info
      operationId: incomingInvoices.info
      description: Get details for a single incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      origin:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - user
                              - peppolIncomingDocument
                          id:
                            type: string
                      supplier:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - company
                              - contact
                          id:
                            type: string
                        nullable: true
                      document_number:
                        type: string
                        nullable: true
                      invoice_date:
                        type: string
                        nullable: true
                      due_date:
                        type: string
                        nullable: true
                      currency:
                        type: object
                        properties:
                          code:
                            $ref: '#/components/schemas/CurrencyCode'
                      total:
                        type: object
                        properties:
                          tax_exclusive:
                            type: object
                            properties:
                              amount:
                                type: number
                            nullable: true
                          tax_inclusive:
                            type: object
                            properties:
                              amount:
                                type: number
                            nullable: true
                      company_entity:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                      file:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        nullable: true
                      payment_reference:
                        type: string
                        nullable: true
                      review_status:
                        type: string
                        enum:
                          - pending
                          - approved
                          - refused
                      iban_number:
                        type: string
                        nullable: true
                      payment_status:
                        type: string
                        enum:
                          - unknown
                          - paid
                          - partially_paid
                          - credited
                          - not_paid
              example:
                data:
                  id: 018d5965-19fb-701a-af11-e80451931551
                  title: Incoming invoice
                  origin:
                    type: user
                    id: 018d5965-19fb-701a-af11-e80451931551
                  supplier:
                    type: company
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                  document_number: DOC-2032039
                  invoice_date: '2024-05-11'
                  due_date: '2024-06-11'
                  currency:
                    code: EUR
                  total:
                    tax_exclusive:
                      amount: 100
                    tax_inclusive:
                      amount: 100
                  company_entity:
                    type: department
                    id: 018fcef1-4f96-7349-9f57-1c7857023c42
                  file:
                    type: file
                    id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
                  payment_reference: REF-3578296
                  review_status: pending
                  iban_number: BE68539007547034
                  payment_status: not_paid
  /incomingInvoices.listPayments:
    post:
      summary: incomingInvoices.listPayments
      operationId: incomingInvoices.listPayments
      description: List payments for an incoming invoice.
      tags:
        - incoming_invoices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingInvoices.listPayments.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/incomingInvoices.listPayments.response'
              example:
                data:
                  - id: 018d5965-19fb-701a-af11-e80451931551
                    payment:
                      amount: 123.3
                      currency: EUR
                    paid_at: '2016-03-03T16:44:33+00:00'
                    payment_method:
                      type: paymentMethod
                      id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
                    remark: This is a remark
                meta:
                  total:
                    amount: 123.3
                    currency: EUR
  /incomingInvoices.markAsPendingReview:
    post:
      summary: incomingInvoices.markAsPendingReview
      operationId: incomingInvoices.markAsPendingReview
      description: Mark an incoming invoice as pending review.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.refuse:
    post:
      summary: incomingInvoices.refuse
      operationId: incomingInvoices.refuse
      description: Refuse an incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              refusal_reason_code: DUPLICATE_INVOICE
            schema:
              type: object
              properties:
                id:
                  type: string
                refusal_reason_code:
                  type: string
                  description: The reason the document is refused. Required under the French e-invoicing reform when refusing an expense received as an electronic invoice; not needed for expenses uploaded manually or via OCR.
                  enum:
                    - INCORRECT_VAT_RATE
                    - INCORRECT_TOTAL_AMOUNT
                    - CALCULATION_ERROR
                    - MISSING_LEGAL_INFORMATION
                    - DUPLICATE_INVOICE
                    - WRONG_RECIPIENT
                    - UNKNOWN_TRANSACTION
                    - UNKNOWN_ISSUER
                    - CONTRACT_ENDED
                    - DOUBLE_INVOICING
                    - ORDER_NUMBER_ERROR
                    - WRONG_ELECTRONIC_BILLING_ADDRESS
                    - MISSING_CONTRACTUAL_REFERENCE
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.registerPayment:
    post:
      summary: incomingInvoices.registerPayment
      operationId: incomingInvoices.registerPayment
      description: Register a payment for an incoming invoice.
      tags:
        - incoming_invoices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingInvoices.registerPayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is a remark
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/incomingInvoices.registerPayment.response'
              example:
                data:
                  type: financialTransaction
                  id: ee94b4c0-5786-0517-9d26-8dd1e6406f20
  /incomingInvoices.removePayment:
    post:
      summary: incomingInvoices.removePayment
      operationId: incomingInvoices.removePayment
      description: Remove a payment from an incoming invoice.
      tags:
        - incoming_invoices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingInvoices.removePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '204':
          description: No Content
          content:
            application/json: {}
  /incomingInvoices.sendToBookkeeping:
    post:
      summary: incomingInvoices.sendToBookkeeping
      operationId: incomingInvoices.sendToBookkeeping
      description: Send an incoming invoice to bookkeeping.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.update:
    post:
      summary: incomingInvoices.update
      operationId: incomingInvoices.update
      description: Updates an incoming invoice.
      tags:
        - incoming_invoices
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              title: Incoming invoice
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              invoice_date: '2024-05-11'
              due_date: '2024-06-11'
              currency:
                code: EUR
              total:
                tax_exclusive:
                  amount: 100
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
              payment_reference: REF-3578296
              iban_number: BE68539007547034
            schema:
              type: object
              properties:
                id:
                  type: string
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                invoice_date:
                  type: string
                  nullable: true
                due_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_exclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                file_id:
                  type: string
                  nullable: true
                payment_reference:
                  type: string
                  nullable: true
                iban_number:
                  type: string
                  nullable: true
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /incomingInvoices.updatePayment:
    post:
      summary: incomingInvoices.updatePayment
      operationId: incomingInvoices.updatePayment
      description: Update a payment for an incoming invoice.
      tags:
        - incoming_invoices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/incomingInvoices.updatePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: aa7e7d42-a951-4cde-85b8-ae447a2f1ac4
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is a remark
      responses:
        '204':
          description: No Content
          content:
            application/json: {}
  /receipts.add:
    post:
      summary: receipts.add
      operationId: receipts.add
      description: Adds a receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              title: Receipt note
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              receipt_date: '2024-05-11'
              currency:
                code: EUR
              total:
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
            schema:
              type: object
              properties:
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                receipt_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                  description: Default company entity will be used if not provided
                file_id:
                  type: string
                  nullable: true
              required:
                - title
                - currency
      responses:
        '201':
          description: Created
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                      - properties:
                          type:
                            example: receipt
                          id:
                            example: 018d5965-19fb-701a-af11-e80451931551
              example:
                data:
                  type: receipt
                  id: 018d5965-19fb-701a-af11-e80451931551
  /receipts.approve:
    post:
      summary: receipts.approve
      operationId: receipts.approve
      description: Approve a receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.delete:
    post:
      summary: receipts.delete
      operationId: receipts.delete
      description: Deletes a receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.info:
    post:
      summary: receipts.info
      operationId: receipts.info
      description: Get details for a single receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      origin:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                      supplier:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - company
                              - contact
                          id:
                            type: string
                        nullable: true
                      document_number:
                        type: string
                        nullable: true
                      receipt_date:
                        type: string
                        nullable: true
                      currency:
                        type: object
                        properties:
                          code:
                            $ref: '#/components/schemas/CurrencyCode'
                      total:
                        type: object
                        properties:
                          tax_inclusive:
                            type: object
                            properties:
                              amount:
                                type: number
                            nullable: true
                      company_entity:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                      file:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        nullable: true
                      review_status:
                        type: string
                        enum:
                          - pending
                          - approved
                          - refused
                      payment_status:
                        type: string
                        enum:
                          - unknown
                          - paid
                          - not_paid
              example:
                data:
                  id: 018d5965-19fb-701a-af11-e80451931551
                  title: Receipt note
                  origin:
                    type: user
                    id: 018d5965-19fb-701a-af11-e80451931551
                  supplier:
                    type: company
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                  document_number: DOC-2032039
                  receipt_date: '2024-05-11'
                  currency:
                    code: EUR
                  total:
                    tax_inclusive:
                      amount: 100
                  company_entity:
                    type: department
                    id: 018fcef1-4f96-7349-9f57-1c7857023c42
                  file:
                    type: file
                    id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
                  review_status: pending
                  payment_status: not_paid
  /receipts.listPayments:
    post:
      summary: receipts.listPayments
      operationId: receipts.listPayments
      description: List payments for a(n incoming) receipt.
      tags:
        - receipts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/receipts.listPayments.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/receipts.listPayments.response'
              example:
                data:
                  - id: 018d5965-19fb-701a-af11-e80451931551
                    payment:
                      amount: 123.3
                      currency: EUR
                    paid_at: '2016-03-03T16:44:33+00:00'
                    payment_method:
                      type: paymentMethod
                      id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
                    remark: This is a remark
                meta:
                  total:
                    amount: 123.3
                    currency: EUR
  /receipts.markAsPendingReview:
    post:
      summary: receipts.markAsPendingReview
      operationId: receipts.markAsPendingReview
      description: Mark a receipt as pending review.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.refuse:
    post:
      summary: receipts.refuse
      operationId: receipts.refuse
      description: Refuse a receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.registerPayment:
    post:
      summary: receipts.registerPayment
      operationId: receipts.registerPayment
      description: Register a payment for a(n incoming) receipt.
      tags:
        - receipts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/receipts.registerPayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is a remark
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/receipts.registerPayment.response'
              example:
                data:
                  id: 6deb188e-3468-4886-b6a1-2306e7fc18fb
                  type: financialTransaction
  /receipts.removePayment:
    post:
      summary: receipts.removePayment
      operationId: receipts.removePayment
      description: Remove a payment from a receipt.
      tags:
        - receipts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/receipts.removePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: 018d5965-19fb-701a-af11-e80451931551
      responses:
        '204':
          description: No Content
          content:
            application/json: {}
  /receipts.sendToBookkeeping:
    post:
      summary: receipts.sendToBookkeeping
      operationId: receipts.sendToBookkeeping
      description: Send a receipt to bookkeeping for processing.
      tags:
        - receipts
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.update:
    post:
      summary: receipts.update
      operationId: receipts.update
      description: Updates a receipt.
      tags:
        - receipts
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              title: Receipt note
              supplier_id: ac4a3bc5-b11f-0eb6-8c20-0f0d697f8c2a
              document_number: DOC-2032039
              receipt_date: '2024-05-11'
              currency:
                code: EUR
              total:
                tax_inclusive:
                  amount: 100
              company_entity_id: 018fcef1-4f96-7349-9f57-1c7857023c42
              file_id: 5027619a-5e0a-01ce-a533-f80dfcc3f142
            schema:
              type: object
              properties:
                id:
                  type: string
                title:
                  type: string
                supplier_id:
                  type: string
                  nullable: true
                document_number:
                  type: string
                  nullable: true
                receipt_date:
                  type: string
                  nullable: true
                currency:
                  type: object
                  properties:
                    code:
                      allOf:
                        - $ref: '#/components/schemas/CurrencyCode'
                        - example: EUR
                  required:
                    - code
                total:
                  type: object
                  properties:
                    tax_inclusive:
                      type: object
                      properties:
                        amount:
                          type: number
                      required:
                        - amount
                      nullable: true
                company_entity_id:
                  type: string
                file_id:
                  type: string
                  nullable: true
              required:
                - id
      responses:
        '204':
          description: No Content
          headers: {}
          content: {}
  /receipts.updatePayment:
    post:
      summary: receipts.updatePayment
      operationId: receipts.updatePayment
      description: Update a payment for a(n incoming) receipt.
      tags:
        - receipts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/receipts.updatePayment.request'
            example:
              id: 018d5965-19fb-701a-af11-e80451931551
              payment_id: aa7e7d42-a951-4cde-85b8-ae447a2f1ac4
              payment:
                amount: 123.3
                currency: EUR
              paid_at: '2016-03-03T16:44:33+00:00'
              payment_method_id: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
              remark: This is an updated remark
      responses:
        '204':
          description: No Content
          content:
            application/json: {}
  /productCategories.list:
    post:
      tags:
        - product_categories
      summary: productCategories.list
      description: Get a list of product categories. They are used as a ledger account, which is important for accounting.
      operationId: productCategories.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/productCategories.list.request'
                - example:
                    filter:
                      department_id: 080aac72-ff1a-4627-bfe3-146b6eee979c
            example:
              filter:
                department_id: 080aac72-ff1a-4627-bfe3-146b6eee979c
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/productCategories.list.response'
                  - example:
                      data:
                        - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                          name: '''Asian Flowers'''
                          ledgers:
                            - department:
                                type: department
                                id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c6
                              ledger_account_number: '70100'
              example:
                data:
                  - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                    name: '''Asian Flowers'''
                    ledgers:
                      - department:
                          type: department
                          id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c6
                        ledger_account_number: '70100'
      deprecated: false
  /products.list:
    post:
      tags:
        - products
      summary: products.list
      description: Get a list of products.
      operationId: products.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/products.list.request'
                - example:
                    filter:
                      ids:
                        - bbbfe0da-e692-4ee3-9d3d-0716808d6523
                        - 722e1eb9-53d5-4b8c-9d17-154dcc65c610
                      term: cookies
                      updated_since: '2019-02-05T16:44:33+00:00'
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - bbbfe0da-e692-4ee3-9d3d-0716808d6523
                  - 722e1eb9-53d5-4b8c-9d17-154dcc65c610
                term: cookies
                updated_since: '2019-02-05T16:44:33+00:00'
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/products.list.response'
                  - example:
                      data:
                        - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                          name: cookies
                          description: dark chocolate
                          code: COOK-DARKCHOC-42
                          unit:
                            type: unitOfMeasure
                            id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                          added_at: '2016-02-01T11:25:41+00:00'
                          updated_at: '2016-02-01T11:25:41+00:00'
                          stock:
                            amount: 123
                          configuration:
                            stock_threshold:
                              minimum: 4
                              action: notify
              example:
                data:
                  - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                    name: cookies
                    description: dark chocolate
                    code: COOK-DARKCHOC-42
                    unit:
                      type: unitOfMeasure
                      id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                    added_at: '2016-02-01T11:25:41+00:00'
                    updated_at: '2016-02-01T11:25:41+00:00'
                    stock:
                      amount: 123
                    configuration:
                      stock_threshold:
                        minimum: 4
                        action: notify
      deprecated: false
  /products.info:
    post:
      tags:
        - products
      summary: products.info
      description: Get details for a single product.
      operationId: products.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/products.info.request'
                - example:
                    id: f8ae61ec-62f3-0538-b028-185c4a5f217f
                    includes: suppliers
            example:
              id: f8ae61ec-62f3-0538-b028-185c4a5f217f
              includes: suppliers
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/products.info.response'
                  - example:
                      data:
                        id: f8ae61ec-62f3-0538-b028-185c4a5f217f
                        name: cookies
                        description: dark chocolate
                        code: COOK-DARKCHOC-42
                        purchase_price:
                          amount: 123.3
                          currency: EUR
                        selling_price:
                          amount: 123.3
                          currency: EUR
                        unit:
                          type: unitOfMeasure
                          id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                        tax:
                          type: taxRate
                          id: df444ced-3129-0916-8f40-07ae5832bf98
                        suppliers:
                          - supplier:
                              type: contact
                              id: e2314517-3cab-4aa9-8471-450e73449040
                            purchase_price:
                              amount: 123.3
                              currency: EUR
                            product_code: prod-111
                            minimum_order_amount: 3
                            classification: primary
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        price_list_prices:
                          - price_list:
                              id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                              type: priceList
                            price:
                              amount: 100
                              currency: EUR
                        product_category:
                          type: productCategory
                          id: e2314517-3cab-4aa9-8471-450e73449041
                        stock:
                          amount: 123
                        configuration:
                          stock_threshold:
                            minimum: 4
                            action: notify
                        added_at: '2016-02-01T11:25:41+00:00'
                        updated_at: '2016-02-01T11:25:41+00:00'
              example:
                data:
                  id: f8ae61ec-62f3-0538-b028-185c4a5f217f
                  name: cookies
                  description: dark chocolate
                  code: COOK-DARKCHOC-42
                  purchase_price:
                    amount: 123.3
                    currency: EUR
                  selling_price:
                    amount: 123.3
                    currency: EUR
                  unit:
                    type: unitOfMeasure
                    id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                  tax:
                    type: taxRate
                    id: df444ced-3129-0916-8f40-07ae5832bf98
                  suppliers:
                    - supplier:
                        type: contact
                        id: e2314517-3cab-4aa9-8471-450e73449040
                      purchase_price:
                        amount: 123.3
                        currency: EUR
                      product_code: prod-111
                      minimum_order_amount: 3
                      classification: primary
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  price_list_prices:
                    - price_list:
                        id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                        type: priceList
                      price:
                        amount: 100
                        currency: EUR
                  product_category:
                    type: productCategory
                    id: e2314517-3cab-4aa9-8471-450e73449041
                  stock:
                    amount: 123
                  configuration:
                    stock_threshold:
                      minimum: 4
                      action: notify
                  added_at: '2016-02-01T11:25:41+00:00'
                  updated_at: '2016-02-01T11:25:41+00:00'
      deprecated: false
  /products.add:
    post:
      tags:
        - products
      summary: products.add
      description: Add a new product.
      operationId: products.add
      parameters: []
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Add Product by Name
                  allOf:
                    - $ref: '#/components/schemas/products.add.request'
                    - required:
                        - name
                - title: Add Product by Code
                  allOf:
                    - $ref: '#/components/schemas/products.add.request'
                    - required:
                        - code
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/products.add.response'
                  - example:
                      data:
                        type: product
                        id: ee94b4c0-5786-0517-9d26-8dd1e6406f20
              example:
                data:
                  type: product
                  id: ee94b4c0-5786-0517-9d26-8dd1e6406f20
      deprecated: false
  /products.update:
    post:
      tags:
        - products
      summary: products.update
      description: Update a product.
      operationId: products.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/products.update.request'
                - example:
                    id: 71e91f91-b222-033f-8c7e-59bcc1521e3d
                    name: Hosting
                    code: c0d32
                    purchase_price:
                      amount: 123.3
                      currency: EUR
                    description: Product used for hosting web solutions
                    selling_price:
                      amount: 123.3
                      currency: EUR
                    unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
                    price_list_prices:
                      - price_list_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                        price:
                          amount: 100
                          currency: EUR
                    stock:
                      amount: 123
                    configuration:
                      stock_threshold:
                        minimum: 4
                        action: notify
                    department_id: af48fe9e-d44c-0eac-8813-8be051b10921
                    product_category_id: 624ca743-8998-4f8c-add1-c427bb022166
                    tax_rate_id: 23097774-e51e-0371-9b42-98ef8ca8bbb6
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: 71e91f91-b222-033f-8c7e-59bcc1521e3d
              name: Hosting
              code: c0d32
              purchase_price:
                amount: 123.3
                currency: EUR
              description: Product used for hosting web solutions
              selling_price:
                amount: 123.3
                currency: EUR
              unit_of_measure_id: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
              price_list_prices:
                - price_list_id: d905ff57-e866-0f59-9d1e-1fd4538bfae1
                  price:
                    amount: 100
                    currency: EUR
              stock:
                amount: 123
              configuration:
                stock_threshold:
                  minimum: 4
                  action: notify
              department_id: af48fe9e-d44c-0eac-8813-8be051b10921
              product_category_id: 624ca743-8998-4f8c-add1-c427bb022166
              tax_rate_id: 23097774-e51e-0371-9b42-98ef8ca8bbb6
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /products.delete:
    post:
      tags:
        - products
      summary: products.delete
      description: Delete a product.
      operationId: products.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/products.delete.request'
                - example:
                    id: 71e91f91-b222-033f-8c7e-59bcc1521e3d
            example:
              id: 71e91f91-b222-033f-8c7e-59bcc1521e3d
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /unitsOfMeasure.list:
    post:
      tags:
        - units_of_measure
      summary: unitsOfMeasure.list
      description: Get a list of units of measure.
      operationId: unitsOfMeasure.list
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/unitsOfMeasure.list.response'
                  - example:
                      data:
                        - id: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
                          name: kg
              example:
                data:
                  - id: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
                    name: kg
      deprecated: false
  /priceLists.list:
    post:
      tags:
        - price_lists
      summary: priceLists.list
      description: Get a list of priceLists.
      operationId: priceLists.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/priceLists.list.request'
                - example:
                    filter:
                      ids:
                        - 5a37d173-78d3-05f3-b018-d51fadc1c5d2
                        - 97233974-7c29-05f5-a51d-fbe3238e6157
            example:
              filter:
                ids:
                  - 5a37d173-78d3-05f3-b018-d51fadc1c5d2
                  - 97233974-7c29-05f5-a51d-fbe3238e6157
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/priceLists.list.response'
                  - example:
                      data:
                        - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                          name: price
                          calculation_method: manual
              example:
                data:
                  - id: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
                    name: price
                    calculation_method: manual
      deprecated: false
  /projects.list:
    post:
      tags:
        - legacy_projects
      summary: projects.list
      description: Get a list of projects.
      operationId: LegacyProjects.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.list.request'
                - example:
                    filter:
                      customer:
                        type: company
                        id: ebafa4c5-fa8a-4409-92e5-1b192243372f
                      participant_id: ed544eac-02e4-037b-8a1a-c8dd662bf621
                      term: coffee
                      updated_since: '2020-06-04T16:44:33+00:00'
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: due_on
            example:
              filter:
                customer:
                  type: company
                  id: ebafa4c5-fa8a-4409-92e5-1b192243372f
                participant_id: ed544eac-02e4-037b-8a1a-c8dd662bf621
                term: coffee
                updated_since: '2020-06-04T16:44:33+00:00'
              page:
                size: 20
                number: 1
              sort:
                - field: due_on
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects.list.response'
                  - example:
                      data:
                        - id: 624ca743-8998-4f8c-add1-c427bb022166
                          reference: PRO-2
                          title: New company website
                          description: ''
                          status: active
                          customer:
                            type: contact
                            id: abbf02c0-8ff9-4048-b83f-5195035161e1
                          starts_on: '2016-02-04'
                          due_on: '2016-10-14'
                          created_at: '2016-02-01T11:25:41+00:00'
                          source:
                            type: deal
                            id: 5023d7c2-80d7-4d4b-b2bd-0fcaa6a1f069
                          actuals:
                            billable_amount:
                              amount: 123.3
                              currency: EUR
                            costs:
                              amount: 123.3
                              currency: EUR
                            result:
                              amount: 123.3
                              currency: EUR
                            profit_percentage: 0
                          budget:
                            provided:
                              amount: 123.3
                              currency: EUR
                            spent:
                              total:
                                amount: 123.3
                                currency: EUR
                              time:
                                amount: 123.3
                                currency: EUR
                              materials:
                                amount: 123.3
                                currency: EUR
                            remaining:
                              amount: 123.3
                              currency: EUR
                            allocated:
                              amount: 123.3
                              currency: EUR
                            forecasted:
                              amount: 123.3
                              currency: EUR
              example:
                data:
                  - id: 624ca743-8998-4f8c-add1-c427bb022166
                    reference: PRO-2
                    title: New company website
                    description: ''
                    status: active
                    customer:
                      type: contact
                      id: abbf02c0-8ff9-4048-b83f-5195035161e1
                    starts_on: '2016-02-04'
                    due_on: '2016-10-14'
                    created_at: '2016-02-01T11:25:41+00:00'
                    source:
                      type: deal
                      id: 5023d7c2-80d7-4d4b-b2bd-0fcaa6a1f069
                    actuals:
                      billable_amount:
                        amount: 123.3
                        currency: EUR
                      costs:
                        amount: 123.3
                        currency: EUR
                      result:
                        amount: 123.3
                        currency: EUR
                      profit_percentage: 0
                    budget:
                      provided:
                        amount: 123.3
                        currency: EUR
                      spent:
                        total:
                          amount: 123.3
                          currency: EUR
                        time:
                          amount: 123.3
                          currency: EUR
                        materials:
                          amount: 123.3
                          currency: EUR
                      remaining:
                        amount: 123.3
                        currency: EUR
                      allocated:
                        amount: 123.3
                        currency: EUR
                      forecasted:
                        amount: 123.3
                        currency: EUR
      deprecated: false
  /projects.info:
    post:
      tags:
        - legacy_projects
      summary: projects.info
      description: Get details for a single project.
      operationId: LegacyProjects.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.info.request'
                - example:
                    id: 8a04371b-2ffb-407b-9b24-d5b5452009c7
            example:
              id: 8a04371b-2ffb-407b-9b24-d5b5452009c7
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects.info.response'
                  - example:
                      data:
                        id: 8a04371b-2ffb-407b-9b24-d5b5452009c7
                        reference: PRO-1
                        title: New company website
                        description: ''
                        status: active
                        customer:
                          type: contact
                          id: de41d3e8-808f-4279-b6ff-4706b04c8df2
                        starts_on: '2016-02-04'
                        due_on: '2016-02-04'
                        source:
                          type: deal
                          id: 39abbf9e-9692-4cca-b20d-79577890752c
                        milestones:
                          - type: milestone
                            id: 7c6b5e26-3068-47a6-bf3b-431d7ab7e704
                        participants:
                          - participant:
                              type: user
                              id: b0ef899b-143c-4708-90ce-aecb3350e116
                            role: decision_maker
                        purchase_order_number: '000023'
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        actuals:
                          billable_amount:
                            amount: 123.3
                            currency: EUR
                          costs:
                            amount: 123.3
                            currency: EUR
                          result:
                            amount: 123.3
                            currency: EUR
                          profit_percentage: 0
                        budget:
                          provided:
                            amount: 123.3
                            currency: EUR
                          spent:
                            total:
                              amount: 123.3
                              currency: EUR
                            time:
                              amount: 123.3
                              currency: EUR
                            materials:
                              amount: 123.3
                              currency: EUR
                          remaining:
                            amount: 123.3
                            currency: EUR
                          allocated:
                            amount: 123.3
                            currency: EUR
                          forecasted:
                            amount: 123.3
                            currency: EUR
              example:
                data:
                  id: 8a04371b-2ffb-407b-9b24-d5b5452009c7
                  reference: PRO-1
                  title: New company website
                  description: ''
                  status: active
                  customer:
                    type: contact
                    id: de41d3e8-808f-4279-b6ff-4706b04c8df2
                  starts_on: '2016-02-04'
                  due_on: '2016-02-04'
                  source:
                    type: deal
                    id: 39abbf9e-9692-4cca-b20d-79577890752c
                  milestones:
                    - type: milestone
                      id: 7c6b5e26-3068-47a6-bf3b-431d7ab7e704
                  participants:
                    - participant:
                        type: user
                        id: b0ef899b-143c-4708-90ce-aecb3350e116
                      role: decision_maker
                  purchase_order_number: '000023'
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  actuals:
                    billable_amount:
                      amount: 123.3
                      currency: EUR
                    costs:
                      amount: 123.3
                      currency: EUR
                    result:
                      amount: 123.3
                      currency: EUR
                    profit_percentage: 0
                  budget:
                    provided:
                      amount: 123.3
                      currency: EUR
                    spent:
                      total:
                        amount: 123.3
                        currency: EUR
                      time:
                        amount: 123.3
                        currency: EUR
                      materials:
                        amount: 123.3
                        currency: EUR
                    remaining:
                      amount: 123.3
                      currency: EUR
                    allocated:
                      amount: 123.3
                      currency: EUR
                    forecasted:
                      amount: 123.3
                      currency: EUR
      deprecated: false
  /projects.create:
    post:
      tags:
        - legacy_projects
      summary: projects.create
      description: Create a new project.
      operationId: LegacyProjects.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.create.request'
                - example:
                    title: New company website
                    starts_on: '2016-02-04'
                    milestones:
                      - starts_on: '2017-01-01'
                        due_on: '2018-01-01'
                        name: Initial setup
                        responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
                    participants:
                      - participant:
                          type: user
                          id: e1240972-6cfc-4549-b49c-edda7568cc48
                        role: member
                    purchase_order_number: '000023'
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    customer:
                      type: contact
                      id: ebafa4c5-fa8a-4409-92e5-1b192243372f
            example:
              title: New company website
              starts_on: '2016-02-04'
              milestones:
                - starts_on: '2017-01-01'
                  due_on: '2018-01-01'
                  name: Initial setup
                  responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
              participants:
                - participant:
                    type: user
                    id: e1240972-6cfc-4549-b49c-edda7568cc48
                  role: member
              purchase_order_number: '000023'
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              customer:
                type: contact
                id: ebafa4c5-fa8a-4409-92e5-1b192243372f
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects.create.response'
                  - example:
                      data:
                        type: project
                        id: c47e8e40-9a16-468f-9b29-38aea8ae4210
              example:
                data:
                  type: project
                  id: c47e8e40-9a16-468f-9b29-38aea8ae4210
      deprecated: false
  /projects.update:
    post:
      tags:
        - legacy_projects
      summary: projects.update
      description: Update a project.
      operationId: LegacyProjects.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.update.request'
                - example:
                    id: dcc2e8ed-51be-4cb6-9c01-034aedac86fd
                    title: New company website
                    description: ''
                    status: active
                    starts_on: '2016-02-04'
                    customer:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    budget:
                      amount: 123.3
                      currency: EUR
                    purchase_order_number: '000023'
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: dcc2e8ed-51be-4cb6-9c01-034aedac86fd
              title: New company website
              description: ''
              status: active
              starts_on: '2016-02-04'
              customer:
                type: company
                id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              budget:
                amount: 123.3
                currency: EUR
              purchase_order_number: '000023'
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects.close:
    post:
      tags:
        - legacy_projects
      summary: projects.close
      description: Closes a project, all its phases, and all tasks within each phase (but not meetings).
      operationId: LegacyProjects.close
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.close.request'
                - example:
                    id: 01548b10-4932-4a18-8a89-005ad09db2c8
            example:
              id: 01548b10-4932-4a18-8a89-005ad09db2c8
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects.reopen:
    post:
      tags:
        - legacy_projects
      summary: projects.reopen
      description: Reopens a project, changing its status to "active".
      operationId: LegacyProjects.reopen
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.reopen.request'
                - example:
                    id: 01548b10-4932-4a18-8a89-005ad09db2c8
            example:
              id: 01548b10-4932-4a18-8a89-005ad09db2c8
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects.delete:
    post:
      tags:
        - legacy_projects
      summary: projects.delete
      description: Delete a project.
      operationId: LegacyProjects.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.delete.request'
                - example:
                    id: 01548b10-4932-4a18-8a89-005ad09db2c8
            example:
              id: 01548b10-4932-4a18-8a89-005ad09db2c8
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects.addParticipant:
    post:
      tags:
        - legacy_projects
      summary: projects.addParticipant
      description: Add a participant to a project.
      operationId: LegacyProjects.addParticipant
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.addParticipant.request'
                - example:
                    id: 8dbfa9db-c53f-410c-97d3-755b19685809
                    participant:
                      type: user
                      id: a1388f3d-6116-4792-ac1c-04657697539e
                    role: member
            example:
              id: 8dbfa9db-c53f-410c-97d3-755b19685809
              participant:
                type: user
                id: a1388f3d-6116-4792-ac1c-04657697539e
              role: member
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects.updateParticipant:
    post:
      tags:
        - legacy_projects
      summary: projects.updateParticipant
      description: Update a participant's role for a project.
      operationId: LegacyProjects.updateParticipant
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects.updateParticipant.request'
                - example:
                    id: 55fbe14f-7399-48e5-b4e0-64b7f5c50451
                    participant:
                      type: user
                      id: 5ccbc008-f65e-4192-836c-4d7e21f54052
                    role: decision_maker
            example:
              id: 55fbe14f-7399-48e5-b4e0-64b7f5c50451
              participant:
                type: user
                id: 5ccbc008-f65e-4192-836c-4d7e21f54052
              role: decision_maker
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /milestones.list:
    post:
      tags:
        - legacy_milestones
      summary: milestones.list
      description: Get a list of project milestones.
      operationId: LegacyMilestones.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.list.request'
                - example:
                    filter:
                      ids:
                        - bbbfe0da-e692-4ee3-9d3d-0716808d6523
                        - 722e1eb9-53d5-4b8c-9d17-154dcc65c610
                      project_id: 082e6289-30c5-45ad-bcd0-190b02d21e81
                      due_before: '2017-01-01'
                      due_after: '2017-01-01'
                      term: coffee
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: starts_on
            example:
              filter:
                ids:
                  - bbbfe0da-e692-4ee3-9d3d-0716808d6523
                  - 722e1eb9-53d5-4b8c-9d17-154dcc65c610
                project_id: 082e6289-30c5-45ad-bcd0-190b02d21e81
                due_before: '2017-01-01'
                due_after: '2017-01-01'
                term: coffee
              page:
                size: 20
                number: 1
              sort:
                - field: starts_on
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/milestones.list.response'
                  - example:
                      data:
                        - id: cfb4146d-06be-41f1-bb39-aa3c929c71dc
                          project:
                            type: project
                            id: 944534fb-15f1-4eea-aab1-82a427aa2d0d
                          starts_on: '2017-01-01'
                          due_on: '2018-01-01'
                          name: Initial setup
                          responsible_user:
                            type: user
                            id: e1240972-6cfc-4549-b49c-edda7568cc48
                          status: open
                          invoicing_method: time_and_materials
                          depends_on:
                            type: milestone
                            id: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                          dependency_for:
                            - type: milestone
                              id: b71ff11f-074e-0705-9450-589342af4f4f
                          actuals:
                            billable_amount:
                              amount: 123.3
                              currency: EUR
                            costs:
                              amount: 123.3
                              currency: EUR
                            result:
                              amount: 123.3
                              currency: EUR
                          budget:
                            provided:
                              amount: 123.3
                              currency: EUR
                            spent:
                              amount: 123.3
                              currency: EUR
                            remaining:
                              amount: 123.3
                              currency: EUR
                            allocated:
                              amount: 123.3
                              currency: EUR
                            forecasted:
                              amount: 123.3
                              currency: EUR
              example:
                data:
                  - id: cfb4146d-06be-41f1-bb39-aa3c929c71dc
                    project:
                      type: project
                      id: 944534fb-15f1-4eea-aab1-82a427aa2d0d
                    starts_on: '2017-01-01'
                    due_on: '2018-01-01'
                    name: Initial setup
                    responsible_user:
                      type: user
                      id: e1240972-6cfc-4549-b49c-edda7568cc48
                    status: open
                    invoicing_method: time_and_materials
                    depends_on:
                      type: milestone
                      id: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                    dependency_for:
                      - type: milestone
                        id: b71ff11f-074e-0705-9450-589342af4f4f
                    actuals:
                      billable_amount:
                        amount: 123.3
                        currency: EUR
                      costs:
                        amount: 123.3
                        currency: EUR
                      result:
                        amount: 123.3
                        currency: EUR
                    budget:
                      provided:
                        amount: 123.3
                        currency: EUR
                      spent:
                        amount: 123.3
                        currency: EUR
                      remaining:
                        amount: 123.3
                        currency: EUR
                      allocated:
                        amount: 123.3
                        currency: EUR
                      forecasted:
                        amount: 123.3
                        currency: EUR
      deprecated: false
  /milestones.info:
    post:
      tags:
        - legacy_milestones
      summary: milestones.info
      description: Get details for a single milestone.
      operationId: LegacyMilestones.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.info.request'
                - example:
                    id: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
            example:
              id: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/milestones.info.response'
                  - example:
                      data:
                        id: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
                        project:
                          type: project
                          id: fffaf951-b65a-4cb1-bfb6-4b93e0e60c10
                        starts_on: '2017-01-01'
                        due_on: '2018-01-01'
                        name: Initial setup
                        description: ''
                        responsible_user:
                          type: user
                          id: e1240972-6cfc-4549-b49c-edda7568cc48
                        status: open
                        invoicing_method: time_and_materials
                        depends_on:
                          type: milestone
                          id: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                        dependency_for:
                          - type: milestone
                            id: b71ff11f-074e-0705-9450-589342af4f4f
                        actuals:
                          billable_amount:
                            amount: 123.3
                            currency: EUR
                          costs:
                            amount: 123.3
                            currency: EUR
                          result:
                            amount: 123.3
                            currency: EUR
                        budget:
                          provided:
                            amount: 123.3
                            currency: EUR
                          spent:
                            amount: 123.3
                            currency: EUR
                          remaining:
                            amount: 123.3
                            currency: EUR
                          allocated:
                            amount: 123.3
                            currency: EUR
                          forecasted:
                            amount: 123.3
                            currency: EUR
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
              example:
                data:
                  id: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
                  project:
                    type: project
                    id: fffaf951-b65a-4cb1-bfb6-4b93e0e60c10
                  starts_on: '2017-01-01'
                  due_on: '2018-01-01'
                  name: Initial setup
                  description: ''
                  responsible_user:
                    type: user
                    id: e1240972-6cfc-4549-b49c-edda7568cc48
                  status: open
                  invoicing_method: time_and_materials
                  depends_on:
                    type: milestone
                    id: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                  dependency_for:
                    - type: milestone
                      id: b71ff11f-074e-0705-9450-589342af4f4f
                  actuals:
                    billable_amount:
                      amount: 123.3
                      currency: EUR
                    costs:
                      amount: 123.3
                      currency: EUR
                    result:
                      amount: 123.3
                      currency: EUR
                  budget:
                    provided:
                      amount: 123.3
                      currency: EUR
                    spent:
                      amount: 123.3
                      currency: EUR
                    remaining:
                      amount: 123.3
                      currency: EUR
                    allocated:
                      amount: 123.3
                      currency: EUR
                    forecasted:
                      amount: 123.3
                      currency: EUR
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
      deprecated: false
  /milestones.create:
    post:
      tags:
        - legacy_milestones
      summary: milestones.create
      description: Create a new milestone.
      operationId: LegacyMilestones.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.create.request'
                - example:
                    project_id: 1c159f98-4b07-438a-9f42-fb4206b9530d
                    starts_on: '2017-01-01'
                    due_on: '2018-01-01'
                    name: Initial setup
                    responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
                    billing_method: time_and_materials
                    budget:
                      amount: 123.3
                      currency: EUR
                    depends_on: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              project_id: 1c159f98-4b07-438a-9f42-fb4206b9530d
              starts_on: '2017-01-01'
              due_on: '2018-01-01'
              name: Initial setup
              responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
              billing_method: time_and_materials
              budget:
                amount: 123.3
                currency: EUR
              depends_on: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/milestones.create.response'
                  - example:
                      data:
                        type: milestone
                        id: 51f19f91-6343-4001-a628-3afe45f674ad
              example:
                data:
                  type: milestone
                  id: 51f19f91-6343-4001-a628-3afe45f674ad
      deprecated: false
  /milestones.update:
    post:
      tags:
        - legacy_milestones
      summary: milestones.update
      description: Update a milestone.
      operationId: LegacyMilestones.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.update.request'
                - example:
                    id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
                    starts_on: '2017-01-01'
                    due_on: '2018-01-01'
                    name: Initial setup
                    responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
                    depends_on: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
                    propagate_date_changes: false
                    billing_method: fixed_price
                    price:
                      amount: 1500
                      currency: EUR
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
              starts_on: '2017-01-01'
              due_on: '2018-01-01'
              name: Initial setup
              responsible_user_id: e1240972-6cfc-4549-b49c-edda7568cc48
              depends_on: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
              propagate_date_changes: false
              billing_method: fixed_price
              price:
                amount: 1500
                currency: EUR
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /milestones.delete:
    post:
      tags:
        - legacy_milestones
      summary: milestones.delete
      description: Delete a milestone.
      operationId: LegacyMilestones.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.delete.request'
                - example:
                    id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
            example:
              id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /milestones.close:
    post:
      tags:
        - legacy_milestones
      summary: milestones.close
      description: Close a milestone. All open tasks will be closed, open meetings will remain open. Closing the last open milestone will also close the project.
      operationId: LegacyMilestones.close
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.close.request'
                - example:
                    id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
            example:
              id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /milestones.open:
    post:
      tags:
        - legacy_milestones
      summary: milestones.open
      description: (Re)open a milestone. If the milestone's project is closed, the project will be reopened.
      operationId: LegacyMilestones.open
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/milestones.open.request'
                - example:
                    id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
            example:
              id: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.list:
    post:
      tags:
        - projects
      summary: projects.list
      description: Lists all projects that match the optional filters provided.
      operationId: NextgenProjects.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.list.request'
                - example:
                    filter:
                      ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
                        - 46156648-87c6-478d-8aa7-1dc3a00daca4
                      status: open
                      quotation_ids:
                        - 132c7189-6e49-420c-889c-23267ce70660
                        - cd740bde-d317-4c97-bec0-76bfad903a1e
                      deal_ids:
                        - 7ea73287-9f87-4b2b-b6f8-866b12b7364a
                        - 68f8bb28-e5d0-4ee2-b269-1dbeeda5bdcc
                      term: Interesting project
                      customers:
                        - type: contact
                          id: 1106f231-0464-41b7-8b0b-19451af81afe
                      created_at:
                        operator: between
                        start: '2022-02-01T00:00:00+00:00'
                        end: '2022-02-28T23:59:59+00:00'
                      updated_at:
                        operator: after
                        value: '2022-03-01T00:00:00+00:00'
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: amount_billed
                    includes: legacy_project,custom_fields
            example:
              filter:
                ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
                  - 46156648-87c6-478d-8aa7-1dc3a00daca4
                status: open
                quotation_ids:
                  - 132c7189-6e49-420c-889c-23267ce70660
                  - cd740bde-d317-4c97-bec0-76bfad903a1e
                deal_ids:
                  - 7ea73287-9f87-4b2b-b6f8-866b12b7364a
                  - 68f8bb28-e5d0-4ee2-b269-1dbeeda5bdcc
                term: Interesting project
                customers:
                  - type: contact
                    id: 1106f231-0464-41b7-8b0b-19451af81afe
                created_at:
                  operator: between
                  start: '2022-02-01T00:00:00+00:00'
                  end: '2022-02-28T23:59:59+00:00'
                updated_at:
                  operator: after
                  value: '2022-03-01T00:00:00+00:00'
              page:
                size: 20
                number: 1
              sort:
                - field: amount_billed
              includes: legacy_project,custom_fields
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projects.list.response'
                  - example:
                      data:
                        - id: 49b403be-a32e-0901-9b1c-25214f9027c6
                          project_key: 123
                          title: My project title
                          description: My project description
                          status: open
                          billing_method: time_and_materials
                          time_budget:
                            value: 43200
                            unit: seconds
                          time_estimated:
                            value: 43200
                            unit: seconds
                          time_tracked:
                            value: 43200
                            unit: seconds
                          amount_billed:
                            amount: 123.3
                            currency: EUR
                          amount_unbilled:
                            amount: 123.3
                            currency: EUR
                          fixed_amount_billed:
                            amount: 123.3
                            currency: EUR
                          amount_paid:
                            amount: 123.3
                            currency: EUR
                          external_budget:
                            amount: 123.3
                            currency: EUR
                          external_budget_spent:
                            amount: 123.3
                            currency: EUR
                          internal_budget:
                            amount: 123.3
                            currency: EUR
                          price:
                            amount: 123.3
                            currency: EUR
                          fixed_price:
                            amount: 123.3
                            currency: EUR
                          calculated_price:
                            amount: 123.3
                            currency: EUR
                          cost:
                            amount: 123.3
                            currency: EUR
                          margin:
                            amount: 123.3
                            currency: EUR
                          margin_percentage: null
                          start_date: '2022-02-23'
                          end_date: '2022-02-28'
                          created_at: '2022-02-01T10:33:45+00:00'
                          updated_at: '2022-02-03T14:12:09+00:00'
                          company_entity:
                            type: department
                            id: 0d0dec5a-7096-4009-be37-07eab117db07
                          owners:
                            - type: user
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                          color: '#00B2B2'
                          assignees:
                            - assignee:
                                type: user
                                id: 66abace2-62af-0836-a927-fe3f44b9b47b
                              assign_type: auto_assigned
                          customers:
                            - type: contact
                              id: 1106f231-0464-41b7-8b0b-19451af81afe
                          deals:
                            - type: deal
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                          quotations:
                            - type: quotation
                              id: a7f15c40-3b65-09ae-9f1b-d55786bc7b01
                          legacy_project:
                            type: project
                            id: 624ca743-8998-4f8c-add1-c427bb022166
                          custom_fields:
                            - definition:
                                type: customFieldDefinition
                                id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                              value: '092980616'
                      meta:
                        page:
                          size: 10
                          number: 2
                        matches: 10
              example:
                data:
                  - id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    project_key: 123
                    title: My project title
                    description: My project description
                    status: open
                    billing_method: time_and_materials
                    time_budget:
                      value: 43200
                      unit: seconds
                    time_estimated:
                      value: 43200
                      unit: seconds
                    time_tracked:
                      value: 43200
                      unit: seconds
                    amount_billed:
                      amount: 123.3
                      currency: EUR
                    amount_unbilled:
                      amount: 123.3
                      currency: EUR
                    fixed_amount_billed:
                      amount: 123.3
                      currency: EUR
                    amount_paid:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    external_budget_spent:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    price:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    calculated_price:
                      amount: 123.3
                      currency: EUR
                    cost:
                      amount: 123.3
                      currency: EUR
                    margin:
                      amount: 123.3
                      currency: EUR
                    margin_percentage: null
                    start_date: '2022-02-23'
                    end_date: '2022-02-28'
                    created_at: '2022-02-01T10:33:45+00:00'
                    updated_at: '2022-02-03T14:12:09+00:00'
                    company_entity:
                      type: department
                      id: 0d0dec5a-7096-4009-be37-07eab117db07
                    owners:
                      - type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                    color: '#00B2B2'
                    assignees:
                      - assignee:
                          type: user
                          id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        assign_type: auto_assigned
                    customers:
                      - type: contact
                        id: 1106f231-0464-41b7-8b0b-19451af81afe
                    deals:
                      - type: deal
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                    quotations:
                      - type: quotation
                        id: a7f15c40-3b65-09ae-9f1b-d55786bc7b01
                    legacy_project:
                      type: project
                      id: 624ca743-8998-4f8c-add1-c427bb022166
                    custom_fields:
                      - definition:
                          type: customFieldDefinition
                          id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 10
      deprecated: false
  /projects-v2/projects.info:
    post:
      tags:
        - projects
      summary: projects.info
      description: Returns all the information of a single project.
      operationId: NextgenProjects.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.info.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    includes: legacy_project
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              includes: legacy_project
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projects.info.response'
                  - example:
                      data:
                        id: 49b403be-a32e-0901-9b1c-25214f9027c6
                        project_key: 123
                        title: My project title
                        description: My project description
                        status: open
                        update_rights: owners
                        billing_method: time_and_materials
                        time_budget:
                          value: 43200
                          unit: seconds
                        time_tracked:
                          value: 43200
                          unit: seconds
                        amount_billed:
                          amount: 123.3
                          currency: EUR
                        fixed_amount_billed:
                          amount: 123.3
                          currency: EUR
                        amount_paid:
                          amount: 123.3
                          currency: EUR
                        external_budget:
                          amount: 123.3
                          currency: EUR
                        task_external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        material_external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        internal_budget:
                          amount: 123.3
                          currency: EUR
                        price:
                          amount: 123.3
                          currency: EUR
                        fixed_price:
                          amount: 123.3
                          currency: EUR
                        calculated_price:
                          amount: 123.3
                          currency: EUR
                        cost:
                          amount: 123.3
                          currency: EUR
                        margin:
                          amount: 123.3
                          currency: EUR
                        margin_percentage: null
                        start_date: '2022-02-23'
                        end_date: '2022-02-28'
                        purchase_order_number: '000023'
                        created_at: '2022-02-01T10:33:45+00:00'
                        updated_at: '2022-02-03T14:12:09+00:00'
                        company_entity:
                          type: department
                          id: 0d0dec5a-7096-4009-be37-07eab117db07
                        owners:
                          - type: user
                            id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        color: '#00B2B2'
                        assignees:
                          - assignee:
                              type: user
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                            assign_type: auto_assigned
                        customers:
                          - type: contact
                            id: 1106f231-0464-41b7-8b0b-19451af81afe
                        deals:
                          - type: deal
                            id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        quotations:
                          - type: quotation
                            id: a7f15c40-3b65-09ae-9f1b-d55786bc7b01
                        custom_user_rates:
                          - user:
                              type: user
                              id: 55d3707c-14dc-4b62-a072-e3f4c1413462
                            custom_rate:
                              amount: 123.3
                              currency: EUR
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        legacy_project:
                          type: project
                          id: 624ca743-8998-4f8c-add1-c427bb022166
                        external_parties:
                          id: f7fcf4eb-583c-4e6b-88be-2a9e83afdb81
                          customer:
                            type: contact
                            id: 66abace2-62af-0836-a927-fe3f44b9b47b
                          function: Sales representative
                          sub_function: Teamleader Focus FR
              example:
                data:
                  id: 49b403be-a32e-0901-9b1c-25214f9027c6
                  project_key: 123
                  title: My project title
                  description: My project description
                  status: open
                  update_rights: owners
                  billing_method: time_and_materials
                  time_budget:
                    value: 43200
                    unit: seconds
                  time_tracked:
                    value: 43200
                    unit: seconds
                  amount_billed:
                    amount: 123.3
                    currency: EUR
                  fixed_amount_billed:
                    amount: 123.3
                    currency: EUR
                  amount_paid:
                    amount: 123.3
                    currency: EUR
                  external_budget:
                    amount: 123.3
                    currency: EUR
                  task_external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  material_external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  internal_budget:
                    amount: 123.3
                    currency: EUR
                  price:
                    amount: 123.3
                    currency: EUR
                  fixed_price:
                    amount: 123.3
                    currency: EUR
                  calculated_price:
                    amount: 123.3
                    currency: EUR
                  cost:
                    amount: 123.3
                    currency: EUR
                  margin:
                    amount: 123.3
                    currency: EUR
                  margin_percentage: null
                  start_date: '2022-02-23'
                  end_date: '2022-02-28'
                  purchase_order_number: '000023'
                  created_at: '2022-02-01T10:33:45+00:00'
                  updated_at: '2022-02-03T14:12:09+00:00'
                  company_entity:
                    type: department
                    id: 0d0dec5a-7096-4009-be37-07eab117db07
                  owners:
                    - type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
                  color: '#00B2B2'
                  assignees:
                    - assignee:
                        type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                      assign_type: auto_assigned
                  customers:
                    - type: contact
                      id: 1106f231-0464-41b7-8b0b-19451af81afe
                  deals:
                    - type: deal
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
                  quotations:
                    - type: quotation
                      id: a7f15c40-3b65-09ae-9f1b-d55786bc7b01
                  custom_user_rates:
                    - user:
                        type: user
                        id: 55d3707c-14dc-4b62-a072-e3f4c1413462
                      custom_rate:
                        amount: 123.3
                        currency: EUR
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  legacy_project:
                    type: project
                    id: 624ca743-8998-4f8c-add1-c427bb022166
                  external_parties:
                    - id: f7fcf4eb-583c-4e6b-88be-2a9e83afdb81
                      customer:
                        type: contact
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                      function: Sales representative
                      sub_function: Teamleader Focus FR
      deprecated: false
  /projects-v2/projects.create:
    post:
      tags:
        - projects
      summary: projects.create
      description: Create a new project. Only `title` is required. All the other fields are optional.
      operationId: NextgenProjects.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.create.request'
                - example:
                    title: My cool new project
                    description: My project description
                    owner_ids:
                      - 47e7e4a2-607d-465b-a121-7bdc9c64ade7
                      - d8ebc8a5-800f-4714-97bb-3947a7ec274d
                    time_budget:
                      value: 43200
                      unit: minutes
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    start_date: '2022-02-23'
                    end_date: '2022-02-28'
                    purchase_order_number: '000023'
                    company_entity_id: 0d0dec5a-7096-4009-be37-07eab117db07
                    color: '#00B2B2'
                    customers:
                      - type: company
                        id: 9cb3e568-3931-4b8f-8db8-5a002e8cf253
                    assignees:
                      - type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                    deal_ids:
                      - 3709b7e9-7722-4d2d-a663-b480789bafe4
                      - 39fb2767-90e0-4fe4-9bac-a244bee6552c
                    quotation_ids:
                      - e8e8e969-2054-49ee-81d1-47453de2aebb
                      - fc41c04f-1841-4238-a31b-42c48c57713e
                    initial_time_tracked:
                      value: 43200
                      unit: minutes
                    initial_price:
                      amount: 123.3
                      currency: EUR
                    initial_cost:
                      amount: 123.3
                      currency: EUR
                    initial_amount_billed:
                      amount: 123.3
                      currency: EUR
                    initial_amount_paid:
                      amount: 123.3
                      currency: EUR
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              title: My cool new project
              description: My project description
              owner_ids:
                - 47e7e4a2-607d-465b-a121-7bdc9c64ade7
                - d8ebc8a5-800f-4714-97bb-3947a7ec274d
              time_budget:
                value: 43200
                unit: minutes
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              fixed_price:
                amount: 123.3
                currency: EUR
              start_date: '2022-02-23'
              end_date: '2022-02-28'
              purchase_order_number: '000023'
              company_entity_id: 0d0dec5a-7096-4009-be37-07eab117db07
              color: '#00B2B2'
              customers:
                - type: company
                  id: 9cb3e568-3931-4b8f-8db8-5a002e8cf253
              assignees:
                - type: user
                  id: 66abace2-62af-0836-a927-fe3f44b9b47b
              deal_ids:
                - 3709b7e9-7722-4d2d-a663-b480789bafe4
                - 39fb2767-90e0-4fe4-9bac-a244bee6552c
              quotation_ids:
                - e8e8e969-2054-49ee-81d1-47453de2aebb
                - fc41c04f-1841-4238-a31b-42c48c57713e
              initial_time_tracked:
                value: 43200
                unit: minutes
              initial_price:
                amount: 123.3
                currency: EUR
              initial_cost:
                amount: 123.3
                currency: EUR
              initial_amount_billed:
                amount: 123.3
                currency: EUR
              initial_amount_paid:
                amount: 123.3
                currency: EUR
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projects.create.response'
                  - example:
                      data:
                        type: nextgenProject
                        id: 49b403be-a32e-0901-9b1c-25214f9027c6
              example:
                data:
                  type: nextgenProject
                  id: 49b403be-a32e-0901-9b1c-25214f9027c6
      deprecated: false
  /projects-v2/projects.update:
    post:
      tags:
        - projects
      summary: projects.update
      description: Update a project. All attributes except for `id` are optional. Providing `null` will clear that value from the project (for properties that are nullable).
      operationId: NextgenProjects.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.update.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    title: A different project title
                    description: Another description
                    time_budget:
                      value: 60
                      unit: minutes
                    billing_method:
                      value: time_and_materials
                      update_strategy: none
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    start_date: '2022-02-23'
                    end_date: '2022-02-28'
                    purchase_order_number: '000023'
                    company_entity_id: 0d0dec5a-7096-4009-be37-07eab117db07
                    color: '#00B2B2'
                    initial_time_tracked:
                      value: 43200
                      unit: minutes
                    initial_price:
                      amount: 123.3
                      currency: EUR
                    initial_cost:
                      amount: 123.3
                      currency: EUR
                    initial_amount_billed:
                      amount: 123.3
                      currency: EUR
                    initial_amount_paid:
                      amount: 123.3
                      currency: EUR
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              title: A different project title
              description: Another description
              time_budget:
                value: 60
                unit: minutes
              billing_method:
                value: time_and_materials
                update_strategy: none
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              fixed_price:
                amount: 123.3
                currency: EUR
              start_date: '2022-02-23'
              end_date: '2022-02-28'
              purchase_order_number: '000023'
              company_entity_id: 0d0dec5a-7096-4009-be37-07eab117db07
              color: '#00B2B2'
              initial_time_tracked:
                value: 43200
                unit: minutes
              initial_price:
                amount: 123.3
                currency: EUR
              initial_cost:
                amount: 123.3
                currency: EUR
              initial_amount_billed:
                amount: 123.3
                currency: EUR
              initial_amount_paid:
                amount: 123.3
                currency: EUR
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.close:
    post:
      tags:
        - projects
      summary: projects.close
      description: Mark a project as closed.
      operationId: NextgenProjects.close
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.close.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    closing_strategy: mark_tasks_and_materials_as_done
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              closing_strategy: mark_tasks_and_materials_as_done
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.reopen:
    post:
      tags:
        - projects
      summary: projects.reopen
      description: Reopen a closed project.
      operationId: NextgenProjects.reopen
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.reopen.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.duplicate:
    post:
      tags:
        - projects
      summary: projects.duplicate
      description: Duplicate a project.
      operationId: NextgenProjects.duplicate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.duplicate.request'
                - example:
                    id: 81df9996-6d2c-4844-86d6-202c08d2837e
                    title: Copy of my project
            example:
              id: 81df9996-6d2c-4844-86d6-202c08d2837e
              title: Copy of my project
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projects.duplicate.response'
                  - example:
                      data:
                        type: nextgenProject
                        id: 49b403be-a32e-0901-9b1c-25214f9027c6
              example:
                data:
                  type: nextgenProject
                  id: 49b403be-a32e-0901-9b1c-25214f9027c6
      deprecated: false
  /projects-v2/projects.delete:
    post:
      tags:
        - projects
      summary: projects.delete
      description: Delete a project.
      operationId: NextgenProjects.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.delete.request'
                - example:
                    id: 81df9996-6d2c-4844-86d6-202c08d2837e
                    delete_strategy: unlink_tasks_and_time_trackings
            example:
              id: 81df9996-6d2c-4844-86d6-202c08d2837e
              delete_strategy: unlink_tasks_and_time_trackings
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.addOwner:
    post:
      tags:
        - projects
      summary: projects.addOwner
      description: Add a user as owner. Doesn't fail if the user was already added.
      operationId: NextgenProjects.addOwner
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.addOwner.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    user_id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              user_id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.removeOwner:
    post:
      tags:
        - projects
      summary: projects.removeOwner
      description: Remove a user as owner. Doesn't fail if the user wasn't linked.
      operationId: NextgenProjects.removeOwner
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.removeOwner.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    user_id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              user_id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.assign:
    post:
      tags:
        - projects
      summary: projects.assign
      description: Assign a user or a team to a project.
      operationId: NextgenProjects.assign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.assign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.unassign:
    post:
      tags:
        - projects
      summary: projects.unassign
      description: Unassign a user or a team from a project.
      operationId: NextgenProjects.unassign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.unassign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.addCustomer:
    post:
      tags:
        - projects
      summary: projects.addCustomer
      description: Add a customer to the project. Doesn't fail if the customer was already added.
      operationId: NextgenProjects.addCustomer
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.addCustomer.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    customer:
                      type: contact
                      id: 03148b5d-4cb0-4750-a3f2-8697cf8bce10
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              customer:
                type: contact
                id: 03148b5d-4cb0-4750-a3f2-8697cf8bce10
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.removeCustomer:
    post:
      tags:
        - projects
      summary: projects.removeCustomer
      description: Remove a customer from the project. Doesn't fail if the customer was not added.
      operationId: NextgenProjects.removeCustomer
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.removeCustomer.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    customer:
                      type: contact
                      id: 03148b5d-4cb0-4750-a3f2-8697cf8bce10
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              customer:
                type: contact
                id: 03148b5d-4cb0-4750-a3f2-8697cf8bce10
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.addDeal:
    post:
      tags:
        - projects
      summary: projects.addDeal
      description: Add a deal to the project. Doesn't fail if the deal was already added.
      operationId: NextgenProjects.addDeal
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.addDeal.request'
                - example:
                    id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
                    deal_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
            example:
              id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
              deal_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.removeDeal:
    post:
      tags:
        - projects
      summary: projects.removeDeal
      description: Remove a deal from the project. Doesn't fail if the deal was already removed.
      operationId: NextgenProjects.removeDeal
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.removeDeal.request'
                - example:
                    id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
                    deal_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
            example:
              id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
              deal_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.addQuotation:
    post:
      tags:
        - projects
      summary: projects.addQuotation
      description: Add a quotation to the project. Doesn't fail if the quotation was already added.
      operationId: NextgenProjects.addQuotation
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.addQuotation.request'
                - example:
                    id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
                    quotation_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
            example:
              id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
              quotation_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projects.removeQuotation:
    post:
      tags:
        - projects
      summary: projects.removeQuotation
      description: Remove a quotation from the project. Doesn't fail if the quotation was already removed.
      operationId: NextgenProjects.removeQuotation
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projects.removeQuotation.request'
                - example:
                    id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
                    quotation_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
            example:
              id: d27909aa-fc0e-4ed4-acec-fcbffda5111b
              quotation_id: 8385b072-587f-4ebf-a32b-5f48baea1b1c
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/externalParties.addToProject:
    post:
      tags:
        - external_parties
      summary: externalParties.addToProject
      description: Add an external party to a project.
      operationId: NextgenProjectsExternalParties.addToProject
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_externalParties.addToProject.request'
                - example:
                    project_id: 48ef99b9-4a20-4071-888d-0927f45c03d5
                    customer:
                      type: contact
                      id: adfec6b9-a8d7-403d-bde3-093ad50d74c2
                    function: Sales representative
                    sub_function: Teamleader Focus Sales FR
            example:
              project_id: 48ef99b9-4a20-4071-888d-0927f45c03d5
              customer:
                type: contact
                id: adfec6b9-a8d7-403d-bde3-093ad50d74c2
              function: Sales representative
              sub_function: Teamleader Focus Sales FR
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/externalParties.update:
    post:
      tags:
        - external_parties
      summary: externalParties.update
      description: Update an external party.
      operationId: NextgenProjectsExternalParties.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_externalParties.update.request'
                - example:
                    id: 48ef99b9-4a20-4071-888d-0927f45c03d5
                    customer:
                      type: contact
                      id: adfec6b9-a8d7-403d-bde3-093ad50d74c2
                    function: Sales representative
                    sub_function: null
            example:
              id: 48ef99b9-4a20-4071-888d-0927f45c03d5
              customer:
                type: contact
                id: adfec6b9-a8d7-403d-bde3-093ad50d74c2
              function: Sales representative
              sub_function: null
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/externalParties.delete:
    post:
      tags:
        - external_parties
      summary: externalParties.delete
      description: Delete an external party.
      operationId: NextgenProjectsExternalParties.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_externalParties.delete.request'
                - example:
                    id: 48ef99b9-4a20-4071-888d-0927f45c03d5
            example:
              id: 48ef99b9-4a20-4071-888d-0927f45c03d5
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectLines.list:
    post:
      tags:
        - project_lines
      summary: projectLines.list
      description: All line types (tasks, materials, groups) can be side-loaded.
      operationId: projectLines.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectLines.list.request'
                - example:
                    project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    filter:
                      types:
                        - nextgenTask
                        - nextgenMaterial
                        - nextgenProjectGroup
                      assignees:
                        - type: user
                          id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
              filter:
                types:
                  - nextgenTask
                  - nextgenMaterial
                  - nextgenProjectGroup
                assignees:
                  - type: user
                    id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projectLines.list.response'
                  - example:
                      data:
                        - line:
                            type: nextgenMaterial
                            id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
                          group:
                            type: nextgenProjectGroup
                            id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
              example:
                data:
                  - line:
                      type: nextgenMaterial
                      id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
                    group:
                      type: nextgenProjectGroup
                      id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
      deprecated: false
  /projects-v2/projectLines.addToGroup:
    post:
      tags:
        - project_lines
      summary: projectLines.addToGroup
      description: Add an existing task or material to a group.
      operationId: projectLines.addToGroup
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectLines.addToGroup.request'
                - example:
                    line_id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
                    group_id: 0daf76e6-5141-4fb0-866f-01916a873a38
            example:
              line_id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
              group_id: 0daf76e6-5141-4fb0-866f-01916a873a38
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectLines.removeFromGroup:
    post:
      tags:
        - project_lines
      summary: projectLines.removeFromGroup
      description: Remove a task or material from the group it is currently in.
      operationId: projectLines.removeFromGroup
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectLines.removeFromGroup.request'
                - example:
                    line_id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
            example:
              line_id: a14a464d-320a-49bb-b6ee-b510c7f4f66c
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectGroups.list:
    post:
      tags:
        - groups
      summary: projectGroups.list
      description: Lists all the groups that match the optional filters provided.
      operationId: projectGroups.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.list.request'
                - example:
                    filter:
                      ids:
                        - 0185a0af-97a6-7f44-8aec-254d8daf72f3
                        - 0185a0c3-b791-7629-8361-d60f3c0d7ce2
                      project_id: 01859b27-1525-7372-bd40-26a6363c8bfe
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 0185a0af-97a6-7f44-8aec-254d8daf72f3
                  - 0185a0c3-b791-7629-8361-d60f3c0d7ce2
                project_id: 01859b27-1525-7372-bd40-26a6363c8bfe
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projectGroups.list.response'
                  - example:
                      data:
                        - id: 0185a0af-97a6-7f44-8aec-254d8daf72f3
                          project:
                            type: nextgenProject
                            id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                          title: Website frontpage
                          color: '#00B2B2'
                          billing_method: time_and_materials
                          billing_status: not_billable
                          amount_billed:
                            amount: 123.3
                            currency: EUR
                          fixed_amount_billed:
                            amount: 123.3
                            currency: EUR
                          external_budget:
                            amount: 123.3
                            currency: EUR
                          external_budget_spent:
                            amount: 123.3
                            currency: EUR
                          internal_budget:
                            amount: 123.3
                            currency: EUR
                          price:
                            amount: 123.3
                            currency: EUR
                          fixed_price:
                            amount: 123.3
                            currency: EUR
                          calculated_price:
                            amount: 123.3
                            currency: EUR
                          cost:
                            amount: 123.3
                            currency: EUR
                          margin:
                            amount: 123.3
                            currency: EUR
                          margin_percentage: null
                          assignees:
                            - assignee:
                                type: user
                                id: 66abace2-62af-0836-a927-fe3f44b9b47b
                              assign_type: auto_assigned
                          start_date: '2023-01-18'
                          end_date: '2023-03-22'
                          time_estimated:
                            value: 28800
                            unit: seconds
                          time_tracked:
                            value: 21100
                            unit: seconds
              example:
                data:
                  - id: 0185a0af-97a6-7f44-8aec-254d8daf72f3
                    project:
                      type: nextgenProject
                      id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                    title: Website frontpage
                    color: '#00B2B2'
                    billing_method: time_and_materials
                    billing_status: not_billable
                    amount_billed:
                      amount: 123.3
                      currency: EUR
                    fixed_amount_billed:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    external_budget_spent:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    price:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    calculated_price:
                      amount: 123.3
                      currency: EUR
                    cost:
                      amount: 123.3
                      currency: EUR
                    margin:
                      amount: 123.3
                      currency: EUR
                    margin_percentage: null
                    assignees:
                      - assignee:
                          type: user
                          id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        assign_type: auto_assigned
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    time_estimated:
                      value: 28800
                      unit: seconds
                    time_tracked:
                      value: 21100
                      unit: seconds
      deprecated: false
  /projects-v2/projectGroups.info:
    post:
      tags:
        - groups
      summary: projectGroups.info
      description: Returns all the information for one group.
      operationId: projectGroups.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.info.request'
                - example:
                    id: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
            example:
              id: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projectGroups.info.response'
                  - example:
                      data:
                        id: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
                        project:
                          type: nextgenProject
                          id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                        title: Website frontpage
                        description: My elaborate description
                        color: '#00B2B2'
                        billing_method: time_and_materials
                        billing_status: not_billable
                        amount_billed:
                          amount: 123.3
                          currency: EUR
                        fixed_amount_billed:
                          amount: 123.3
                          currency: EUR
                        external_budget:
                          amount: 123.3
                          currency: EUR
                        external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        internal_budget:
                          amount: 123.3
                          currency: EUR
                        price:
                          amount: 123.3
                          currency: EUR
                        fixed_price:
                          amount: 123.3
                          currency: EUR
                        calculated_price:
                          amount: 123.3
                          currency: EUR
                        cost:
                          amount: 123.3
                          currency: EUR
                        margin:
                          amount: 123.3
                          currency: EUR
                        margin_percentage: null
                        assignees:
                          - assignee:
                              type: user
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                            assign_type: auto_assigned
                        start_date: '2023-01-18'
                        end_date: '2023-03-22'
                        time_estimated:
                          value: 28800
                          unit: seconds
                        time_tracked:
                          value: 21100
                          unit: seconds
              example:
                data:
                  id: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
                  project:
                    type: nextgenProject
                    id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                  title: Website frontpage
                  description: My elaborate description
                  color: '#00B2B2'
                  billing_method: time_and_materials
                  billing_status: not_billable
                  amount_billed:
                    amount: 123.3
                    currency: EUR
                  fixed_amount_billed:
                    amount: 123.3
                    currency: EUR
                  external_budget:
                    amount: 123.3
                    currency: EUR
                  external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  internal_budget:
                    amount: 123.3
                    currency: EUR
                  price:
                    amount: 123.3
                    currency: EUR
                  fixed_price:
                    amount: 123.3
                    currency: EUR
                  calculated_price:
                    amount: 123.3
                    currency: EUR
                  cost:
                    amount: 123.3
                    currency: EUR
                  margin:
                    amount: 123.3
                    currency: EUR
                  margin_percentage: null
                  assignees:
                    - assignee:
                        type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                      assign_type: auto_assigned
                  start_date: '2023-01-18'
                  end_date: '2023-03-22'
                  time_estimated:
                    value: 28800
                    unit: seconds
                  time_tracked:
                    value: 21100
                    unit: seconds
      deprecated: false
  /projects-v2/projectGroups.create:
    post:
      tags:
        - groups
      summary: projectGroups.create
      description: Create a group. All properties except for `title` and `project_id` are optional.
      operationId: projectGroups.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.create.request'
                - example:
                    project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    title: My project group
                    description: Some long-winded description
                    color: '#00B2B2'
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    assignees:
                      - type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
              title: My project group
              description: Some long-winded description
              color: '#00B2B2'
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
              assignees:
                - type: user
                  id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projectGroups.create.response'
                  - example:
                      data:
                        type: nextgenProjectGroup
                        id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
              example:
                data:
                  type: nextgenProjectGroup
                  id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
      deprecated: false
  /projects-v2/projectGroups.update:
    post:
      tags:
        - groups
      summary: projectGroups.update
      description: Update a group. All attributes except for `id` are optional. Providing `null` will clear that value from the project (for properties that are nullable).
      operationId: projectGroups.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.update.request'
                - example:
                    id: e8478f2c-05a1-4e69-b3c4-e08507640f01
                    title: My updated group
                    description: I updated this group because I felt like it
                    color: '#00B2B2'
                    billing_method:
                      value: time_and_materials
                      update_strategy: none
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
            example:
              id: e8478f2c-05a1-4e69-b3c4-e08507640f01
              title: My updated group
              description: I updated this group because I felt like it
              color: '#00B2B2'
              billing_method:
                value: time_and_materials
                update_strategy: none
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectGroups.duplicate:
    post:
      tags:
        - groups
      summary: projectGroups.duplicate
      description: Duplicate a group and its entities, without any time trackings.
      operationId: projectGroups.duplicate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.duplicate.request'
                - example:
                    origin_id: 0186a6b5-2fdc-749a-983a-c4a1303546d7
            example:
              origin_id: 0186a6b5-2fdc-749a-983a-c4a1303546d7
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_projectGroups.duplicate.response'
                  - example:
                      data:
                        type: nextgenProjectGroup
                        id: 0186a6b5-682c-7b0e-95c9-090627a73d3b
              example:
                data:
                  type: nextgenProjectGroup
                  id: 0186a6b5-682c-7b0e-95c9-090627a73d3b
      deprecated: false
  /projects-v2/projectGroups.delete:
    post:
      tags:
        - groups
      summary: projectGroups.delete
      description: Delete a group.
      operationId: projectGroups.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.delete.request'
                - example:
                    id: 01866e6f-f264-7fe5-8b7c-a3f739fa292c
                    delete_strategy: ungroup_tasks_and_materials
            example:
              id: 01866e6f-f264-7fe5-8b7c-a3f739fa292c
              delete_strategy: ungroup_tasks_and_materials
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectGroups.assign:
    post:
      tags:
        - groups
      summary: projectGroups.assign
      description: Assign a user or a team to a group.
      operationId: projectGroups.assign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.assign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/projectGroups.unassign:
    post:
      tags:
        - groups
      summary: projectGroups.unassign
      description: Unassign a user or a team from a group.
      operationId: projectGroups.unassign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_projectGroups.unassign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/tasks.list:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.list
      description: Lists all the tasks that match the optional filters provided.
      operationId: NextgenProjectsTasks.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.list.request'
                - example:
                    filter:
                      ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
                        - 46156648-87c6-478d-8aa7-1dc3a00daca4
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
                  - 46156648-87c6-478d-8aa7-1dc3a00daca4
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_tasks.list.response'
                  - example:
                      data:
                        - id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
                          project:
                            type: nextgenProject
                            id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                          group:
                            type: nextgenProjectGroup
                            id: eab232c6-49b2-4b7e-a977-5e1148dad471
                          work_type:
                            type: workType
                            id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                          task_type:
                            type: workType
                            id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                          status: in_progress
                          title: Write API documentation
                          billing_method: user_rate
                          billing_status: not_billable
                          custom_rate:
                            amount: 123.3
                            currency: EUR
                          amount_billed:
                            amount: 123.3
                            currency: EUR
                          external_budget:
                            amount: 123.3
                            currency: EUR
                          external_budget_spent:
                            amount: 123.3
                            currency: EUR
                          internal_budget:
                            amount: 123.3
                            currency: EUR
                          price:
                            amount: 123.3
                            currency: EUR
                          unit_price:
                            amount: 123.3
                            currency: EUR
                          fixed_price:
                            amount: 123.3
                            currency: EUR
                          cost:
                            amount: 123.3
                            currency: EUR
                          unit_cost:
                            amount: 123.3
                            currency: EUR
                          margin:
                            amount: 123.3
                            currency: EUR
                          margin_percentage: null
                          assignees:
                            - assignee:
                                type: user
                                id: 66abace2-62af-0836-a927-fe3f44b9b47b
                              assign_type: manual
                          start_date: '2023-01-18'
                          end_date: '2023-03-22'
                          time_estimated:
                            value: 28800
                            unit: seconds
                          time_tracked:
                            value: 21100
                            unit: seconds
              example:
                data:
                  - id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
                    project:
                      type: nextgenProject
                      id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                    group:
                      type: nextgenProjectGroup
                      id: eab232c6-49b2-4b7e-a977-5e1148dad471
                    work_type:
                      type: workType
                      id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    task_type:
                      type: workType
                      id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    status: in_progress
                    title: Write API documentation
                    billing_method: user_rate
                    billing_status: not_billable
                    custom_rate:
                      amount: 123.3
                      currency: EUR
                    amount_billed:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    external_budget_spent:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    price:
                      amount: 123.3
                      currency: EUR
                    unit_price:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    cost:
                      amount: 123.3
                      currency: EUR
                    unit_cost:
                      amount: 123.3
                      currency: EUR
                    margin:
                      amount: 123.3
                      currency: EUR
                    margin_percentage: null
                    assignees:
                      - assignee:
                          type: user
                          id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        assign_type: manual
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    time_estimated:
                      value: 28800
                      unit: seconds
                    time_tracked:
                      value: 21100
                      unit: seconds
      deprecated: false
  /projects-v2/tasks.info:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.info
      description: Returns all the information for one task.
      operationId: NextgenProjectsTasks.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.info.request'
                - example:
                    id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
            example:
              id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_tasks.info.response'
                  - example:
                      data:
                        id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                        project:
                          type: nextgenProject
                          id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                        group:
                          type: nextgenProjectGroup
                          id: eab232c6-49b2-4b7e-a977-5e1148dad471
                        work_type:
                          type: workType
                          id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                        task_type:
                          type: workType
                          id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                        status: in_progress
                        title: Write API documentation
                        description: I buy a house and garden somewhere, along a country road a piece
                        billing_method: user_rate
                        billing_status: not_billable
                        custom_rate:
                          amount: 123.3
                          currency: EUR
                        amount_billed:
                          amount: 123.3
                          currency: EUR
                        external_budget:
                          amount: 123.3
                          currency: EUR
                        external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        internal_budget:
                          amount: 123.3
                          currency: EUR
                        price:
                          amount: 123.3
                          currency: EUR
                        unit_price:
                          amount: 123.3
                          currency: EUR
                        fixed_price:
                          amount: 123.3
                          currency: EUR
                        cost:
                          amount: 123.3
                          currency: EUR
                        unit_cost:
                          amount: 123.3
                          currency: EUR
                        margin:
                          amount: 123.3
                          currency: EUR
                        margin_percentage: null
                        assignees:
                          - assignee:
                              type: user
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                            assign_type: manual
                        start_date: '2023-01-18'
                        end_date: '2023-03-22'
                        time_estimated:
                          value: 28800
                          unit: seconds
                        time_tracked:
                          value: 21100
                          unit: seconds
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
              example:
                data:
                  id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                  project:
                    type: nextgenProject
                    id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                  group:
                    type: nextgenProjectGroup
                    id: eab232c6-49b2-4b7e-a977-5e1148dad471
                  work_type:
                    type: workType
                    id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                  task_type:
                    type: workType
                    id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                  status: in_progress
                  title: Write API documentation
                  description: I buy a house and garden somewhere, along a country road a piece
                  billing_method: user_rate
                  billing_status: not_billable
                  custom_rate:
                    amount: 123.3
                    currency: EUR
                  amount_billed:
                    amount: 123.3
                    currency: EUR
                  external_budget:
                    amount: 123.3
                    currency: EUR
                  external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  internal_budget:
                    amount: 123.3
                    currency: EUR
                  price:
                    amount: 123.3
                    currency: EUR
                  unit_price:
                    amount: 123.3
                    currency: EUR
                  fixed_price:
                    amount: 123.3
                    currency: EUR
                  cost:
                    amount: 123.3
                    currency: EUR
                  unit_cost:
                    amount: 123.3
                    currency: EUR
                  margin:
                    amount: 123.3
                    currency: EUR
                  margin_percentage: null
                  assignees:
                    - assignee:
                        type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                      assign_type: manual
                  start_date: '2023-01-18'
                  end_date: '2023-03-22'
                  time_estimated:
                    value: 28800
                    unit: seconds
                  time_tracked:
                    value: 21100
                    unit: seconds
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
      deprecated: false
  /projects-v2/tasks.create:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.create
      description: Create a task. All properties except for `title` and `project_id` are optional.
      operationId: NextgenProjectsTasks.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.create.request'
                - example:
                    project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    title: My task
                    group_id: 0185968b-2c9e-73fd-9ce1-a12c0979783b
                    work_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    task_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    description: But nothing is any good without you cause baby you are my centerpiece
                    billing_method: fixed_price
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    custom_rate:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    time_estimated:
                      value: 480
                      unit: minutes
                    assignees:
                      - type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
              title: My task
              group_id: 0185968b-2c9e-73fd-9ce1-a12c0979783b
              work_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
              task_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
              description: But nothing is any good without you cause baby you are my centerpiece
              billing_method: fixed_price
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              custom_rate:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
              time_estimated:
                value: 480
                unit: minutes
              assignees:
                - type: user
                  id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_tasks.create.response'
                  - example:
                      data:
                        type: nextgenTask
                        id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
              example:
                data:
                  type: nextgenTask
                  id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
      deprecated: false
  /projects-v2/tasks.update:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.update
      description: Update a task. All attributes except for `id` are optional. Providing `null` will clear that value from the project (for properties that are nullable).
      operationId: NextgenProjectsTasks.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.update.request'
                - example:
                    id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                    work_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    task_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
                    status: on_hold
                    title: Write API documentation
                    description: But nothing is any good without you cause baby you are my centerpiece
                    billing_method: fixed_price
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    custom_rate:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    time_estimated:
                      value: 480
                      unit: minutes
            example:
              id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
              work_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
              task_type_id: 0f517e20-2e76-4684-8d6c-3334f6d7148c
              status: on_hold
              title: Write API documentation
              description: But nothing is any good without you cause baby you are my centerpiece
              billing_method: fixed_price
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              custom_rate:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
              time_estimated:
                value: 480
                unit: minutes
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/tasks.duplicate:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.duplicate
      description: Duplicate a task, without its time trackings.
      operationId: NextgenProjectsTasks.duplicate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.duplicate.request'
                - example:
                    origin_id: 0186a6b5-32d9-73d4-a416-d9f86cba567d
            example:
              origin_id: 0186a6b5-32d9-73d4-a416-d9f86cba567d
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_tasks.duplicate.response'
                  - example:
                      data:
                        type: nextgenTask
                        id: 0186a721-3879-729a-bf52-91576e0522f3
              example:
                data:
                  type: nextgenTask
                  id: 0186a721-3879-729a-bf52-91576e0522f3
      deprecated: false
  /projects-v2/tasks.delete:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.delete
      description: Delete a task.
      operationId: NextgenProjectsTasks.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.delete.request'
                - example:
                    id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                    delete_strategy: unlink_time_tracking
            example:
              id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
              delete_strategy: unlink_time_tracking
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/tasks.assign:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.assign
      description: Assign a user or a team to a task.
      operationId: NextgenProjectsTasks.assign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.assign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/tasks.unassign:
    post:
      tags:
        - projects_v2_tasks
      summary: tasks.unassign
      description: Unassign a user or a team from a task.
      operationId: NextgenProjectsTasks.unassign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_tasks.unassign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/materials.list:
    post:
      tags:
        - materials
      summary: materials.list
      description: Lists all the materials that match the optional filters provided.
      operationId: NextgenProjectsMaterials.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.list.request'
                - example:
                    filter:
                      ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
                        - 46156648-87c6-478d-8aa7-1dc3a00daca4
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
                  - 46156648-87c6-478d-8aa7-1dc3a00daca4
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_materials.list.response'
                  - example:
                      data:
                        - id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
                          project:
                            type: nextgenProject
                            id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                          group:
                            type: nextgenProjectGroup
                            id: eab232c6-49b2-4b7e-a977-5e1148dad471
                          title: Metal studs
                          status: in_progress
                          billing_method: unit_price
                          billing_status: not_billable
                          quantity: null
                          quantity_estimated: null
                          unit_price:
                            amount: 123.3
                            currency: EUR
                          unit_cost:
                            amount: 123.3
                            currency: EUR
                          unit:
                            type: priceunit
                            id: f1b7ae71-b610-02e0-8a10-443c31597e11
                          amount_billed:
                            amount: 123.3
                            currency: EUR
                          external_budget:
                            amount: 123.3
                            currency: EUR
                          external_budget_spent:
                            amount: 123.3
                            currency: EUR
                          internal_budget:
                            amount: 123.3
                            currency: EUR
                          price:
                            amount: 123.3
                            currency: EUR
                          fixed_price:
                            amount: 123.3
                            currency: EUR
                          cost:
                            amount: 123.3
                            currency: EUR
                          margin:
                            amount: 123.3
                            currency: EUR
                          margin_percentage: null
                          assignees:
                            - assignee:
                                type: user
                                id: 66abace2-62af-0836-a927-fe3f44b9b47b
                              assign_type: manual
                          start_date: '2023-01-18'
                          end_date: '2023-03-22'
                          product:
                            type: product
                            id: 85fd7319-b094-462a-ae78-ff94d6bcb226
              example:
                data:
                  - id: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
                    project:
                      type: nextgenProject
                      id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                    group:
                      type: nextgenProjectGroup
                      id: eab232c6-49b2-4b7e-a977-5e1148dad471
                    title: Metal studs
                    status: in_progress
                    billing_method: unit_price
                    billing_status: not_billable
                    quantity: null
                    quantity_estimated: null
                    unit_price:
                      amount: 123.3
                      currency: EUR
                    unit_cost:
                      amount: 123.3
                      currency: EUR
                    unit:
                      type: priceunit
                      id: f1b7ae71-b610-02e0-8a10-443c31597e11
                    amount_billed:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    external_budget_spent:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    price:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    cost:
                      amount: 123.3
                      currency: EUR
                    margin:
                      amount: 123.3
                      currency: EUR
                    margin_percentage: null
                    assignees:
                      - assignee:
                          type: user
                          id: 66abace2-62af-0836-a927-fe3f44b9b47b
                        assign_type: manual
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    product:
                      type: product
                      id: 85fd7319-b094-462a-ae78-ff94d6bcb226
      deprecated: false
  /projects-v2/materials.info:
    post:
      tags:
        - materials
      summary: materials.info
      description: Returns all the information for one material.
      operationId: NextgenProjectsMaterials.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.info.request'
                - example:
                    id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
            example:
              id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_materials.info.response'
                  - example:
                      data:
                        id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                        project:
                          type: nextgenProject
                          id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                        group:
                          type: nextgenProjectGroup
                          id: eab232c6-49b2-4b7e-a977-5e1148dad471
                        title: WD-40® Multi-Use Product Industrial Size
                        description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
                        status: in_progress
                        billing_method: unit_price
                        billing_status: not_billable
                        quantity: null
                        quantity_estimated: null
                        unit_price:
                          amount: 123.3
                          currency: EUR
                        unit_cost:
                          amount: 123.3
                          currency: EUR
                        unit:
                          type: priceunit
                          id: f1b7ae71-b610-02e0-8a10-443c31597e11
                        amount_billed:
                          amount: 123.3
                          currency: EUR
                        external_budget:
                          amount: 123.3
                          currency: EUR
                        external_budget_spent:
                          amount: 123.3
                          currency: EUR
                        internal_budget:
                          amount: 123.3
                          currency: EUR
                        price:
                          amount: 123.3
                          currency: EUR
                        fixed_price:
                          amount: 123.3
                          currency: EUR
                        cost:
                          amount: 123.3
                          currency: EUR
                        margin:
                          amount: 123.3
                          currency: EUR
                        margin_percentage: null
                        assignees:
                          - assignee:
                              type: user
                              id: 66abace2-62af-0836-a927-fe3f44b9b47b
                            assign_type: manual
                        start_date: '2023-01-18'
                        end_date: '2023-03-22'
                        product:
                          type: product
                          id: 85fd7319-b094-462a-ae78-ff94d6bcb226
              example:
                data:
                  id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                  project:
                    type: nextgenProject
                    id: 018536c0-bf23-77eb-81f5-10e87cad50bc
                  group:
                    type: nextgenProjectGroup
                    id: eab232c6-49b2-4b7e-a977-5e1148dad471
                  title: WD-40® Multi-Use Product Industrial Size
                  description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
                  status: in_progress
                  billing_method: unit_price
                  billing_status: not_billable
                  quantity: null
                  quantity_estimated: null
                  unit_price:
                    amount: 123.3
                    currency: EUR
                  unit_cost:
                    amount: 123.3
                    currency: EUR
                  unit:
                    type: priceunit
                    id: f1b7ae71-b610-02e0-8a10-443c31597e11
                  amount_billed:
                    amount: 123.3
                    currency: EUR
                  external_budget:
                    amount: 123.3
                    currency: EUR
                  external_budget_spent:
                    amount: 123.3
                    currency: EUR
                  internal_budget:
                    amount: 123.3
                    currency: EUR
                  price:
                    amount: 123.3
                    currency: EUR
                  fixed_price:
                    amount: 123.3
                    currency: EUR
                  cost:
                    amount: 123.3
                    currency: EUR
                  margin:
                    amount: 123.3
                    currency: EUR
                  margin_percentage: null
                  assignees:
                    - assignee:
                        type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
                      assign_type: manual
                  start_date: '2023-01-18'
                  end_date: '2023-03-22'
                  product:
                    type: product
                    id: 85fd7319-b094-462a-ae78-ff94d6bcb226
      deprecated: false
  /projects-v2/materials.create:
    post:
      tags:
        - materials
      summary: materials.create
      description: Create a material. All properties except for `title` and `project_id` are optional.
      operationId: NextgenProjectsMaterials.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.create.request'
                - example:
                    project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
                    title: Some material
                    group_id: 0185968b-2c9e-73fd-9ce1-a12c0979783b
                    after_id: 8ba797aa-107d-4934-9511-2a043bf3f766
                    description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
                    billing_method: unit_price
                    unit_price:
                      amount: 123.3
                      currency: EUR
                    unit_cost:
                      amount: 123.3
                      currency: EUR
                    unit_id: 69cbfbf2-fefe-4f03-9269-3ddc79117f4d
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    product_id: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
                    assignees:
                      - type: user
                        id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              project_id: 49b403be-a32e-0901-9b1c-25214f9027c6
              title: Some material
              group_id: 0185968b-2c9e-73fd-9ce1-a12c0979783b
              after_id: 8ba797aa-107d-4934-9511-2a043bf3f766
              description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
              billing_method: unit_price
              unit_price:
                amount: 123.3
                currency: EUR
              unit_cost:
                amount: 123.3
                currency: EUR
              unit_id: 69cbfbf2-fefe-4f03-9269-3ddc79117f4d
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
              product_id: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
              assignees:
                - type: user
                  id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_materials.create.response'
                  - example:
                      data:
                        type: nextgenMaterial
                        id: b275487e-47d9-40b4-9cfe-5dfef77f4954
              example:
                data:
                  type: nextgenMaterial
                  id: b275487e-47d9-40b4-9cfe-5dfef77f4954
      deprecated: false
  /projects-v2/materials.update:
    post:
      tags:
        - materials
      summary: materials.update
      description: Update a material. All attributes except for `id` are optional. Providing `null` will clear that value from the project (for properties that are nullable).
      operationId: NextgenProjectsMaterials.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.update.request'
                - example:
                    id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
                    title: WD-40® Multi-Use Product Industrial Size
                    description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
                    status: on_hold
                    billing_method: unit_price
                    unit_price:
                      amount: 123.3
                      currency: EUR
                    unit_cost:
                      amount: 123.3
                      currency: EUR
                    fixed_price:
                      amount: 123.3
                      currency: EUR
                    external_budget:
                      amount: 123.3
                      currency: EUR
                    internal_budget:
                      amount: 123.3
                      currency: EUR
                    start_date: '2023-01-18'
                    end_date: '2023-03-22'
                    product_id: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
            example:
              id: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
              title: WD-40® Multi-Use Product Industrial Size
              description: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
              status: on_hold
              billing_method: unit_price
              unit_price:
                amount: 123.3
                currency: EUR
              unit_cost:
                amount: 123.3
                currency: EUR
              fixed_price:
                amount: 123.3
                currency: EUR
              external_budget:
                amount: 123.3
                currency: EUR
              internal_budget:
                amount: 123.3
                currency: EUR
              start_date: '2023-01-18'
              end_date: '2023-03-22'
              product_id: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/materials.duplicate:
    post:
      tags:
        - materials
      summary: materials.duplicate
      description: Duplicate a material.
      operationId: NextgenProjectsMaterials.duplicate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.duplicate.request'
                - example:
                    origin_id: 0186a74b-b640-7458-9717-7c84356b26fd
            example:
              origin_id: 0186a74b-b640-7458-9717-7c84356b26fd
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/projects-v2_materials.duplicate.response'
                  - example:
                      data:
                        type: nextgenMaterial
                        id: 0186a2f3-32a5-7c81-b3a9-55809146ad0c
              example:
                data:
                  type: nextgenMaterial
                  id: 0186a2f3-32a5-7c81-b3a9-55809146ad0c
      deprecated: false
  /projects-v2/materials.delete:
    post:
      tags:
        - materials
      summary: materials.delete
      description: Delete a material.
      operationId: NextgenProjectsMaterials.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.delete.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/materials.assign:
    post:
      tags:
        - materials
      summary: materials.assign
      description: Assign a user or a team to a material.
      operationId: NextgenProjectsMaterials.assign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.assign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /projects-v2/materials.unassign:
    post:
      tags:
        - materials
      summary: materials.unassign
      description: Unassign a user or a team from a material.
      operationId: NextgenProjectsMaterials.unassign
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/projects-v2_materials.unassign.request'
                - example:
                    id: 0184f276-811b-716d-8b79-17628c9573c6
                    assignee:
                      type: user
                      id: 66abace2-62af-0836-a927-fe3f44b9b47b
            example:
              id: 0184f276-811b-716d-8b79-17628c9573c6
              assignee:
                type: user
                id: 66abace2-62af-0836-a927-fe3f44b9b47b
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tasks.list:
    post:
      tags:
        - tasks
      summary: tasks.list
      description: Get a list of tasks.
      operationId: tasks.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tasks.list.response'
                  - example:
                      data:
                        - id: f29abf48-337d-44b4-aad4-585f5277a456
                          title: Review code changes
                          description: ''
                          completed: false
                          completed_at: '2016-02-04T16:44:33+00:00'
                          due_on: '2016-02-04'
                          added_at: '2016-02-04T16:44:33+00:00'
                          estimated_duration:
                            unit: min
                            value: 60
                          work_type:
                            type: workType
                            id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          assignee:
                            type: user
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          customer:
                            type: contact
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          milestone:
                            type: milestone
                            id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          deal:
                            type: deal
                            id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          project:
                            type: project
                            id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                          ticket:
                            type: ticket
                            id: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                          priority: A
              example:
                data:
                  - id: f29abf48-337d-44b4-aad4-585f5277a456
                    title: Review code changes
                    description: ''
                    completed: false
                    completed_at: '2016-02-04T16:44:33+00:00'
                    due_on: '2016-02-04'
                    added_at: '2016-02-04T16:44:33+00:00'
                    estimated_duration:
                      unit: min
                      value: 60
                    work_type:
                      type: workType
                      id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    assignee:
                      type: user
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    customer:
                      type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    milestone:
                      type: milestone
                      id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    deal:
                      type: deal
                      id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    project:
                      type: project
                      id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                    ticket:
                      type: ticket
                      id: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                    priority: A
      deprecated: false
  /tasks.info:
    post:
      tags:
        - tasks
      summary: tasks.info
      description: Get information about a task.
      operationId: tasks.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.info.request'
                - example:
                    id: 6fac0bf0-e803-424e-af67-76863a3d7d16
            example:
              id: 6fac0bf0-e803-424e-af67-76863a3d7d16
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tasks.info.response'
                  - example:
                      data:
                        id: 6fac0bf0-e803-424e-af67-76863a3d7d16
                        title: Review code changes
                        description: ''
                        completed: false
                        completed_at: '2016-02-04T16:44:33+00:00'
                        due_on: '2016-02-04'
                        estimated_duration:
                          unit: min
                          value: 60
                        work_type:
                          type: workType
                          id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                        assignee:
                          type: user
                          id: f29abf48-337d-44b4-aad4-585f5277a456
                        customer:
                          type: contact
                          id: f29abf48-337d-44b4-aad4-585f5277a456
                        milestone:
                          type: milestone
                          id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                        deal:
                          type: deal
                          id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                        project:
                          type: project
                          id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                        ticket:
                          type: ticket
                          id: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                        custom_fields:
                          - definition:
                              type: customFieldDefinition
                              id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                            value: '092980616'
                        priority: A
              example:
                data:
                  id: 6fac0bf0-e803-424e-af67-76863a3d7d16
                  title: Review code changes
                  description: ''
                  completed: false
                  completed_at: '2016-02-04T16:44:33+00:00'
                  due_on: '2016-02-04'
                  estimated_duration:
                    unit: min
                    value: 60
                  work_type:
                    type: workType
                    id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                  assignee:
                    type: user
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                  customer:
                    type: contact
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                  milestone:
                    type: milestone
                    id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                  deal:
                    type: deal
                    id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                  project:
                    type: project
                    id: bbbb772b-e7ad-06c5-935c-b0f6ef61d6bc
                  ticket:
                    type: ticket
                    id: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
                  priority: A
      deprecated: false
  /tasks.create:
    post:
      tags:
        - tasks
      summary: tasks.create
      description: Create a new task.
      operationId: tasks.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tasks.create.request'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tasks.create.response'
                  - example:
                      data:
                        type: task
                        id: 1759dfc1-7365-4f1b-8d90-d29787a5d29d
              example:
                data:
                  type: task
                  id: 1759dfc1-7365-4f1b-8d90-d29787a5d29d
      deprecated: false
  /tasks.update:
    post:
      tags:
        - tasks
      summary: tasks.update
      description: Update a task.
      operationId: tasks.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tasks.update.request'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tasks.complete:
    post:
      tags:
        - tasks
      summary: tasks.complete
      description: Mark a task as complete.
      operationId: tasks.complete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.complete.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tasks.reopen:
    post:
      tags:
        - tasks
      summary: tasks.reopen
      description: Reopen a task that had been marked as complete.
      operationId: tasks.reopen
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.reopen.request'
                - example:
                    id: 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              id: 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tasks.delete:
    post:
      tags:
        - tasks
      summary: tasks.delete
      description: Delete a task.
      operationId: tasks.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.delete.request'
                - example:
                    id: 5f0afd8a-8a40-48a4-bbe6-7d0e9c61bb6d
            example:
              id: 5f0afd8a-8a40-48a4-bbe6-7d0e9c61bb6d
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tasks.schedule:
    post:
      tags:
        - tasks
      summary: tasks.schedule
      description: Schedule a task in a user's calendar. Without `assignee_id`, the task is scheduled in your own calendar.
      operationId: tasks.schedule
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tasks.schedule.request'
                - example:
                    id: 7c70c54e-6e50-4e6a-b5fd-80234eb535cf
                    starts_at: '2016-02-04T16:00:00+00:00'
                    ends_at: '2016-02-04T18:00:00+00:00'
                    assignee_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
            example:
              id: 7c70c54e-6e50-4e6a-b5fd-80234eb535cf
              starts_at: '2016-02-04T16:00:00+00:00'
              ends_at: '2016-02-04T18:00:00+00:00'
              assignee_id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tasks.schedule.response'
                  - example:
                      data:
                        type: event
                        id: d7d2d100-d440-46c2-a4a3-177ad4b2a860
              example:
                data:
                  type: event
                  id: d7d2d100-d440-46c2-a4a3-177ad4b2a860
      deprecated: false
  /timeTracking.list:
    post:
      tags:
        - time_tracking
      summary: timeTracking.list
      description: Get a list of tracked time.
      operationId: timeTracking.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.list.request'
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timeTracking.list.response'
                  - example:
                      data:
                        - id: 4f4288b2-c21b-4dac-87f6-a97511309079
                          user:
                            type: user
                            id: eb1eb8b8-d0cb-4385-b60a-c995953ec6be
                          work_type:
                            type: workType
                            id: 8a146eda-c9af-4b11-b63a-ddac47bb254d
                          started_on: '2017-04-26'
                          started_at: '2017-04-26T10:01:49+00:00'
                          ended_at: '2017-04-26T11:01:49+00:00'
                          duration: 3600
                          description: Timer description
                          subject:
                            type: milestone
                            id: 58f5b799-51c4-4eb9-8308-b1aa02e0a873
                          invoiceable: true
                          billing_info:
                            type: invoice
                            invoice:
                              type: invoice
                              id: b2b4b2b4-4b2b-4b2b-4b2b-4b2b4b2b4b2b
                          materials:
                            - product:
                                type: product
                                id: e2314517-3cab-4aa9-8471-450e73449040
                              description: Product description
                              unit_price:
                                amount: 123.3
                                currency: EUR
                              quantity: 5
                          relates_to:
                            - type: contact
                              id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          hourly_rate:
                            amount: 123.3
                            currency: EUR
              example:
                data:
                  - id: 4f4288b2-c21b-4dac-87f6-a97511309079
                    user:
                      type: user
                      id: eb1eb8b8-d0cb-4385-b60a-c995953ec6be
                    work_type:
                      type: workType
                      id: 8a146eda-c9af-4b11-b63a-ddac47bb254d
                    started_on: '2017-04-26'
                    started_at: '2017-04-26T10:01:49+00:00'
                    ended_at: '2017-04-26T11:01:49+00:00'
                    duration: 3600
                    description: Timer description
                    subject:
                      type: milestone
                      id: 58f5b799-51c4-4eb9-8308-b1aa02e0a873
                    invoiceable: true
                    billing_info:
                      type: invoice
                      invoice:
                        type: invoice
                        id: b2b4b2b4-4b2b-4b2b-4b2b-4b2b4b2b4b2b
                    materials:
                      - product:
                          type: product
                          id: e2314517-3cab-4aa9-8471-450e73449040
                        description: Product description
                        unit_price:
                          amount: 123.3
                          currency: EUR
                        quantity: 5
                    relates_to:
                      - type: contact
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    hourly_rate:
                      amount: 123.3
                      currency: EUR
      deprecated: false
  /timeTracking.info:
    post:
      tags:
        - time_tracking
      summary: timeTracking.info
      description: Get information about tracked time.
      operationId: timeTracking.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.info.request'
                - example:
                    id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
                    includes: materials,relates_to
            example:
              id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
              includes: materials,relates_to
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timeTracking.info.response'
                  - example:
                      data:
                        id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
                        user:
                          type: user
                          id: 56bc6b39-b722-42f5-9ea7-acea4814d7dd
                        work_type:
                          type: workType
                          id: d980dbc6-944e-47fc-bf16-2ed7d5a71889
                        started_on: '2017-04-26'
                        started_at: '2017-04-26T10:01:49+00:00'
                        ended_at: '2017-04-26T11:01:49+00:00'
                        duration: 3600
                        description: Timer description
                        subject:
                          type: milestone
                          id: 5883723a-b5aa-4c9d-a02b-ec0dd25f6ca2
                        invoiceable: true
                        locked: true
                        billing_info:
                          type: invoice
                          invoice:
                            type: invoice
                            id: b2b4b2b4-4b2b-4b2b-4b2b-4b2b4b2b4b2b
                        materials:
                          - product:
                              type: product
                              id: e2314517-3cab-4aa9-8471-450e73449040
                            description: Product description
                            unit_price:
                              amount: 123.3
                              currency: EUR
                            quantity: 5
                        relates_to:
                          - type: contact
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                        hourly_rate:
                          amount: 123.3
                          currency: EUR
                      meta:
                        updatable: true
              example:
                data:
                  id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
                  user:
                    type: user
                    id: 56bc6b39-b722-42f5-9ea7-acea4814d7dd
                  work_type:
                    type: workType
                    id: d980dbc6-944e-47fc-bf16-2ed7d5a71889
                  started_on: '2017-04-26'
                  started_at: '2017-04-26T10:01:49+00:00'
                  ended_at: '2017-04-26T11:01:49+00:00'
                  duration: 3600
                  description: Timer description
                  subject:
                    type: milestone
                    id: 5883723a-b5aa-4c9d-a02b-ec0dd25f6ca2
                  invoiceable: true
                  locked: true
                  billing_info:
                    type: invoice
                    invoice:
                      type: invoice
                      id: b2b4b2b4-4b2b-4b2b-4b2b-4b2b4b2b4b2b
                  materials:
                    - product:
                        type: product
                        id: e2314517-3cab-4aa9-8471-450e73449040
                      description: Product description
                      unit_price:
                        amount: 123.3
                        currency: EUR
                      quantity: 5
                  relates_to:
                    - type: contact
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                  hourly_rate:
                    amount: 123.3
                    currency: EUR
                meta:
                  updatable: true
      deprecated: false
  /timeTracking.add:
    post:
      tags:
        - time_tracking
      summary: timeTracking.add
      description: Add tracked time.
      operationId: timeTracking.add
      parameters: []
      requestBody:
        required: true
        description: Note that the time tracking entry will be split up if the time span passes midnight.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.add.request'
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timeTracking.add.response'
              example:
                data:
                  type: timetracking
                  id: 6f052357-142e-499e-a647-36b55ecf447c
      deprecated: false
  /timeTracking.update:
    post:
      tags:
        - time_tracking
      summary: timeTracking.update
      description: Update tracked time.
      operationId: timeTracking.update
      parameters: []
      requestBody:
        required: true
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.update.request'
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /timeTracking.resume:
    post:
      tags:
        - time_tracking
      summary: timeTracking.resume
      description: Start a new timer based on previously tracked time.
      operationId: timeTracking.resume
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.resume.request'
                - example:
                    id: 06dfa08a-b769-4005-a912-45ab885c5737
                    started_at: '2017-04-26T10:01:49+00:00'
            example:
              id: 06dfa08a-b769-4005-a912-45ab885c5737
              started_at: '2017-04-26T10:01:49+00:00'
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timeTracking.resume.response'
                  - example:
                      data:
                        type: timer
                        id: f01adf4a-bb9b-45de-b231-615cd0e941de
              example:
                data:
                  type: timer
                  id: f01adf4a-bb9b-45de-b231-615cd0e941de
      deprecated: false
  /timeTracking.delete:
    post:
      tags:
        - time_tracking
      summary: timeTracking.delete
      description: Delete a tracked time.
      operationId: timeTracking.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timeTracking.delete.request'
                - example:
                    id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
            example:
              id: 6caeea11-aa83-4da9-9859-5b62bbf3a476
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /timers.current:
    post:
      tags:
        - timers
      summary: timers.current
      description: Get the current running timer.
      operationId: timers.current
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timers.current.response'
                  - example:
                      data:
                        id: 2b282dec-ba9d-4faa-9b39-944b99ee5c0a
                        user:
                          type: user
                          id: 5443a1b9-7673-4922-921f-1da4ff557783
                        work_type:
                          type: workType
                          id: d02de940-9435-4e35-bc0b-3d17f3d0ea7b
                        started_at: '2017-04-26T10:01:49+00:00'
                        description: Timer description
                        subject:
                          type: milestone
                          id: 31931bc9-4ae8-4c50-ba8d-9ea88498c1c1
                        invoiceable: true
              example:
                data:
                  id: 2b282dec-ba9d-4faa-9b39-944b99ee5c0a
                  user:
                    type: user
                    id: 5443a1b9-7673-4922-921f-1da4ff557783
                  work_type:
                    type: workType
                    id: d02de940-9435-4e35-bc0b-3d17f3d0ea7b
                  started_at: '2017-04-26T10:01:49+00:00'
                  description: Timer description
                  subject:
                    type: milestone
                    id: 31931bc9-4ae8-4c50-ba8d-9ea88498c1c1
                  invoiceable: true
      deprecated: false
  /timers.start:
    post:
      tags:
        - timers
      summary: timers.start
      description: Start a new timer.
      operationId: timers.start
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timers.start.request'
                - example:
                    work_type_id: db41328a-7a25-4e85-8fb9-830baacb7f40
                    started_at: '2017-04-26T10:01:49+00:00'
                    subject:
                      type: milestone
                      id: 29ff471c-7d8f-40d5-8c95-9a9cab841e65
                    invoiceable: true
            example:
              work_type_id: db41328a-7a25-4e85-8fb9-830baacb7f40
              started_at: '2017-04-26T10:01:49+00:00'
              subject:
                type: milestone
                id: 29ff471c-7d8f-40d5-8c95-9a9cab841e65
              invoiceable: true
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timers.start.response'
                  - example:
                      data:
                        type: timer
                        id: 4ff475b2-f45b-4803-800e-350b9c02aeca
              example:
                data:
                  type: timer
                  id: 4ff475b2-f45b-4803-800e-350b9c02aeca
      deprecated: false
  /timers.stop:
    post:
      tags:
        - timers
      summary: timers.stop
      description: Stop the current timer. This will add a new time tracking in the background.
      operationId: timers.stop
      parameters: []
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/timers.stop.response'
                  - example:
                      data:
                        type: timeTracking
                        id: 4ff475b2-f45b-4803-800e-350b9c02aeca
              example:
                data:
                  type: timeTracking
                  id: 4ff475b2-f45b-4803-800e-350b9c02aeca
      deprecated: false
  /timers.update:
    post:
      tags:
        - timers
      summary: timers.update
      description: Update the current timer. Only possible if there is a timer running.
      operationId: timers.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/timers.update.request'
                - example:
                    work_type_id: db41328a-7a25-4e85-8fb9-830baacb7f40
                    started_at: '2017-04-26T10:01:49+00:00'
                    description: Timer Description
                    subject:
                      type: milestone
                      id: 29ff471c-7d8f-40d5-8c95-9a9cab841e65
                    invoiceable: true
            example:
              work_type_id: db41328a-7a25-4e85-8fb9-830baacb7f40
              started_at: '2017-04-26T10:01:49+00:00'
              description: Timer Description
              subject:
                type: milestone
                id: 29ff471c-7d8f-40d5-8c95-9a9cab841e65
              invoiceable: true
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tickets.list:
    post:
      tags:
        - tickets
      summary: tickets.list
      description: Get a list of tickets.
      operationId: tickets.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.list.request'
                - example:
                    filter:
                      ids:
                        - 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                        - 21467288-3baa-0027-a910-cd952030dbc2
                      relates_to:
                        type: contact
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                      project_ids:
                        - 082e6289-30c5-45ad-bcd0-190b02d21e81
                      exclude:
                        status_ids:
                          - a344c251-2494-0013-b433-ccee8e8435e6
                          - c11dc02c-3556-0daf-8035-c5b0376eb928
                    page:
                      size: 20
                      number: 1
            example:
              filter:
                ids:
                  - 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
                  - 21467288-3baa-0027-a910-cd952030dbc2
                relates_to:
                  type: contact
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                project_ids:
                  - 082e6289-30c5-45ad-bcd0-190b02d21e81
                exclude:
                  status_ids:
                    - a344c251-2494-0013-b433-ccee8e8435e6
                    - c11dc02c-3556-0daf-8035-c5b0376eb928
              page:
                size: 20
                number: 1
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.list.response'
                  - example:
                      data:
                        - id: f29abf48-337d-44b4-aad4-585f5277a456
                          reference: 123
                          subject: ''
                          status:
                            type: ticketStatus
                            id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                          assignee:
                            type: user
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          created_at: '2017-05-09T11:25:11+00:00'
                          closed_at: '2017-05-09T11:25:11+00:00'
                          customer:
                            type: contact
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          participant:
                            customer:
                              type: company
                              id: f29abf48-337d-44b4-aad4-585f5277a456
                          project:
                            type: project
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          milestone:
                            type: milestone
                            id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                          last_message_at: '2017-05-09T11:25:11+00:00'
              example:
                data:
                  - id: f29abf48-337d-44b4-aad4-585f5277a456
                    reference: 123
                    subject: ''
                    status:
                      type: ticketStatus
                      id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                    assignee:
                      type: user
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    created_at: '2017-05-09T11:25:11+00:00'
                    closed_at: '2017-05-09T11:25:11+00:00'
                    customer:
                      type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    participant:
                      customer:
                        type: company
                        id: f29abf48-337d-44b4-aad4-585f5277a456
                    project:
                      type: project
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    milestone:
                      type: milestone
                      id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                    last_message_at: '2017-05-09T11:25:11+00:00'
      deprecated: false
  /tickets.info:
    post:
      tags:
        - tickets
      summary: tickets.info
      description: Get details for a single ticket.
      operationId: tickets.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.info.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.info.response'
                  - example:
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                      reference: 123
                      subject: ''
                      status:
                        type: ticketStatus
                        id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                      assignee:
                        type: user
                        id: f29abf48-337d-44b4-aad4-585f5277a456
                      created_at: '2017-05-09T11:25:11+00:00'
                      closed_at: '2017-05-09T11:25:11+00:00'
                      customer:
                        type: contact
                        id: f29abf48-337d-44b4-aad4-585f5277a456
                      participant:
                        customer:
                          type: company
                          id: f29abf48-337d-44b4-aad4-585f5277a456
                      last_message_at: '2017-05-09T11:25:11+00:00'
                      description: My ticket details
                      project:
                        type: project
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                      milestone:
                        type: milestone
                        id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                      custom_fields:
                        - definition:
                            type: customFieldDefinition
                            id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                          value: '092980616'
              example:
                id: f29abf48-337d-44b4-aad4-585f5277a456
                reference: 123
                subject: ''
                status:
                  type: ticketStatus
                  id: aba0ad66-bf59-49fa-b546-45dcbc5e7e6e
                assignee:
                  type: user
                  id: f29abf48-337d-44b4-aad4-585f5277a456
                created_at: '2017-05-09T11:25:11+00:00'
                closed_at: '2017-05-09T11:25:11+00:00'
                customer:
                  type: contact
                  id: f29abf48-337d-44b4-aad4-585f5277a456
                participant:
                  customer:
                    type: company
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                last_message_at: '2017-05-09T11:25:11+00:00'
                description: My ticket details
                project:
                  type: project
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                milestone:
                  type: milestone
                  id: 32665afd-1818-0ed3-9e18-a603a3a21b95
                custom_fields:
                  - definition:
                      type: customFieldDefinition
                      id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                    value: '092980616'
      deprecated: false
  /tickets.create:
    post:
      tags:
        - tickets
      summary: tickets.create
      description: Create a ticket.
      operationId: tickets.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.create.request'
                - example:
                    subject: My ticket subject
                    customer:
                      type: company
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    assignee:
                      type: user
                      id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    description: My ticket details
                    participant:
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    milestone_id: 32665afd-1818-0ed3-9e18-a603a3a21b95
            example:
              subject: My ticket subject
              customer:
                type: company
                id: f29abf48-337d-44b4-aad4-585f5277a456
              ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              assignee:
                type: user
                id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              description: My ticket details
              participant:
                customer:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              milestone_id: 32665afd-1818-0ed3-9e18-a603a3a21b95
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.create.response'
                  - example:
                      data:
                        type: ticket
                        id: f29abf48-337d-44b4-aad4-585f5277a456
              example:
                data:
                  type: ticket
                  id: f29abf48-337d-44b4-aad4-585f5277a456
      deprecated: false
  /tickets.update:
    post:
      tags:
        - tickets
      summary: tickets.update
      description: Update a ticket.
      operationId: tickets.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.update.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    subject: My ticket subject
                    description: My ticket details
                    ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    customer:
                      type: company
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    assignee:
                      type: user
                      id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                    participant:
                      customer:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    custom_fields:
                      - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
                    milestone_id: 32665afd-1818-0ed3-9e18-a603a3a21b95
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
              subject: My ticket subject
              description: My ticket details
              ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              customer:
                type: company
                id: f29abf48-337d-44b4-aad4-585f5277a456
              assignee:
                type: user
                id: 98b2863e-7b01-4232-82f5-ede1f0b9db22
              participant:
                customer:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              custom_fields:
                - id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                  value: '092980616'
              milestone_id: 32665afd-1818-0ed3-9e18-a603a3a21b95
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /tickets.listMessages:
    post:
      tags:
        - tickets
      summary: tickets.listMessages
      description: Lists messages of a ticket.
      operationId: tickets.listMessages
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.listMessages.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    filter:
                      type: customer
                      created_before: '2024-02-01T18:00:00+00:00'
                      created_after: '2024-01-01T18:00:00+00:00'
                    page:
                      size: 20
                      number: 1
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
              filter:
                type: customer
                created_before: '2024-02-01T18:00:00+00:00'
                created_after: '2024-01-01T18:00:00+00:00'
              page:
                size: 20
                number: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.listMessages.response'
                  - example:
                      data:
                        - message_id: f29abf48-337d-44b4-aad4-585f5277a456
                          body: <p>This is a message</p>
                          type: customer
                          created_at: '2017-05-09T11:25:11+00:00'
                          sent_by:
                            type: contact
                            id: f29abf48-337d-44b4-aad4-585f5277a456
                          attachments:
                            - type: file
                              id: 0686d0da-1797-475b-ae94-27191b2eca4d
                      meta:
                        page:
                          size: 10
                          number: 2
                        matches: 12
              example:
                data:
                  - message_id: f29abf48-337d-44b4-aad4-585f5277a456
                    body: <p>This is a message</p>
                    type: customer
                    created_at: '2017-05-09T11:25:11+00:00'
                    sent_by:
                      type: contact
                      id: f29abf48-337d-44b4-aad4-585f5277a456
                    attachments:
                      - type: file
                        id: 0686d0da-1797-475b-ae94-27191b2eca4d
                meta:
                  page:
                    size: 10
                    number: 2
                  matches: 12
      deprecated: false
  /tickets.getMessage:
    post:
      tags:
        - tickets
      summary: tickets.getMessage
      description: Gets the ticket message.
      operationId: tickets.getMessage
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.getMessage.request'
                - example:
                    message_id: f29abf48-337d-44b4-aad4-585f5277a456
            example:
              message_id: f29abf48-337d-44b4-aad4-585f5277a456
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.getMessage.response'
                  - example:
                      message_id: f29abf48-337d-44b4-aad4-585f5277a456
                      body: <p>This is a message</p>
                      raw_body: <p>This is a message</p>
                      created_at: '2017-05-09T11:25:11+00:00'
                      sent_by:
                        type: contact
                        id: f29abf48-337d-44b4-aad4-585f5277a456
                      ticket:
                        type: ticket
                        id: 4f5c4ee1-9078-0eda-8817-03e4cba61bab
                      attachments:
                        - type: file
                          id: 0686d0da-1797-475b-ae94-27191b2eca4d
                      type: customer
              example:
                message_id: f29abf48-337d-44b4-aad4-585f5277a456
                body: <p>This is a message</p>
                raw_body: <p>This is a message</p>
                created_at: '2017-05-09T11:25:11+00:00'
                sent_by:
                  type: contact
                  id: f29abf48-337d-44b4-aad4-585f5277a456
                ticket:
                  type: ticket
                  id: 4f5c4ee1-9078-0eda-8817-03e4cba61bab
                attachments:
                  - type: file
                    id: 0686d0da-1797-475b-ae94-27191b2eca4d
                type: customer
      deprecated: false
  /tickets.importMessage:
    post:
      tags:
        - tickets
      summary: tickets.importMessage
      description: Imports an existing message to a ticket.
      operationId: tickets.importMessage
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.importMessage.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    body: <p>Hello world</p>
                    sent_by:
                      type: contact
                      id: 4b3b07c6-a4bf-4c1b-9471-283fee71b049
                    sent_at: '2024-02-29T11:11:11+00:00'
                    attachments:
                      - 4f4288b2-c21b-4dac-87f6-a97511309079
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
              body: <p>Hello world</p>
              sent_by:
                type: contact
                id: 4b3b07c6-a4bf-4c1b-9471-283fee71b049
              sent_at: '2024-02-29T11:11:11+00:00'
              attachments:
                - 4f4288b2-c21b-4dac-87f6-a97511309079
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.importMessage.response'
                  - example:
                      data:
                        type: ticketMessage
                        id: e3de4c0d-787d-4720-b78f-af8df5c8182c
              example:
                data:
                  type: ticketMessage
                  id: e3de4c0d-787d-4720-b78f-af8df5c8182c
      deprecated: false
  /tickets.addReply:
    post:
      tags:
        - tickets
      summary: tickets.addReply
      description: Adds a message to a ticket.
      operationId: tickets.addReply
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.addReply.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    body: <p>Hello world</p>
                    ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    attachments:
                      - 4f4288b2-c21b-4dac-87f6-a97511309079
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
              body: <p>Hello world</p>
              ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              attachments:
                - 4f4288b2-c21b-4dac-87f6-a97511309079
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.addReply.response'
                  - example:
                      data:
                        type: ticketMessage
                        id: e3de4c0d-787d-4720-b78f-af8df5c8182c
              example:
                data:
                  type: ticketMessage
                  id: e3de4c0d-787d-4720-b78f-af8df5c8182c
      deprecated: false
  /tickets.addInternalMessage:
    post:
      tags:
        - tickets
      summary: tickets.addInternalMessage
      description: Adds an internal message to a ticket.
      operationId: tickets.addInternalMessage
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/tickets.addInternalMessage.request'
                - example:
                    id: f29abf48-337d-44b4-aad4-585f5277a456
                    body: <p>Hello world</p>
                    ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    attachments:
                      - 4f4288b2-c21b-4dac-87f6-a97511309079
            example:
              id: f29abf48-337d-44b4-aad4-585f5277a456
              body: <p>Hello world</p>
              ticket_status_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              attachments:
                - 4f4288b2-c21b-4dac-87f6-a97511309079
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/tickets.addInternalMessage.response'
                  - example:
                      data:
                        type: ticketMessage
                        id: e3de4c0d-787d-4720-b78f-af8df5c8182c
              example:
                data:
                  type: ticketMessage
                  id: e3de4c0d-787d-4720-b78f-af8df5c8182c
      deprecated: false
  /ticketStatus.list:
    post:
      tags:
        - ticket_status
      summary: ticketStatus.list
      description: Get a list of ticket statuses.
      operationId: ticketStatus.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ticketStatus.list.request'
                - example:
                    filter:
                      ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
                        - 46156648-87c6-478d-8aa7-1dc3a00daca4
            example:
              filter:
                ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
                  - 46156648-87c6-478d-8aa7-1dc3a00daca4
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ticketStatus.list.response'
                  - example:
                      data:
                        - id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                          status: new
                          label: Custom Label
              example:
                data:
                  - id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    status: new
                    label: Custom Label
      deprecated: false
  /files.list:
    post:
      tags:
        - files
      summary: files.list
      description: Get a list of files.
      operationId: files.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/files.list.request'
                - example:
                    filter:
                      subject:
                        type: company
                        id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    page:
                      size: 20
                      number: 1
                    sort:
                      - field: updated_at
                        order: desc
            example:
              filter:
                subject:
                  type: company
                  id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              page:
                size: 20
                number: 1
              sort:
                - field: updated_at
                  order: desc
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/files.list.response'
                  - example:
                      data:
                        - id: a856642a-a476-4b69-8e42-e7d1badb2ce9
                          subject:
                            type: company
                            id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                          name: meeting-report.pdf
                          mime_type: application/msword
                          size: 1024
                          updated_at: '2019-10-15T17:30:58+00:00'
                          uploaded_by:
                            type: user
                            id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                          folder: Documents
              example:
                data:
                  - id: a856642a-a476-4b69-8e42-e7d1badb2ce9
                    subject:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    name: meeting-report.pdf
                    mime_type: application/msword
                    size: 1024
                    updated_at: '2019-10-15T17:30:58+00:00'
                    uploaded_by:
                      type: user
                      id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                    folder: Documents
      deprecated: false
  /files.info:
    post:
      tags:
        - files
      summary: files.info
      description: Get details for a single file.
      operationId: files.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/files.info.request'
                - example:
                    id: 6fac0bf0-e803-424e-af67-76863a3d7d16
            example:
              id: 6fac0bf0-e803-424e-af67-76863a3d7d16
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/files.info.response'
                  - example:
                      data:
                        id: a856642a-a476-4b69-8e42-e7d1badb2ce9
                        subject:
                          type: company
                          id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                        name: meeting-report.pdf
                        mime_type: application/msword
                        size: 1024
                        updated_at: '2019-10-15T17:30:58+00:00'
                        uploaded_by:
                          type: user
                          id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                        folder: Documents
              example:
                data:
                  id: a856642a-a476-4b69-8e42-e7d1badb2ce9
                  subject:
                    type: company
                    id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                  name: meeting-report.pdf
                  mime_type: application/msword
                  size: 1024
                  updated_at: '2019-10-15T17:30:58+00:00'
                  uploaded_by:
                    type: user
                    id: bef8c53b-b6bc-0fde-944e-5c4b16e5155a
                  folder: Documents
      deprecated: false
  /files.download:
    post:
      tags:
        - files
      summary: files.download
      description: Request the download link for a file.
      operationId: files.download
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/files.download.request'
                - example:
                    id: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
            example:
              id: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/files.download.response'
                  - example:
                      data:
                        location: https://cdn.teamleader.eu/file
                        expires_at: '2018-02-05T16:44:33+00:00'
              example:
                data:
                  location: https://cdn.teamleader.eu/file
                  expires_at: '2018-02-05T16:44:33+00:00'
      deprecated: false
  /files.upload:
    post:
      tags:
        - files
      summary: files.upload
      description: |
        Request the upload link for a file.

        The following remarks apply to `temporary` files:
        - they exist for a maximum of 24 hours if not linked to an entity
        - do not show up in any file overview
        - are not included in external syncs
      operationId: files.upload
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/files.upload.request'
                - example:
                    name: Important meeting note from August 2022.docx
                    subject:
                      type: company
                      id: 2659dc4d-444b-4ced-b51c-b87591f604d7
                    folder: My monthly notes
            example:
              name: Important meeting note from August 2022.docx
              subject:
                type: company
                id: 2659dc4d-444b-4ced-b51c-b87591f604d7
              folder: My monthly notes
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/files.upload.response'
                  - example:
                      data:
                        location: https://files.teamleader.eu/upload/66726166a
                        expires_at: '2019-10-30T11:44:33+00:00'
              example:
                data:
                  location: https://files.teamleader.eu/upload/66726166a
                  expires_at: '2019-10-30T11:44:33+00:00'
      deprecated: false
  /files.delete:
    post:
      tags:
        - files
      summary: files.delete
      description: Delete a file.
      operationId: files.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/files.delete.request'
                - example:
                    id: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
            example:
              id: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /mailTemplates.list:
    post:
      tags:
        - mail_templates
      summary: mailTemplates.list
      description: Get a list of all mail templates.
      operationId: mailTemplates.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json;charset=utf-8:
            schema:
              allOf:
                - $ref: '#/components/schemas/mailTemplates.list.request'
                - example:
                    filter:
                      department_id: a344c251-2494-0013-b433-ccee8e8435e5
                      type: invoice
            example:
              filter:
                department_id: a344c251-2494-0013-b433-ccee8e8435e5
                type: invoice
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json;charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/mailTemplates.list.response'
                  - example:
                      data:
                        - id: a344c251-2494-0013-b433-ccee8e8435e5
                          department:
                            type: department
                            id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                          name: Send link in english
                          content:
                            subject: Link for document
                            body: '#LINK \n<link> Thank you for using our services'
                          language: en
                          type: invoice
              example:
                data:
                  - id: a344c251-2494-0013-b433-ccee8e8435e5
                    department:
                      type: department
                      id: 36386b05-936e-4cc0-9523-bd20d797ebf5
                    name: Send link in english
                    content:
                      subject: Link for document
                      body: '#LINK \n<link> Thank you for using our services'
                    language: en
                    type: invoice
      deprecated: false
  /migrate.id:
    post:
      tags:
        - migrating
      summary: migrate.id
      description: Translates an ID from the deprecated API into a new UUID.
      operationId: migrate.id
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/migrate.id.request'
                - example:
                    type: contact
                    id: 1
            example:
              type: contact
              id: 1
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/migrate.id.response'
                  - example:
                      data:
                        type: contact
                        id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
              example:
                data:
                  type: contact
                  id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
      deprecated: false
  /migrate.taxRate:
    post:
      tags:
        - migrating
      summary: migrate.taxRate
      description: Translates tax rates from the deprecated API into a new UUID tax rate.
      operationId: migrate.taxRate
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/migrate.taxRate.request'
                - example:
                    department_id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
                    tax_rate: '21'
            example:
              department_id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
              tax_rate: '21'
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/migrate.taxRate.response'
                  - example:
                      data:
                        type: taxRate
                        id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
              example:
                data:
                  type: taxRate
                  id: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
      deprecated: false
  /migrate.activityType:
    post:
      tags:
        - migrating
      summary: migrate.activityType
      description: Translates `meeting`, `call` and `task` into their respective activity type UUID.
      operationId: migrate.activityType
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/migrate.activityType.request'
                - example:
                    type: meeting
            example:
              type: meeting
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/migrate.activityType.response'
                  - example:
                      data:
                        type: activityType
                        id: 28f3639d-9b64-44a8-974d-a4df645af6a5
              example:
                data:
                  type: activityType
                  id: 28f3639d-9b64-44a8-974d-a4df645af6a5
      deprecated: false
  /orders.info:
    post:
      tags:
        - orders
      summary: orders.info
      description: Get details for a single order.
      operationId: orders.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/orders.info.request'
            example:
              id: 31b9d864-da1d-060e-9811-f683896aeb11
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/orders.info.response'
              example:
                data:
                  id: 31b9d864-da1d-060e-9811-f683896aeb11
                  name: General costs
                  order_date: '2016-02-04'
                  delivery_date: '2016-10-14'
                  payment_term:
                    type: cash
                  total:
                    tax_exclusive:
                      amount: 123.3
                      currency: EUR
                    tax_inclusive:
                      amount: 123.3
                      currency: EUR
                    purchase_price_tax_exclusive:
                      amount: 123.3
                      currency: EUR
                    purchase_price_tax_inclusive:
                      amount: 123.3
                      currency: EUR
                    taxes:
                      - rate: 0.21
                        taxable:
                          amount: 123.3
                          currency: EUR
                        tax:
                          amount: 123.3
                          currency: EUR
                  web_url: https://focus.teamleader.eu/order_detail.php?id=31b9d864-da1d-060e-9811-f683896aeb11
                  supplier:
                    type: contact
                    id: e2314517-3cab-4aa9-8471-450e73449040
                  department:
                    type: department
                    id: aa849e5d-5678-4d41-a052-2e4e5420707d
                  deal:
                    type: deal
                    id: a7431439-5795-433c-8503-089cc2fff03a
                  project:
                    type: project
                    id: 656e4faa-8006-4a58-9de9-ffe509633743
                  assignee:
                    type: user
                    id: 7ba98a20-5e2b-4b46-81b9-a3364432d4f0
                  custom_fields:
                    - definition:
                        type: customFieldDefinition
                        id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                      value: '092980616'
  /orders.list:
    post:
      tags:
        - orders
      summary: orders.list
      description: Get a list of orders.
      operationId: orders.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/orders.list.request'
                - example:
                    filter:
                      ids:
                        - 31b9d864-da1d-060e-9811-f683896aeb11
                        - 7c3c4edc-fd8d-0cc3-bd1e-9f3f9d7b7db2
                    page:
                      size: 20
                      number: 1
                    includes: custom_fields
            example:
              filter:
                ids:
                  - 31b9d864-da1d-060e-9811-f683896aeb11
                  - 7c3c4edc-fd8d-0cc3-bd1e-9f3f9d7b7db2
              page:
                size: 20
                number: 1
              includes: custom_fields
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orders.list.response'
              example:
                data:
                  - id: 31b9d864-da1d-060e-9811-f683896aeb11
                    name: General costs
                    order_date: '2016-02-04'
                    delivery_date: '2016-10-14'
                    payment_term:
                      type: cash
                    total:
                      tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      purchase_price_tax_exclusive:
                        amount: 123.3
                        currency: EUR
                      purchase_price_tax_inclusive:
                        amount: 123.3
                        currency: EUR
                      taxes:
                        - rate: 0.21
                          taxable:
                            amount: 123.3
                            currency: EUR
                          tax:
                            amount: 123.3
                            currency: EUR
                    web_url: https://focus.teamleader.eu/order_detail.php?id=31b9d864-da1d-060e-9811-f683896aeb11
                    supplier:
                      type: contact
                      id: e2314517-3cab-4aa9-8471-450e73449040
                    department:
                      type: department
                      id: aa849e5d-5678-4d41-a052-2e4e5420707d
                    deal:
                      type: deal
                      id: a7431439-5795-433c-8503-089cc2fff03a
                    project:
                      type: project
                      id: 656e4faa-8006-4a58-9de9-ffe509633743
                    assignee:
                      type: user
                      id: 7ba98a20-5e2b-4b46-81b9-a3364432d4f0
                    custom_fields:
                      - definition:
                          type: customFieldDefinition
                          id: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
                        value: '092980616'
  /webhooks.register:
    post:
      tags:
        - webhooks
      summary: webhooks.register
      description: Register a new webhook.
      operationId: webhooks.register
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebHook'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /webhooks.list:
    post:
      tags:
        - webhooks
      summary: webhooks.list
      description: List registered webhooks ordered by URL.
      operationId: webhooks.list
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhooks.list.response'
      deprecated: false
  /webhooks.unregister:
    post:
      tags:
        - webhooks
      summary: webhooks.unregister
      description: Unregister a webhook.
      operationId: webhooks.unregister
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebHook'
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /cloudPlatforms.url:
    post:
      tags:
        - cloud_platforms
      summary: cloudPlatforms.url
      description: Fetch cloudPlatform url for type and id.
      operationId: cloudPlatforms.url
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/cloudPlatforms.url.request'
                - example:
                    type: invoice
                    id: b7023c11-455e-4fa5-bb96-87f37dbc7d07
            example:
              type: invoice
              id: b7023c11-455e-4fa5-bb96-87f37dbc7d07
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/cloudPlatforms.url.response'
                  - example:
                      data:
                        url: https://teamleader.cloud/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yUmR5yNZ45P_jHDbjAzuk4kRA8YNoM9ckSZOZpMIJmU/
              example:
                data:
                  url: https://teamleader.cloud/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yUmR5yNZ45P_jHDbjAzuk4kRA8YNoM9ckSZOZpMIJmU/
      deprecated: false
  /accounts.projects-v2-status:
    post:
      tags:
        - accounts
      summary: accounts.projects-v2-status
      description: Fetch which version of Projects the account is using.
      operationId: accounts.projects-v2-status
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          style: simple
          schema:
            enum:
              - application/json
            type: string
            example: application/json
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/accounts.projects-v2-status.response'
                  - example:
                      data:
                        status: projects-v2
                        will_be_automatically_switched_on: '2024-12-31'
              example:
                data:
                  status: projects-v2
                  will_be_automatically_switched_on: '2024-12-31'
      deprecated: false
  /plannableItems.list:
    post:
      tags:
        - plannable_items
      summary: plannableItems.list
      description: Lists all plannable items that match the optional filters provided.
      operationId: plannableItems.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/plannableItems.list.request'
                - example:
                    filter:
                      ids:
                        - 018d79a1-2b99-7fbd-b323-500b01305371
            example:
              filter:
                ids:
                  - 018d79a1-2b99-7fbd-b323-500b01305371
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/plannableItems.list.response'
                  - example:
                      data:
                        - id: 018d79a1-2b99-7fbd-b323-500b01305371
                          source:
                            type: task
                            id: 948b8ca5-58aa-0844-ba34-cee255aa9694
                          total_duration:
                            value: 600
                            unit: minutes
                          planned_duration:
                            value: 600
                            unit: minutes
                          unplanned_duration:
                            value: 0
                            unit: minutes
              example:
                data:
                  - id: 018d79a1-2b99-7fbd-b323-500b01305371
                    source:
                      type: task
                      id: 948b8ca5-58aa-0844-ba34-cee255aa9694
                    total_duration:
                      value: 600
                      unit: minutes
                    planned_duration:
                      value: 600
                      unit: minutes
                    unplanned_duration:
                      value: 0
                      unit: minutes
      deprecated: false
  /plannableItems.info:
    post:
      tags:
        - plannable_items
      summary: plannableItems.info
      description: Returns the info for a single plannable item, either by ID or source if the ID is unknown.
      operationId: plannableItems.info
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/plannableItems.info.request'
                - example:
                    id: 018d79a1-2b99-7fbd-b323-500b01305371
            example:
              id: 018d79a1-2b99-7fbd-b323-500b01305371
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/plannableItems.info.response'
                  - example:
                      data:
                        id: 018d79a1-2b99-7fbd-b323-500b01305371
                        source:
                          type: task
                          id: 948b8ca5-58aa-0844-ba34-cee255aa9694
                        total_duration:
                          value: 600
                          unit: minutes
                        planned_duration:
                          value: 600
                          unit: minutes
                        unplanned_duration:
                          value: 0
                          unit: minutes
              example:
                data:
                  id: 018d79a1-2b99-7fbd-b323-500b01305371
                  source:
                    type: task
                    id: 948b8ca5-58aa-0844-ba34-cee255aa9694
                  total_duration:
                    value: 600
                    unit: minutes
                  planned_duration:
                    value: 600
                    unit: minutes
                  unplanned_duration:
                    value: 0
                    unit: minutes
      deprecated: false
  /reservations.list:
    post:
      tags:
        - reservations
      summary: reservations.list
      description: Lists all reservations that match the optional filters provided.
      operationId: reservations.list
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/reservations.list.request'
                - example:
                    filter:
                      plannable_item_ids:
                        - 46156648-87c6-478d-8aa7-1dc3a00dacab
            example:
              filter:
                plannable_item_ids:
                  - 46156648-87c6-478d-8aa7-1dc3a00dacab
        required: false
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/reservations.list.response'
                  - example:
                      data:
                        - id: 018d79a1-2b99-7fbd-b323-500b01305371
                          plannable_item:
                            type: plannableItem
                            id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                          date: '2024-01-02'
                          duration:
                            value: 60
                            unit: minutes
                          assignee: null
                          origin: null
                          source:
                            type: task
                            id: 948b8ca5-58aa-0844-ba34-cee255aa9694
              example:
                data:
                  - id: 018d79a1-2b99-7fbd-b323-500b01305371
                    plannable_item:
                      type: plannableItem
                      id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    date: '2024-01-02'
                    duration:
                      value: 60
                      unit: minutes
                    assignee: null
                    origin: null
                    source:
                      type: task
                      id: 948b8ca5-58aa-0844-ba34-cee255aa9694
      deprecated: false
  /reservations.create:
    post:
      tags:
        - reservations
      summary: reservations.create
      description: Create a new reservation.
      operationId: reservations.create
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/reservations.create.request'
                - example:
                    plannable_item_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
                    date: '2024-01-12'
                    duration:
                      value: 60
                      unit: minutes
                    assignee:
                      type: user
                      id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
            example:
              plannable_item_id: 46156648-87c6-478d-8aa7-1dc3a00dacab
              date: '2024-01-12'
              duration:
                value: 60
                unit: minutes
              assignee:
                type: user
                id: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
        required: true
      responses:
        '201':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/reservations.create.response'
                  - example:
                      data:
                        type: reservation
                        id: 019a3012-c800-7109-ae63-0ab5bcd3b484
              example:
                data:
                  type: reservation
                  id: 019a3012-c800-7109-ae63-0ab5bcd3b484
      deprecated: false
  /reservations.update:
    post:
      tags:
        - reservations
      summary: reservations.update
      description: Update an existing reservation.
      operationId: reservations.update
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/reservations.update.request'
                - example:
                    id: 019a3012-c800-7109-ae63-0ab5bcd3b484
                    date: '2024-01-01'
                    duration:
                      value: 120
                      unit: minutes
            example:
              id: 019a3012-c800-7109-ae63-0ab5bcd3b484
              date: '2024-01-01'
              duration:
                value: 120
                unit: minutes
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /reservations.delete:
    post:
      tags:
        - reservations
      summary: reservations.delete
      description: Delete a reservation.
      operationId: reservations.delete
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/reservations.delete.request'
                - example:
                    id: 019a3012-c800-7109-ae63-0ab5bcd3b484
            example:
              id: 019a3012-c800-7109-ae63-0ab5bcd3b484
        required: true
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
      deprecated: false
  /userAvailability.total:
    post:
      tags:
        - user_availability
      summary: userAvailability.total
      description: Returns the total availability for all users.
      operationId: userAvailability.total
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/userAvailability.total.request'
                - example:
                    period:
                      start_date: '2024-01-01'
                      end_date: '2024-01-07'
            example:
              period:
                start_date: '2024-01-01'
                end_date: '2024-01-07'
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/userAvailability.total.response'
                  - example:
                      data:
                        - user:
                            type: user
                            id: 1c00aeaa-0a47-0ce5-8f2b-60935c241f12
                          availability:
                            gross_time_available:
                              value: 480
                              unit: minutes
                            net_time_available:
                              value: 480
                              unit: minutes
                            planned_time:
                              value: 60
                              unit: minutes
                            unplanned_time:
                              value: 420
                              unit: minutes
              example:
                data:
                  - user:
                      type: user
                      id: 1c00aeaa-0a47-0ce5-8f2b-60935c241f12
                    availability:
                      gross_time_available:
                        value: 480
                        unit: minutes
                      net_time_available:
                        value: 480
                        unit: minutes
                      planned_time:
                        value: 60
                        unit: minutes
                      unplanned_time:
                        value: 420
                        unit: minutes
      deprecated: false
  /userAvailability.daily:
    post:
      tags:
        - user_availability
      summary: userAvailability.daily
      description: Returns the daily availability for all users.
      operationId: userAvailability.daily
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/userAvailability.daily.request'
                - example:
                    period:
                      start_date: '2024-01-01'
                      end_date: '2024-01-01'
            example:
              period:
                start_date: '2024-01-01'
                end_date: '2024-01-01'
        required: true
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/userAvailability.daily.response'
                  - example:
                      data:
                        - user:
                            type: user
                            id: 1c00aeaa-0a47-0ce5-8f2b-60935c241f12
                          availabilities:
                            - date: '2024-01-01'
                              availability:
                                gross_time_available:
                                  value: 480
                                  unit: minutes
                                net_time_available:
                                  value: 480
                                  unit: minutes
                                planned_time:
                                  value: 60
                                  unit: minutes
                                unplanned_time:
                                  value: 420
                                  unit: minutes
              example:
                data:
                  - user:
                      type: user
                      id: 1c00aeaa-0a47-0ce5-8f2b-60935c241f12
                    availabilities:
                      - date: '2024-01-01'
                        availability:
                          gross_time_available:
                            value: 480
                            unit: minutes
                          net_time_available:
                            value: 480
                            unit: minutes
                          planned_time:
                            value: 60
                            unit: minutes
                          unplanned_time:
                            value: 420
                            unit: minutes
      deprecated: false
components:
  securitySchemes:
    httpBearer:
      type: http
      scheme: bearer
  schemas:
    Order:
      title: Order
      enum:
        - asc
        - desc
      type: string
    Sort:
      title: Sort
      required:
        - field
      type: object
      properties:
        field:
          type: string
        order:
          $ref: '#/components/schemas/Order'
    departments.list.request:
      title: departments.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              example:
                - 92296ad0-2d61-4179-b174-9f354ca2157f
                - 53635682-c382-4fbf-9fd9-9506ca4fbcdd
            status:
              type: array
              items:
                type: string
                enum:
                  - active
                  - archived
              description: |
                Filters on status:
                * `active`   - Filters on active departments
                * `archived` - Filters on archived departments
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - default_department
                      - name
                      - created_at
                    description: |-
                      * `default_department` - When sorting ascending, default departments are listed first.
                      * `name` - Sorts by department name.
                      * `created_at` - Sorts by department creation date.
    Email:
      title: Email
      type: object
      properties:
        type:
          type: string
          example: primary
        email:
          type: string
          example: info@piedpiper.eu
    departments.list.response:
      title: departments.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 67c576e7-7e6f-465d-b6ab-a864f6e5e95b
              name:
                type: string
                example: Human Resources
              vat_number:
                type: string
                example: BE0899623035
              currency:
                type: string
                example: EUR
              emails:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Email'
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - primary
                            - invoicing
                          example: primary
                description: ''
              status:
                type: string
                enum:
                  - active
                  - archived
                example: active
          description: ''
    departments.info.request:
      title: departments.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 92296ad0-2d61-4179-b174-9f354ca2157f
    TypeAndId:
      title: TypeAndId
      type: object
      properties:
        id:
          type: string
          example: eab232c6-49b2-4b7e-a977-5e1148dad471
        type:
          type: string
    AddressResponse:
      title: AddressResponse
      type: object
      properties:
        line_1:
          type: string
          nullable: true
          example: Dok Noord 3A 101
        postal_code:
          type: string
          nullable: true
          example: '9000'
        city:
          type: string
          nullable: true
          example: Ghent
        country:
          type: string
          example: BE
        area_level_two:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - properties:
                type:
                  type: string
                  example: area_level_two
    Telephone:
      title: Telephone
      type: object
      properties:
        type:
          type: string
          enum:
            - phone
            - mobile
            - fax
          example: phone
        number:
          type: string
          example: '092980615'
    departments.info.response:
      title: departments.info.response
      type: object
      properties:
        data:
          type: object
          title: data1
          properties:
            id:
              type: string
              example: 67c576e7-7e6f-465d-b6ab-a864f6e5e95b
            name:
              type: string
              example: Human Resources
            vat_number:
              type: string
              example: BE0899623035
            address:
              $ref: '#/components/schemas/AddressResponse'
            emails:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Email'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - primary
                          - invoicing
                        example: primary
              description: ''
            telephones:
              type: array
              items:
                $ref: '#/components/schemas/Telephone'
              description: ''
            website:
              type: string
              example: https://piedpiper.com
            currency:
              type: string
              example: EUR
            iban:
              type: string
              example: BE12123412341234
            bic:
              type: string
              example: BICBANK
            fiscal_regime:
              type: string
              nullable: true
              enum:
                - RF01
                - RF02
                - RF03
                - RF04
                - RF05
                - RF06
                - RF07
                - RF08
                - RF09
                - RF10
                - RF11
                - RF12
                - RF13
                - RF14
                - RF15
                - RF16
                - RF17
                - RF18
                - RF19
              example: RF01
            status:
              type: string
              enum:
                - active
                - archived
              example: active
    UserLanguage:
      title: UserLanguage
      enum:
        - nl-BE
        - da
        - de
        - en
        - es
        - fi
        - fr
        - it
        - nb
        - nl
        - pl
        - pt
        - sv
        - tr
      type: string
      example: nl-BE
    UserPreferences:
      title: UserPreferences
      type: object
      properties:
        invoiceable:
          type: boolean
          example: true
        historic_time_tracking_limit:
          type: object
          nullable: true
          properties:
            unit:
              type: string
              enum:
                - hour
              example: hour
            value:
              type: number
              example: 24
        whitelabeling:
          type: boolean
          example: true
    users.me.response:
      title: users.me.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
            account:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: account
            first_name:
              type: string
              example: John
            last_name:
              type: string
              example: Smith
            email:
              type: string
              example: john@teamleader.eu
            email_verification_status:
              type: string
              enum:
                - pending
                - confirmed
              example: confirmed
            telephones:
              type: array
              items:
                $ref: '#/components/schemas/Telephone'
              description: ''
            language:
              allOf:
                - $ref: '#/components/schemas/UserLanguage'
                - example: nl-BE
            function:
              type: string
              example: Sales
            time_zone:
              type: string
              example: Europe/Brussels
            preferences:
              $ref: '#/components/schemas/UserPreferences'
            teams:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: team
    Page:
      title: Page
      type: object
      properties:
        size:
          type: number
          default: 20
        number:
          type: number
          default: 1
    users.list.request:
      title: users.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on first name, last name, email and function
              example: John
            status:
              type: array
              items:
                type: string
                enum:
                  - active
                  - deactivated
              description: |
                Filters on status:
                * `active`   - Filters on active users
                * `deactivated` - Filters on deactivated users
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - first_name
                      - last_name
                      - email
                      - function
          description: ''
        page:
          $ref: '#/components/schemas/Page'
    users.list.response:
      title: users.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
              account:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: account
              first_name:
                type: string
                example: John
              last_name:
                type: string
                example: Smith
              email:
                type: string
                example: john@teamleader.eu
              telephones:
                type: array
                items:
                  $ref: '#/components/schemas/Telephone'
                description: ''
              language:
                type: string
                example: nl
              function:
                type: string
                example: Sales
              status:
                type: string
                enum:
                  - active
                  - deactivated
                example: active
              teams:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/TypeAndId'
                    - properties:
                        type:
                          type: string
                          example: team
    users.info.request:
      title: users.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
        includes:
          type: string
          description: when used, the response will include `external_rate`
          example: external_rate
    CurrencyCode:
      title: CurrencyCode
      enum:
        - BAM
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EUR
        - GBP
        - INR
        - ISK
        - JPY
        - MAD
        - MXN
        - NOK
        - PEN
        - PLN
        - RON
        - SEK
        - TRY
        - USD
        - ZAR
      type: string
    Money:
      title: Money
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          example: 123.3
        currency:
          $ref: '#/components/schemas/CurrencyCode'
    users.info.response:
      title: users.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
            account:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: account
            first_name:
              type: string
              example: John
            last_name:
              type: string
              example: Smith
            email:
              type: string
              example: john@teamleader.eu
            telephones:
              type: array
              items:
                $ref: '#/components/schemas/Telephone'
              description: ''
            language:
              allOf:
                - $ref: '#/components/schemas/UserLanguage'
                - example: nl-BE
            function:
              type: string
              example: Sales
            time_zone:
              type: string
              example: Europe/Brussels
            status:
              type: string
              enum:
                - active
                - deactivated
              example: active
            teams:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: team
              description: ''
            external_rate:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
    users.listDaysOff.request:
      title: users.listDaysOff.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 87982c96-f2fe-4b05-838c-ff42c0525758
        filter:
          type: object
          properties:
            starts_after:
              type: string
              description: Start of the period for which to return days off.
              example: '2023-10-01'
            ends_before:
              type: string
              description: End of the period for which to return days off.
              example: '2023-10-30'
        page:
          $ref: '#/components/schemas/Page'
    Pagination:
      title: Pagination
      type: object
      properties:
        size:
          type: number
          example: 10
        number:
          type: number
          example: 2
    Meta:
      title: Meta
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Pagination'
        matches:
          type: number
          example: 12
      description: Only included with request parameter `includes=pagination`
    users.listDaysOff.response:
      title: users.listDaysOff.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: f611da79-90c2-02b1-b819-a810e0c77291
              starts_at:
                type: string
                example: '2023-10-01T09:00:00+01:00'
              ends_at:
                type: string
                example: '2023-10-20T18:00:00+01:00'
              user:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        enum:
                          - user
                        example: user
              leave_type:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        enum:
                          - dayOffType
                        example: dayOffType
              status:
                type: string
                enum:
                  - approved
                  - not_approved
                  - pending
                example: approved
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    users.getWeekSchedule.request:
      title: users.getWeekSchedule.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 87982c96-f2fe-4b05-838c-ff42c0525758
    Weekday:
      title: Weekday
      enum:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      type: string
    users.getWeekSchedule.response:
      title: users.getWeekSchedule.response
      type: object
      properties:
        data:
          type: object
          properties:
            periods:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - working_hours
                      - lunch_break
                    example: working_hours
                  start:
                    type: object
                    properties:
                      day:
                        $ref: '#/components/schemas/Weekday'
                      time:
                        type: string
                        description: The time of day in 24-hour hh:mm format. The time will be reported in the user's time zone.
                        example: '09:00'
                  end:
                    type: object
                    properties:
                      day:
                        $ref: '#/components/schemas/Weekday'
                      time:
                        type: string
                        description: The time of day in 24-hour hh:mm format. The time will be reported in the user's time zone.
                        example: '17:00'
              description: ''
    userSchedules.list.request:
      title: userSchedules.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          required:
            - user_ids
            - from
            - until
          properties:
            user_ids:
              type: array
              items:
                type: string
                example: 87982c96-f2fe-4b05-838c-ff42c0525758
              description: The users for which to return working schedules.
            from:
              type: string
              description: Start of the date range (inclusive) in `YYYY-MM-DD` format.
              example: '2026-06-01'
            until:
              type: string
              description: End of the date range (inclusive) in `YYYY-MM-DD` format. Must be on or after `from`, and the range may span at most 7 days.
              example: '2026-06-07'
        page:
          $ref: '#/components/schemas/Page'
    userSchedules.list.response:
      title: userSchedules.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              user:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        enum:
                          - user
                        example: user
              schedule:
                type: array
                items:
                  type: object
                  properties:
                    date:
                      type: string
                      description: The day in `YYYY-MM-DD` format.
                      example: '2026-06-01'
                    periods:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - working_hours
                              - lunch_break
                            example: working_hours
                          start:
                            type: object
                            properties:
                              time:
                                type: string
                                description: The time of day in 24-hour hh:mm format. The time will be reported in the user's time zone.
                                example: '09:00'
                          end:
                            type: object
                            properties:
                              time:
                                type: string
                                description: The time of day in 24-hour hh:mm format. The time will be reported in the user's time zone.
                                example: '17:00'
                description: The working schedule expanded per day over the requested range. Non-working days are omitted.
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    teams.list.request:
      title: teams.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on name
              example: Designers
            team_lead_id:
              type: string
              description: Filters on teams for which a user is team lead for
              example: 6a9106c3-ed2a-46a2-a919-eb3d41165dd2
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    enum:
                      - name
                    type: string
                    example: name
          description: ''
    teams.list.response:
      title: teams.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 4b5291aa-2d78-09d2-882c-6c1483f00d88
              name:
                type: string
                example: Designers
              team_lead:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              members:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/TypeAndId'
                description: ''
          description: ''
    CustomFieldDefinitionType:
      type: string
      enum:
        - single_line
        - multi_line
        - single_select
        - multi_select
        - date
        - money
        - auto_increment
        - integer
        - number
        - boolean
        - email
        - telephone
        - url
        - company
        - contact
        - product
        - user
    Context:
      title: Context
      enum:
        - contact
        - company
        - deal
        - project
        - milestone
        - product
        - invoice
        - subscription
        - ticket
      type: string
    customFieldDefinitions.create.request:
      title: customFieldDefinitions.create.request
      required:
        - label
        - type
        - context
      type: object
      properties:
        label:
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/CustomFieldDefinitionType'
            - example: single_line
        context:
          allOf:
            - $ref: '#/components/schemas/Context'
            - example: contact
        required:
          type: boolean
        configuration:
          type: object
          description: |
            - Use `options` when `type` is one of [`single_select`, `multi_select`]
            - Use `default_value` when `type` is `auto_increment`
            - Use `searchable` when `type` is one of [`single_line`, `company`, `integer`, `number`, `auto_increment`, `email`, `telephone`]
          oneOf:
            - type: object
              title: options
              properties:
                options:
                  type: array
                  items:
                    type: string
            - type: object
              title: default_value
              properties:
                default_value:
                  type: number
            - type: object
              title: searchable
              properties:
                searchable:
                  type: boolean
    customFieldDefinitions.create.response:
      title: customFieldDefinitions.create.response
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - properties:
                type:
                  type: string
                  example: customFieldDefinition
    customFieldDefinitions.list.request:
      title: customFieldDefinitions.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            context:
              allOf:
                - $ref: '#/components/schemas/Context'
                - description: Filters on context
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - label
                      - context
          description: ''
    customFieldDefinitions.list.response:
      title: customFieldDefinitions.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 74855f4a-2b61-429c-81d8-c79ad3675a76
              context:
                allOf:
                  - $ref: '#/components/schemas/Context'
                  - example: contact
              type:
                $ref: '#/components/schemas/CustomFieldDefinitionType'
              label:
                type: string
              group:
                type: string
              required:
                type: boolean
                example: false
              configuration:
                type: object
                properties:
                  options:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 179e1564-493b-4305-8c54-a34fc80920fc
                        value:
                          type: string
                          example: foo
                    description: Only returned for `single_select` and `multi_select` types
                  extra_option_allowed:
                    type: boolean
                    example: true
                  default_value:
                    type: string
                    nullable: true
                    description: Only returned for `single_select` type
          description: ''
    customFieldDefinitions.info.request:
      title: customFieldDefinitions.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 9c64570b-4ec1-4e03-9662-af904f78f7fa
    customFieldDefinitions.info.response:
      title: customFieldDefinitions.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 74855f4a-2b61-429c-81d8-c79ad3675a76
            context:
              allOf:
                - $ref: '#/components/schemas/Context'
                - example: contact
            type:
              $ref: '#/components/schemas/CustomFieldDefinitionType'
            label:
              type: string
            group:
              type: string
            required:
              type: boolean
              example: false
            configuration:
              type: object
              properties:
                options:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 179e1564-493b-4305-8c54-a34fc80920fc
                      value:
                        type: string
                        example: foo
                  description: Only returned for `single_select` and `multi_select` types
                extra_option_allowed:
                  type: boolean
                  example: true
    workTypes.list.request:
      title: workTypes.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Searches in the work type name only
              example: design
        page:
          $ref: '#/components/schemas/Page'
    IdAndName:
      title: IdAndName
      type: object
      properties:
        id:
          type: string
          example: 811a5825-96f4-4318-83c3-2840935c6003
        name:
          type: string
    workTypes.list.response:
      title: workTypes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    DocumentType:
      title: DocumentType
      type: string
      enum:
        - delivery_note
        - invoice
        - order
        - order_confirmation
        - quotation
        - timetracking_report
        - workorder
      example: invoice
    documentTemplates.list.request:
      title: documentTemplates.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          required:
            - department_id
            - document_type
          properties:
            department_id:
              type: string
              example: a344c251-2494-0013-b433-ccee8e8435e5
            document_type:
              allOf:
                - $ref: '#/components/schemas/DocumentType'
                - example: invoice
            status:
              type: array
              items:
                type: string
                enum:
                  - active
                  - archived
              description: |-
                Filters on status:
                * `active`   - Filters on active departments
                * `archived` - Filters on archived departments
    documentTemplates.list.response:
      title: documentTemplates.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: a344c251-2494-0013-b433-ccee8e8435e5
              department:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: department
              document_type:
                allOf:
                  - $ref: '#/components/schemas/DocumentType'
                  - example: invoice
              is_default:
                type: boolean
                example: true
              name:
                type: string
                example: new logo
              status:
                type: string
                enum:
                  - active
                  - archived
                example: active
          description: ''
    currencies.exchangeRates.request:
      title: currencies.exchangeRates.request
      required:
        - base
      type: object
      properties:
        base:
          $ref: '#/components/schemas/CurrencyCode'
    currencies.exchangeRates.response:
      title: currencies.exchangeRates.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              code:
                $ref: '#/components/schemas/CurrencyCode'
              symbol:
                type: string
                example: $
              name:
                type: string
                example: US Dollar
              exchange_rate:
                type: number
                description: The exchange rate from the provided base currency to the listed currency
                example: 1.1238
          description: ''
    NoteSubjectTypes:
      title: NoteSubjectTypes
      enum:
        - company
        - contact
        - creditNote
        - deal
        - invoice
        - meeting
        - nextgenProject
        - product
        - project
        - quotation
        - subscription
      type: string
    notes.list.request:
      title: notes.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          required:
            - subject
          properties:
            subject:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - required:
                    - type
                    - id
                  properties:
                    type:
                      $ref: '#/components/schemas/NoteSubjectTypes'
        page:
          $ref: '#/components/schemas/Page'
    notes.list.response:
      title: notes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: a344c251-2494-0013-b433-ccee8e8435e5
              content:
                type: string
                example: new note content
              subject:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        $ref: '#/components/schemas/NoteSubjectTypes'
              added_at:
                type: string
                example: '2016-01-01T00:00:00+00:00'
          description: ''
    NoteSubjectTypesCreate:
      title: NoteSubjectTypes
      enum:
        - company
        - contact
        - creditNote
        - deal
        - invoice
        - meeting
        - nextgenProject
        - product
        - quotation
        - subscription
      type: string
    notes.create.request:
      title: notes.create.request
      required:
        - subject
        - content
      type: object
      properties:
        subject:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  $ref: '#/components/schemas/NoteSubjectTypesCreate'
        content:
          type: string
          example: new note content
        notify:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/TypeAndId'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    enum:
                      - user
                    type: string
                    example: user
          description: ''
    notes.create.response:
      title: notes.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    notes.update.request:
      title: notes.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 36386b05-936e-4cc0-9523-bd20d797ebf5
        content:
          type: string
          example: new note content
    notes.delete.request:
      title: notes.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 36386b05-936e-4cc0-9523-bd20d797ebf5
    EmailTrackingSubjectTypes:
      title: EmailTrackingSubjectTypes
      enum:
        - contact
        - company
        - deal
        - invoice
        - creditNote
        - subscription
        - product
        - quotation
        - nextgenProject
      type: string
    emailTracking.list.request:
      title: emailTracking.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          required:
            - subject
          properties:
            subject:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - required:
                    - type
                    - id
                  properties:
                    type:
                      $ref: '#/components/schemas/EmailTrackingSubjectTypes'
        page:
          $ref: '#/components/schemas/Page'
    emailTracking.list.response:
      title: emailTracking.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: a344c251-2494-0013-b433-ccee8e8435e5
              title:
                type: string
                example: an email subject
              content:
                type: string
                example: <p>the contents of the received email</p>
              subject:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - required:
                      - type
                      - id
                    properties:
                      type:
                        $ref: '#/components/schemas/EmailTrackingSubjectTypes'
              added_at:
                type: string
                example: '2016-01-01T00:00:00+00:00'
              attachments:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
          description: ''
    emailTracking.create.request:
      title: emailTracking.create.request
      required:
        - subject
        - content
      type: object
      properties:
        subject:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  $ref: '#/components/schemas/EmailTrackingSubjectTypes'
        title:
          type: string
          example: an email subject
        content:
          type: string
          example: <p>the contents of the received email</p>
        attachments:
          type: array
          items:
            type: string
          description: All files must have the same subject as the email tracking subject
    emailTracking.create.response:
      title: emailTracking.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    closingDays.list.request:
      title: closingDays.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            date_before:
              type: string
              description: Start of the period for which to return closing days. This includes closing days starting on the date provided.
              example: '2023-12-31'
            date_after:
              type: string
              description: End of the period for which to return closing days. This includes closing days ending on the date provided.
              example: '2023-12-01'
        page:
          $ref: '#/components/schemas/Page'
    closingDays.list.response:
      title: closingDays.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 05676ac4-c61d-42bf-a3ea-a420fc1ec017
              date:
                type: string
                example: '2023-12-21'
            description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    closingDays.add.request:
      title: closingDays.add.request
      required:
        - day
      type: object
      properties:
        day:
          type: string
          example: '2024-02-01'
    closingDays.add.response:
      title: closingDays.add.response
      type: object
      properties:
        data:
          type: object
          required:
            - id
          properties:
            type:
              type: string
              example: closingDay
            id:
              type: string
              example: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
    closingDays.delete.request:
      title: closingDays.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
    dayOffTypes.list.response:
      title: dayOffTypes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    DateValidity:
      title: DateValidity
      required:
        - from
        - unit
      type: object
      properties:
        from:
          type: string
          example: '2024-04-04'
        until:
          type: string
          example: '2025-05-05'
    dayOffTypes.create.request:
      title: dayOffTypes.create.request
      required:
        - name
      type: object
      properties:
        name:
          type: string
          example: day off type
        color:
          type: string
          nullable: true
          example: '#00B2B2'
        date_validity:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/DateValidity'
    dayOffTypes.create.response:
      title: dayOffTypes.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    dayOffTypes.update.request:
      title: dayOffTypes.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
        name:
          type: string
          example: day off type
        color:
          type: string
          example: '#00B2B2'
        date_validity:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/DateValidity'
    dayOffTypes.delete.request:
      title: dayOffTypes.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 1b7cece0-288c-0bbe-b916-5a315fbe9fe2
    daysOff.import.request:
      title: daysOff.import.request
      required:
        - user_id
        - leave_type_id
        - days
      type: object
      properties:
        user_id:
          type: string
          description: The id of the user that the days off belong to.
          example: f29abf48-337d-44b4-aad4-585f5277a456
        leave_type_id:
          type: string
          description: The id of the leave type that is associated with the given days off.
          example: 0f517e20-2e76-4684-8d6c-3334f6d7148c
        days:
          type: array
          items:
            oneOf:
              - type: object
                title: Timed day off
                required:
                  - starts_at
                  - ends_at
                properties:
                  starts_at:
                    type: string
                    format: date-time
                    example: '2024-02-01T08:00:00+00:00'
                  ends_at:
                    type: string
                    format: date-time
                    example: '2024-02-01T18:00:00+00:00'
              - type: object
                title: Full day off
                required:
                  - date
                properties:
                  date:
                    type: string
                    format: date
                    example: '2024-02-02'
                    description: Imports the day off as a full day. The user must have a working schedule on this date.
          description: At least one day must be present, and at most 100.
    daysOff.bulkDelete.request:
      title: daysOff.bulkDelete.request
      required:
        - user_id
      type: object
      properties:
        user_id:
          type: string
          description: The id of the user that the days off belong to.
          example: f29abf48-337d-44b4-aad4-585f5277a456
        ids:
          type: array
          items:
            type: string
          description: At least one day off id must be present.
    contacts.list.request:
      title: contacts.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            email:
              allOf:
                - $ref: '#/components/schemas/Email'
                - type: object
                  required:
                    - type
                    - email
                  properties:
                    type:
                      type: string
                      enum:
                        - primary
            ids:
              type: array
              items:
                type: string
              description: ''
            company_id:
              type: string
              nullable: true
              example: cb8da52a-ce89-4bf6-8f7e-8ee6cb85e3b5
              description: Filters on contacts linked to this company. To fetch the contacts that are linked to no company at all, provide `null`. A contact whose only linked company has been deleted is part of that set.
            term:
              type: string
              description: Filters on first_name, last_name, email and telephone
              example: James
            updated_since:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            tags:
              type: array
              items:
                type: string
              description: Filters on contacts coupled to all given tags
            status:
              type: string
              enum:
                - active
                - deactivated
              example: active
            marketing_mails_consent:
              type: boolean
              example: false
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - added_at
                      - name
                      - updated_at
          description: ''
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: custom_fields
    Gender:
      title: Gender
      type: string
      enum:
        - female
        - male
        - non_binary
        - prefers_not_to_say
        - unknown
      example: unknown
    PaymentTerm:
      title: PaymentTerm
      type: object
      properties:
        type:
          type: string
          enum:
            - cash
            - end_of_month
            - after_invoice_date
        days:
          type: number
          description: Modifier "X" for the above statements. Not required when type is 'cash'.
    InvoicingPreferences:
      title: InvoicingPreferences
      type: object
      properties:
        electronic_invoicing_address:
          type: string
          nullable: true
    CustomFieldsResponse:
      title: CustomFieldsResponse
      type: object
      properties:
        definition:
          type: object
          properties:
            type:
              type: string
              example: customFieldDefinition
            id:
              type: string
              example: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
        value:
          oneOf:
            - title: string
              description: For strings
              type: string
              example: '092980616'
            - title: numbers
              description: For integer, number, money and auto-increment fields
              type: number
              example: 123
            - title: multiple selection
              type: array
              items:
                description: For multiple selection fields
                type: string
                example: foo
            - title: boolean
              description: For Yes/No fields
              type: boolean
              example: true
            - title: object
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      description: For related Teamleader objects
                      type: string
                      enum:
                        - company
                        - contact
                        - product
                        - user
                      example: company
    contacts.list.response:
      title: contacts.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2a39e420-3ba3-4384-8024-fa702ef99c9f
              first_name:
                type: string
                example: Erlich
              last_name:
                type: string
                example: Bachman
              status:
                type: string
                enum:
                  - active
                  - deactivated
                example: active
              salutation:
                type: string
                example: Mr
              emails:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Email'
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - primary
                          example: primary
                description: ''
              telephones:
                type: array
                items:
                  $ref: '#/components/schemas/Telephone'
                description: ''
              website:
                type: string
                example: https://piedpiper.com
              primary_address:
                $ref: '#/components/schemas/AddressResponse'
              gender:
                type: string
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Gender'
              birthdate:
                type: string
                example: '1987-04-25'
              iban:
                type: string
                example: BE12123412341234
              bic:
                type: string
                example: BICBANK
              national_identification_number:
                type: string
                example: 86792345-L
              language:
                type: string
                example: en
              payment_term:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/PaymentTerm'
              invoicing_preferences:
                $ref: '#/components/schemas/InvoicingPreferences'
              tags:
                type: array
                items:
                  type: string
                description: ''
              added_at:
                type: string
                example: '2016-02-04T16:44:33+00:00'
              updated_at:
                type: string
                example: '2016-02-05T16:44:33+00:00'
              web_url:
                type: string
                example: https://focus.teamleader.eu/contact_detail.php?id=2a39e420-3ba3-4384-8024-fa702ef99c9f
              marketing_mails_consent:
                type: boolean
                example: false
              custom_fields:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldsResponse'
                description: Only included with request parameter `includes=custom_fields`
              price_list:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                    example: priceList
                  id:
                    type: string
                    example: 27261187-19c9-081f-b833-021fa5873129
                description: Only included when the account has access to price lists. `null` when no price list is set on the contact.
          description: ''
    contacts.info.request:
      title: contacts.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
    AddressesResponse:
      title: AddressesResponse
      type: object
      properties:
        type:
          type: string
          enum:
            - primary
            - invoicing
            - delivery
            - visiting
          example: invoicing
        address:
          allOf:
            - $ref: '#/components/schemas/AddressResponse'
            - type: object
              properties:
                addressee:
                  type: string
                  example: Teamleader HQ
    contacts.info.response:
      title: contacts.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: cde0bc5f-8602-4e12-b5d3-f03436b54c0d
            first_name:
              type: string
              example: Erlich
            last_name:
              type: string
              example: Bachman
            status:
              type: string
              enum:
                - active
              description: |-
                + Members
                  + `active`
                  + `deactivated`
              example: active
            salutation:
              type: string
              example: Mr
            vat_number:
              type: string
              nullable: true
              example: BE0899623034
            emails:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Email'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - primary
                        example: primary
              description: ''
            telephones:
              type: array
              items:
                $ref: '#/components/schemas/Telephone'
              description: ''
            website:
              type: string
              example: https://piedpiper.com
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/AddressesResponse'
              description: ''
            gender:
              type: string
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Gender'
            birthdate:
              type: string
              example: '1987-04-25'
            iban:
              type: string
              example: BE12123412341234
            bic:
              type: string
              example: BICBANK
            national_identification_number:
              type: string
              example: 00051730-A
            companies:
              type: array
              items:
                type: object
                properties:
                  position:
                    type: string
                    example: Developer
                  secondary_position:
                    type: string
                    example: Technical lead
                  division:
                    type: string
                    example: '''Engineering'''
                  decision_maker:
                    type: boolean
                    example: true
                  company:
                    $ref: '#/components/schemas/TypeAndId'
              description: ''
            language:
              type: string
              example: en
            payment_term:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/PaymentTerm'
            invoicing_preferences:
              $ref: '#/components/schemas/InvoicingPreferences'
            remarks:
              type: string
              description: This is the background information in Markdown
              example: First contact at expo
            tags:
              type: array
              items:
                type: string
              description: ''
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            marketing_mails_consent:
              type: boolean
              example: false
            added_at:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            updated_at:
              type: string
              example: '2016-02-05T16:44:33+00:00'
            web_url:
              type: string
              example: https://focus.teamleader.eu/contact_detail.php?id=cde0bc5f-8602-4e12-b5d3-f03436b54c0d
            price_list:
              type: object
              nullable: true
              properties:
                type:
                  type: string
                  example: priceList
                id:
                  type: string
                  example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              description: Only included when the account has access to price lists. `null` when no price list is set on the contact.
    AddressRequest:
      title: AddressRequest
      required:
        - line_1
        - postal_code
        - city
        - country
      type: object
      properties:
        line_1:
          type: string
          nullable: true
          example: Dok Noord 3A 101
        postal_code:
          type: string
          nullable: true
          example: '9000'
        city:
          type: string
          nullable: true
          example: Ghent
        country:
          type: string
          example: BE
        area_level_two_id:
          type: string
          example: db232cf8-ad4a-024b-941f-15a7a74f0fd2
    AddressesRequest:
      title: AddressesRequest
      type: object
      properties:
        type:
          type: string
          enum:
            - primary
            - invoicing
            - delivery
            - visiting
          example: invoicing
        address:
          allOf:
            - $ref: '#/components/schemas/AddressRequest'
            - type: object
              properties:
                addressee:
                  type: string
                  example: Teamleader HQ
    CustomFieldsRequest:
      title: CustomFieldsRequest
      type: object
      properties:
        id:
          type: string
          example: bf6765de-56eb-40ec-ad14-9096c5dc5fe1
        value:
          oneOf:
            - title: string
              description: For strings
              type: string
              example: '092980616'
            - title: number
              description: For integer, number, money and auto-increment fields
              type: number
              example: 123
            - title: multiple selection
              description: For multiple selection fields
              type: array
              items:
                type: string
            - title: boolean
              description: For Yes/No fields
              type: boolean
              example: true
            - title: object
              description: For related Teamleader objects
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - product
                        - user
                      example: company
    contacts.add.request:
      title: contacts.add.request
      required:
        - last_name
      type: object
      properties:
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Smith
        emails:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Email'
              - type: object
                required:
                  - type
                  - email
                properties:
                  type:
                    type: string
                    enum:
                      - primary
                    example: primary
          description: ''
        salutation:
          type: string
          example: Mr
        telephones:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Telephone'
              - type: object
                required:
                  - type
                  - number
          description: ''
        website:
          type: string
          example: http://example.com
        addresses:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AddressesRequest'
              - type: object
                required:
                  - type
                  - address
          description: ''
        language:
          type: string
          example: en
        gender:
          type: string
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Gender'
        birthdate:
          type: string
          example: '1989-08-19'
        iban:
          type: string
          example: BE12123412341234
        bic:
          type: string
          example: BICBANK
        national_identification_number:
          type: string
          example: 01234567-X
        remarks:
          type: string
          description: This is the background information in Markdown
          example: Met at expo
        tags:
          type: array
          items:
            type: string
          description: ''
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        marketing_mails_consent:
          type: boolean
          example: false
        price_list_id:
          type: string
          example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
    contacts.add.response:
      title: contacts.add.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    contacts.update.request:
      title: contacts.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
        first_name:
          type: string
          nullable: true
          example: John
        last_name:
          type: string
          example: Smith
        salutation:
          type: string
          nullable: true
          example: Mr
        emails:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Email'
              - type: object
                required:
                  - type
                  - email
                properties:
                  type:
                    type: string
                    enum:
                      - primary
                    example: primary
                  email:
                    type: string
                    nullable: true
                    example: info@piedpiper.eu
          description: ''
        telephones:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Telephone'
              - type: object
                required:
                  - type
                  - number
          description: ''
          nullable: true
        website:
          type: string
          nullable: true
          example: http://example.com
        addresses:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AddressesRequest'
              - type: object
                required:
                  - type
                  - address
          description: ''
        language:
          type: string
          example: en
        gender:
          type: string
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Gender'
        birthdate:
          type: string
          nullable: true
          example: '1989-08-19'
        iban:
          type: string
          nullable: true
          example: BE12123412341234
        bic:
          type: string
          nullable: true
          example: BICBANK
        national_identification_number:
          type: string
          example: 19346758-T
        remarks:
          type: string
          description: This is the background information in Markdown
          nullable: true
          example: Met at expo
        tags:
          type: array
          items:
            type: string
          description: This will overwrite existing tags
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        marketing_mails_consent:
          type: boolean
          example: false
        price_list_id:
          type: string
          description: Pass `null` to remove the price list from the contact
          nullable: true
          example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
    contacts.delete.request:
      title: contacts.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
    contacts.tag.request:
      title: contacts.tag.request
      required:
        - id
        - tags
      type: object
      properties:
        id:
          type: string
          example: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
        tags:
          type: array
          items:
            type: string
          description: ''
    contacts.untag.request:
      title: contacts.untag.request
      required:
        - id
        - tags
      type: object
      properties:
        id:
          type: string
          example: 518d2e5e-99bc-4c66-8509-78e6820a1418
        tags:
          type: array
          items:
            type: string
          description: ''
    contacts.linkToCompany.request:
      title: contacts.linkToCompany.request
      required:
        - id
        - company_id
      type: object
      properties:
        id:
          type: string
          example: 75596038-b9c8-4a37-969d-61059e300a28
        company_id:
          type: string
          example: 4da20f00-0628-4336-b885-aa90e580dd85
        position:
          type: string
          example: CEO
        decision_maker:
          type: boolean
          example: true
    contacts.unlinkFromCompany.request:
      title: contacts.unlinkFromCompany.request
      required:
        - id
        - company_id
      type: object
      properties:
        id:
          type: string
          example: b4b3160a-b55e-4033-bdae-25b6d22949b4
        company_id:
          type: string
          example: 3f1c8650-4292-4187-bb02-4aa00bbe9632
    contacts.updateCompanyLink.request:
      title: contacts.updateCompanyLink.request
      required:
        - id
        - company_id
      type: object
      properties:
        id:
          type: string
          example: 75596038-b9c8-4a37-969d-61059e300a28
        company_id:
          type: string
          example: 4da20f00-0628-4336-b885-aa90e580dd85
        position:
          type: string
          example: CEO
        decision_maker:
          type: boolean
          example: true
    contacts.uploadAvatar.request:
      title: contacts.uploadAvatar.request
      required:
        - id
        - image
      type: object
      properties:
        id:
          type: string
          example: 76c9d03c-ec5c-4b21-9fc6-7ffee488b12d
        image:
          type: string
          nullable: true
          example: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
          description: Use `null` to remove the avatar
    companies.list.request:
      title: companies.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            email:
              allOf:
                - $ref: '#/components/schemas/Email'
                - type: object
                  required:
                    - type
                    - email
                  properties:
                    type:
                      type: string
                      enum:
                        - primary
                      example: user
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on name, vat number, emails and telephones
              example: Acme
            updated_since:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            tags:
              type: array
              items:
                type: string
              description: Filters on tag names
            vat_number:
              type: string
              example: BE 0899.623.035
            national_identification_number:
              type: string
              example: '63326426'
            status:
              type: string
              enum:
                - active
                - deactivated
              example: active
            marketing_mails_consent:
              type: boolean
              example: false
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - name
                      - added_at
                      - updated_at
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: custom_fields
    CompanyTelephone:
      title: CompanyTelephone
      required:
        - type
        - number
      type: object
      properties:
        type:
          type: string
          enum:
            - phone
            - fax
          example: phone
        number:
          type: string
          example: '092980615'
    companies.list.response:
      title: companies.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 96a38bbf-24ed-4083-8a5c-20db92aa471e
              name:
                type: string
                example: Pied Piper
              status:
                type: string
                enum:
                  - active
                  - deactivated
                example: active
              business_type:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: businessType
              vat_number:
                type: string
                example: BE0899623035
              national_identification_number:
                type: string
                example: '63326426'
              emails:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Email'
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - primary
                            - invoicing
                          example: primary
                description: ''
              telephones:
                type: array
                items:
                  $ref: '#/components/schemas/CompanyTelephone'
                description: ''
              website:
                type: string
                example: https://piedpiper.com
              primary_address:
                $ref: '#/components/schemas/AddressResponse'
              iban:
                type: string
                example: BE12123412341234
              bic:
                type: string
                example: BICBANK
              language:
                type: string
                example: nl
              preferred_currency:
                type: string
                nullable: true
                example: EUR
              payment_term:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/PaymentTerm'
              invoicing_preferences:
                $ref: '#/components/schemas/InvoicingPreferences'
              responsible_user:
                $ref: '#/components/schemas/TypeAndId'
              added_at:
                type: string
                example: '2016-02-04T16:44:33+00:00'
              updated_at:
                type: string
                example: '2016-02-05T16:44:33+00:00'
              web_url:
                type: string
                example: https://focus.teamleader.eu/company_detail.php?id=96a38bbf-24ed-4083-8a5c-20db92aa471e
              tags:
                type: array
                items:
                  type: string
                description: ''
              marketing_mails_consent:
                type: boolean
                example: false
              custom_fields:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldsResponse'
                description: Only included with request parameter `includes=custom_fields`
              price_list:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                    example: priceList
                  id:
                    type: string
                    example: 27261187-19c9-081f-b833-021fa5873129
                description: Only included when the account has access to price lists. `null` when no price list is set on the company.
          description: ''
    companies.info.request:
      title: companies.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
        includes:
          type: string
          description: when used, the response will include `related_companies` and/or `related_contacts`
          example: related_companies,related_contacts
    RelatedContacts:
      title: RelatedContacts
      type: object
      properties:
        type:
          type: string
          example: contact
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        position:
          type: string
          nullable: true
          example: Developer
        secondary_position:
          type: string
          nullable: true
          example: Technical lead
        division:
          type: string
          nullable: true
          example: Engineering
        is_decision_maker:
          type: boolean
          example: false
    companies.info.response:
      title: companies.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
            name:
              type: string
              example: Pied Piper
            status:
              type: string
              enum:
                - active
                - deactivated
              description: |-
                + Members
                  + `active`
                  + `deactivated`
              example: active
            business_type:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: businessType
            vat_number:
              type: string
              example: BE0899623035
            national_identification_number:
              type: string
              example: '63326426'
            emails:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Email'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - primary
                          - invoicing
                        example: primary
              description: ''
            telephones:
              type: array
              items:
                $ref: '#/components/schemas/CompanyTelephone'
              description: ''
            website:
              type: string
              example: https://piedpiper.com
            addresses:
              type: array
              items:
                $ref: '#/components/schemas/AddressesResponse'
              description: ''
            iban:
              type: string
              example: BE12123412341234
            bic:
              type: string
              example: BICBANK
            language:
              type: string
              example: nl
            preferred_currency:
              type: string
              nullable: true
              example: EUR
            payment_term:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/PaymentTerm'
            invoicing_preferences:
              $ref: '#/components/schemas/InvoicingPreferences'
            responsible_user:
              $ref: '#/components/schemas/TypeAndId'
            remarks:
              type: string
              description: This is the background information in Markdown
              example: First contact at expo
            added_at:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            updated_at:
              type: string
              example: '2016-02-05T16:44:33+00:00'
            web_url:
              type: string
              example: https://focus.teamleader.eu/company_detail.php?id=e8d31ae7-8258-4fcd-9b2d-78f41b0aa5d5
            tags:
              type: array
              items:
                type: string
              description: ''
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            marketing_mails_consent:
              type: boolean
              example: false
            related_companies:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: Only included with request parameter `includes=related_companies`
            related_contacts:
              type: array
              items:
                $ref: '#/components/schemas/RelatedContacts'
              description: Only included with request parameter `includes=related_contacts`
            price_list:
              type: object
              nullable: true
              properties:
                type:
                  type: string
                  example: priceList
                id:
                  type: string
                  example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
              description: Only included when the account has access to price lists. `null` when no price list is set on the company.
    companies.add.request:
      title: companies.add.request
      required:
        - name
      type: object
      properties:
        name:
          type: string
          example: Pied Piper
        business_type_id:
          type: string
          example: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
        vat_number:
          type: string
          example: BE0899623035
        national_identification_number:
          type: string
          example: '63326426'
        emails:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Email'
              - type: object
                required:
                  - type
                  - email
                properties:
                  type:
                    type: string
                    enum:
                      - primary
                      - invoicing
                    example: primary
          description: ''
        telephones:
          type: array
          items:
            $ref: '#/components/schemas/CompanyTelephone'
          description: ''
        website:
          type: string
          example: http://example.com
        addresses:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AddressesRequest'
              - type: object
                required:
                  - type
                  - address
          description: ''
        iban:
          type: string
          example: BE12123412341234
        bic:
          type: string
          example: BICBANK
        language:
          type: string
          example: en
        responsible_user_id:
          type: string
          example: 2b12bd5d-d2d9-43ac-8755-36a1e00bd67f
        remarks:
          type: string
          description: This is the background information in Markdown
          example: Met at expo
        tags:
          type: array
          items:
            type: string
          description: ''
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        marketing_mails_consent:
          type: boolean
          example: false
        preferred_currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
            - example: EUR
              type: string
        price_list_id:
          type: string
          example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
    companies.add.response:
      title: companies.add.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    companies.update.request:
      title: companies.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4784189d-610b-4488-b3a5-5f324f752417
        name:
          type: string
          example: Pied Piper
        business_type_id:
          type: string
          nullable: true
          example: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
        vat_number:
          type: string
          nullable: true
          example: BE0899623035
        national_identification_number:
          type: string
          nullable: true
          example: '63326426'
        emails:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Email'
              - type: object
                required:
                  - type
                  - email
                properties:
                  type:
                    type: string
                    enum:
                      - primary
                      - invoicing
                    example: primary
          description: ''
        telephones:
          type: array
          items:
            $ref: '#/components/schemas/CompanyTelephone'
          description: ''
        website:
          type: string
          example: http://example.com
        addresses:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AddressesRequest'
              - type: object
                required:
                  - type
                  - address
          description: ''
        iban:
          type: string
          nullable: true
          example: BE12123412341234
        bic:
          type: string
          nullable: true
          example: BICBANK
        language:
          type: string
          nullable: true
          example: en
        responsible_user_id:
          type: string
          nullable: true
          example: 0ea94804-401d-4dbd-a577-c2d60998f798
        remarks:
          type: string
          description: This is the background information in Markdown
          nullable: true
          example: Met at expo
        tags:
          type: array
          items:
            type: string
          description: This will overwrite existing tags
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        marketing_mails_consent:
          type: boolean
          example: false
        preferred_currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
            - example: EUR
              nullable: true
              type: string
        price_list_id:
          type: string
          example: 5a37d173-78d3-05f3-b018-d51fadc1c5d2
    companies.uploadLogo.request:
      title: companies.uploadLogo.request
      required:
        - id
        - image
      type: object
      properties:
        id:
          type: string
          example: 4784189d-610b-4488-b3a5-5f324f752417
        image:
          type: string
          nullable: true
          example: data:image/png;base64,0tyZUP4y8ObjsqZnRFhHANZY+Kc=
          description: Use `null` to remove the logo
    companies.delete.request:
      title: companies.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f3d67f3e-b8a9-45e8-99b1-17a3b14de8a6
    companies.tag.request:
      title: companies.tag.request
      required:
        - id
        - tags
      type: object
      properties:
        id:
          type: string
          example: cadd94ba-a41e-4eb4-a46e-39a7f6f96070
        tags:
          type: array
          items:
            type: string
          description: ''
    companies.untag.request:
      title: companies.untag.request
      required:
        - id
        - tags
      type: object
      properties:
        id:
          type: string
          example: 518d2e5e-99bc-4c66-8509-78e6820a1418
        tags:
          type: array
          items:
            type: string
          description: ''
    businessTypes.list.request:
      title: businessTypes.list.request
      type: object
      properties:
        country:
          type: string
          example: BE
    businessTypes.list.response:
      title: businessTypes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
              name:
                type: string
                example: VZW/ASBL
              country:
                type: string
                example: BE
          description: ''
    tags.list.request:
      title: tags.list.request
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - tag
                    default: tag
                  order:
                    type: string
                    enum:
                      - asc
                    default: asc
          description: ''
    tags.list.response:
      title: tags.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              tag:
                type: string
                example: campaign
            description: ''
    levelTwoAreas.list.request:
      title: levelTwoAreas.list.request
      required:
        - country
      type: object
      properties:
        country:
          type: string
          example: BE
        language:
          type: string
          description: if not passed, the name is returned in the primary language of the country
          example: nl
    levelTwoAreas.list.response:
      title: levelTwoAreas.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: fd48d4a3-b9dc-4eac-8071-5889c9f21e5d
              name:
                type: string
                example: VZW/ASBL
              country:
                type: string
                example: BE
            description: ''
    Customer:
      title: Customer
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - contact
            - company
          example: contact
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
    deals.list.request:
      title: deals.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on the title, reference and customer's name
              example: Interesting deal
            customer:
              $ref: '#/components/schemas/Customer'
            phase_id:
              type: string
              example: 1758e847-cc1f-04ce-bd17-5a852e8c01b4
            estimated_closing_date:
              type: string
              nullable: true
              example: '2018-02-11'
            estimated_closing_date_from:
              type: string
              description: This date is inclusive
              example: '2020-01-01'
            estimated_closing_date_until:
              type: string
              description: This date is inclusive
              example: '2020-01-31'
            responsible_user_id:
              oneOf:
                - type: string
                  title: String format
                  example: 98b2863e-7b01-4232-82f5-ede1f0b9db22
                - type: array
                  title: Array of strings format
                  items:
                    type: string
                    example:
                      - 98b2863e-7b01-4232-82f5-ede1f0b9db22
                      - 98b2863e-7b01-4232-82f5-ede1f0b9db24
            updated_since:
              type: string
              description: This is the last activity of the deal - this date is inclusive
              example: '2018-02-11T16:45:30+00:00'
            created_before:
              type: string
              description: This date is inclusive
              example: '2018-02-11T16:45:30+00:00'
            status:
              type: array
              items:
                type: string
                enum:
                  - open
                  - won
                  - lost
              example:
                - won
              description: ''
            pipeline_ids:
              type: array
              items:
                type: string
              description: an array of pipeline ids
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    default: created_at
                    enum:
                      - created_at
                      - weighted_value
                  order:
                    allOf:
                      - $ref: '#/components/schemas/Order'
                      - default: desc
          description: ''
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: custom_fields,second_responsible_user
    LeadResponse:
      title: LeadResponse
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        contact_person:
          $ref: '#/components/schemas/TypeAndId'
    LostReason:
      title: lost_reason
      type: object
      properties:
        reason:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        remark:
          type: string
          nullable: true
          example: Too expensive
    CurrencyExchangeRate:
      title: CurrencyExchangeRate
      type: object
      properties:
        from:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
            - example: USD
        to:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
            - example: EUR
        rate:
          type: number
          example: 1.1234
    deals.list.response:
      title: deals.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 6e7fe84d-d4b3-4723-abae-9bc082d8f65a
              title:
                type: string
                example: Interesting deal
              summary:
                type: string
                description: This is the remarks field
                nullable: true
                example: Additional information
              reference:
                type: string
                example: 2017/2
              status:
                type: string
                enum:
                  - new
                  - open
                  - won
                  - lost
                example: won
              lead:
                $ref: '#/components/schemas/LeadResponse'
              department:
                $ref: '#/components/schemas/TypeAndId'
              estimated_value:
                $ref: '#/components/schemas/Money'
              estimated_closing_date:
                type: string
                example: '2017-05-09'
              estimated_probability:
                type: number
                example: 0.5
              weighted_value:
                $ref: '#/components/schemas/Money'
              purchase_order_number:
                type: string
                nullable: true
                example: '000023'
              current_phase:
                $ref: '#/components/schemas/TypeAndId'
              responsible_user:
                $ref: '#/components/schemas/TypeAndId'
              second_responsible_user:
                type: object
                nullable: true
                description: Only included with request parameter `includes=second_responsible_user`. This requires the second deal responsible feature to be enabled. Contact support.focus@teamleader.eu to enable it
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              closed_at:
                type: string
                example: '2017-05-09T11:31:30+00:00'
              source:
                $ref: '#/components/schemas/TypeAndId'
              lost_reason:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/LostReason'
              created_at:
                type: string
                example: '2017-05-09T11:25:11+00:00'
              updated_at:
                type: string
                example: '2017-05-09T11:30:58+00:00'
              web_url:
                type: string
                example: https://focus.teamleader.eu/sale_detail.php?id=6e7fe84d-d4b3-4723-abae-9bc082d8f65a
              custom_fields:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldsResponse'
                description: Only included with request parameter `includes=custom_fields`
              currency_exchange_rate:
                $ref: '#/components/schemas/CurrencyExchangeRate'
              pipeline:
                type: object
                properties:
                  type:
                    type: string
                    example: dealPipeline
                  id:
                    type: string
                    example: 4e81f3c4-7dca-44cb-b126-6158bec392a2
          description: ''
    deals.info.request:
      title: deals.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f6871b06-6513-4750-b5e6-ff3503b5a029
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: second_responsible_user
    deals.info.response:
      title: deals.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: f6871b06-6513-4750-b5e6-ff3503b5a029
            title:
              type: string
              example: Interesting deal
            summary:
              type: string
              description: This is the remarks field
              nullable: true
              example: Additional information
            reference:
              type: string
              example: 2017/2
            status:
              type: string
              enum:
                - open
                - won
                - lost
              example: won
            lead:
              $ref: '#/components/schemas/LeadResponse'
            department:
              $ref: '#/components/schemas/TypeAndId'
            estimated_value:
              $ref: '#/components/schemas/Money'
            estimated_closing_date:
              type: string
              example: '2017-05-09'
            estimated_probability:
              type: number
              example: 0.5
            weighted_value:
              $ref: '#/components/schemas/Money'
            purchase_order_number:
              type: string
              nullable: true
              example: '000023'
            current_phase:
              $ref: '#/components/schemas/TypeAndId'
            responsible_user:
              $ref: '#/components/schemas/TypeAndId'
            second_responsible_user:
              type: object
              nullable: true
              description: Only included with request parameter `includes=second_responsible_user`. This requires the second deal responsible feature to be enabled. Contact support.focus@teamleader.eu to enable it
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            closed_at:
              type: string
              example: '2017-05-09T11:31:30+00:00'
            source:
              $ref: '#/components/schemas/TypeAndId'
            phase_history:
              type: array
              items:
                type: object
                properties:
                  phase:
                    $ref: '#/components/schemas/TypeAndId'
                  started_at:
                    type: string
                    example: '2017-05-01 12:00:00'
                  started_by:
                    $ref: '#/components/schemas/TypeAndId'
              description: ''
            quotations:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            lost_reason:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/LostReason'
            created_at:
              type: string
              example: '2017-05-09T11:25:11+00:00'
            updated_at:
              type: string
              example: '2017-05-09T11:30:58+00:00'
            web_url:
              type: string
              example: https://focus.teamleader.eu/sale_detail.php?id=f6871b06-6513-4750-b5e6-ff3503b5a029
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            currency_exchange_rate:
              $ref: '#/components/schemas/CurrencyExchangeRate'
            pipeline:
              type: object
              properties:
                type:
                  type: string
                  example: dealPipeline
                id:
                  type: string
                  example: 4e81f3c4-7dca-44cb-b126-6158bec392a2
    LeadRequest:
      title: LeadRequest
      required:
        - customer
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        contact_person_id:
          type: string
          example: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
    CurrencyWithRequiredExchangeRate:
      title: CurrencyWithRequiredExchangeRate
      required:
        - code
        - exchange_rate
      type: object
      properties:
        code:
          $ref: '#/components/schemas/CurrencyCode'
        exchange_rate:
          type: number
          example: 1.1238
    deals.create.request:
      title: deals.create.request
      required:
        - lead
        - title
      type: object
      properties:
        lead:
          $ref: '#/components/schemas/LeadRequest'
        title:
          type: string
          example: Interesting business deal
        summary:
          type: string
          description: This is the remarks field
          example: Additional information
        source_id:
          type: string
          example: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
        department_id:
          type: string
          example: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
        responsible_user_id:
          type: string
          example: 98b2863e-7b01-4232-82f5-ede1f0b9db22
        second_responsible_user_id:
          type: string
          nullable: true
          description: This requires the second deal responsible feature to be enabled. Contact support.focus@teamleader.eu to enable it
          example: 656a9c04-de65-01f9-9610-3ac636738e91
        phase_id:
          type: string
          example: 060687bb-a742-4882-a538-199a5e5feb60
        estimated_value:
          type: object
          nullable: true
          description: The amount may be negative.
          allOf:
            - $ref: '#/components/schemas/Money'
        estimated_probability:
          type: number
          description: A number between 0 and 1 (inclusive)
          example: 0.75
        estimated_closing_date:
          type: string
          example: '2017-05-09'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        currency:
          $ref: '#/components/schemas/CurrencyWithRequiredExchangeRate'
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
    deals.create.response:
      title: deals.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    deals.update.request:
      title: deals.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 65a35860-dcca-4850-9fd6-47ff08469e0c
        lead:
          $ref: '#/components/schemas/LeadRequest'
        title:
          type: string
          example: Interesting business deal
        summary:
          type: string
          description: This is the remarks field
          nullable: true
          example: Additional information
        source_id:
          type: string
          nullable: true
          example: b38ebb9b-6e46-4bf4-a1e2-af747d6b64ae
        department_id:
          type: string
          nullable: true
          example: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
        responsible_user_id:
          type: string
          nullable: true
          example: 98b2863e-7b01-4232-82f5-ede1f0b9db22
        second_responsible_user_id:
          type: string
          nullable: true
          description: This requires the second deal responsible feature to be enabled. Contact support.focus@teamleader.eu to enable it. `null` clears it
          example: 656a9c04-de65-01f9-9610-3ac636738e91
        estimated_value:
          type: object
          nullable: true
          description: The amount may be negative.
          allOf:
            - $ref: '#/components/schemas/Money'
        estimated_probability:
          type: number
          description: A number between 0 and 1 (inclusive)
          nullable: true
          example: 0.75
        estimated_closing_date:
          type: string
          nullable: true
          example: '2017-05-09'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        currency:
          $ref: '#/components/schemas/CurrencyWithRequiredExchangeRate'
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
    deals.move.request:
      title: deals.move.request
      required:
        - id
        - phase_id
      type: object
      properties:
        id:
          type: string
          example: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
        phase_id:
          type: string
          example: 8776abee-d856-43c6-b98d-9ffc912e8b0b
    deals.win.request:
      title: deals.win.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e88131bf-50c4-49d3-8ae3-47e5d9626bf6
    deals.lose.request:
      title: deals.lose.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 460df7b2-fe82-4c6c-b215-6d0a1bd3c742
        reason_id:
          type: string
          example: da4c902f-2ae5-4c1f-be6f-b50308aabc5c
        extra_info:
          type: string
          example: Not ready for a change, decision postponed
    deals.delete.request:
      title: deals.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
    lostReasons.list.request:
      title: lostReasons.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - name
                    default: name
                  order:
                    type: string
                    enum:
                      - asc
                    default: asc
          description: ''
    lostReasons.list.response:
      title: lostReasons.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    dealPipelines.list.request:
      title: dealPipelines.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            status:
              type: array
              items:
                type: string
                enum:
                  - open
                  - pending_deletion
            term:
              type: string
              description: Searches in the pipeline name only
              example: Sales
        page:
          $ref: '#/components/schemas/Page'
    dealPipelines.list.response:
      title: dealPipelines.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - properties:
                default:
                  type: string
                  example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
                matches:
                  type: number
                  description: Only included with request parameter `includes=pagination`
    dealPipelines.create.request:
      title: dealPipelines.create.request
      required:
        - name
      type: object
      properties:
        name:
          type: string
          example: Primary Pipeline
    dealPipelines.create.response:
      title: dealPipelines.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    dealPipelines.update.request:
      title: dealPipelines.update.request
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          example: 254dc5ee-f8de-0791-9e31-a4f7817e64d2
        name:
          type: string
          example: Main Pipeline
    dealPipelines.markAsDefault.request:
      title: dealPipelines.markAsDefault.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
    dealPipelines.duplicate.request:
      title: dealPipelines.duplicate.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Id from source pipeline
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
    dealPipelines.duplicate.response:
      title: dealPipelines.duplicate.response
      type: object
      properties:
        data:
          type: object
          required:
            - id
          properties:
            type:
              type: string
              example: closingDay
            id:
              type: string
              example: eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8
    dealPipelines.delete.request:
      title: dealPipelines.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        migrate_phases:
          type: array
          items:
            type: object
            required:
              - old_phase_id
              - new_phase_id
            properties:
              old_phase_id:
                type: string
                example: 57785244-0d45-0f01-9c18-5ce1cb68e4c1
              new_phase_id:
                type: string
                example: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
          description: Array of phase ids to migrate deals to
    dealPhases.list.request:
      title: dealPhases.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            deal_pipeline_id:
              type: string
              example: 53a7e592-a136-4bae-ae15-517befd3d75d
        page:
          $ref: '#/components/schemas/Page'
    RequiresAttentionAfter:
      title: RequiresAttentionAfter
      type: object
      properties:
        amount:
          type: number
          example: 7
        unit:
          type: string
          enum:
            - days
            - weeks
          example: days
      description: Time period in this phase after which a deal requires attention
    dealPhases.list.response:
      title: dealPhases.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 21efc56e-1ba8-469d-926a-e89502591b47
              name:
                type: string
                example: New
              actions:
                type: array
                items:
                  type: string
                  enum:
                    - create_event
                    - create_call
                    - create_task
                description: Only returned when user has access to planning and deal automation
              requires_attention_after:
                allOf:
                  - $ref: '#/components/schemas/RequiresAttentionAfter'
                  - description: Time period in this phase after which a deal requires attention
              probability:
                type: number
                example: 0.75
          description: ''
    FollowUpActions:
      title: FollowUpActions
      enum:
        - create_event
        - create_call
        - create_task
      type: string
    dealPhases.create.request:
      title: dealPhases.create.request
      required:
        - name
        - deal_pipeline_id
        - requires_attention_after
      type: object
      properties:
        name:
          type: string
          example: Investigation
        deal_pipeline_id:
          type: string
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        requires_attention_after:
          allOf:
            - $ref: '#/components/schemas/RequiresAttentionAfter'
            - description: Time period after which a deal requires attention
              required:
                - amount
                - unit
        estimated_probability:
          type: number
          example: 0.5
        follow_up_actions:
          type: array
          items:
            $ref: '#/components/schemas/FollowUpActions'
          description: ''
    dealPhases.create.response:
      title: dealPhases.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    dealPhases.update.request:
      title: dealPhases.update.request
      required:
        - id
        - requires_attention_after
      type: object
      properties:
        id:
          type: string
          example: 22364cbf-971e-022c-811b-a76c28000257
        name:
          type: string
          example: Preparation
        requires_attention_after:
          allOf:
            - $ref: '#/components/schemas/RequiresAttentionAfter'
            - description: Time period after which a deal requires attention
              required:
                - amount
                - unit
        estimated_probability:
          type: number
          example: 0.8
        follow_up_actions:
          type: array
          items:
            $ref: '#/components/schemas/FollowUpActions'
          description: ''
    dealPhases.move.request:
      title: dealPhases.move.request
      required:
        - id
        - after_phase_id
      type: object
      properties:
        id:
          type: string
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        after_phase_id:
          type: string
          example: 22364cbf-971e-022c-811b-a76c28000257
    dealPhases.delete.request:
      title: dealPhases.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f350e48a-fbc3-0a79-e62a-53aa1ae86d44
        new_phase_id:
          type: string
          description: Phase to migrate deals to
          example: 29648aea-52f9-09f7-8e1e-cc5c08b4c742
    dealSources.list.request:
      title: dealSources.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            term:
              type: string
              description: Searches in the deal source name only
              example: Website
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    default: name
                  order:
                    type: string
                    enum:
                      - asc
                    default: asc
    dealSources.list.response:
      title: dealSources.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    quotations.list.request:
      title: quotations.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
    Taxes:
      title: Taxes
      type: object
      properties:
        rate:
          type: number
          example: 0.21
        taxable:
          $ref: '#/components/schemas/Money'
        tax:
          $ref: '#/components/schemas/Money'
    Expiry:
      title: Expiry
      type: object
      properties:
        expires_after:
          type: string
          example: '2023-04-05'
        action_after_expiry:
          type: string
          enum:
            - lock
            - none
      description: returned if user has access to quotation expiry and `includes=expiry` is requested
    quotations.list.response:
      title: quotations.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 5b16f6ee-e302-0079-901b-50c26c4a55b1
              deal:
                $ref: '#/components/schemas/TypeAndId'
              currency_exchange_rate:
                $ref: '#/components/schemas/CurrencyExchangeRate'
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
                    description: ''
                  purchase_price:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Money'
              created_at:
                type: string
                nullable: true
                example: '2017-05-09T11:25:11+00:00'
              updated_at:
                type: string
                nullable: true
                example: '2017-05-09T11:30:58+00:00'
              status:
                type: string
                enum:
                  - open
                  - accepted
                  - refused
                  - expired
                example: open
              name:
                type: string
                example: Webdevelopment
              expiry:
                allOf:
                  - $ref: '#/components/schemas/Expiry'
                  - description: returned if user has access to quotation expiry and `includes=expiry` is requested
          description: ''
    quotations.info.request:
      title: quotations.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e7a3fe2b-2c75-480f-87b9-121816b5257b
    Discount:
      title: Discount
      type: object
      properties:
        value:
          type: number
          example: 10
        type:
          type: string
          description: Values between 0 and 100
          enum:
            - percentage
          example: percentage
    LineItemResponse:
      title: LineItemResponse
      type: object
      properties:
        product:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        quantity:
          type: number
          example: 3
        description:
          type: string
          example: An awesome product
        extended_description:
          type: string
          description: Uses Markdown formatting
          nullable: true
          example: Some more information about this awesome product
        unit:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        unit_price:
          type: object
        tax:
          $ref: '#/components/schemas/TypeAndId'
        discount:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Discount'
        total:
          type: object
          properties:
            tax_exclusive:
              $ref: '#/components/schemas/Money'
            tax_exclusive_before_discount:
              $ref: '#/components/schemas/Money'
            tax_inclusive:
              $ref: '#/components/schemas/Money'
            tax_inclusive_before_discount:
              $ref: '#/components/schemas/Money'
    MoneyWithTax:
      title: MoneyWithTax
      allOf:
        - $ref: '#/components/schemas/Money'
        - type: object
      properties:
        tax:
          type: string
          enum:
            - excluding
          example: excluding
    Periodicity:
      title: Periodicity
      oneOf:
        - type: object
          title: By Week
          properties:
            unit:
              type: string
              enum:
                - week
              example: week
            period:
              type: number
              enum:
                - 1
                - 2
              example: 2
          required:
            - unit
            - period
        - type: object
          title: By Month
          properties:
            unit:
              type: string
              enum:
                - month
              example: month
            period:
              type: number
              enum:
                - 1
                - 2
                - 3
                - 4
                - 6
              example: 4
          required:
            - unit
            - period
        - type: object
          title: By Year
          properties:
            unit:
              type: string
              enum:
                - year
              example: year
            period:
              type: number
              enum:
                - 1
                - 2
                - 3
                - 4
                - 5
                - 6
                - 7
                - 8
                - 9
                - 10
              example: 7
          required:
            - unit
            - period
    QuotationsGroupedLinesResponse:
      title: QuotationsGroupedLinesResponse
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemResponse'
              - type: object
                properties:
                  extended_description:
                    type: string
                    nullable: false
                  unit_price:
                    allOf:
                      - $ref: '#/components/schemas/MoneyWithTax'
                      - type: object
                  purchase_price:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Money'
                  periodicity:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Periodicity'
    CommercialDiscount:
      title: CommercialDiscount
      type: object
      properties:
        type:
          type: string
          description: Values between 0 and 100
          enum:
            - percentage
          example: percentage
        value:
          type: number
          example: 15.5
        description:
          type: string
          example: winter promotion
    quotations.info.response:
      title: quotations.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: e7a3fe2b-2c75-480f-87b9-121816b5257b
            deal:
              $ref: '#/components/schemas/TypeAndId'
            grouped_lines:
              type: array
              items:
                $ref: '#/components/schemas/QuotationsGroupedLinesResponse'
              description: ''
            currency:
              type: string
              example: USD
            currency_exchange_rate:
              $ref: '#/components/schemas/CurrencyExchangeRate'
            text:
              type: string
              description: Uses Markdown formatting
              example: Quotation text
            total:
              type: object
              properties:
                tax_exclusive:
                  $ref: '#/components/schemas/Money'
                tax_inclusive:
                  $ref: '#/components/schemas/Money'
                taxes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Taxes'
                  description: ''
                purchase_price:
                  type: object
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/Money'
            discounts:
              type: array
              items:
                $ref: '#/components/schemas/CommercialDiscount'
              description: ''
            created_at:
              type: string
              nullable: true
              example: '2017-05-09T11:25:11+00:00'
            updated_at:
              type: string
              nullable: true
              example: '2017-05-09T11:30:58+00:00'
            status:
              type: string
              enum:
                - open
                - accepted
                - refused
                - expired
              example: open
            name:
              type: string
              example: Webdevelopment
            document_template:
              $ref: '#/components/schemas/TypeAndId'
            expiry:
              allOf:
                - $ref: '#/components/schemas/Expiry'
                - description: returned if user has access to quotation expiry and `includes=expiry` is requested
    quotations.download.request:
      title: quotations.download.request
      required:
        - id
        - format
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        format:
          enum:
            - pdf
          type: string
          example: pdf
    Download:
      title: Download
      type: object
      properties:
        location:
          type: string
          description: A temporary url where the requested file can be downloaded
          example: https://cdn.teamleader.eu/file
        expires:
          type: string
          description: Expiration time of the temporary download link
          example: '2018-02-05T16:44:33+00:00'
    quotations.download.response:
      title: quotations.download.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Download'
    AmountWithTax:
      title: AmountWithTax
      required:
        - amount
        - tax
      type: object
      properties:
        amount:
          type: number
          example: 123.3
        tax:
          type: string
          enum:
            - excluding
          example: excluding
    LineItemRequest:
      title: LineItemRequest
      required:
        - quantity
        - description
        - tax_rate_id
      type: object
      properties:
        quantity:
          type: number
          example: 3
        description:
          type: string
          example: An awesome product
        extended_description:
          type: string
          description: Uses Markdown formatting
          nullable: true
          example: Some more information about this awesome product
        unit_of_measure_id:
          type: string
          nullable: true
          example: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
        unit_price:
          $ref: '#/components/schemas/AmountWithTax'
        tax_rate_id:
          type: string
          example: c0c03f1e-77e3-402c-a713-30ea1c585823
        discount:
          allOf:
            - $ref: '#/components/schemas/Discount'
            - type: object
              required:
                - type
                - value
        product_id:
          type: string
          example: d905ff57-e866-0f59-9d1e-1fd4538bfae1
    QuotationsGroupedLinesRequest:
      title: QuotationsGroupedLinesRequest
      required:
        - line_items
      type: object
      properties:
        section:
          type: object
          required:
            - title
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemRequest'
              - type: object
                required:
                  - quantity
                  - description
                  - unit_price
                  - tax_rate_id
                properties:
                  extended_description:
                    type: string
                    nullable: false
                  product_id:
                    type: string
                    description: This is purely informational and does not affect the quotation besides adding a reference to the product
                    example: e2314517-3cab-4aa9-8471-450e73449041
                  purchase_price:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Money'
                  periodicity:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Periodicity'
    quotations.create.request:
      title: quotations.create.request
      required:
        - deal_id
      type: object
      properties:
        deal_id:
          type: string
          example: cef01135-7e51-4f6f-a6eb-6e5e5a885ac8
        currency:
          $ref: '#/components/schemas/CurrencyWithRequiredExchangeRate'
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/QuotationsGroupedLinesRequest'
          description: A quotation needs `grouped_lines` and/or `text` to be valid
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/CommercialDiscount'
          description: ''
        text:
          type: string
          description: Uses Markdown formatting. A quotation needs `grouped_lines` and/or `text` to be valid
          example: Quotation text
        name:
          type: string
          description: Between 1 and 80 characters. Only letters, digits and limited punctuation are accepted; characters such as `/`, `\`, `*`, `?`, `<`, `>` and `|` are rejected. If omitted, a name is generated based on the quotation number.
          example: Webdevelopment
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        expiry:
          allOf:
            - $ref: '#/components/schemas/Expiry'
            - type: object
              required:
                - action_after_expiry
              properties:
                expires_after:
                  type: string
                  nullable: true
                  example: '2023-04-05'
            - description: Only available if user has access to quotation expiry.
    quotations.create.response:
      title: quotations.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    Sender:
      title: Sender
      required:
        - type
        - id
      type: object
      properties:
        type:
          type: string
          enum:
            - user
            - department
        id:
          type: string
          example: 2659dc4d-444b-4ced-b51c-b87591f604d7
    ToEmailAddress:
      title: ToEmailAddress
      required:
        - email_address
      type: object
      properties:
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Customer'
        email_address:
          type: string
          example: info@teamleader.eu
    CcEmailAddress:
      title: CcEmailAddress
      required:
        - email_address
      type: object
      properties:
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Customer'
        email_address:
          type: string
          example: info@teamleader.eu
    QuotationLanguage:
      title: QuotationLanguage
      enum:
        - en
        - nl
        - fr
        - ch
        - jp
        - de
        - es
        - pt
        - it
        - gr
        - tr
        - cs
        - so
        - sk
        - ru
        - ko
        - ir
        - iq
        - hu
        - gh
        - bg
        - bs
        - br
        - ar
        - ag
        - al
        - af
        - ro
        - pl
        - ca
        - da
        - uk
        - 'no'
        - fi
        - sv
      type: string
    quotations.send.request:
      title: quotations.send.request
      required:
        - quotations
        - recipients
        - subject
        - content
        - language
      type: object
      properties:
        quotations:
          type: array
          items:
            type: string
          description: list of quotation ids you wish to send. These quotations need to come from the same deal.
        from:
          type: object
          required:
            - sender
            - email_address
          properties:
            sender:
              $ref: '#/components/schemas/Sender'
            email_address:
              type: string
              example: info@teamleader.eu
        recipients:
          title: recipients
          required:
            - to
          type: object
          properties:
            to:
              type: array
              items:
                $ref: '#/components/schemas/ToEmailAddress'
              description: ''
            cc:
              type: array
              items:
                $ref: '#/components/schemas/CcEmailAddress'
              description: ''
            bcc:
              type: array
              items:
                $ref: '#/components/schemas/CcEmailAddress'
              description: ''
        subject:
          type: string
          example: An offer you cannot refuse
        content:
          type: string
          description: the shortcode '#LINK' will be replaced with the cloudsign url
          example: 'Sign your offer here #LINK'
        attachments:
          type: array
          items:
            type: string
          description: an array of file ids
        language:
          $ref: '#/components/schemas/QuotationLanguage'
    quotations.update.request:
      title: quotations.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 5b16f6ee-e302-0079-901b-50c26c4a55b1
        currency:
          $ref: '#/components/schemas/CurrencyWithRequiredExchangeRate'
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/QuotationsGroupedLinesRequest'
          description: A quotation needs `grouped_lines` and/or `text` to be valid
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/CommercialDiscount'
          description: ''
        text:
          type: string
          description: Uses Markdown formatting. A quotation needs `grouped_lines` and/or `text` to be valid
          nullable: true
          example: Quotation text
        name:
          type: string
          description: Between 1 and 80 characters. Only letters, digits and limited punctuation are accepted; characters such as `/`, `\`, `*`, `?`, `<`, `>` and `|` are rejected.
          example: Webdevelopment
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        expiry:
          allOf:
            - $ref: '#/components/schemas/Expiry'
            - type: object
              required:
                - action_after_expiry
              properties:
                expires_after:
                  type: string
                  nullable: true
                  example: '2023-04-05'
            - description: Only available if user has access to quotation expiry.
    quotations.accept.request:
      title: quotations.accept.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e7a3fe2b-2c75-480f-87b9-121816b5257b
    quotations.delete.request:
      title: quotations.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4e235f27-0af0-40e5-82f3-d32d0aa9edb3
    meetings.list.request:
      title: meetings.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            employee_id:
              type: string
              example: f29abf48-337d-44b4-aad4-585f5277a456
            start_date:
              type: string
              example: '2019-02-04'
            end_date:
              type: string
              example: '2019-02-04'
            milestone_id:
              type: string
              example: f29abf48-337d-44b4-aad4-585f5277a456
            group_id:
              type: string
              description: filter by nextgen project group. Cannot be combined with `milestone_id`.
              example: f29abf48-337d-44b4-aad4-585f5277a456
            term:
              type: string
              example: funny joke HR meeting
            recurrence_id:
              type: string
              example: 1dfccc8e-68d0-0b83-8d1b-5cf1b0d99ab1
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - scheduled_at
                    default: scheduled_at
                  order:
                    type: string
                    default: asc
          description: ''
        includes:
          type: string
          description: when used, the response will include `tracked_time`
          example: tracked_time
    DurationInMinutes:
      title: DurationInMinutes
      type: object
      properties:
        unit:
          type: string
          enum:
            - min
          example: min
        value:
          type: number
          example: 60
    Time:
      title: Time
      type: object
      properties:
        value:
          type: number
          example: 60
        unit:
          type: string
          example: minutes
    Attendees:
      title: Attendees
      type: object
      properties:
        type:
          type: string
          enum:
            - user
            - contact
          example: user
        id:
          type: string
          example: 6ddd2666-65a0-497f-9f01-54c4343ec1a6
    meetings.list.response:
      title: meetings.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: f29abf48-337d-44b4-aad4-585f5277a456
              title:
                type: string
                example: My meeting
              description:
                type: string
                example: My meeting description
              created_at:
                type: string
                example: '2020-02-01T10:33:45+00:00'
              created_by:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: user
              scheduled_at:
                type: string
                example: '2020-02-04T16:44:33+00:00'
              duration:
                $ref: '#/components/schemas/DurationInMinutes'
              tracked_time:
                type: object
                description: Only included with request parameter `includes=tracked_time`
                properties:
                  total:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/Time'
                    properties:
                      unit:
                        type: string
                        enum:
                          - min
                        example: min
              estimated_time:
                type: object
                description: Only included with request parameter `includes=estimated_time`
                properties:
                  total:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/Time'
                    properties:
                      unit:
                        type: string
                        enum:
                          - s
                        example: s
              customer:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Customer'
              project:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        enum:
                          - project
                          - nextgenProject
                        example: project
              milestone:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              group:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              attendees:
                type: array
                items:
                  $ref: '#/components/schemas/Attendees'
                description: ''
              status:
                type: string
                enum:
                  - open
                  - done
              recurrence:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
          description: ''
    meetings.info.request:
      title: meetings.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
        includes:
          type: string
          description: when used, the response will include `tracked_time`
          example: tracked_time
    MeetingsLocationResponse:
      title: MeetingsLocationResponse
      type: object
      oneOf:
        - type: object
          title: With type string
          properties:
            type:
              type: string
              enum:
                - virtual
                - calendarResource
              example: virtual
        - type: object
          title: With type & address
          properties:
            type:
              type: string
              enum:
                - contact
                - company
              example: contact
            address:
              $ref: '#/components/schemas/AddressResponse'
        - type: object
          title: With id, type & address
          properties:
            type:
              type: string
              example: address
            id:
              type: string
              example: 4191c526-5e26-0818-8e16-9523215b5081
            address:
              $ref: '#/components/schemas/AddressResponse'
    meetings.info.response:
      title: meetings.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 70af3fdd-b037-0936-ad1a-6d784dd44cf4
            title:
              type: string
              example: My meeting
            description:
              type: string
              example: My meeting description
            created_at:
              type: string
              example: '2020-02-01T10:33:45+00:00'
            created_by:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: user
            scheduled_at:
              type: string
              example: '2020-02-04T16:44:33+00:00'
            duration:
              $ref: '#/components/schemas/DurationInMinutes'
            tracked_time:
              type: object
              description: Only included with request parameter `includes=tracked_time`
              properties:
                total:
                  type: object
                  allOf:
                    - $ref: '#/components/schemas/Time'
                  properties:
                    unit:
                      type: string
                      enum:
                        - min
                      example: min
            estimated_time:
              type: object
              description: Only included with request parameter `includes=estimated_time`
              properties:
                total:
                  type: object
                  allOf:
                    - $ref: '#/components/schemas/Time'
                  properties:
                    unit:
                      type: string
                      enum:
                        - s
                      example: s
            customer:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Customer'
            project:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - project
                        - nextgenProject
                      example: project
            milestone:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            group:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            deal:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            location:
              $ref: '#/components/schemas/MeetingsLocationResponse'
            customer_meeting_room:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            attendees:
              type: array
              items:
                $ref: '#/components/schemas/Attendees'
              description: ''
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            status:
              type: string
              enum:
                - open
                - done
            recurrence:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            workOrder:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
    MeetingsLocationRequest:
      title: MeetingsLocationRequest
      oneOf:
        - type: object
          title: With type string
          properties:
            type:
              type: string
              example: virtual
          required:
            - type
        - type: object
          title: With type & address
          properties:
            type:
              type: string
              enum:
                - contact
                - company
              example: contact
            id:
              type: string
              example: f29abf48-337d-44b4-aad4-585f5277a456
            address:
              $ref: '#/components/schemas/AddressRequest'
          required:
            - id
            - type
            - address
        - type: object
          title: With type & address
          properties:
            type:
              type: string
              example: address
            address:
              $ref: '#/components/schemas/AddressRequest'
          required:
            - type
            - address
        - type: object
          title: With type & id
          properties:
            type:
              type: string
              example: calendarResource
            id:
              type: string
              example: 4191c526-5e26-0818-8e16-9523215b5081
          required:
            - type
            - address
    meetings.schedule.request:
      title: meetings.schedule.request
      required:
        - title
        - starts_at
        - ends_at
        - attendees
      type: object
      properties:
        title:
          type: string
          example: My meeting
        starts_at:
          type: string
          example: '2023-10-01T09:00:00+01:00'
        ends_at:
          type: string
          example: '2023-10-01T10:00:00+01:00'
        description:
          type: string
          example: My meeting description
        attendees:
          type: array
          items:
            $ref: '#/components/schemas/Attendees'
          description: at least one user attendee must be present
        customer:
          $ref: '#/components/schemas/Customer'
        location:
          $ref: '#/components/schemas/MeetingsLocationRequest'
        project_id:
          type: string
          description: Mutually exclusive with `milestone_id`.
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        group_id:
          type: string
          description: If omitted the meeting is not added to a group. Requires `project_id`. The group must belong to the specified project.
          example: 0185968b-2c9e-73fd-9ce1-a12c0979783b
        milestone_id:
          type: string
          description: Mutually exclusive with `project_id`.
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        deal_id:
          type: string
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        work_order_id:
          type: string
          example: 531132ea-7c81-0843-9a11-5f43ff9c5491
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    meetings.schedule.response:
      title: meetings.schedule.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    meetings.update.request:
      title: meetings.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 00ed6266-a5bd-4aac-a292-2582017b6400
        title:
          type: string
          example: My meeting
        starts_at:
          type: string
          example: '2023-10-01T09:00:00+01:00'
        ends_at:
          type: string
          example: '2023-10-01T10:00:00+01:00'
        description:
          type: string
          nullable: true
          example: My meeting description
        attendees:
          type: array
          items:
            $ref: '#/components/schemas/Attendees'
          description: when provided, at least one user attendee must be present
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Customer'
        location:
          $ref: '#/components/schemas/MeetingsLocationRequest'
        project_id:
          type: string
          nullable: true
          description: Mutually exclusive with `milestone_id`. Required when `group_id` is provided.
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        group_id:
          type: string
          nullable: true
          description: Requires `project_id`. The group must belong to the specified project.
          example: 0185968b-2c9e-73fd-9ce1-a12c0979783b
        milestone_id:
          type: string
          nullable: true
          description: Mutually exclusive with `project_id`.
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        deal_id:
          type: string
          nullable: true
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    meetings.complete.request:
      title: meetings.complete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
    meetings.delete.request:
      title: meetings.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
    meetings.createReport.request:
      title: meetings.createReport.request
      required:
        - id
        - attach_to
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
        attach_to:
          type: object
          properties:
            type:
              type: string
              enum:
                - contact
                - company
                - deal
              example: contact
            id:
              type: string
              example: f29abf48-337d-44b4-aad4-585f5277a456
        summary:
          type: string
          example: My meeting summary
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    meetings.createReport.response:
      title: meetings.createReport.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    calls.list.request:
      title: calls.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            scheduled_after:
              type: string
              description: Filter on calls occurring on or after a given date
              example: '2021-11-21'
            scheduled_before:
              type: string
              description: Filter on calls occurring on or before a given date
              example: '2022-05-13'
            relates_to:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - description: Filter calls by related object (currently only companies allowed)
                  properties:
                    type:
                      type: string
                      example: company
            call_outcome_id:
              type: string
              description: Filter on completed calls by outcome
              example: 6bd20dd8-dc3f-0e68-8919-dee0be6efe55
        page:
          allOf:
            - $ref: '#/components/schemas/Page'
            - type: object
              properties:
                size:
                  description: The amount of entries returned per request, max 1 to 100
                number:
                  description: The current page, the first page is 1
    Participant:
      title: Participant
      type: object
      properties:
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        contact:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
    calls.list.response:
      title: calls.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 32665afd-1818-0ed3-9e18-a603a3a21b95
              added_at:
                type: string
                nullable: true
                example: '2021-11-21T18:14:15+00:00'
              participant:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Participant'
              description:
                type: string
                nullable: true
                example: Call with customer
              outcome:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              outcome_summary:
                type: string
                nullable: true
                example: Called, but was not available
              assignee:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              scheduled_at:
                type: string
                example: '2021-11-21T19:14:15+00:00'
              status:
                type: string
                enum:
                  - open
                  - completed
                example: open
              deal:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    calls.info.request:
      title: calls.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
    calls.info.response:
      title: calls.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 32665afd-1818-0ed3-9e18-a603a3a21b95
            added_at:
              type: string
              nullable: true
              example: '2016-02-01T16:44:33+00:00'
            completed_at:
              type: string
              nullable: true
              example: '2016-02-04T16:44:33+00:00'
            participant:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Participant'
            description:
              type: string
              nullable: true
              example: Description of the call
            outcome:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            outcome_summary:
              type: string
              nullable: true
              example: Called, but was not available
            assignee:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            scheduled_at:
              type: string
              example: '2016-02-04T16:00:00+00:00'
            status:
              type: string
              enum:
                - open
                - completed
              example: open
            deal:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
    Assignee:
      title: Assignee
      type: object
      properties:
        type:
          type: string
          example: user
        id:
          type: string
          example: 66abace2-62af-0836-a927-fe3f44b9b47b
    calls.add.request:
      title: calls.add.request
      required:
        - participant
        - due_at
        - assignee
      type: object
      properties:
        description:
          type: string
          example: Description of the call
        participant:
          type: object
          required:
            - customer
          properties:
            customer:
              $ref: '#/components/schemas/Customer'
        due_at:
          type: string
          example: '2016-02-04T16:00:00+00:00'
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - user
                  example: user
        deal_id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    calls.add.response:
      title: calls.add.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    calls.update.request:
      title: calls.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        description:
          type: string
          example: Description of the call
        participant:
          type: object
          properties:
            customer:
              $ref: '#/components/schemas/Customer'
        due_at:
          type: string
          example: '2016-02-04T16:00:00+00:00'
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - user
                  example: user
        deal_id:
          type: string
          nullable: true
          example: f29abf48-337d-44b4-aad4-585f5277a456
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    calls.complete.request:
      title: calls.complete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
        call_outcome_id:
          type: string
          example: 2b43633b-22d1-41b6-b87b-e1fd742325d4
        outcome_summary:
          type: string
          example: Called, but was not available
    calls.delete.request:
      title: calls.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
    callOutcomes.list.request:
      title: callOutcomes.list.request
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
    callOutcomes.list.response:
      title: callOutcomes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    Attendee:
      title: Attendee
      required:
        - type
        - id
      type: object
      properties:
        type:
          enum:
            - contact
          type: string
          example: contact
        id:
          type: string
          example: 2659dc4d-444b-4ced-b51c-b87591f604d7
    events.list.request:
      title: events.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            user_id:
              type: string
              example: 5309c8c9-e313-47b0-90ba-6850c3dc3e33
            activity_type_id:
              type: string
              example: edd94120-63e2-4b10-80ed-fdfcfaa0a515
            ends_after:
              type: string
              description: Start of the period for which to return events
              example: '2017-01-01T00:00:00+00:00'
            starts_before:
              type: string
              description: End of the period for which to return events
              example: '2018-01-01T00:00:00+00:00'
            term:
              type: string
              description: Searches for a term in title or description
              example: coffee
            attendee:
              $ref: '#/components/schemas/Attendee'
            link:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      enum:
                        - contact
                        - company
                        - deal
                      example: contact
            task_id:
              type: string
              example: 5309c8c9-e313-47b0-90ba-6850c3dc3e33
            done:
              type: boolean
              example: false
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    enum:
                      - starts_at
                    type: string
                    default: starts_at
                  order:
                    enum:
                      - asc
                      - desc
                    default: asc
          description: ''
    events.list.response:
      title: events.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 6d64488c-75d8-4de9-b140-2555566fa27d
              creator:
                $ref: '#/components/schemas/TypeAndId'
              task:
                $ref: '#/components/schemas/TypeAndId'
              activity_type:
                $ref: '#/components/schemas/TypeAndId'
              title:
                type: string
                example: Erlich Bachman's birthday
              description:
                type: string
              starts_at:
                type: string
                example: '2016-02-04T16:00:00+00:00'
              ends_at:
                type: string
                example: '2016-02-04T18:00:00+00:00'
              location:
                type: string
              attendees:
                type: array
                items:
                  $ref: '#/components/schemas/Attendees'
                description: ''
              links:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/TypeAndId'
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - contact
                            - company
                            - deal
                          example: contact
    events.info.request:
      title: events.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 9a5a3984-abfc-40cd-a880-f97683c6a99c
    events.info.response:
      title: events.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 9a5a3984-abfc-40cd-a880-f97683c6a99c
            title:
              type: string
              example: Meeting with stakeholders
            description:
              type: string
            creator:
              $ref: '#/components/schemas/TypeAndId'
            task:
              $ref: '#/components/schemas/TypeAndId'
            activity_type:
              $ref: '#/components/schemas/TypeAndId'
            starts_at:
              type: string
              example: '2016-02-04T16:00:00+00:00'
            ends_at:
              type: string
              example: '2016-02-04T18:00:00+00:00'
            location:
              type: string
            attendees:
              type: array
              items:
                $ref: '#/components/schemas/Attendees'
              description: ''
            links:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - contact
                          - company
                          - work_order
                          - deal
                        example: company
    events.create.request:
      title: events.create.request
      required:
        - title
        - activity_type_id
        - starts_at
        - ends_at
      type: object
      properties:
        title:
          type: string
          example: Meeting with stakeholders
        description:
          type: string
        activity_type_id:
          type: string
          example: b0a9ace5-fe82-4827-9d90-fc52f2c93050
        starts_at:
          type: string
          example: '2016-02-04T16:00:00+00:00'
        ends_at:
          type: string
          example: '2016-02-04T18:00:00+00:00'
        location:
          type: string
        work_type_id:
          type: string
          example: b37e2bc7-dea0-4fda-88e9-c092fb65667d
        attendees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Attendees'
              - type: object
                required:
                  - type
                  - id
          description: ''
        links:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/TypeAndId'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - contact
                      - company
                      - deal
                    example: company
          description: ''
    events.create.response:
      title: events.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    events.update.request:
      title: events.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f22fc69d-5d07-40cf-af46-015698a74b63
        title:
          type: string
          example: Meeting with stakeholders
        description:
          type: string
          nullable: true
        starts_at:
          type: string
          example: '2016-02-04T16:00:00+00:00'
        ends_at:
          type: string
          example: '2016-02-04T18:00:00+00:00'
        location:
          type: string
        work_type_id:
          type: string
          example: b37e2bc7-dea0-4fda-88e9-c092fb65667d
        attendees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Attendees'
              - type: object
                required:
                  - type
                  - id
          description: ''
        links:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/TypeAndId'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - contact
                      - company
                      - deal
                    example: company
    events.cancel.request:
      title: events.cancel.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: b519491e-ca80-4efb-bb7b-3f08544936b0
    activityTypes.list.request:
      title: activityTypes.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
    activityTypes.list.response:
      title: activityTypes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    invoices.list.request:
      title: invoices.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on invoice number, purchase order number, payment reference and invoicee
              example: Interesting invoice
            invoice_number:
              type: string
              description: Filters on a full invoice number (fiscal year / number)
              example: 2017 / 5
            department_id:
              type: string
              description: Filters on a department (company entity)
              example: af48fe9e-d44c-0eac-8813-8be051b10921
            deal_id:
              type: string
              description: Filters on a deal
              example: 4a219dae-7b80-4c79-97d2-bdadbab299ba
            project_id:
              type: string
              description: Filters on a project
              example: ba7d9731-c7d0-43d3-af95-fd7b3e818dbc
            subscription_id:
              type: string
              description: Filters on a subscription
              example: 8631bbbf-bead-4f6e-a2ab-58ec9bbd997a
            status:
              type: array
              items:
                type: string
                enum:
                  - draft
                  - outstanding
                  - matched
              description: The statuses you want to filter by.
            updated_since:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            purchase_order_number:
              type: string
              example: '000023'
            payment_reference:
              type: string
              example: +++084/2613/66074+++
            invoice_date_after:
              type: string
              description: This date is inclusive
              example: '2020-01-01'
            invoice_date_before:
              type: string
              description: This date is inclusive
              example: '2022-01-01'
            customer:
              $ref: '#/components/schemas/Customer'
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - invoice_number
                      - invoice_date
                    default: invoice_number
                  order:
                    allOf:
                      - $ref: '#/components/schemas/Order'
                      - default: desc
          description: ''
        includes:
          type: string
          description: when used, the response will include `totals.due_incasso_inclusive`, `totals.fixed_late_fee` and `totals.interest`
          example: late_fees
    ForAttentionOf:
      title: ForAttentionOf
      type: object
      properties:
        name:
          type: string
          nullable: true
          example: Radja Nainggolan
        contact:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
    InvoicesListInvoicee:
      title: InvoicesListInvoicee
      type: object
      properties:
        name:
          type: string
          example: De Rode Duivels
        vat_number:
          type: string
          nullable: true
          example: BE0899623035
        customer:
          $ref: '#/components/schemas/TypeAndId'
        for_attention_of:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ForAttentionOf'
    invoices.list.response:
      title: invoices.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
              department:
                $ref: '#/components/schemas/TypeAndId'
              invoice_number:
                type: string
                nullable: true
                example: 2017 / 5
              invoice_date:
                type: string
                nullable: true
                example: '2016-02-04'
              status:
                type: string
                enum:
                  - draft
                  - outstanding
                  - matched
                example: matched
              due_on:
                type: string
                nullable: true
                example: '2016-03-03'
              paid:
                type: boolean
                example: true
              paid_at:
                type: string
                nullable: true
                example: '2016-02-04T16:44:33+00:00'
              sent:
                type: boolean
                example: true
              purchase_order_number:
                type: string
                nullable: true
                example: '000023'
              payment_reference:
                type: string
                nullable: true
                example: +++084/2613/66074+++
              invoicee:
                $ref: '#/components/schemas/InvoicesListInvoicee'
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  payable:
                    $ref: '#/components/schemas/Money'
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
                    description: ''
                  due:
                    $ref: '#/components/schemas/Money'
                  due_incasso_inclusive:
                    $ref: '#/components/schemas/Money'
                  fixed_late_fee:
                    $ref: '#/components/schemas/Money'
                  interest:
                    $ref: '#/components/schemas/Money'
              currency_exchange_rate:
                $ref: '#/components/schemas/CurrencyExchangeRate'
              created_at:
                type: string
                example: '2016-02-04T16:44:33+00:00'
              updated_at:
                type: string
                example: '2016-02-05T16:44:33+00:00'
              web_url:
                type: string
                example: https://focus.teamleader.eu/invoice_detail.php?id=2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
              file:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              deal:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              project:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              subscription:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              delivery_date:
                type: string
                nullable: true
                example: '2025-12-08'
          description: ''
    invoices.info.request:
      title: invoices.info.request
      type: object
      properties:
        id:
          type: string
          example: 27300f09-6250-4a23-8557-d84c52f99ecf
        includes:
          type: string
          description: when used, the response will include `totals.due_incasso_inclusive`, `totals.fixed_late_fee` and `totals.interest`
          example: late_fees
    InvoicesResponseInvoicee:
      title: InvoicesResponseInvoicee
      type: object
      properties:
        name:
          type: string
          example: De Rode Duivels
        vat_number:
          type: string
          nullable: true
          example: BE0899623035
        customer:
          $ref: '#/components/schemas/TypeAndId'
        for_attention_of:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ForAttentionOf'
        email:
          type: string
          nullable: true
          example: duivels@test.com
        national_identification_number:
          type: string
          nullable: true
          example: '123'
    InvoicesGroupedLinesResponse:
      title: InvoicesGroupedLinesResponse
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemResponse'
              - type: object
                properties:
                  product_category:
                    type: object
                    nullable: true
                    description: These are ledger accounts
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                  unit_price:
                    allOf:
                      - $ref: '#/components/schemas/AmountWithTax'
                      - type: object
                  withheld_tax:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
          description: ''
    InvoiceContent:
      title: InvoiceContent
      type: string
      nullable: true
      enum:
        - goods
        - services
        - goods_and_services
      example: goods_and_services
    ExpectedPaymentMethod:
      title: ExpectedPaymentMethod
      type: object
      oneOf:
        - type: object
          title: With method & optional reference
          properties:
            method:
              type: string
              enum:
                - direct_debit
                - credit_card
              example: credit_card
            reference:
              type: string
              nullable: true
              example: AB1234
        - type: object
          title: With method only
          properties:
            method:
              type: string
              enum:
                - cash
                - cheque
                - bankers_draft
                - bank_transfer
                - payment_card
              example: cash
        - type: object
          title: SEPA direct debit
          properties:
            method:
              type: string
              enum:
                - sepa_direct_debit
              example: sepa_direct_debit
            reference:
              type: string
              example: AB1234
          required:
            - reference
    PeppolStatus:
      title: PeppolStatus
      enum:
        - sending
        - sending_failed
        - sent
        - application_acknowledged
        - application_accepted
        - application_rejected
        - receiver_acknowledged
        - receiver_accepted
        - receiver_rejected
        - receiver_is_processing
        - receiver_awaits_feedback
        - receiver_conditionally_accepted
        - receiver_paid
      type: string
      nullable: true
      example: sent
    invoices.info.response:
      title: invoices.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: e540fe7e-dce2-459e-bf7e-24e605fc18b3
            department:
              $ref: '#/components/schemas/TypeAndId'
            invoice_number:
              type: string
              nullable: true
              example: 2017 / 5
            invoice_date:
              type: string
              nullable: true
              example: '2016-02-04'
            status:
              type: string
              enum:
                - draft
                - outstanding
                - matched
              example: matched
            due_on:
              type: string
              nullable: true
              example: '2016-03-03'
            paid:
              type: boolean
              example: true
            paid_at:
              type: string
              nullable: true
              example: '2016-02-04T16:44:33+00:00'
            sent:
              type: boolean
              example: true
            purchase_order_number:
              type: string
              nullable: true
              example: '000023'
            invoicee:
              $ref: '#/components/schemas/InvoicesResponseInvoicee'
            discounts:
              type: array
              items:
                $ref: '#/components/schemas/CommercialDiscount'
              description: ''
            grouped_lines:
              type: array
              items:
                $ref: '#/components/schemas/InvoicesGroupedLinesResponse'
              description: ''
            total:
              type: object
              properties:
                tax_exclusive:
                  $ref: '#/components/schemas/Money'
                tax_exclusive_before_discount:
                  $ref: '#/components/schemas/Money'
                tax_inclusive:
                  $ref: '#/components/schemas/Money'
                tax_inclusive_before_discount:
                  $ref: '#/components/schemas/Money'
                taxes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Taxes'
                  description: ''
                withheld_taxes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: e2314517-3cab-4aa9-8471-450e73449040
                      taxable:
                        $ref: '#/components/schemas/Money'
                      withheld:
                        $ref: '#/components/schemas/Money'
                payable:
                  $ref: '#/components/schemas/Money'
                due:
                  $ref: '#/components/schemas/Money'
                due_incasso_inclusive:
                  $ref: '#/components/schemas/Money'
                fixed_late_fee:
                  $ref: '#/components/schemas/Money'
                interest:
                  $ref: '#/components/schemas/Money'
            payment_term:
              $ref: '#/components/schemas/PaymentTerm'
            payments:
              type: array
              items:
                type: object
                properties:
                  paid_at:
                    type: string
                    example: '2016-03-03T16:44:33+00:00'
                  payment:
                    $ref: '#/components/schemas/Money'
            payment_reference:
              type: string
              nullable: true
              example: +++084/2613/66074+++
            note:
              type: string
              description: This is the remarks field
              nullable: true
              example: '''Some extra remarks about the invoice'''
            invoice_content:
              allOf:
                - $ref: '#/components/schemas/InvoiceContent'
                - description: Whether the invoice is for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France; null otherwise.
            currency:
              type: string
              example: USD
            currency_exchange_rate:
              $ref: '#/components/schemas/CurrencyExchangeRate'
            expected_payment_method:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/ExpectedPaymentMethod'
            file:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            deal:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            project:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            on_hold_since:
              type: string
              nullable: true
              example: '2016-02-01'
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            created_at:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            updated_at:
              type: string
              example: '2016-02-05T16:44:33+00:00'
            document_template:
              $ref: '#/components/schemas/TypeAndId'
            delivery_date:
              type: string
              nullable: true
              example: '2025-12-08'
            peppol_status:
              allOf:
                - $ref: '#/components/schemas/PeppolStatus'
                - example: sent
    InvoiceDownloadFormat:
      title: Format
      enum:
        - pdf
        - ubl/e-fff
        - ubl/peppol_bis_3
        - ubl/xrechnung
      type: string
      example: pdf
    invoices.download.request:
      title: invoices.download.request
      required:
        - id
        - format
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        format:
          allOf:
            - $ref: '#/components/schemas/InvoiceDownloadFormat'
            - example: pdf
    invoices.download.response:
      title: invoices.download.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Download'
    InvoicesRequestInvoicee:
      title: InvoicesRequestInvoicee
      required:
        - customer
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        for_attention_of:
          type: object
          oneOf:
            - type: object
              title: By Name
              properties:
                name:
                  type: string
                  example: Finance Dept.
              required:
                - name
            - type: object
              title: By Contact Id
              properties:
                contact_id:
                  type: string
                  example: 417a2231-c3c7-4e1c-a6bb-1b014836ca60
              required:
                - contact_id
    Currency:
      title: Currency
      required:
        - code
      type: object
      properties:
        code:
          $ref: '#/components/schemas/CurrencyCode'
        exchange_rate:
          type: number
          example: 1.1238
    InvoicesGroupedLinesRequest:
      title: InvoicesGroupedLinesRequest
      required:
        - line_items
      type: object
      properties:
        section:
          type: object
          required:
            - title
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemRequest'
              - type: object
                properties:
                  withholding_tax_rate_id:
                    type: string
                    example: c0c03f1e-77e3-402c-a713-30ea1c585824
                  product_category_id:
                    type: string
                    description: These are ledger accounts
                    example: e2314517-3cab-4aa9-8471-450e73449041
    invoices.draft.request:
      title: invoices.draft.request
      required:
        - invoicee
        - department_id
        - payment_term
        - grouped_lines
      type: object
      properties:
        invoicee:
          $ref: '#/components/schemas/InvoicesRequestInvoicee'
        department_id:
          type: string
          example: cef01135-7e51-4f6f-a6eb-6e5e5a885ac7
        payment_term:
          $ref: '#/components/schemas/PaymentTerm'
        currency:
          $ref: '#/components/schemas/Currency'
        project_id:
          type: string
          example: 624ca743-8998-4f8c-add1-c427bb022166
        purchase_order_number:
          type: string
          example: '000023'
        quotation_id:
          type: string
          example: 0be7d809-ff5d-4702-9dc1-2afa9de71a43
          description: Links the created invoice to the source quotation and its deal, marking the deal as won.
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoicesGroupedLinesRequest'
          description: ''
        invoice_date:
          type: string
          example: '2016-02-04'
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/CommercialDiscount'
          description: ''
        note:
          type: string
          description: This is the remarks field
          example: Invoice comments
        invoice_content:
          allOf:
            - $ref: '#/components/schemas/InvoiceContent'
            - description: Whether the invoice is for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France. Cleared otherwise.
        expected_payment_method:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ExpectedPaymentMethod'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        delivery_date:
          type: string
          nullable: true
          example: '2025-12-08'
    invoices.draft.response:
      title: invoices.draft.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    invoices.update.request:
      title: invoices.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: b7023c11-455e-4fa5-bb96-87f37dbc7d07
        invoicee:
          $ref: '#/components/schemas/InvoicesRequestInvoicee'
        payment_term:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentTerm'
        currency:
          $ref: '#/components/schemas/Currency'
        project_id:
          type: string
          example: 624ca743-8998-4f8c-add1-c427bb022166
        purchase_order_number:
          type: string
          example: '000023'
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoicesGroupedLinesRequest'
          description: ''
        invoice_date:
          type: string
          example: '2016-02-04'
        note:
          type: string
          description: This is the remarks field
          nullable: true
          example: Some comments about the invoice
        invoice_content:
          allOf:
            - $ref: '#/components/schemas/InvoiceContent'
            - description: Whether the invoice is for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France. Cleared otherwise.
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/CommercialDiscount'
          description: ''
        expected_payment_method:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ExpectedPaymentMethod'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        delivery_date:
          type: string
          nullable: true
          example: '2025-12-08'
    invoices.updateBooked.request:
      title: invoices.updateBooked.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: b7023c11-455e-4fa5-bb96-87f37dbc7d07
        invoicee:
          $ref: '#/components/schemas/InvoicesRequestInvoicee'
        payment_term:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentTerm'
        project_id:
          type: string
          example: 624ca743-8998-4f8c-add1-c427bb022166
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoicesGroupedLinesRequest'
          description: ''
        invoice_date:
          type: string
          example: '2016-02-04'
        note:
          type: string
          nullable: true
          example: Some comments about the invoice
        invoice_content:
          allOf:
            - $ref: '#/components/schemas/InvoiceContent'
            - description: Whether the invoice is for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France. Cleared otherwise.
        expected_payment_method:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ExpectedPaymentMethod'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    invoices.copy.request:
      title: invoices.copy.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: b7023c11-455e-4fa5-bb96-87f37dbc7d07
    invoices.copy.response:
      title: invoices.copy.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    invoices.book.request:
      title: invoices.book.request
      required:
        - id
        - 'on'
      type: object
      properties:
        id:
          type: string
          example: 7abb325c-e063-42a4-8fb4-1b730759645a
        'on':
          type: string
          example: '2016-02-04'
    invoices.delete.request:
      title: invoices.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 7517d21c-75c1-4b89-8956-0e67f46c8532
    invoices.registerPayment.request:
      title: invoices.registerPayment.request
      required:
        - id
        - payment
        - paid_at
      type: object
      properties:
        id:
          type: string
          example: 7abb325c-e063-42a4-8fb4-1b730759645a
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          example: '2016-03-03T16:44:33+00:00'
        payment_method_id:
          type: string
          example: bb9589ec-6e08-0d5f-9b23-7be9b9c3ea2d
    invoices.removePayments.request:
      title: invoices.removePayments.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
    invoices.credit.request:
      title: invoices.credit.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        credit_note_date:
          type: string
          example: '2016-02-04'
    invoices.credit.response:
      title: invoices.credit.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    invoices.creditPartially.request:
      title: invoices.creditPartially.request
      required:
        - id
        - grouped_lines
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        credit_note_date:
          type: string
          example: '2016-02-04'
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoicesGroupedLinesRequest'
          description: ''
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/CommercialDiscount'
          description: ''
    invoices.creditPartially.response:
      title: invoices.creditPartially.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    ToEmail:
      title: ToEmail
      required:
        - email
      type: object
      properties:
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Customer'
        email:
          type: string
          example: info@teamleader.eu
    CcEmail:
      title: CcEmail
      required:
        - email
      type: object
      properties:
        customer:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Customer'
        email:
          type: string
          example: info@teamleader.eu
    invoices.send.request:
      title: invoices.send.request
      required:
        - id
        - content
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        content:
          type: object
          required:
            - subject
            - body
          properties:
            subject:
              type: string
              example: Invoice
            body:
              type: string
              example: Please find your invoice attached to this mail
            mail_template_id:
              type: string
              nullable: true
              description: 'Important: use this to set the language of the email and to keep track of which template was used. If you want to use the mail_template content, this should be fetched in a separate request to mailTemplates.list and passed in the above subject and body'
              example: 045cd6a9-7527-09c9-aa16-fd5ac7953e71
        recipients:
          type: object
          properties:
            to:
              type: array
              items:
                $ref: '#/components/schemas/ToEmail'
              description: ''
            cc:
              type: array
              items:
                $ref: '#/components/schemas/CcEmail'
              description: ''
            bcc:
              type: array
              items:
                $ref: '#/components/schemas/CcEmail'
              description: ''
        attachments:
          type: array
          items:
            type: string
          description: an array of file ids
    invoices.sendViaPeppol.request:
      title: invoices.sendViaPeppol
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 018d5965-19fb-701a-af11-e80451931551
    creditNotes.list.request:
      title: creditNotes.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            department_id:
              type: string
              description: The ID of the department you wish to filter on.
              example: 080aac72-ff1a-4627-bfe3-146b6eee979c
            updated_since:
              type: string
              example: '2016-02-04T16:44:33+00:00'
            invoice_id:
              type: string
              example: 60f03745-4289-4ae7-8c74-d797860bc887
            project_id:
              type: string
              example: 082e6289-30c5-45ad-bcd0-190b02d21e81
            customer:
              $ref: '#/components/schemas/Customer'
            credit_note_date_after:
              type: string
              description: This date is inclusive
              example: '2022-01-01'
            credit_note_date_before:
              type: string
              description: This date is exclusive
              example: '2023-01-01'
        page:
          $ref: '#/components/schemas/Page'
    CreditNotesListInvoicee:
      title: CreditNotesListInvoicee
      type: object
      properties:
        name:
          type: string
          example: De Rode Duivels
        vat_number:
          type: string
          nullable: true
          example: BE0899623035
        customer:
          $ref: '#/components/schemas/TypeAndId'
    creditNotes.list.response:
      title: creditNotes.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2b43633b-22d1-41b6-b87b-e1fd742325d4
              department:
                $ref: '#/components/schemas/TypeAndId'
              credit_note_number:
                type: string
                nullable: true
                example: 2017/5
              credit_note_date:
                type: string
                nullable: true
                example: '2016-02-04'
              status:
                type: string
                enum:
                  - booked
                example: booked
              invoice:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              paid:
                type: boolean
                example: true
              paid_at:
                type: string
                nullable: true
                example: '2016-03-03T16:44:33+00:00'
              invoicee:
                $ref: '#/components/schemas/CreditNotesListInvoicee'
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  payable:
                    $ref: '#/components/schemas/Money'
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
                    description: ''
              created_at:
                type: string
                example: '2016-02-04T16:44:33+00:00'
              updated_at:
                type: string
                example: '2016-02-05T16:44:33+00:00'
          description: ''
    creditNotes.info.request:
      title: creditNotes.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 27300f09-6250-4a23-8557-d84c52f99ecf
    CreditNotesResponseInvoicee:
      title: CreditNotesResponseInvoicee
      type: object
      properties:
        name:
          type: string
          example: De Rode Duivels
        vat_number:
          type: string
          nullable: true
          example: BE0899623035
        customer:
          $ref: '#/components/schemas/TypeAndId'
        email:
          type: string
          nullable: true
          example: duivels@test.com
        national_identification_number:
          type: string
          nullable: true
          example: '123'
    CreditNotesGroupedLinesResponse:
      title: CreditNotesGroupedLinesResponse
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemResponse'
              - type: object
                properties:
                  extended_description:
                    type: string
                    nullable: false
                  product_category:
                    type: object
                    nullable: true
                    description: These are ledger accounts
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                  unit_price:
                    allOf:
                      - $ref: '#/components/schemas/MoneyWithTax'
                      - type: object
    creditNotes.info.response:
      title: creditNotes.info.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 27300f09-6250-4a23-8557-d84c52f99ecf
              department:
                $ref: '#/components/schemas/TypeAndId'
              credit_note_number:
                type: string
                nullable: true
                example: 2017/5
              credit_note_date:
                type: string
                nullable: true
                example: '2016-02-04'
              status:
                type: string
                enum:
                  - booked
                example: booked
              invoice:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              paid:
                type: boolean
                example: true
              paid_at:
                type: string
                nullable: true
                example: '2016-03-03T16:44:33+00:00'
              invoicee:
                $ref: '#/components/schemas/CreditNotesResponseInvoicee'
              discounts:
                type: array
                items:
                  $ref: '#/components/schemas/CommercialDiscount'
                description: ''
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  payable:
                    $ref: '#/components/schemas/Money'
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
                    description: ''
              grouped_lines:
                type: array
                items:
                  $ref: '#/components/schemas/CreditNotesGroupedLinesResponse'
                description: ''
              currency:
                type: string
                example: USD
              currency_exchange_rate:
                $ref: '#/components/schemas/CurrencyExchangeRate'
              created_at:
                type: string
                example: '2016-02-04T16:44:33+00:00'
              updated_at:
                type: string
                example: '2016-02-05T16:44:33+00:00'
              document_template:
                $ref: '#/components/schemas/TypeAndId'
              peppol_status:
                allOf:
                  - $ref: '#/components/schemas/PeppolStatus'
                  - example: sent
          description: ''
    CreditNoteDownloadFormat:
      title: Format
      enum:
        - pdf
        - ubl/e-fff
        - ubl/peppol_bis_3
        - ubl/xrechnung
      type: string
      example: pdf
    creditNotes.download.request:
      title: creditNotes.download.request
      required:
        - id
        - format
      type: object
      properties:
        id:
          type: string
          example: d885e5d5-bacb-4607-bde9-abc4a04a901b
        format:
          allOf:
            - $ref: '#/components/schemas/CreditNoteDownloadFormat'
            - example: pdf
    creditNotes.download.response:
      title: creditNotes.download.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Download'
    creditNotes.sendViaPeppol.request:
      title: creditNotes.sendViaPeppol
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 018d5965-19fb-701a-af11-e80451931551
    subscriptions.list.request:
      title: subscriptions.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            invoice_id:
              type: string
              description: Find subscriptions that generated the given invoice
              example: 60f03745-4289-4ae7-8c74-d797860bc887
            deal_id:
              type: string
              description: Filter on subscriptions created from a deal
              example: fddf42f9-bda1-0c49-a22b-0bf147cd1e3f
            department_id:
              type: string
              description: Filter on subscriptions of a specific department (company entity)
              example: af48fe9e-d44c-0eac-8813-8be051b10921
            customer:
              $ref: '#/components/schemas/Customer'
            status:
              type: array
              items:
                type: string
                enum:
                  - active
                  - deactivated
              description: |
                Filters on status:
                * `active`   - Filters on active subscriptions
                * `deactivated` - Filters on deactivated subscriptions
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - title
                      - created_at
                      - status
    SubscriptionsResponseInvoicee:
      title: SubscriptionsResponseInvoicee
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        for_attention_of:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ForAttentionOf'
    BillingCycle:
      title: BillingCycle
      type: object
      properties:
        periodicity:
          $ref: '#/components/schemas/Periodicity'
        days_in_advance:
          type: integer
          enum:
            - 0
            - 7
            - 14
            - 21
            - 28
          example: 7
    subscriptions.list.response:
      title: subscriptions.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: e2314517-3cab-4aa9-8471-450e73449041
              title:
                type: string
                example: Subscription for cookies
              note:
                type: string
                description: Uses Markdown formatting
                nullable: true
                example: Some more **information** about this subscription
              invoice_content:
                allOf:
                  - $ref: '#/components/schemas/InvoiceContent'
                  - description: Whether the invoices generated from this subscription are for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France; null otherwise.
              status:
                type: string
                enum:
                  - active
                  - deactivated
                example: active
              department:
                $ref: '#/components/schemas/TypeAndId'
              invoicee:
                $ref: '#/components/schemas/SubscriptionsResponseInvoicee'
              project:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              starts_on:
                type: string
                example: '2022-05-21'
              ends_on:
                type: string
                nullable: true
                example: '2023-07-21'
              next_renewal_date:
                type: string
                nullable: true
                example: '2022-06-21'
              billing_cycle:
                $ref: '#/components/schemas/BillingCycle'
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
              web_url:
                type: string
                example: https://focus.teamleader.eu/subscription_detail.php?id=e2314517-3cab-4aa9-8471-450e73449041
              purchase_order_number:
                type: string
                nullable: true
                example: '000023'
              delivery_information:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                    enum:
                      - set_days_after_invoice_date
                  number_of_days_after_invoice_date:
                    type: integer
                    example: 5
              created_at:
                type: string
                nullable: true
                example: '2022-04-18T16:44:33+00:00'
          description: ''
    subscriptions.info.request:
      title: subscriptions.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e2314517-3cab-4aa9-8471-450e73449041
    SubscriptionsGroupedLinesResponse:
      title: SubscriptionsGroupedLinesResponse
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
              nullable: true
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemResponse'
              - type: object
                properties:
                  product_category:
                    type: object
                    nullable: true
                    description: These are ledger accounts
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                  unit_price:
                    allOf:
                      - $ref: '#/components/schemas/AmountWithTax'
                      - type: object
                  withheld_tax:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
          description: ''
    subscriptions.info.response:
      title: subscriptions.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: e2314517-3cab-4aa9-8471-450e73449041
            title:
              type: string
              example: Subscription for cookies
            note:
              type: string
              description: Uses Markdown formatting
              nullable: true
              example: Some more **information** about this subscription
            invoice_content:
              allOf:
                - $ref: '#/components/schemas/InvoiceContent'
                - description: Whether the invoices generated from this subscription are for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France; null otherwise.
            status:
              type: string
              enum:
                - active
                - deactivated
              example: active
            department:
              $ref: '#/components/schemas/TypeAndId'
            invoicee:
              $ref: '#/components/schemas/SubscriptionsResponseInvoicee'
            project:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            next_renewal_date:
              type: string
              nullable: true
              example: '2022-06-21'
            total:
              type: object
              properties:
                tax_exclusive:
                  $ref: '#/components/schemas/Money'
                tax_inclusive:
                  $ref: '#/components/schemas/Money'
                taxes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Taxes'
            web_url:
              type: string
              example: https://focus.teamleader.eu/subscription_detail.php?id=e2314517-3cab-4aa9-8471-450e73449041
            starts_on:
              type: string
              example: '2022-05-21'
            ends_on:
              type: string
              nullable: true
              example: '2023-07-21'
            billing_cycle:
              allOf:
                - $ref: '#/components/schemas/BillingCycle'
                - description: Only available for api-version 9999-99-99
            payment_term:
              $ref: '#/components/schemas/PaymentTerm'
            grouped_lines:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionsGroupedLinesResponse'
              description: ''
            invoice_generation:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - draft
                    - book
                    - book_and_send
                  example: book
                sending_methods:
                  type: array
                  description: Only provided when action is "book_and_send".
                  items:
                    type: object
                    properties:
                      method:
                        type: string
                        enum:
                          - email
                          - peppol
                          - postal_service
                        example: email
                payment_method:
                  type: string
                  enum:
                    - direct_debit
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            document_template:
              $ref: '#/components/schemas/TypeAndId'
            currency:
              type: string
              example: USD
            purchase_order_number:
              type: string
              nullable: true
              example: '000023'
            delivery_information:
              type: object
              nullable: true
              properties:
                type:
                  type: string
                  enum:
                    - set_days_after_invoice_date
                number_of_days_after_invoice_date:
                  type: integer
                  example: 5
            created_at:
              type: string
              nullable: true
              example: '2022-04-18T16:44:33+00:00'
    SubscriptionsGroupedLinesRequest:
      title: SubscriptionsGroupedLinesRequest
      required:
        - line_items
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemRequest'
              - type: object
                required:
                  - quantity
                  - description
                  - unit_price
                  - tax_rate_id
                properties:
                  withholding_tax_rate_id:
                    type: string
                    example: c0c03f1e-77e3-402c-a713-30ea1c585824
                  product_category_id:
                    type: string
                    description: These are ledger accounts
                    example: e2314517-3cab-4aa9-8471-450e73449041
          description: ''
    InvoiceGenerationCreate:
      title: InvoiceGenerationCreate
      type: object
      oneOf:
        - type: object
          title: With action draft
          properties:
            action:
              type: string
              example: draft
            payment_method:
              type: string
              enum:
                - direct_debit
          required:
            - action
        - type: object
          title: With action book
          properties:
            action:
              type: string
              example: book
            payment_method:
              type: string
              enum:
                - direct_debit
          required:
            - action
        - type: object
          title: With action & sending_methods
          properties:
            action:
              type: string
              example: book_and_send
            sending_methods:
              type: array
              description: Only provided when action is "book_and_send". Method "email" is always required; when "peppol" is used, "email" acts as the fallback for when Peppol sending fails.
              items:
                type: object
                properties:
                  method:
                    type: string
                    enum:
                      - email
                      - peppol
                      - postal_service
                    example: email
                required:
                  - method
            payment_method:
              type: string
              enum:
                - direct_debit
          required:
            - action
            - sending_methods
    subscriptions.create.request:
      title: subscriptions.create.request
      type: object
      required:
        - invoicee
        - department_id
        - starts_on
        - billing_cycle
        - title
        - grouped_lines
        - payment_term
        - invoice_generation
      properties:
        invoicee:
          $ref: '#/components/schemas/InvoicesRequestInvoicee'
        department_id:
          type: string
          example: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
        starts_on:
          type: string
          example: '2022-04-26'
        billing_cycle:
          allOf:
            - $ref: '#/components/schemas/BillingCycle'
            - required:
                - periodicity
                - days_in_advance
        title:
          type: string
          example: Subscription for cookies
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionsGroupedLinesRequest'
          description: ''
        ends_on:
          type: string
          nullable: true
          example: '2022-05-26'
        deal_id:
          type: string
          example: cef01135-7e51-4f6f-a6eb-6e5e5a885ac8
        project_id:
          type: string
          example: ebafa4c5-fa8a-4409-92e5-1b192243372f
        note:
          type: string
          example: Subscription comments
        invoice_content:
          allOf:
            - $ref: '#/components/schemas/InvoiceContent'
            - description: Whether the invoices generated from this subscription are for goods, services, or both. Required when the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France. Cleared otherwise.
        payment_term:
          $ref: '#/components/schemas/PaymentTerm'
        invoice_generation:
          $ref: '#/components/schemas/InvoiceGenerationCreate'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
        delivery_information:
          type: object
          nullable: true
          properties:
            type:
              type: string
              enum:
                - set_days_after_invoice_date
            number_of_days_after_invoice_date:
              type: integer
              minimum: 0
              example: 5
          required:
            - type
            - number_of_days_after_invoice_date
    subscriptions.create.response:
      title: subscriptions.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    InvoiceGenerationUpdate:
      title: InvoiceGenerationUpdate
      type: object
      oneOf:
        - type: object
          title: With action draft
          properties:
            action:
              type: string
              example: draft
            payment_method:
              type: string
              enum:
                - direct_debit
          required:
            - action
        - type: object
          title: With action book
          properties:
            action:
              type: string
              example: book
            payment_method:
              type: string
              enum:
                - direct_debit
          required:
            - action
        - type: object
          title: With action & sending_methods
          properties:
            action:
              type: string
              example: book_and_send
            sending_methods:
              type: array
              description: Only provided when action is "book_and_send". Method "email" is always required; when "peppol" is used, "email" acts as the fallback for when Peppol sending fails.
              items:
                type: object
                properties:
                  method:
                    type: string
                    enum:
                      - email
                      - peppol
                      - postal_service
                    example: email
                required:
                  - method
            payment_method:
              type: string
              enum:
                - direct_debit
              nullable: true
          required:
            - action
            - sending_methods
    subscriptions.update.request:
      title: subscriptions.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 5b16f6ee-e302-0079-901b-50c26c4a55b1
        starts_on:
          type: string
          description: Can only be provided if no invoices have been created yet.
          example: '2022-04-26'
        billing_cycle:
          allOf:
            - $ref: '#/components/schemas/BillingCycle'
            - type: object
              required:
                - periodicity
                - days_in_advance
            - description: Can only be provided if no invoices have been created yet.
        ends_on:
          type: string
          nullable: true
          example: '2022-05-26'
        title:
          type: string
          example: Subscription for cookies
        invoicee:
          $ref: '#/components/schemas/InvoicesRequestInvoicee'
        department_id:
          type: string
          example: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
        payment_term:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentTerm'
        project_id:
          type: string
          nullable: true
          example: cef01135-7e51-4f6f-a6eb-6e5e5a885ac8
        deal_id:
          type: string
          nullable: true
          example: f6871b06-6513-4750-b5e6-ff3503b5a029
        note:
          type: string
          nullable: true
          example: Subscription comments
        invoice_content:
          allOf:
            - $ref: '#/components/schemas/InvoiceContent'
            - description: Whether the invoices generated from this subscription are for goods, services, or both. When the department and the customer's invoicing address are both in France and the account sends invoices via Peppol from France, an explicit `null` returns a 400, and omitting the field defaults to `goods_and_services` unless a value is already set. Cleared otherwise.
        grouped_lines:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionsGroupedLinesRequest'
          description: ''
        invoice_generation:
          $ref: '#/components/schemas/InvoiceGenerationUpdate'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        document_template_id:
          type: string
          example: 179e1564-493b-4305-8c54-a34fc80920fc
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
        delivery_information:
          type: object
          nullable: true
          properties:
            type:
              type: string
              enum:
                - set_days_after_invoice_date
            number_of_days_after_invoice_date:
              type: integer
              minimum: 0
              example: 5
          required:
            - type
            - number_of_days_after_invoice_date
    subscriptions.deactivate.request:
      title: subscriptions.deactivate.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
    taxRates.list.request:
      title: taxRates.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            department_id:
              type: string
              description: The ID of the department you wish to filter on.
              example: 080aac72-ff1a-4627-bfe3-146b6eee979c
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - department_id
                      - rate
                      - description
                  order:
                    type: string
                    enum:
                      - asc
                      - desc
    taxRates.list.response:
      title: taxRates.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: c93ddb52-0af8-47d9-8551-441435be66a7
              description:
                type: string
                example: 21%
              rate:
                type: number
                example: 0.21
              department:
                $ref: '#/components/schemas/TypeAndId'
          description: ''
    paymentTerms.list.response:
      title: paymentTerms.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: c93ddb52-0af8-47d9-8551-441435be66a7
              type:
                type: string
                enum:
                  - cash
                  - end_of_month
                  - after_invoice_date
                description: |
                  * `cash` - Direct payment, often cash.
                  * `end_of_month` - End of the month of Xth day after the invoice date.
                  * `after_invoice_date` - X days after invoice date.
              days:
                type: number
                description: Modifier "X" for the above statements. Not required when type is 'cash'.
        meta:
          type: object
          properties:
            default:
              type: string
              example: c93ddb52-0af8-47d9-8551-441435be66a7
    withholdingTaxRates.list.request:
      title: withholdingTaxRates.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            department_id:
              type: string
              description: The ID of the department you wish to filter on.
              example: 080aac72-ff1a-4627-bfe3-146b6eee979c
    withholdingTaxRates.list.response:
      title: withholdingTaxRates.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: c93ddb52-0af8-47d9-8551-441435be66a7
              description:
                type: string
                example: 21%
              rate:
                type: number
                example: 0.21
              department:
                $ref: '#/components/schemas/TypeAndId'
          description: ''
    commercialDiscounts.list.request:
      title: commercialDiscounts.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            department_id:
              type: string
              example: 6a6343fc-fdd8-4bc0-aa69-3a004c710e87
    commercialDiscounts.list.response:
      title: commercialDiscounts.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: f8f95182-3947-0a4a-b426-3adaa66fc32a
              name:
                type: string
                example: My holiday discount
              department:
                $ref: '#/components/schemas/TypeAndId'
          description: ''
    paymentMethods.list.request:
      title: paymentMethods.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              example:
                - 92296ad0-2d61-4179-b174-9f354ca2157f
                - 53635682-c382-4fbf-9fd9-9506ca4fbcdd
            status:
              type: array
              items:
                type: string
                enum:
                  - active
                  - archived
              description: Filters on status
        page:
          $ref: '#/components/schemas/Page'
    paymentMethods.list.response:
      title: paymentMethods.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - status
            properties:
              id:
                type: string
                example: 49b403be-a32e-0901-9b1c-25214f9027c6
              name:
                type: string
                example: Coupons
              status:
                type: string
                enum:
                  - active
                  - archived
                example: active
          description: ''
    expenses.list.request:
      type: object
      properties:
        filter:
          type: object
          properties:
            term:
              type: string
              description: Filters by document number, supplier name and title, case-insensitive
            source_types:
              type: array
              description: Filters by one or more source types
              items:
                type: string
                enum:
                  - incomingInvoice
                  - incomingCreditNote
                  - receipt
            review_statuses:
              type: array
              description: Filters by one or more review statuses
              items:
                type: string
                enum:
                  - pending
                  - approved
                  - refused
            bookkeeping_statuses:
              type: array
              description: Filters by one or more bookkeeping statuses
              items:
                type: string
                enum:
                  - sent
                  - not_sent
            payment_statuses:
              type: array
              description: Filters by one or more payment statuses
              items:
                type: string
                enum:
                  - unknown
                  - paid
                  - partially_paid
                  - credited
                  - not_paid
            department_ids:
              type: array
              description: Filters by one or more department IDs
              items:
                type: string
            supplier:
              type: object
              description: Filters by a specific supplier
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                id:
                  type: string
              required:
                - type
                - id
            document_date:
              type: object
              properties:
                operator:
                  type: string
                  enum:
                    - is_empty
                    - between
                    - equals
                    - before
                    - after
                value:
                  type: string
                  description: Required if operator is `equals`, `before`, or `after`
                start:
                  type: string
                  description: Required if operator is `between`
                end:
                  type: string
                  description: Required if operator is `between`
              required:
                - operator
            paid_at:
              type: object
              description: Filters by payment date
              properties:
                operator:
                  type: string
                  enum:
                    - is_empty
                    - between
                    - equals
                    - before
                    - after
                value:
                  type: string
                  description: Required if operator is `equals`, `before`, or `after`, date is inclusive
                start:
                  type: string
                  description: Required if operator is `between`
                end:
                  type: string
                  description: Required if operator is `between`
              required:
                - operator
        page:
          type: object
          properties:
            size:
              type: number
              default: 20
            number:
              type: number
              default: 1
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - type: object
                properties:
                  field:
                    enum:
                      - document_date
                      - due_date
                      - supplier_name
    expenses.list.response:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              source:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - incomingInvoice
                      - incomingCreditNote
                      - receipt
                  id:
                    type: string
              origin:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - user
                      - peppolIncomingDocument
                  id:
                    type: string
              title:
                type: string
              supplier:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - company
                      - contact
                  id:
                    type: string
                nullable: true
              document_number:
                type: string
                nullable: true
              document_date:
                type: string
                nullable: true
              due_date:
                type: string
                nullable: true
              currency:
                type: object
                properties:
                  code:
                    $ref: '#/components/schemas/CurrencyCode'
              total:
                type: object
                properties:
                  tax_exclusive:
                    type: object
                    properties:
                      amount:
                        type: number
                    nullable: true
                  tax_inclusive:
                    type: object
                    properties:
                      amount:
                        type: number
                    nullable: true
              company_entity:
                type: object
                properties:
                  type:
                    type: string
                  id:
                    type: string
                nullable: true
              file:
                type: object
                properties:
                  type:
                    type: string
                  id:
                    type: string
                nullable: true
              payment_reference:
                type: string
                nullable: true
              review_status:
                type: string
                enum:
                  - pending
                  - approved
                  - refused
              bookkeeping_status:
                type: string
                enum:
                  - not_sent
                  - sent
              iban_number:
                type: string
                nullable: true
              payment_status:
                type: string
                enum:
                  - unknown
                  - paid
                  - partially_paid
                  - credited
                  - not_paid
              paid_amount:
                type: number
                nullable: true
              paid_at:
                type: string
                nullable: true
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    incomingCreditNotes.listPayments.request:
      title: incomingCreditNotes.listPayments.request
      type: object
      properties:
        id:
          type: string
      required:
        - id
    incomingCreditNotes.listPayments.response:
      title: incomingCreditNotes.listPayments.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              payment:
                $ref: '#/components/schemas/Money'
              paid_at:
                type: string
                format: date-time
              payment_method:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                  id:
                    type: string
              remark:
                type: string
                nullable: true
        meta:
          type: object
          properties:
            total:
              $ref: '#/components/schemas/Money'
    incomingCreditNotes.registerPayment.request:
      title: receipts.incomingCreditNotes
      type: object
      properties:
        id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment
        - paid_at
    incomingCreditNotes.registerPayment.response:
      title: receipts.registerPayment.response
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
    incomingCreditNotes.removePayment.request:
      title: receipts.removePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
      required:
        - id
        - payment_id
    incomingCreditNotes.updatePayment.request:
      title: incomingCreditNotes.updatePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment_id
    incomingInvoices.listPayments.request:
      title: incomingInvoices.listPayments.request
      type: object
      properties:
        id:
          type: string
      required:
        - id
    incomingInvoices.listPayments.response:
      title: incomingInvoices.listPayments.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              payment:
                $ref: '#/components/schemas/Money'
              paid_at:
                type: string
                format: date-time
              payment_method:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                  id:
                    type: string
              remark:
                type: string
                nullable: true
        meta:
          type: object
          properties:
            total:
              $ref: '#/components/schemas/Money'
    incomingInvoices.registerPayment.request:
      title: incomingInvoices.registerPayment.request
      type: object
      properties:
        id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment
        - paid_at
    incomingInvoices.registerPayment.response:
      title: receipts.registerPayment.response
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
    incomingInvoices.removePayment.request:
      title: incomingInvoices.removePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
      required:
        - id
        - payment_id
    incomingInvoices.updatePayment.request:
      title: incomingInvoices.updatePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment_id
    receipts.listPayments.request:
      title: receipts.listPayments.request
      type: object
      properties:
        id:
          type: string
      required:
        - id
    receipts.listPayments.response:
      title: receipts.listPayments.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              payment:
                $ref: '#/components/schemas/Money'
              paid_at:
                type: string
                format: date-time
              payment_method:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                  id:
                    type: string
              remark:
                type: string
                nullable: true
        meta:
          type: object
          properties:
            total:
              $ref: '#/components/schemas/Money'
    receipts.registerPayment.request:
      title: receipts.registerPayment.request
      type: object
      properties:
        id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment
        - paid_at
    receipts.registerPayment.response:
      title: receipts.registerPayment.response
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
    receipts.removePayment.request:
      title: receipts.removePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
      required:
        - id
        - payment_id
    receipts.updatePayment.request:
      title: receipts.updatePayment.request
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
        payment:
          $ref: '#/components/schemas/Money'
        paid_at:
          type: string
          format: date-time
        payment_method_id:
          type: string
          nullable: true
        remark:
          type: string
          nullable: true
      required:
        - id
        - payment_id
    productCategories.list.request:
      title: productCategories.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            department_id:
              type: string
              description: The ID of the department you wish to filter on.
              example: 080aac72-ff1a-4627-bfe3-146b6eee979c
    productCategories.list.response:
      title: productCategories.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
              name:
                type: string
                example: '''Asian Flowers'''
              ledgers:
                type: array
                items:
                  type: object
                  properties:
                    department:
                      $ref: '#/components/schemas/TypeAndId'
                    ledger_account_number:
                      type: string
                      example: '70100'
                description: ''
          description: ''
    products.list.request:
      title: products.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            term:
              type: string
              description: Will filter on the name or the code.
              example: cookies
            updated_since:
              type: string
              example: '2019-02-05T16:44:33+00:00'
        page:
          $ref: '#/components/schemas/Page'
    Stock:
      title: Stock
      type: object
      properties:
        amount:
          type: number
          nullable: true
          example: 123
      description: Only available when stock management feature is enabled
    ProductConfigurationRead:
      title: ProductConfigurationRead
      type: object
      properties:
        stock_threshold:
          type: object
          nullable: true
          description: Only available when stock management feature is enabled
          properties:
            minimum:
              type: number
              example: 4
            action:
              type: string
              enum:
                - notify
              example: notify
    products.list.response:
      title: products.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
              name:
                type: string
                nullable: true
                example: cookies
              description:
                type: string
                description: The description of the product in Markdown
                nullable: true
                example: dark chocolate
              code:
                type: string
                nullable: true
                example: COOK-DARKCHOC-42
              unit:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              added_at:
                type: string
                example: '2016-02-01T11:25:41+00:00'
              updated_at:
                type: string
                example: '2016-02-01T11:25:41+00:00'
              stock:
                allOf:
                  - $ref: '#/components/schemas/Stock'
                  - description: Only available when stock management feature is enabled
              configuration:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/ProductConfigurationRead'
          description: ''
    products.info.request:
      title: products.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: suppliers
    products.info.response:
      title: products.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: f8ae61ec-62f3-0538-b028-185c4a5f217f
            name:
              type: string
              nullable: true
              example: cookies
            description:
              type: string
              description: The description of the product in Markdown
              nullable: true
              example: dark chocolate
            code:
              type: string
              nullable: true
              example: COOK-DARKCHOC-42
            purchase_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            selling_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            unit:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            tax:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            suppliers:
              type: array
              items:
                type: object
                properties:
                  supplier:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - company
                          - contact
                        example: contact
                      id:
                        type: string
                        example: e2314517-3cab-4aa9-8471-450e73449040
                  purchase_price:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Money'
                  product_code:
                    type: string
                    example: prod-111
                  minimum_order_amount:
                    type: number
                    example: 3
                  classification:
                    type: string
                    enum:
                      - primary
                      - secondary
              description: Only included with request parameter `includes=suppliers`
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            price_list_prices:
              type: array
              items:
                type: array
                items: {}
            product_category:
              type: object
              nullable: true
              description: These are ledger accounts
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            stock:
              allOf:
                - $ref: '#/components/schemas/Stock'
                - description: Only available when stock management feature is enabled
            configuration:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/ProductConfigurationRead'
            added_at:
              type: string
              example: '2016-02-01T11:25:41+00:00'
            updated_at:
              type: string
              example: '2016-02-01T11:25:41+00:00'
    ProductPriceWrite:
      title: ProductPriceWrite
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          example: 100
        currency:
          type: string
          example: EUR
    StockThreshold:
      title: StockThreshold
      required:
        - minimum
        - action
      type: object
      properties:
        minimum:
          type: number
          description: Cannot be negative
          example: 4
        action:
          enum:
            - notify
          type: string
          example: notify
      description: Only available when stock management feature is enabled
    ProductConfigurationWrite:
      title: ProductConfigurationWrite
      type: object
      properties:
        stock_threshold:
          type: object
          nullable: true
          description: Only available when stock management feature is enabled
          allOf:
            - $ref: '#/components/schemas/StockThreshold'
    products.add.request:
      title: products.add.request
      type: object
      properties:
        name:
          type: string
          example: cookies
        code:
          type: string
          example: COOK-DARKCHOC-42
        description:
          type: string
          description: The description of the product in Markdown
        purchase_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        selling_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_of_measure_id:
          type: string
          nullable: true
          example: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
        price_list_prices:
          type: array
          items:
            type: object
            required:
              - price_list_id
              - price
            properties:
              price_list_id:
                type: string
                example: d905ff57-e866-0f59-9d1e-1fd4538bfae1
              price:
                $ref: '#/components/schemas/ProductPriceWrite'
        stock:
          allOf:
            - $ref: '#/components/schemas/Stock'
            - description: Only available when stock management feature is enabled
        configuration:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ProductConfigurationWrite'
        department_id:
          type: string
          example: af48fe9e-d44c-0eac-8813-8be051b10921
        product_category_id:
          type: string
          description: These are ledger accounts
          example: 624ca743-8998-4f8c-add1-c427bb022166
        tax_rate_id:
          type: string
          example: 23097774-e51e-0371-9b42-98ef8ca8bbb6
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    products.add.response:
      title: products.add.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    products.update.request:
      title: products.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 71e91f91-b222-033f-8c7e-59bcc1521e3d
        name:
          type: string
          nullable: true
          example: Hosting
        code:
          type: string
          nullable: true
          example: c0d32
        purchase_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        description:
          type: string
          nullable: true
          example: Product used for hosting web solutions
        selling_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_of_measure_id:
          type: string
          nullable: true
          example: f79d3e04-b8dc-0637-8f18-ca7c8fc63b71
        price_list_prices:
          type: array
          items:
            type: array
            items: {}
        stock:
          allOf:
            - $ref: '#/components/schemas/Stock'
            - description: Only available when stock management feature is enabled
        configuration:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ProductConfigurationWrite'
        department_id:
          type: string
          example: af48fe9e-d44c-0eac-8813-8be051b10921
        product_category_id:
          type: string
          description: These are ledger accounts
          example: 624ca743-8998-4f8c-add1-c427bb022166
        tax_rate_id:
          type: string
          example: 23097774-e51e-0371-9b42-98ef8ca8bbb6
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    products.delete.request:
      title: products.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 71e91f91-b222-033f-8c7e-59bcc1521e3d
    unitsOfMeasure.list.response:
      title: unitsOfMeasure.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IdAndName'
          description: ''
    priceLists.list.request:
      title: priceLists.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
    priceLists.list.response:
      title: priceLists.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 2aa4a6a9-9ce8-4851-a9b3-26aea2ea14c4
              name:
                type: string
                example: price
              calculation_method:
                type: string
                enum:
                  - manual
                  - based_on_price_list
                  - based_on_purchase_price
                example: manual
          description: ''
    projects.list.request:
      title: projects.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            customer:
              $ref: '#/components/schemas/Customer'
            status:
              type: string
              enum:
                - active
                - on_hold
                - done
                - cancelled
            participant_id:
              type: string
              example: ed544eac-02e4-037b-8a1a-c8dd662bf621
            term:
              type: string
              description: Searches for a term in title or description
              example: coffee
            updated_since:
              type: string
              example: '2020-06-04T16:44:33+00:00'
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - due_on
                      - title
                      - created_at
                    default: due_on
                  order:
                    default: asc
    ProjectsActuals:
      title: ProjectsActuals
      type: object
      properties:
        billable_amount:
          $ref: '#/components/schemas/Money'
        costs:
          $ref: '#/components/schemas/Money'
        result:
          $ref: '#/components/schemas/Money'
        profit_percentage:
          type: number
      description: Only accessible for administrators of this project
    ProjectsBudget:
      title: ProjectsBudget
      description: Only accessible for administrators of this project
      type: object
      properties:
        provided:
          $ref: '#/components/schemas/Money'
        spent:
          type: object
          properties:
            total:
              $ref: '#/components/schemas/Money'
            time:
              $ref: '#/components/schemas/Money'
            materials:
              $ref: '#/components/schemas/Money'
        remaining:
          $ref: '#/components/schemas/Money'
        allocated:
          type: object
          nullable: true
          description: The amount of money still expected to be spent. This is null if there is not enough data to calculate
          allOf:
            - $ref: '#/components/schemas/Money'
        forecasted:
          type: object
          nullable: true
          description: A prediction of the spent budget upon project completion. This is null if there is not enough data to calculate
          allOf:
            - $ref: '#/components/schemas/Money'
    projects.list.response:
      title: projects.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 624ca743-8998-4f8c-add1-c427bb022166
              reference:
                type: string
                example: PRO-2
              title:
                type: string
                example: New company website
              description:
                type: string
              status:
                type: string
                enum:
                  - active
                  - on_hold
                  - done
                  - cancelled
              customer:
                $ref: '#/components/schemas/TypeAndId'
              starts_on:
                type: string
                example: '2016-02-04'
              due_on:
                type: string
                example: '2016-10-14'
              created_at:
                type: string
                example: '2016-02-01T11:25:41+00:00'
              source:
                $ref: '#/components/schemas/TypeAndId'
              actuals:
                allOf:
                  - $ref: '#/components/schemas/ProjectsActuals'
                  - description: Only accessible for administrators of this project
              budget:
                allOf:
                  - $ref: '#/components/schemas/ProjectsBudget'
                  - description: Only accessible for administrators of this project
          description: ''
    projects.info.request:
      title: projects.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 8a04371b-2ffb-407b-9b24-d5b5452009c7
    Role:
      title: Role
      enum:
        - decision_maker
        - member
      type: string
    Participants:
      title: Participants
      type: object
      properties:
        participant:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - user
                  example: user
        role:
          $ref: '#/components/schemas/Role'
    projects.info.response:
      title: projects.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 8a04371b-2ffb-407b-9b24-d5b5452009c7
            reference:
              type: string
              example: PRO-1
            title:
              type: string
              example: New company website
            description:
              type: string
            status:
              type: string
              enum:
                - active
                - on_hold
                - done
                - cancelled
            customer:
              $ref: '#/components/schemas/Customer'
            starts_on:
              type: string
              example: '2016-02-04'
            due_on:
              type: string
              example: '2016-02-04'
            source:
              $ref: '#/components/schemas/TypeAndId'
            milestones:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            participants:
              type: array
              items:
                $ref: '#/components/schemas/Participants'
              description: ''
            purchase_order_number:
              type: string
              nullable: true
              example: '000023'
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            actuals:
              allOf:
                - $ref: '#/components/schemas/ProjectsActuals'
                - description: Only accessible for administrators of this project
            budget:
              allOf:
                - $ref: '#/components/schemas/ProjectsBudget'
                - description: Only accessible for administrators of this project
    projects.create.request:
      title: projects.create.request
      required:
        - title
        - starts_on
        - milestones
        - participants
      type: object
      properties:
        title:
          type: string
          example: New company website
        description:
          type: string
        starts_on:
          type: string
          example: '2016-02-04'
        milestones:
          type: array
          items:
            type: object
            required:
              - due_on
              - name
              - responsible_user_id
            properties:
              starts_on:
                type: string
                nullable: true
                example: '2017-01-01'
              due_on:
                type: string
                example: '2018-01-01'
              name:
                type: string
                example: Initial setup
              responsible_user_id:
                type: string
                example: e1240972-6cfc-4549-b49c-edda7568cc48
          description: At least one milestone is required
        participants:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Participants'
              - type: object
                required:
                  - participant
                properties:
                  participant:
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                      - type: object
                        required:
                          - type
                          - id
          description: At least one decision making participant is required
        purchase_order_number:
          type: string
          example: '000023'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        customer:
          $ref: '#/components/schemas/Customer'
    projects.create.response:
      title: projects.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects.update.request:
      title: projects.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: dcc2e8ed-51be-4cb6-9c01-034aedac86fd
        title:
          type: string
          example: New company website
        description:
          type: string
        status:
          type: string
          enum:
            - active
            - on_hold
            - done
            - cancelled
        starts_on:
          type: string
          example: '2016-02-04'
        customer:
          type: object
          nullable: true
          description: Null will unlink the customer from the project
          allOf:
            - $ref: '#/components/schemas/Customer'
        budget:
          $ref: '#/components/schemas/Money'
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    projects.close.request:
      title: projects.close.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 01548b10-4932-4a18-8a89-005ad09db2c8
    projects.reopen.request:
      title: projects.reopen.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 01548b10-4932-4a18-8a89-005ad09db2c8
    projects.delete.request:
      title: projects.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 01548b10-4932-4a18-8a89-005ad09db2c8
    projects.addParticipant.request:
      title: projects.addParticipant.request
      required:
        - id
        - participant
      type: object
      properties:
        id:
          type: string
          example: 8dbfa9db-c53f-410c-97d3-755b19685809
        participant:
          $ref: '#/components/schemas/TypeAndId'
        role:
          $ref: '#/components/schemas/Role'
    projects.updateParticipant.request:
      title: projects.updateParticipant.request
      required:
        - id
        - role
      type: object
      properties:
        id:
          type: string
          example: 55fbe14f-7399-48e5-b4e0-64b7f5c50451
        participant:
          $ref: '#/components/schemas/TypeAndId'
        role:
          $ref: '#/components/schemas/Role'
    milestones.list.request:
      title: milestones.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            project_id:
              type: string
              example: 082e6289-30c5-45ad-bcd0-190b02d21e81
            status:
              type: string
              enum:
                - open
                - closed
            due_before:
              type: string
              example: '2017-01-01'
            due_after:
              type: string
              example: '2017-01-01'
            term:
              type: string
              description: Searches for a term in title
              example: coffee
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - starts_on
                      - due_on
                    default: due_on
                  order:
                    default: asc
    MilestonesActuals:
      title: MilestonesActuals
      type: object
      properties:
        billable_amount:
          $ref: '#/components/schemas/Money'
        costs:
          $ref: '#/components/schemas/Money'
        result:
          $ref: '#/components/schemas/Money'
      description: Only accessible for administrators of the project this milestone belongs to
    MilestonesBudget:
      title: MilestonesBudget
      description: Only accessible for administrators of the project this milestone belongs to
      type: object
      properties:
        provided:
          $ref: '#/components/schemas/Money'
        spent:
          $ref: '#/components/schemas/Money'
        remaining:
          $ref: '#/components/schemas/Money'
        allocated:
          type: object
          nullable: true
          description: The amount of money still expected to be spent. This is null if there is not enough data to calculate
          allOf:
            - $ref: '#/components/schemas/Money'
        forecasted:
          type: object
          nullable: true
          description: A prediction of the spent budget upon milestone completion. This is null if there is not enough data to calculate
          allOf:
            - $ref: '#/components/schemas/Money'
    milestones.list.response:
      title: milestones.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: cfb4146d-06be-41f1-bb39-aa3c929c71dc
              project:
                $ref: '#/components/schemas/TypeAndId'
              starts_on:
                type: string
                nullable: true
                example: '2017-01-01'
              due_on:
                type: string
                example: '2018-01-01'
              name:
                type: string
                example: Initial setup
              responsible_user:
                $ref: '#/components/schemas/TypeAndId'
              status:
                type: string
                enum:
                  - open
                  - closed
              invoicing_method:
                type: string
                enum:
                  - time_and_materials
                  - fixed_price
                  - non_invoiceable
                example: time_and_materials
              depends_on:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              dependency_for:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
              actuals:
                allOf:
                  - $ref: '#/components/schemas/MilestonesActuals'
                  - description: Only accessible for administrators of the project this milestone belongs to
              budget:
                allOf:
                  - $ref: '#/components/schemas/MilestonesBudget'
                  - description: Only accessible for administrators of the project this milestone belongs to
          description: ''
    milestones.info.request:
      title: milestones.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
    milestones.info.response:
      title: milestones.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 64349fa2-6ca2-4b19-82e6-d3258ceab2d8
            project:
              $ref: '#/components/schemas/TypeAndId'
            starts_on:
              type: string
              nullable: true
              example: '2017-01-01'
            due_on:
              type: string
              example: '2018-01-01'
            name:
              type: string
              example: Initial setup
            description:
              type: string
            responsible_user:
              $ref: '#/components/schemas/TypeAndId'
            status:
              type: string
              enum:
                - open
                - closed
            invoicing_method:
              type: string
              enum:
                - time_and_materials
                - fixed_price
                - non_invoiceable
              example: time_and_materials
            depends_on:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            dependency_for:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            actuals:
              allOf:
                - $ref: '#/components/schemas/MilestonesActuals'
                - description: Only accessible for administrators of the project this milestone belongs to
            budget:
              allOf:
                - $ref: '#/components/schemas/MilestonesBudget'
                - description: Only accessible for administrators of the project this milestone belongs to
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
    milestones.create.request:
      title: milestones.create.request
      required:
        - project_id
        - due_on
        - name
        - responsible_user_id
      type: object
      properties:
        project_id:
          type: string
          example: 1c159f98-4b07-438a-9f42-fb4206b9530d
        starts_on:
          type: string
          nullable: true
          example: '2017-01-01'
        due_on:
          type: string
          example: '2018-01-01'
        name:
          type: string
          example: Initial setup
        description:
          type: string
        responsible_user_id:
          type: string
          example: e1240972-6cfc-4549-b49c-edda7568cc48
        depends_on:
          type: string
          nullable: true
          example: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
      oneOf:
        - type: object
          title: With budget
          properties:
            billing_method:
              type: string
              enum:
                - non_invoiceable
                - time_and_materials
              default: time_and_materials
            budget:
              allOf:
                - $ref: '#/components/schemas/Money'
              description: Required when `billing_method` is provided. The currency must match the account currency.
        - type: object
          title: With price
          required:
            - billing_method
            - price
          properties:
            billing_method:
              type: string
              enum:
                - fixed_price
            price:
              allOf:
                - $ref: '#/components/schemas/Money'
              description: The currency must match the account currency.
    milestones.create.response:
      title: milestones.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    milestones.update.request:
      title: milestones.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
        starts_on:
          type: string
          nullable: true
          example: '2017-01-01'
        due_on:
          type: string
          example: '2018-01-01'
        name:
          type: string
          example: Initial setup
        description:
          type: string
        responsible_user_id:
          type: string
          example: e1240972-6cfc-4549-b49c-edda7568cc48
        depends_on:
          type: string
          nullable: true
          example: 0488d792-ba9b-059f-bd57-bea75d3f4f4e
        propagate_date_changes:
          type: boolean
          example: false
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
      oneOf:
        - type: object
          title: With budget
          properties:
            billing_method:
              type: string
              enum:
                - non_invoiceable
                - time_and_materials
            budget:
              allOf:
                - $ref: '#/components/schemas/Money'
              description: Required when `billing_method` is provided. The currency must match the account currency.
        - type: object
          title: With price
          required:
            - billing_method
            - price
          properties:
            billing_method:
              type: string
              enum:
                - fixed_price
            price:
              allOf:
                - $ref: '#/components/schemas/Money'
              description: The currency must match the account currency.
    milestones.delete.request:
      title: milestones.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
    milestones.close.request:
      title: milestones.close.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
    milestones.open.request:
      title: milestones.open.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 67e80ad8-d14f-4510-a2bd-a4c6aa578c37
    projects-v2_projects.list.request:
      title: projects-v2_projects.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            status:
              type: string
              enum:
                - open
                - planned
                - running
                - overdue
                - over_budget
                - closed
              example: open
            quotation_ids:
              type: array
              items:
                type: string
              description: ''
            deal_ids:
              type: array
              items:
                type: string
              description: ''
            term:
              type: string
              description: Filters on the project number, title, customer names, assignee names and owner names. Terms are split on spaces and all terms need to match.
              example: Interesting project
            customers:
              type: array
              items:
                $ref: '#/components/schemas/Customer'
              description: ''
            created_at:
              type: object
              description: Filters by creation date
              properties:
                operator:
                  type: string
                  enum:
                    - between
                    - equals
                    - before
                    - after
                value:
                  type: string
                  format: date-time
                  description: Required if operator is `equals`, `before`, or `after`
                  example: '2022-02-01T00:00:00+00:00'
                start:
                  type: string
                  format: date-time
                  description: Required if operator is `between`
                  example: '2022-02-01T00:00:00+00:00'
                end:
                  type: string
                  format: date-time
                  description: Required if operator is `between`
                  example: '2022-02-28T23:59:59+00:00'
              required:
                - operator
            updated_at:
              type: object
              description: Filters by last update date
              properties:
                operator:
                  type: string
                  enum:
                    - between
                    - equals
                    - before
                    - after
                value:
                  type: string
                  format: date-time
                  description: Required if operator is `equals`, `before`, or `after`
                  example: '2022-02-01T00:00:00+00:00'
                start:
                  type: string
                  format: date-time
                  description: Required if operator is `between`
                  example: '2022-02-01T00:00:00+00:00'
                end:
                  type: string
                  format: date-time
                  description: Required if operator is `between`
                  example: '2022-02-28T23:59:59+00:00'
              required:
                - operator
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - amount_billed
                      - amount_paid
                      - amount_unbilled
                      - cost
                      - created_at
                      - customer
                      - end_date
                      - external_budget_spent
                      - external_budget
                      - internal_budget
                      - margin
                      - price
                      - project_key
                      - start_date
                      - status
                      - time_budget
                      - time_estimated
                      - time_tracked
                      - title
                      - updated_at
                    default: project_key
                  order:
                    default: desc
          description: Sorting on `cost` or `margin` is only available to administrators and users with the "Costs on projects" permission
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: legacy_project,custom_fields
    Color:
      title: Color
      enum:
        - '#00B2B2'
        - '#008A8C'
        - '#992600'
        - '#ED9E00'
        - '#D157D3'
        - '#A400B2'
        - '#0071F2'
        - '#004DA6'
        - '#64788F'
        - '#C0C0C4'
        - '#82828C'
        - '#1A1C20'
      type: string
      example: '#00B2B2'
    Assignees:
      title: Assignees
      type: object
      properties:
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
        assign_type:
          type: string
          enum:
            - manual
            - auto_assigned
            - manual_and_auto_assigned
          example: auto_assigned
    projects-v2_projects.list.response:
      title: projects-v2_projects.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 49b403be-a32e-0901-9b1c-25214f9027c6
              project_key:
                type: number
                description: Positive, sequential integer representing the index of the project for the account
                example: 123
              title:
                type: string
                example: My project title
              description:
                type: string
                nullable: true
                example: My project description
              status:
                type: string
                enum:
                  - open
                  - closed
              billing_method:
                type: string
                enum:
                  - time_and_materials
                  - fixed_price
                  - non_billable
                example: time_and_materials
              time_budget:
                type: object
                nullable: true
                description: Value in seconds, rounded to the nearest minute
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        type: string
                        enum:
                          - seconds
                        example: seconds
              time_estimated:
                type: object
                nullable: true
                description: Combined value of all time estimated by lines linked to project, value in seconds, rounded to the nearest minute.
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        type: string
                        enum:
                          - seconds
                        example: seconds
              time_tracked:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        type: string
                        enum:
                          - seconds
                        example: seconds
              amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              amount_unbilled:
                type: object
                description: Price of the project minus the amount billed.
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              amount_paid:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget:
                type: object
                description: Also known as "budget". Value set by user to compare with price.
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget_spent:
                type: object
                description: Simulated price if billing method were time_and_materials (dependent on type).
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              internal_budget:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              calculated_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin_percentage:
                type: number
                description: '`null` if the user does not have access to "Costs on projects"'
                nullable: true
              start_date:
                type: string
                nullable: true
                example: '2022-02-23'
              end_date:
                type: string
                nullable: true
                example: '2022-02-28'
              created_at:
                type: string
                format: date-time
                example: '2022-02-01T10:33:45+00:00'
              updated_at:
                type: string
                format: date-time
                example: '2022-02-03T14:12:09+00:00'
              company_entity:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              owners:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
              color:
                allOf:
                  - $ref: '#/components/schemas/Color'
                  - example: '#00B2B2'
              assignees:
                type: array
                items:
                  $ref: '#/components/schemas/Assignees'
                description: ''
              customers:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
                description: ''
              deals:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
              quotations:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
              legacy_project:
                type: object
                nullable: true
                description: Only included if `legacy_project` is in the optional includes. `null` if there is no corresponding legacy project
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: project
              custom_fields:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldsResponse'
                description: Only included with request parameter `includes=custom_fields`
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    projects-v2_projects.info.request:
      title: projects-v2_projects.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: legacy_project
    projects-v2_projects.info.response:
      title: projects.inforesponse1
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 49b403be-a32e-0901-9b1c-25214f9027c6
            project_key:
              type: number
              description: Positive, sequential integer representing the index of the project for the account
              example: 123
            title:
              type: string
              example: My project title
            description:
              type: string
              nullable: true
              example: My project description
            status:
              type: string
              enum:
                - open
                - closed
            update_rights:
              type: string
              enum:
                - owners
                - owners_and_assignees
                - everyone
              example: owners
            billing_method:
              type: string
              enum:
                - time_and_materials
                - fixed_price
                - non_billable
              example: time_and_materials
            time_budget:
              type: object
              nullable: true
              description: Value in seconds, rounded to the nearest minute
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      type: string
                      enum:
                        - seconds
                      example: seconds
            time_tracked:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      type: string
                      enum:
                        - seconds
                      example: seconds
            amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            amount_paid:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            task_external_budget_spent:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            material_external_budget_spent:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget_spent:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            internal_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            calculated_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin_percentage:
              type: number
              description: '`null` if the user does not have access to "Costs on projects"'
              nullable: true
            start_date:
              type: string
              nullable: true
              example: '2022-02-23'
            end_date:
              type: string
              nullable: true
              example: '2022-02-28'
            purchase_order_number:
              type: string
              nullable: true
              example: '000023'
            created_at:
              type: string
              format: date-time
              example: '2022-02-01T10:33:45+00:00'
            updated_at:
              type: string
              format: date-time
              example: '2022-02-03T14:12:09+00:00'
            company_entity:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            owners:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            color:
              allOf:
                - $ref: '#/components/schemas/Color'
                - example: '#00B2B2'
            assignees:
              type: array
              items:
                $ref: '#/components/schemas/Assignees'
              description: ''
            customers:
              type: array
              items:
                $ref: '#/components/schemas/Customer'
              description: ''
            deals:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            quotations:
              type: array
              items:
                $ref: '#/components/schemas/TypeAndId'
              description: ''
            custom_user_rates:
              type: array
              items:
                type: object
                properties:
                  user:
                    $ref: '#/components/schemas/TypeAndId'
                  custom_rate:
                    $ref: '#/components/schemas/Money'
              description: ''
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: Auto-increment custom fields are not supported on projects.
            legacy_project:
              type: object
              nullable: true
              description: Only included if `legacy_project` is in the optional includes. `null` if there is no corresponding legacy project
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: project
            external_parties:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: e80e3e0f-4008-47cc-aa94-3d71a42052bf
                  customer:
                    $ref: '#/components/schemas/Customer'
                  function:
                    type: string
                    example: Sales representative
                  sub_function:
                    type: string
                    example: Teamleader Focus FR
    projects-v2_projects.create.request:
      title: projects-v2_projects.create.request
      required:
        - title
      type: object
      properties:
        title:
          type: string
          example: My cool new project
        description:
          type: string
          example: My project description
        owner_ids:
          type: array
          items:
            type: string
          description: The creator is automatically added as an owner, these are additional owners to be added
        time_budget:
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
        billing_method:
          type: string
          enum:
            - time_and_materials
            - fixed_price
            - non_billable
          example: time_and_materials
        external_budget:
          type: object
          description: Also known as "budget". Value set by user to compare with price. Must be higher than or equal to zero, and lower than 100000000000 (100 billion). Only allowed for time_and_materials billing method. Currently only EUR is supported.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          description: Also known as "cost budget". Value set by user to compare with cost. Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          description: Should not be after end_date if provided
          example: '2022-02-23'
        end_date:
          type: string
          description: Should not be before start_date if provided
          example: '2022-02-28'
        purchase_order_number:
          type: string
          example: '000023'
        company_entity_id:
          type: string
          example: 0d0dec5a-7096-4009-be37-07eab117db07
        color:
          allOf:
            - $ref: '#/components/schemas/Color'
            - example: '#00B2B2'
        customers:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
          description: ''
        assignees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Assignee'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - team
                      - user
                    example: user
          description: ''
        deal_ids:
          type: array
          items:
            type: string
          description: ''
        quotation_ids:
          type: array
          items:
            type: string
          description: ''
        initial_time_tracked:
          type: object
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
        initial_price:
          type: object
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_cost:
          type: object
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_amount_billed:
          type: object
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_amount_paid:
          type: object
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: Auto-increment custom fields are not supported on projects.
    projects-v2_projects.create.response:
      title: projects-v2_projects.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    BillingMethod:
      title: BillingMethod
      required:
        - value
        - update_strategy
      type: object
      properties:
        value:
          type: string
          example: time_and_materials
        update_strategy:
          type: string
          enum:
            - none
            - cascade
          example: none
    projects-v2_projects.update.request:
      title: projects-v2_projects.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        title:
          type: string
          example: A different project title
        description:
          type: string
          nullable: true
          example: Another description
        time_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
        billing_method:
          allOf:
            - $ref: '#/components/schemas/BillingMethod'
            - type: object
              properties:
                value:
                  type: string
                  enum:
                    - time_and_materials
                    - fixed_price
                    - non_billable
                  example: time_and_materials
        external_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          description: Should not be after end_date if provided
          nullable: true
          example: '2022-02-23'
        end_date:
          type: string
          description: Should not be before start_date if provided
          nullable: true
          example: '2022-02-28'
        purchase_order_number:
          type: string
          nullable: true
          example: '000023'
        company_entity_id:
          type: string
          nullable: true
          example: 0d0dec5a-7096-4009-be37-07eab117db07
        color:
          allOf:
            - $ref: '#/components/schemas/Color'
            - example: '#00B2B2'
        initial_time_tracked:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
        initial_price:
          type: object
          nullable: true
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_cost:
          type: object
          nullable: true
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_amount_billed:
          type: object
          nullable: true
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        initial_amount_paid:
          type: object
          nullable: true
          description: Must be higher than or equal to zero, and lower than 100000000000 (100 billion).
          allOf:
            - $ref: '#/components/schemas/Money'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: Auto-increment custom fields are not supported on projects.
    projects-v2_projects.close.request:
      title: projects-v2_projects.close.request
      required:
        - id
        - closing_strategy
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        closing_strategy:
          type: string
          enum:
            - mark_tasks_and_materials_as_done
            - none
    projects-v2_projects.reopen.request:
      title: projects-v2_projects.reopen.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 01548b10-4932-4a18-8a89-005ad09db2c8
    projects-v2_projects.duplicate.request:
      title: projects-v2_projects.duplicate.request
      required:
        - id
        - title
      type: object
      properties:
        id:
          type: string
          example: 81df9996-6d2c-4844-86d6-202c08d2837e
        title:
          type: string
          example: Copy of my project
    projects-v2_projects.duplicate.response:
      title: projects-v2_projects.duplicate.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_projects.delete.request:
      title: projects-v2_projects.delete.request
      required:
        - id
        - delete_strategy
      type: object
      properties:
        id:
          type: string
          example: 81df9996-6d2c-4844-86d6-202c08d2837e
        delete_strategy:
          type: string
          enum:
            - unlink_tasks_and_time_trackings
            - delete_tasks_and_time_trackings
            - delete_tasks_unlink_time_trackings
          example: unlink_tasks_and_time_trackings
    projects-v2_projects.addOwner.request:
      title: projects-v2_projects.addOwner.request
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        user_id:
          type: string
          example: 66abace2-62af-0836-a927-fe3f44b9b47b
    projects-v2_projects.removeOwner.request:
      title: projects-v2_projects.removeOwner.request
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        user_id:
          type: string
          example: 66abace2-62af-0836-a927-fe3f44b9b47b
    projects-v2_projects.assign.request:
      title: projects-v2_projects.assign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_projects.unassign.request:
      title: projects-v2_projects.unassign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_projects.addCustomer.request:
      title: projects-v2_projects.addCustomer.request
      required:
        - id
        - customer
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        customer:
          $ref: '#/components/schemas/Customer'
    projects-v2_projects.removeCustomer.request:
      title: projects-v2_projects.removeCustomer.request
      required:
        - id
        - customer
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        customer:
          $ref: '#/components/schemas/Customer'
    projects-v2_projects.addDeal.request:
      title: projects-v2_projects.addDeal.request
      required:
        - id
        - deal_id
      type: object
      properties:
        id:
          type: string
          example: d27909aa-fc0e-4ed4-acec-fcbffda5111b
        deal_id:
          type: string
          example: 8385b072-587f-4ebf-a32b-5f48baea1b1c
    projects-v2_projects.removeDeal.request:
      title: projects-v2_projects.removeDeal.request
      required:
        - id
        - deal_id
      type: object
      properties:
        id:
          type: string
          example: d27909aa-fc0e-4ed4-acec-fcbffda5111b
        deal_id:
          type: string
          example: 8385b072-587f-4ebf-a32b-5f48baea1b1c
    projects-v2_projects.addQuotation.request:
      title: projects-v2_projects.addQuotation.request
      required:
        - id
        - quotation_id
      type: object
      properties:
        id:
          type: string
          example: d27909aa-fc0e-4ed4-acec-fcbffda5111b
        quotation_id:
          type: string
          example: 8385b072-587f-4ebf-a32b-5f48baea1b1c
    projects-v2_projects.removeQuotation.request:
      title: projects-v2_projects.removeQuotation.request
      required:
        - id
        - quotation_id
      type: object
      properties:
        id:
          type: string
          example: d27909aa-fc0e-4ed4-acec-fcbffda5111b
        quotation_id:
          type: string
          example: 8385b072-587f-4ebf-a32b-5f48baea1b1c
    projects-v2_externalParties.addToProject.request:
      title: projects-v2_externalParties.addToProject.request
      required:
        - project_id
        - customer
      type: object
      properties:
        project_id:
          type: string
          example: 7257b535-d40f-4699-b3bd-63679379b579
        customer:
          $ref: '#/components/schemas/Customer'
        function:
          type: string
          example: Project Manager
        sub_function:
          type: string
          example: Project Coordinator
    projects-v2_externalParties.update.request:
      title: projects-v2_externalParties.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6126596f-6193-445a-935a-60c10df9f632
        customer:
          $ref: '#/components/schemas/Customer'
        function:
          type: string
          example: Project Manager
          nullable: true
        sub_function:
          type: string
          example: Project Coordinator
          nullable: true
    projects-v2_externalParties.delete.request:
      title: projects-v2_externalParties.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6126596f-6193-445a-935a-60c10df9f632
    projects-v2_projectLines.list.request:
      title: projects-v2_projectLines.list.request
      required:
        - project_id
      type: object
      properties:
        project_id:
          type: string
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        filter:
          type: object
          properties:
            types:
              type: array
              items:
                type: string
                enum:
                  - nextgenTask
                  - nextgenMaterial
                  - nextgenProjectGroup
              description: ''
            assignees:
              type: array
              description: To fetch unassigned lines, provide `null` instead of the type/id object
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
    projects-v2_projectLines.list.response:
      title: projects-v2_projectLines.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              line:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - nextgenTask
                      - nextgenMaterial
                      - nextgenProjectGroup
                    example: nextgenMaterial
                  id:
                    type: string
                    example: a14a464d-320a-49bb-b6ee-b510c7f4f66c
              group:
                type: object
                nullable: true
                description: If null, this line is not a part of a group.
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: nextgenProjectGroup
          description: ''
    projects-v2_projectLines.addToGroup.request:
      title: projects-v2_projectLines.addToGroup.request
      required:
        - line_id
        - group_id
      type: object
      properties:
        line_id:
          type: string
          description: The ID of the task or material. May not be a group.
          example: a14a464d-320a-49bb-b6ee-b510c7f4f66c
        group_id:
          type: string
          example: 0daf76e6-5141-4fb0-866f-01916a873a38
    projects-v2_projectLines.removeFromGroup.request:
      title: projects-v2_projectLines.removeFromGroup.request
      required:
        - line_id
      type: object
      properties:
        line_id:
          type: string
          description: The ID of the task or material. May not be a group.
          example: a14a464d-320a-49bb-b6ee-b510c7f4f66c
    projects-v2_projectGroups.list.request:
      title: projects-v2_projectGroups.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            project_id:
              type: string
              example: 01859b27-1525-7372-bd40-26a6363c8bfe
        page:
          $ref: '#/components/schemas/Page'
    BillingStatus:
      title: BillingStatus
      enum:
        - not_billable
        - not_billed
        - partially_billed
        - fully_billed
      type: string
      example: not_billable
    projects-v2_projectGroups.list.response:
      title: projects-v2_projectGroups.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 0185a0af-97a6-7f44-8aec-254d8daf72f3
              project:
                $ref: '#/components/schemas/TypeAndId'
              title:
                type: string
                example: Website frontpage
              color:
                allOf:
                  - $ref: '#/components/schemas/Color'
                  - example: '#00B2B2'
              billing_method:
                type: string
                enum:
                  - time_and_materials
                  - fixed_price
                  - parent_fixed_price
                  - non_billable
                example: time_and_materials
              billing_status:
                allOf:
                  - $ref: '#/components/schemas/BillingStatus'
                  - example: not_billable
              amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget_spent:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              internal_budget:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              calculated_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin_percentage:
                type: number
                description: '`null` if the user does not have access to "Costs on projects"'
                nullable: true
              assignees:
                type: array
                items:
                  $ref: '#/components/schemas/Assignees'
                description: ''
              start_date:
                type: string
                nullable: true
                example: '2023-01-18'
              end_date:
                type: string
                nullable: true
                example: '2023-03-22'
              time_estimated:
                type: object
                nullable: true
                description: The total of all time estimated for every item in this group. Value in seconds, rounded to the nearest minute.
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        enum:
                          - seconds
                        example: seconds
              time_tracked:
                type: object
                nullable: true
                description: The total of all time tracked for every item in this group.
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        enum:
                          - seconds
                        example: seconds
          description: ''
    projects-v2_projectGroups.info.request:
      title: projects-v2_projectGroups.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
    projects-v2_projectGroups.info.response:
      title: projects-v2_projectGroups.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: cfe2666c-b0f4-4e85-8d6f-9e1284706d0a
            project:
              $ref: '#/components/schemas/TypeAndId'
            title:
              type: string
              example: Website frontpage
            description:
              type: string
              nullable: true
              example: My elaborate description
            color:
              allOf:
                - $ref: '#/components/schemas/Color'
                - example: '#00B2B2'
            billing_method:
              type: string
              enum:
                - time_and_materials
                - fixed_price
                - parent_fixed_price
                - non_billable
              example: time_and_materials
            billing_status:
              allOf:
                - $ref: '#/components/schemas/BillingStatus'
                - example: not_billable
            amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget_spent:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            internal_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            calculated_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin_percentage:
              type: number
              description: '`null` if the user does not have access to "Costs on projects"'
              nullable: true
            assignees:
              type: array
              items:
                $ref: '#/components/schemas/Assignees'
              description: ''
            start_date:
              type: string
              nullable: true
              example: '2023-01-18'
            end_date:
              type: string
              nullable: true
              example: '2023-03-22'
            time_estimated:
              type: object
              nullable: true
              description: The total of all time estimated for every item in this group. Value in seconds, rounded to the nearest minute.
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      enum:
                        - seconds
                      example: seconds
            time_tracked:
              type: object
              nullable: true
              description: The total of all time tracked for every item in this group.
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      enum:
                        - seconds
                      example: seconds
    projects-v2_projectGroups.create.request:
      title: projects-v2_projectGroups.create.request
      required:
        - project_id
        - title
      type: object
      properties:
        project_id:
          type: string
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        title:
          type: string
          example: My project group
        description:
          type: string
          example: Some long-winded description
        color:
          allOf:
            - $ref: '#/components/schemas/Color'
            - example: '#00B2B2'
        billing_method:
          type: string
          enum:
            - time_and_materials
            - fixed_price
            - parent_fixed_price
            - non_billable
        fixed_price:
          type: object
          description: Only allowed if the billing_method is fixed_price, or the group is already fixed_price.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          description: Also known as "budget". Value set by user to compare with price. Only allowed if the billing_method is time_and_materials, or the group is already time_and_materials.
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          description: Also known as "cost budget". Value set by user to compare with cost.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          example: '2023-01-18'
        end_date:
          type: string
          example: '2023-03-22'
        assignees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Assignee'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - team
                      - user
                    example: user
          description: ''
    projects-v2_projectGroups.create.response:
      title: projects-v2_projectGroups.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_projectGroups.update.request:
      title: projects-v2_projectGroups.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: e8478f2c-05a1-4e69-b3c4-e08507640f01
        title:
          type: string
          example: My updated group
        description:
          type: string
          description: If `null`, the description is cleared.
          nullable: true
          example: I updated this group because I felt like it
        color:
          allOf:
            - $ref: '#/components/schemas/Color'
            - example: '#00B2B2'
        billing_method:
          allOf:
            - $ref: '#/components/schemas/BillingMethod'
            - type: object
              properties:
                value:
                  type: string
                  enum:
                    - time_and_materials
                    - fixed_price
                    - parent_fixed_price
                    - non_billable
                  example: time_and_materials
        fixed_price:
          type: object
          description: Only allowed if the billing_method is fixed_price, or the group is already fixed_price.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          type: object
          description: Also known as "budget". Value set by user to compare with price. Only allowed if the billing_method is time_and_materials, or the group is already time_and_materials.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          description: '"cost budget". Value set by user to compare with cost.'
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          nullable: true
          example: '2023-01-18'
        end_date:
          type: string
          nullable: true
          example: '2023-03-22'
    projects-v2_projectGroups.duplicate.request:
      title: projects-v2_projectGroups.duplicate.request
      required:
        - origin_id
      type: object
      properties:
        origin_id:
          type: string
          description: The id of the group that is being duplicated
          example: 0186a6b5-2fdc-749a-983a-c4a1303546d7
    projects-v2_projectGroups.duplicate.response:
      title: projects-v2_projectGroups.duplicate.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_projectGroups.delete.request:
      title: projects-v2_projectGroups.delete.request
      required:
        - id
        - delete_strategy
      type: object
      properties:
        id:
          type: string
          example: 01866e6f-f264-7fe5-8b7c-a3f739fa292c
        delete_strategy:
          type: string
          enum:
            - ungroup_tasks_and_materials
            - delete_tasks_and_materials
            - delete_tasks_materials_and_unbilled_timetrackings
          example: ungroup_tasks_and_materials
    projects-v2_projectGroups.assign.request:
      title: projects-v2_projectGroups.assign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_projectGroups.unassign.request:
      title: projects-v2_projectGroups.unassign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_tasks.list.request:
      title: projects-v2_tasks.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
    projects-v2_tasks.list.response:
      title: projects-v2_tasks.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
              project:
                $ref: '#/components/schemas/TypeAndId'
              group:
                type: object
                nullable: true
                description: If `null`, the task is not in any group.
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: nextgenProjectGroup
              work_type:
                type: object
                nullable: true
                description: If null, the task does not have a specific work type.
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: workType
              task_type:
                type: object
                nullable: true
                description: DEPRECATED - Use `work_type` instead.
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: workType
              status:
                type: string
                enum:
                  - to_do
                  - in_progress
                  - on_hold
                  - done
                example: in_progress
              title:
                type: string
                example: Write API documentation
              billing_method:
                type: string
                enum:
                  - user_rate
                  - work_type_rate
                  - custom_rate
                  - fixed_price
                  - parent_fixed_price
                  - non_billable
                example: user_rate
              billing_status:
                allOf:
                  - $ref: '#/components/schemas/BillingStatus'
                  - example: not_billable
              custom_rate:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget:
                type: object
                description: Also known as "budget". Value set by user to compare with price.
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget_spent:
                type: object
                description: Simulated price if billing method were time_and_materials (dependent on type).
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              internal_budget:
                type: object
                description: Also known as "cost budget". Value set by user to compare with cost.
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              unit_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              unit_cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin_percentage:
                type: number
                description: '`null` if the user does not have access to "Costs on projects"'
                nullable: true
              assignees:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Assignees'
                    - type: object
                      properties:
                        assign_type:
                          type: string
                          enum:
                            - manual
                          example: manual
                description: ''
              start_date:
                type: string
                nullable: true
                example: '2023-01-18'
              end_date:
                type: string
                nullable: true
                example: '2023-03-22'
              time_estimated:
                type: object
                nullable: true
                description: Value in seconds, rounded to the nearest minute.
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        enum:
                          - seconds
                        example: seconds
              time_tracked:
                type: object
                nullable: true
                description: The total of all time tracked for this task.
                allOf:
                  - $ref: '#/components/schemas/Time'
                  - properties:
                      unit:
                        enum:
                          - seconds
                        example: seconds
          description: ''
    projects-v2_tasks.info.request:
      title: projects-v2_tasks.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
    projects-v2_tasks.info.response:
      title: projects-v2_tasks.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
            project:
              $ref: '#/components/schemas/TypeAndId'
            group:
              type: object
              nullable: true
              description: If `null`, the task is not in any group.
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: nextgenProjectGroup
            work_type:
              type: object
              nullable: true
              description: If null, the task does not have a specific work type.
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: workType
            task_type:
              type: object
              nullable: true
              description: DEPRECATED - Use `work_type` instead.
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: workType
            status:
              type: string
              enum:
                - to_do
                - in_progress
                - on_hold
                - done
              example: in_progress
            title:
              type: string
              example: Write API documentation
            description:
              type: string
              nullable: true
              example: I buy a house and garden somewhere, along a country road a piece
            billing_method:
              type: string
              enum:
                - user_rate
                - work_type_rate
                - custom_rate
                - fixed_price
                - parent_fixed_price
                - non_billable
              example: user_rate
            billing_status:
              allOf:
                - $ref: '#/components/schemas/BillingStatus'
                - example: not_billable
            custom_rate:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget:
              type: object
              description: Also known as "budget". Value set by user to compare with price.
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget_spent:
              type: object
              description: Simulated price if billing method were time_and_materials (dependent on type).
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            internal_budget:
              type: object
              description: Also known as "cost budget". Value set by user to compare with cost.
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            unit_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            unit_cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin_percentage:
              type: number
              description: '`null` if the user does not have access to "Costs on projects"'
              nullable: true
            assignees:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignees'
                  - type: object
                    properties:
                      assign_type:
                        type: string
                        enum:
                          - manual
                        example: manual
              description: ''
            start_date:
              type: string
              nullable: true
              example: '2023-01-18'
            end_date:
              type: string
              nullable: true
              example: '2023-03-22'
            time_estimated:
              type: object
              nullable: true
              description: Value in seconds, rounded to the nearest minute.
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      enum:
                        - seconds
                      example: seconds
            time_tracked:
              type: object
              nullable: true
              description: The total of all time tracked for this task.
              allOf:
                - $ref: '#/components/schemas/Time'
                - properties:
                    unit:
                      enum:
                        - seconds
                      example: seconds
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
    projects-v2_tasks.create.request:
      title: projects-v2_tasks.create.request
      required:
        - project_id
        - title
      type: object
      properties:
        project_id:
          type: string
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        title:
          type: string
          example: My task
        group_id:
          type: string
          description: If omitted the task is not added to a group.
          example: 0185968b-2c9e-73fd-9ce1-a12c0979783b
        work_type_id:
          type: string
          description: Cannot be null if `billing_method` is `task_type_rate`.
          example: 0f517e20-2e76-4684-8d6c-3334f6d7148c
        task_type_id:
          type: string
          description: DEPRECATED - Use `work_type_id` instead.
          example: 0f517e20-2e76-4684-8d6c-3334f6d7148c
        description:
          type: string
          example: But nothing is any good without you cause baby you are my centerpiece
        billing_method:
          type: string
          enum:
            - user_rate
            - work_type_rate
            - custom_rate
            - fixed_price
            - parent_fixed_price
            - non_billable
          example: user_rate
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        custom_rate:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          example: '2023-01-18'
        end_date:
          type: string
          example: '2023-03-22'
        time_estimated:
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                value:
                  type: number
                  example: 480
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
        assignees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Assignee'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - team
                      - user
                    example: user
          description: ''
    projects-v2_tasks.create.response:
      title: projects-v2_tasks.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_tasks.update.request:
      title: projects-v2_tasks.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
        work_type_id:
          type: string
          description: Cannot be null if `billing_method` is `work_type_rate`.
          nullable: true
          example: 0f517e20-2e76-4684-8d6c-3334f6d7148c
        task_type_id:
          type: string
          description: DEPRECATED - Use `work_type_id` instead.
          nullable: true
          example: 0f517e20-2e76-4684-8d6c-3334f6d7148c
        status:
          type: string
          enum:
            - to_do
            - in_progress
            - on_hold
            - done
          example: on_hold
        title:
          type: string
          example: Write API documentation
        description:
          type: string
          nullable: true
          example: But nothing is any good without you cause baby you are my centerpiece
        billing_method:
          type: string
          enum:
            - user_rate
            - work_type_rate
            - custom_rate
            - fixed_price
            - parent_fixed_price
            - non_billable
          example: user_rate
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        custom_rate:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          nullable: true
          example: '2023-01-18'
        end_date:
          type: string
          nullable: true
          example: '2023-03-22'
        time_estimated:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Time'
            - properties:
                value:
                  type: number
                  example: 480
                unit:
                  type: string
                  enum:
                    - hours
                    - minutes
                    - seconds
                  example: minutes
              required:
                - value
                - unit
    projects-v2_tasks.duplicate.request:
      title: projects-v2_tasks.duplicate.request
      required:
        - origin_id
      type: object
      properties:
        origin_id:
          type: string
          description: The id of the task that is being duplicated
          example: 0186a6b5-32d9-73d4-a416-d9f86cba567d
    projects-v2_tasks.duplicate.response:
      title: projects-v2_tasks.duplicate.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_tasks.delete.request:
      title: projects-v2_tasks.delete.request
      required:
        - id
        - delete_strategy
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
        delete_strategy:
          type: string
          enum:
            - unlink_time_tracking
            - delete_time_tracking
          example: unlink_time_tracking
    projects-v2_tasks.assign.request:
      title: projects-v2_tasks.assign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_tasks.unassign.request:
      title: projects-v2_tasks.unassign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_materials.list.request:
      title: projects-v2_materials.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
    projects-v2_materials.list.response:
      title: projects-v2_materials.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
              project:
                $ref: '#/components/schemas/TypeAndId'
              group:
                type: object
                nullable: true
                description: If `null`, the material is not in any group.
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: nextgenProjectGroup
              title:
                type: string
                example: Metal studs
              status:
                type: string
                enum:
                  - to_do
                  - in_progress
                  - on_hold
                  - done
                example: in_progress
              billing_method:
                type: string
                enum:
                  - fixed_price
                  - unit_price
                  - non_billable
                  - parent_fixed_price
                example: unit_price
              billing_status:
                allOf:
                  - $ref: '#/components/schemas/BillingStatus'
                  - example: not_billable
              quantity:
                type: number
                nullable: true
              quantity_estimated:
                type: number
                nullable: true
              unit_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              unit_cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              unit:
                type: object
                nullable: true
                description: '`null` if the default unit is used'
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: priceunit
              amount_billed:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              external_budget_spent:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              internal_budget:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              fixed_price:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              cost:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Money'
              margin_percentage:
                type: number
                description: '`null` if the user does not have access to "Costs on projects"'
                nullable: true
              assignees:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Assignees'
                    - type: object
                      properties:
                        assign_type:
                          type: string
                          enum:
                            - manual
                          example: manual
                description: ''
              start_date:
                type: string
                nullable: true
                example: '2023-01-18'
              end_date:
                type: string
                nullable: true
                example: '2023-03-22'
              product:
                type: object
                nullable: true
                description: '`null` if no product is coupled to the material'
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        example: product
          description: ''
    projects-v2_materials.info.request:
      title: projects-v2_materials.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
    projects-v2_materials.info.response:
      title: projects-v2_materials.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
            project:
              $ref: '#/components/schemas/TypeAndId'
            group:
              type: object
              nullable: true
              description: If `null`, the material is not in any group.
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: nextgenProjectGroup
            title:
              type: string
              example: WD-40® Multi-Use Product Industrial Size
            description:
              type: string
              description: Can be `null`.
              nullable: true
              example: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
            status:
              type: string
              enum:
                - to_do
                - in_progress
                - on_hold
                - done
              example: in_progress
            billing_method:
              type: string
              enum:
                - fixed_price
                - unit_price
                - non_billable
                - parent_fixed_price
              example: unit_price
            billing_status:
              allOf:
                - $ref: '#/components/schemas/BillingStatus'
                - example: not_billable
            quantity:
              type: number
              nullable: true
            quantity_estimated:
              type: number
              nullable: true
            unit_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            unit_cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            unit:
              type: object
              nullable: true
              description: '`null` if the default unit is used'
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: priceunit
            amount_billed:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            external_budget_spent:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            internal_budget:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            fixed_price:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            cost:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Money'
            margin_percentage:
              type: number
              description: '`null` if the user does not have access to "Costs on projects"'
              nullable: true
            assignees:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignees'
                  - type: object
                    properties:
                      assign_type:
                        type: string
                        enum:
                          - manual
                        example: manual
              description: ''
            start_date:
              type: string
              nullable: true
              example: '2023-01-18'
            end_date:
              type: string
              nullable: true
              example: '2023-03-22'
            product:
              type: object
              nullable: true
              description: '`null` if no product is coupled to the material'
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      example: product
    projects-v2_materials.create.request:
      title: projects-v2_materials.create.request
      required:
        - project_id
        - title
      type: object
      properties:
        project_id:
          type: string
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
        title:
          type: string
          example: Some material
        group_id:
          type: string
          description: If omitted the material is not added to a group.
          example: 0185968b-2c9e-73fd-9ce1-a12c0979783b
        after_id:
          type: string
          description: If `after_id` is null, material is placed on top of the project/group. If `after_id` is not provided, material is placed at the bottom of the project/group.
          nullable: true
          example: 8ba797aa-107d-4934-9511-2a043bf3f766
        description:
          type: string
          example: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
        billing_method:
          type: string
          description: '`parent_fixed_price` is only valid if the parent is fixed price.'
          enum:
            - fixed_price
            - unit_price
            - non_billable
            - parent_fixed_price
          example: unit_price
        quantity:
          type: number
        quantity_estimated:
          type: number
        unit_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_cost:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_id:
          type: string
          example: 69cbfbf2-fefe-4f03-9269-3ddc79117f4d
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          example: '2023-01-18'
        end_date:
          type: string
          example: '2023-03-22'
        product_id:
          type: string
          example: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
        assignees:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Assignee'
              - type: object
                required:
                  - type
                  - id
                properties:
                  type:
                    type: string
                    enum:
                      - team
                      - user
                    example: user
          description: ''
    projects-v2_materials.create.response:
      title: projects-v2_materials.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_materials.update.request:
      title: projects-v2_materials.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
        title:
          type: string
          example: WD-40® Multi-Use Product Industrial Size
        description:
          type: string
          nullable: true
          example: Protects metal from rust and corrosion, penetrates stuck parts, displaces moisture and lubricates almost anything.
        status:
          type: string
          enum:
            - to_do
            - in_progress
            - on_hold
            - done
          example: on_hold
        billing_method:
          type: string
          description: '`parent_fixed_price` is only valid if the parent is fixed price.'
          enum:
            - fixed_price
            - unit_price
            - non_billable
            - parent_fixed_price
          example: unit_price
        quantity:
          type: number
          nullable: true
        quantity_estimated:
          type: number
          nullable: true
        unit_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_cost:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        unit_id:
          type: string
          nullable: true
        fixed_price:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        external_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        internal_budget:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Money'
        start_date:
          type: string
          nullable: true
          example: '2023-01-18'
        end_date:
          type: string
          nullable: true
          example: '2023-03-22'
        product_id:
          type: string
          nullable: true
          example: 1c5cf7a1-7248-469c-9dcd-9f0581321ec2
    projects-v2_materials.duplicate.request:
      title: projects-v2_materials.duplicate.request
      required:
        - origin_id
      type: object
      properties:
        origin_id:
          type: string
          description: The id of the material that is being duplicated
          example: 0186a74b-b640-7458-9717-7c84356b26fd
    projects-v2_materials.duplicate.response:
      title: projects-v2_materials.duplicate.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    projects-v2_materials.delete.request:
      title: projects-v2_materials.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
    projects-v2_materials.assign.request:
      title: projects-v2_materials.assign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    projects-v2_materials.unassign.request:
      title: projects-v2_materials.unassign.request
      required:
        - id
        - assignee
      type: object
      properties:
        id:
          type: string
          example: 0184f276-811b-716d-8b79-17628c9573c6
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    tasks.list.request:
      title: tasks.listrequest1
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
              description: ''
            user_id:
              type: string
              description: Returns tasks that are assigned to this user or to a team to which this user belongs. When passing `null`, it returns tasks that are unassigned.
              nullable: true
              example: f29abf48-337d-44b4-aad4-585f5277a456
            milestone_id:
              type: string
              example: 32665afd-1818-0ed3-9e18-a603a3a21b95
            completed:
              type: boolean
              example: true
            scheduled:
              type: boolean
              example: true
            due_by:
              type: string
              example: '2019-02-04'
            due_from:
              type: string
              example: '2019-10-20'
            term:
              type: string
              description: Searches for a term in the description.
              example: website design
            customer:
              $ref: '#/components/schemas/Customer'
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - created_at
                      - due_on
                    example: due_on
          description: ''
    Priority:
      title: Priority
      enum:
        - A
        - B
        - C
        - D
      type: string
    tasks.list.response:
      title: tasks.listresponse1
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: f29abf48-337d-44b4-aad4-585f5277a456
              title:
                type: string
                example: Review code changes
              description:
                type: string
              completed:
                type: boolean
                example: false
              completed_at:
                type: string
                nullable: true
                example: '2016-02-04T16:44:33+00:00'
              due_on:
                type: string
                example: '2016-02-04'
              added_at:
                type: string
                nullable: true
                example: '2016-02-04T16:44:33+00:00'
              estimated_duration:
                $ref: '#/components/schemas/DurationInMinutes'
              work_type:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              assignee:
                type: object
                nullable: true
                description: Null if the task is unassigned
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
              customer:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/Customer'
              milestone:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              deal:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              project:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              ticket:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - required:
                      - id
                    properties:
                      type:
                        example: ticket
              priority:
                $ref: '#/components/schemas/Priority'
          description: ''
    tasks.info.request:
      title: tasks.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: ff19a113-50ba-4afc-9fff-2e5c5c5a5485
    tasks.info.response:
      title: tasks.inforesponse1
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 6fac0bf0-e803-424e-af67-76863a3d7d16
            title:
              type: string
              example: Review code changes
            description:
              type: string
            completed:
              type: boolean
              example: false
            completed_at:
              type: string
              nullable: true
              example: '2016-02-04T16:44:33+00:00'
            due_on:
              type: string
              example: '2016-02-04'
            estimated_duration:
              $ref: '#/components/schemas/DurationInMinutes'
            work_type:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            assignee:
              type: object
              nullable: true
              description: Null if the task is unassigned
              allOf:
                - $ref: '#/components/schemas/Assignee'
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - team
                        - user
                      example: user
            customer:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Customer'
            milestone:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            deal:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            project:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            ticket:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - required:
                    - id
                  properties:
                    type:
                      example: ticket
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: ''
            priority:
              $ref: '#/components/schemas/Priority'
    tasks.create.request:
      title: tasks.createrequest1
      required:
        - title
        - due_on
        - work_type_id
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        due_on:
          type: string
          example: '2016-02-04'
        work_type_id:
          type: string
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        milestone_id:
          type: string
          description: Only available for users that have access to the old projects module
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        project_id:
          type: string
          description: Only available for users that have access to the new projects module
          example: 0185aa33-603c-7fd5-bf0d-5bd83d503b96
        deal_id:
          type: string
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        ticket_id:
          type: string
          example: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
        estimated_duration:
          $ref: '#/components/schemas/DurationInMinutes'
        assignee:
          type: object
          nullable: true
          description: Use null if the task is unassigned
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
        customer:
          $ref: '#/components/schemas/Customer'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    tasks.create.response:
      title: tasks.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    tasks.update.request:
      title: tasks.updaterequest1
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 00ed6266-a5bd-4aac-a292-2582017b6400
        title:
          type: string
        description:
          type: string
        due_on:
          type: string
          example: '2016-02-04'
        work_type_id:
          type: string
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        milestone_id:
          type: string
          nullable: true
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
          description: Only available for users that have access to the old projects module
        project_id:
          type: string
          nullable: true
          example: 0185aa33-603c-7fd5-bf0d-5bd83d503b96
          description: Only available for users that have access to the new projects module
        deal_id:
          type: string
          nullable: true
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        ticket_id:
          type: string
          nullable: true
          example: 8607faa8-3d2e-0a66-a71e-e69f447a2ed1
        estimated_duration:
          $ref: '#/components/schemas/DurationInMinutes'
        assignee:
          type: object
          nullable: true
          description: Use null if the task is unassigned
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
        customer:
          $ref: '#/components/schemas/Customer'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
    tasks.complete.request:
      title: tasks.complete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
    tasks.reopen.request:
      title: tasks.reopen.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
    tasks.delete.request:
      title: tasks.deleterequest1
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 5f0afd8a-8a40-48a4-bbe6-7d0e9c61bb6d
    tasks.schedule.request:
      title: tasks.schedule.request
      required:
        - id
        - starts_at
        - ends_at
      type: object
      properties:
        id:
          type: string
          example: 7c70c54e-6e50-4e6a-b5fd-80234eb535cf
        starts_at:
          type: string
          example: '2016-02-04T16:00:00+00:00'
        ends_at:
          type: string
          example: '2016-02-04T18:00:00+00:00'
        assignee_id:
          type: string
          description: ID of the user in whose calendar the task is scheduled. Defaults to the authenticated user. Requires access to that user's calendar. This does not change the task's assignee.
          example: 98b2863e-7b01-4232-82f5-ede1f0b9db22
    tasks.schedule.response:
      title: tasks.schedule.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    timeTracking.list.request:
      title: timeTracking.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            user_id:
              type: string
              example: 87982c96-f2fe-4b05-838c-ff42c0525758
            started_after:
              type: string
              description: Start of the period for which to return time tracking. This includes time tracking that started on the date provided.
              example: '2017-04-26T10:01:49+00:00'
            started_before:
              type: string
              description: End of the period for which to return time tracking. This includes time tracking that started on the date provided.
              example: '2017-04-26T10:01:49+00:00'
            ended_after:
              type: string
              description: Start of the period for which to return time tracking. This includes time tracking that ended at the date provided.
              example: '2017-04-26T10:01:49+00:00'
            ended_before:
              type: string
              description: End of the period for which to return time tracking. This includes time tracking that ended at the date provided.
              example: '2017-05-26T10:01:49+00:00'
            subject:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - event
                        - todo
                        - milestone
                        - ticket
            subject_types:
              type: array
              items:
                type: string
                enum:
                  - company
                  - contact
                  - event
                  - todo
                  - milestone
                  - ticket
              description: Include all tracked time with one of the provided subject types. For tracked time without a subject type, provide `null`
            relates_to:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - description: Find all tracked time linked directly and indirectly to a subject
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      enum:
                        - milestone
                        - project
                        - nextgenProject
                        - nextgenProjectGroup
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    enum:
                      - starts_on
                    type: string
                    default: starts_on
          description: ''
        page:
          $ref: '#/components/schemas/Page'
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: materials,relates_to
    BillingInfo:
      title: BillingInfo
      type: object
      properties:
        type:
          type: string
          enum:
            - invoice
            - prepaid
          example: invoice
        invoice:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
    TimeTrackingMaterials:
      title: TimeTrackingMaterials
      type: object
      properties:
        product:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        description:
          type: string
          example: Product description
        unit_price:
          $ref: '#/components/schemas/Money'
        quantity:
          type: number
          example: 5
    TimeTrackingRelatesToTypes:
      title: TimeTrackingRelatesToTypes
      enum:
        - contact
        - company
        - project
        - milestone
        - ticket
        - nextgenProject
        - nextgenProjectGroup
        - nextgenTask
      type: string
    timeTracking.list.response:
      title: timeTracking.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 4f4288b2-c21b-4dac-87f6-a97511309079
              user:
                $ref: '#/components/schemas/TypeAndId'
              work_type:
                $ref: '#/components/schemas/TypeAndId'
              started_on:
                type: string
                example: '2017-04-26'
              started_at:
                type: string
                nullable: true
                example: '2017-04-26T10:01:49+00:00'
              ended_at:
                type: string
                nullable: true
                example: '2017-04-26T11:01:49+00:00'
              duration:
                type: number
                description: In seconds
                example: 3600
              description:
                type: string
                example: Timer description
              subject:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        enum:
                          - company
                          - contact
                          - event
                          - todo
                          - milestone
                          - ticket
              invoiceable:
                type: boolean
                example: true
              billing_info:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/BillingInfo'
              materials:
                type: array
                items:
                  $ref: '#/components/schemas/TimeTrackingMaterials'
                description: Only included with request parameter `includes=materials`
              relates_to:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/TypeAndId'
                    - properties:
                        type:
                          $ref: '#/components/schemas/TimeTrackingRelatesToTypes'
                description: Only included with request parameter `includes=relates_to`
              hourly_rate:
                type: object
                description: Only included for users with access to invoicing
                allOf:
                  - $ref: '#/components/schemas/Money'
    timeTracking.info.request:
      title: timeTracking.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6caeea11-aa83-4da9-9859-5b62bbf3a476
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: materials,relates_to
    timeTracking.info.response:
      title: timeTracking.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 6caeea11-aa83-4da9-9859-5b62bbf3a476
            user:
              $ref: '#/components/schemas/TypeAndId'
            work_type:
              $ref: '#/components/schemas/TypeAndId'
            started_on:
              type: string
              example: '2017-04-26'
            started_at:
              type: string
              nullable: true
              example: '2017-04-26T10:01:49+00:00'
            ended_at:
              type: string
              nullable: true
              example: '2017-04-26T11:01:49+00:00'
            duration:
              type: number
              description: In seconds
              example: 3600
            description:
              type: string
              example: Timer description
            subject:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - event
                        - todo
                        - milestone
                        - ticket
            invoiceable:
              type: boolean
              example: true
            locked:
              type: boolean
              description: If true, the freeze time window has passed since creating it
              example: true
            billing_info:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/BillingInfo'
            materials:
              type: array
              items:
                $ref: '#/components/schemas/TimeTrackingMaterials'
              description: Only included with request parameter `includes=materials`
            relates_to:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        $ref: '#/components/schemas/TimeTrackingRelatesToTypes'
              description: Only included with request parameter `includes=relates_to`
            hourly_rate:
              type: object
              description: Only included for users with access to invoicing
              allOf:
                - $ref: '#/components/schemas/Money'
        meta:
          type: object
          properties:
            updatable:
              type: boolean
              description: If true, the current user can update the entry even if it is locked
              example: true
    timeTracking.add.request:
      title: timeTracking.add.request
      type: object
      properties:
        work_type_id:
          type: string
          example: 2175597d-484e-4a1c-a781-cbc3d9f893ba
        description:
          type: string
        subject:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                    - event
                    - milestone
                    - nextgenTask
                    - ticket
                    - todo
        invoiceable:
          type: boolean
          example: true
        user_id:
          type: string
          description: To add tracked time for a different user.
          example: 87982c96-f2fe-4b05-838c-ff42c0525758
      oneOf:
        - type: object
          title: With started_at & duration
          required:
            - started_at
            - duration
          properties:
            started_at:
              type: string
              format: date-time
              example: '2017-04-26T10:01:49+00:00'
            duration:
              type: number
              example: 3600
        - type: object
          title: With end date
          required:
            - started_at
            - ended_at
          properties:
            started_at:
              type: string
              format: date-time
              example: '2017-04-26T10:01:49+00:00'
            ended_at:
              type: string
              format: date-time
              example: '2017-04-26T16:02:00+00:00'
        - type: object
          title: With started_on & duration
          required:
            - started_on
            - duration
          properties:
            started_on:
              type: string
              format: date
              example: '2017-04-26'
              description: Only available if duration time tracking is enabled.
            duration:
              type: number
              example: 3600
    timeTracking.add.response:
      title: timeTracking.add.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    timeTracking.update.request:
      title: timeTracking.update.request
      required:
        - id
        - duration
      type: object
      properties:
        id:
          type: string
          example: 66621f54-3d0d-420f-8d4b-ddd7fc473bf2
        work_type_id:
          type: string
          nullable: true
          example: a12f4289-3580-4780-bb6d-b4e9f84f80ad
        duration:
          type: integer
          example: 3600
          description: In seconds
        description:
          type: string
          nullable: true
        subject:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                    - event
                    - todo
                    - milestone
                    - ticket
        invoiceable:
          type: boolean
          example: true
      oneOf:
        - type: object
          title: Update with started_at
          description: Update the timetracking with `started_at` DateTime.
          required:
            - started_at
          properties:
            started_at:
              type: string
              format: date-time
              example: '2017-04-26T10:01:49+00:00'
        - type: object
          title: Update with started_on
          description: Update the timetracking with `started_on` date.
          required:
            - started_on
          properties:
            started_on:
              type: string
              format: date
              example: '2017-04-26'
              description: Only available if duration time tracking is enabled.
    timeTracking.resume.request:
      title: timeTracking.resume.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 06dfa08a-b769-4005-a912-45ab885c5737
        started_at:
          type: string
          description: If not provided, current time will be used
          example: '2017-04-26T10:01:49+00:00'
    timeTracking.resume.response:
      title: timeTracking.resume.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    timeTracking.delete.request:
      title: timeTracking.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6caeea11-aa83-4da9-9859-5b62bbf3a476
    timers.current.response:
      title: timers.current.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 2b282dec-ba9d-4faa-9b39-944b99ee5c0a
            user:
              $ref: '#/components/schemas/TypeAndId'
            work_type:
              $ref: '#/components/schemas/TypeAndId'
            started_at:
              type: string
              example: '2017-04-26T10:01:49+00:00'
            description:
              type: string
              example: Timer description
            subject:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - event
                        - todo
                        - milestone
                        - ticket
            invoiceable:
              type: boolean
              example: true
    timers.start.request:
      title: timers.start.request
      type: object
      properties:
        work_type_id:
          type: string
          example: db41328a-7a25-4e85-8fb9-830baacb7f40
        started_at:
          type: string
          description: If not provided, current time will be used
          example: '2017-04-26T10:01:49+00:00'
        description:
          type: string
        subject:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                    - event
                    - todo
                    - milestone
                    - ticket
        invoiceable:
          type: boolean
          example: true
    timers.start.response:
      title: timers.start.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    timers.stop.response:
      title: timers.stop.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    timers.update.request:
      title: timers.update.request
      type: object
      properties:
        work_type_id:
          type: string
          nullable: true
          example: db41328a-7a25-4e85-8fb9-830baacb7f40
        started_at:
          type: string
          example: '2017-04-26T10:01:49+00:00'
        description:
          type: string
          nullable: true
          example: Timer Description
        subject:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                    - event
                    - todo
                    - milestone
                    - ticket
        invoiceable:
          type: boolean
          example: true
    tickets.list.request:
      title: tickets.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            relates_to:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - description: Only lists tickets related to given type.
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      enum:
                        - contact
                        - company
                      example: contact
            project_ids:
              type: array
              items:
                type: string
              description: an array of project ids
            assignee_ids:
              type: array
              items:
                type: string
                nullable: true
                example: f29abf48-337d-44b4-aad4-585f5277a456
              description: Only lists tickets assigned to one of these users. Pass `null` as an entry to include tickets that are unassigned, e.g. `["f29abf48-337d-44b4-aad4-585f5277a456", null]`, or `[null]` for the unassigned ones only.
            exclude:
              type: object
              properties:
                status_ids:
                  type: array
                  items:
                    type: string
        page:
          $ref: '#/components/schemas/Page'
    tickets.list.response:
      title: tickets.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: f29abf48-337d-44b4-aad4-585f5277a456
              reference:
                type: number
                example: 123
              subject:
                type: string
              status:
                $ref: '#/components/schemas/TypeAndId'
              assignee:
                type: object
                nullable: true
                description: Null if unassigned
                allOf:
                  - $ref: '#/components/schemas/Assignee'
              created_at:
                type: string
                example: '2017-05-09T11:25:11+00:00'
              closed_at:
                type: string
                nullable: true
                example: '2017-05-09T11:25:11+00:00'
              customer:
                $ref: '#/components/schemas/Customer'
              participant:
                type: object
                nullable: true
                properties:
                  customer:
                    $ref: '#/components/schemas/TypeAndId'
              project:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              milestone:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              last_message_at:
                type: string
                nullable: true
                example: '2017-05-09T11:25:11+00:00'
          description: ''
    tickets.info.request:
      title: tickets.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
    tickets.info.response:
      title: tickets.info.response
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        reference:
          type: number
          example: 123
        subject:
          type: string
        status:
          $ref: '#/components/schemas/TypeAndId'
        assignee:
          type: object
          nullable: true
          description: Null if unassigned
          allOf:
            - $ref: '#/components/schemas/Assignee'
        created_at:
          type: string
          example: '2017-05-09T11:25:11+00:00'
        closed_at:
          type: string
          nullable: true
          example: '2017-05-09T11:25:11+00:00'
        customer:
          $ref: '#/components/schemas/Customer'
        participant:
          type: object
          nullable: true
          properties:
            customer:
              $ref: '#/components/schemas/TypeAndId'
        last_message_at:
          type: string
          nullable: true
          example: '2017-05-09T11:25:11+00:00'
        description:
          type: string
          example: My ticket details
        project:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        milestone:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsResponse'
          description: ''
    CompanyCustomer:
      title: CompanyCustomer
      required:
        - type
        - id
      type: object
      properties:
        type:
          enum:
            - company
          type: string
          example: company
        id:
          type: string
          example: 2659dc4d-444b-4ced-b51c-b87591f604d7
    tickets.create.request:
      title: tickets.create.request
      required:
        - subject
        - customer
        - ticket_status_id
      type: object
      properties:
        subject:
          type: string
          example: My ticket subject
        customer:
          $ref: '#/components/schemas/Customer'
        ticket_status_id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - user
                  example: user
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        description:
          type: string
          description: Uses Markdown formatting
          example: My ticket details
        participant:
          type: object
          required:
            - customer
          properties:
            customer:
              $ref: '#/components/schemas/CompanyCustomer'
        initial_reply:
          type: string
          enum:
            - automatic
            - disabled
          description: 'Create & send an initial autoreply according to configuration (default: automatic).'
        milestone_id:
          type: string
          description: Links the ticket to a milestone. Only applicable to accounts using legacy projects. A ticket can be linked to either a `milestone_id` or a `project_id`, but not both.
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        project_id:
          type: string
          description: Links the ticket to a project. Only applicable to accounts using the new projects. A ticket can be linked to either a `milestone_id` or a `project_id`, but not both.
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
    tickets.create.response:
      title: tickets.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    tickets.update.request:
      title: tickets.update.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        subject:
          type: string
          example: My ticket subject
        description:
          type: string
          description: Uses Markdown formatting
          example: My ticket details
        ticket_status_id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
        customer:
          $ref: '#/components/schemas/Customer'
        assignee:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - user
                  example: user
        participant:
          type: object
          nullable: true
          required:
            - customer
          properties:
            customer:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/CompanyCustomer'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldsRequest'
          description: ''
        milestone_id:
          type: string
          nullable: true
          description: Links the ticket to a milestone. Only applicable to accounts using legacy projects. A ticket can be linked to either a `milestone_id` or a `project_id`, but not both.
          example: 32665afd-1818-0ed3-9e18-a603a3a21b95
        project_id:
          type: string
          nullable: true
          description: Links the ticket to a project. Only applicable to accounts using the new projects. A ticket can be linked to either a `milestone_id` or a `project_id`, but not both.
          example: 49b403be-a32e-0901-9b1c-25214f9027c6
    tickets.listMessages.request:
      title: tickets.listMessages.request
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        filter:
          type: object
          properties:
            type:
              type: string
              enum:
                - customer
                - internal
                - thirdParty
              example: customer
            created_before:
              type: string
              example: '2024-02-01T18:00:00+00:00'
            created_after:
              type: string
              example: '2024-01-01T18:00:00+00:00'
        page:
          $ref: '#/components/schemas/Page'
    SentBy:
      title: SentBy
      type: object
      properties:
        type:
          type: string
          enum:
            - company
            - contact
            - user
          example: contact
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
    tickets.listMessages.response:
      title: tickets.listMessages.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              message_id:
                type: string
                example: f29abf48-337d-44b4-aad4-585f5277a456
              body:
                type: string
                description: Uses HTML formatting
                example: <p>This is a message</p>
              type:
                type: string
                enum:
                  - customer
                  - internal
                  - thirdParty
                example: customer
              created_at:
                type: string
                example: '2017-05-09T11:25:11+00:00'
              sent_by:
                $ref: '#/components/schemas/SentBy'
              attachments:
                type: array
                items:
                  $ref: '#/components/schemas/TypeAndId'
                description: ''
          description: ''
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - description: Only included with request parameter `includes=pagination`
    tickets.getMessage.request:
      title: tickets.getMessage.request
      type: object
      properties:
        message_id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
    tickets.getMessage.response:
      title: tickets.getMessage.response
      type: object
      properties:
        message_id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        body:
          type: string
          description: Uses HTML formatting
          example: <p>This is a message</p>
        raw_body:
          type: string
          description: Uses HTML formatting
          example: <p>This is a message</p>
        created_at:
          type: string
          example: '2017-05-09T11:25:11+00:00'
        sent_by:
          $ref: '#/components/schemas/SentBy'
        ticket:
          $ref: '#/components/schemas/TypeAndId'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/TypeAndId'
          description: ''
        type:
          type: string
          enum:
            - customer
            - internal
            - thirdParty
          example: customer
    tickets.importMessage.request:
      title: tickets.importMessage.request
      required:
        - id
        - body
        - sent_by
        - sent_at
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        body:
          type: string
          description: Uses HTML formatting
          example: <p>Hello world</p>
        sent_by:
          allOf:
            - $ref: '#/components/schemas/SentBy'
            - required:
                - type
                - id
        sent_at:
          type: string
          example: '2024-02-29T11:11:11+00:00'
        attachments:
          type: array
          items:
            type: string
          description: All files must have the ticket as a subject
    tickets.importMessage.response:
      title: tickets.importMessage.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    tickets.addReply.request:
      title: tickets.addReply.request
      required:
        - id
        - body
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        body:
          type: string
          description: Uses HTML formatting
          example: <p>Hello world</p>
        ticket_status_id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
        attachments:
          type: array
          items:
            type: string
          description: All files must have the ticket as a subject
    tickets.addReply.response:
      title: tickets.addReply.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    tickets.addInternalMessage.request:
      title: tickets.addInternalMessage.request
      required:
        - id
        - body
      type: object
      properties:
        id:
          type: string
          example: f29abf48-337d-44b4-aad4-585f5277a456
        body:
          type: string
          description: Uses HTML formatting
          example: <p>Hello world</p>
        ticket_status_id:
          type: string
          example: 46156648-87c6-478d-8aa7-1dc3a00dacab
        attachments:
          type: array
          items:
            type: string
          description: All files must have the ticket as a subject
    tickets.addInternalMessage.response:
      title: tickets.addInternalMessage.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    ticketStatus.list.request:
      title: ticketStatus.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
    ticketStatus.list.response:
      title: ticketStatus.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 46156648-87c6-478d-8aa7-1dc3a00dacab
              status:
                type: string
                enum:
                  - new
                  - open
                  - waiting_for_client
                  - escalated_thirdparty
                  - closed
                  - custom
                example: new
              label:
                type: string
                description: Only available for `custom` type of status.
                example: Custom Label
          description: ''
    files.list.request:
      title: files.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          description: Either `subject` or `ids` is required
          anyOf:
            - title: By subject
              description: Lists the files linked to `subject`
              required:
                - subject
            - title: By ids
              description: Lists the files with the given `ids`
              required:
                - ids
          properties:
            subject:
              description: Required, unless `ids` is given
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - deal
                        - invoice
                        - creditNote
                        - meeting
                        - product
                        - project
                        - nextgenProject
                        - ticket
                      example: company
            ids:
              type: array
              description: Only returns the files with these ids. Files the user has no access to are left out.
              items:
                type: string
              example:
                - a856642a-a476-4b69-8e42-e7d1badb2ce9
                - b0e1ad49-2a4e-4c8f-9a3f-1d2f6c7e8a90
            term:
              type: string
              description: Filters on the file name. Accents and special characters are transliterated, so `cafe` also matches `Café.pdf`.
              example: invoice
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    enum:
                      - updated_at
                    type: string
                    example: updated_at
                  order:
                    type: string
                    enum:
                      - desc
                    example: desc
          description: ''
    MimeType:
      title: MimeType
      enum:
        - application/msword
        - application/octet-stream
        - application/pdf
        - application/vnd.ms-excel
        - application/vnd.ms-powerpoint
        - application/vnd.openxmlformats-officedocument.presentationml.presentation
        - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
        - application/vnd.openxmlformats-officedocument.wordprocessingml.document
        - application/xml
        - application/zip
        - audio/mpeg
        - audio/wav
        - image/gif
        - image/jpeg
        - image/png
        - text/css
        - text/csv
        - text/html
        - text/javascript
        - text/plain
        - video/3gpp
        - video/mpeg
        - video/quicktime
        - video/x-msvideo
      type: string
    files.list.response:
      title: files.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: a856642a-a476-4b69-8e42-e7d1badb2ce9
              subject:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        enum:
                          - company
                          - contact
                          - deal
                          - invoice
                          - creditNote
                          - meeting
                          - product
                          - project
                          - nextgenProject
                          - ticket
                        example: company
              name:
                type: string
                example: meeting-report.pdf
              mime_type:
                $ref: '#/components/schemas/MimeType'
              size:
                type: number
                description: file size in bytes.
                example: 1024
              updated_at:
                type: string
                example: '2019-10-15T17:30:58+00:00'
              uploaded_by:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              folder:
                type: string
                example: Documents
          description: ''
    files.info.request:
      title: files.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
    files.info.response:
      title: files.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: a856642a-a476-4b69-8e42-e7d1badb2ce9
            subject:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      enum:
                        - company
                        - contact
                        - deal
                        - invoice
                        - creditNote
                        - meeting
                        - order
                        - product
                        - project
                        - nextgenProject
                        - ticket
                        - workOrder
                      example: company
            name:
              type: string
              example: meeting-report.pdf
            mime_type:
              $ref: '#/components/schemas/MimeType'
            size:
              type: number
              description: file size in bytes.
              example: 1024
            updated_at:
              type: string
              example: '2019-10-15T17:30:58+00:00'
            uploaded_by:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
            folder:
              type: string
              example: Documents
    files.download.request:
      title: files.download.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
    files.download.response:
      title: files.download.response
      type: object
      properties:
        data:
          type: object
          properties:
            location:
              type: string
              description: A temporary url where the requested file can be downloaded
              example: https://cdn.teamleader.eu/file
            expires_at:
              type: string
              description: Expiration time of the temporary download url
              example: '2018-02-05T16:44:33+00:00'
    files.upload.request:
      title: files.upload.request
      required:
        - name
        - subject
      type: object
      properties:
        name:
          type: string
          description: Name under which the file will be stored. This name should contain the same extension as the file that the user wants to upload.
          example: Important meeting note from August 2022.docx
        subject:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - required:
                - type
                - id
            - properties:
                id:
                  description: Not required if `type` is `temporary`
                type:
                  type: string
                  enum:
                    - company
                    - contact
                    - deal
                    - invoice
                    - creditNote
                    - nextgenProject
                    - ticket
                    - temporary
                  example: company
        folder:
          type: string
          description: Name of a folder under which the file will be stored. Defaults to `General` in account's language if not passed.
          example: My monthly notes
    files.upload.response:
      title: files.upload.response
      type: object
      properties:
        data:
          type: object
          properties:
            location:
              type: string
              description: The temporary API endpoint (URL) that should be used for sending a POST request to with the binary file contents (not form-data) to complete the file upload.
              example: https://files.teamleader.eu/upload/66726166a
            expires_at:
              type: string
              description: Expiration time of the temporary API endpoint.
              example: '2019-10-30T11:44:33+00:00'
    files.delete.request:
      title: files.delete.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 4afb0a9c-91c6-49ed-a2e5-ce7c1e3a87fb
    mailTemplates.list.request:
      title: mailTemplates.list.request
      required:
        - filter
      type: object
      properties:
        filter:
          type: object
          required:
            - type
          properties:
            department_id:
              type: string
              example: a344c251-2494-0013-b433-ccee8e8435e5
            type:
              type: string
              enum:
                - invoice
                - quotation
                - work_order
                - credit_note
              example: invoice
    mailTemplates.list.response:
      title: mailTemplates.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: a344c251-2494-0013-b433-ccee8e8435e5
              department:
                type: object
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
              name:
                type: string
                example: Send link in english
              content:
                type: object
                properties:
                  subject:
                    type: string
                    example: Link for document
                  body:
                    type: string
                    example: '#LINK \n<link> Thank you for using our services'
              language:
                type: string
                example: en
              type:
                type: string
                enum:
                  - invoice
                  - quotation
                  - work_order
                  - credit_note
                example: invoice
          description: ''
    migrate.id.request:
      title: migrate.id.request
      type: object
      properties:
        type:
          type: string
          enum:
            - account
            - user
            - department
            - product
            - contact
            - company
            - deal
            - dealPhase
            - project
            - milestone
            - task
            - meeting
            - call
            - ticket
            - invoice
            - creditNote
            - subscription
            - quotation
            - timeTracking
            - customField
          example: contact
        id:
          type: number
          example: 1
    migrate.id.response:
      title: migrate.id.response
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              enum:
                - account
                - user
                - department
                - product
                - contact
                - company
                - deal
                - dealPhase
                - project
                - milestone
                - todo
                - event
                - ticket
                - invoice
                - creditNote
                - subscription
                - quotation
                - timeTracking
                - customField
              example: contact
            id:
              type: string
              example: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
    migrate.taxRate.request:
      title: migrate.taxRate.request
      type: object
      properties:
        department_id:
          type: string
          example: 6ad54ec6-ee2d-4500-afe6-0917c1aa7a38
        tax_rate:
          type: string
          example: '21'
    migrate.taxRate.response:
      title: migrate.taxRate.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    migrate.activityType.request:
      title: migrate.activityType.request
      type: object
      properties:
        type:
          type: string
          enum:
            - meeting
            - call
            - task
          example: meeting
    migrate.activityType.response:
      title: migrate.activityType.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    orders.info.request:
      title: orders.info.request
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: 6fac0bf0-e803-424e-af67-76863a3d7d16
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: custom_fields
    OrdersGroupedLinesResponse:
      title: OrdersGroupedLinesResponse
      type: object
      properties:
        section:
          type: object
          properties:
            title:
              type: string
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItemResponse'
              - type: object
                properties:
                  product_category:
                    type: object
                    nullable: true
                    description: These are ledger accounts
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                  unit_price:
                    allOf:
                      - $ref: '#/components/schemas/AmountWithTax'
                      - type: object
                  project:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                      - properties:
                          type:
                            example: nextgenProject
                  group:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/TypeAndId'
                      - properties:
                          type:
                            example: nextgenProjectGroup
                  purchase_price:
                    type: object
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/Money'
          description: ''
    orders.info.response:
      title: orders.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 31b9d864-da1d-060e-9811-f683896aeb11
            name:
              type: string
              example: General costs
            order_date:
              type: string
              example: '2016-02-04'
              nullable: true
            order_number:
              type: number
              example: 32
              nullable: true
            delivery_date:
              type: string
              example: '2016-10-14'
              nullable: true
            payment_term:
              allOf:
                - $ref: '#/components/schemas/PaymentTerm'
                - type: object
                  nullable: true
            grouped_lines:
              type: array
              items:
                $ref: '#/components/schemas/OrdersGroupedLinesResponse'
              description: ''
            total:
              type: object
              properties:
                tax_exclusive:
                  $ref: '#/components/schemas/Money'
                tax_inclusive:
                  $ref: '#/components/schemas/Money'
                purchase_price_tax_exclusive:
                  allOf:
                    - $ref: '#/components/schemas/Money'
                    - type: object
                      nullable: true
                purchase_price_tax_inclusive:
                  allOf:
                    - $ref: '#/components/schemas/Money'
                    - type: object
                      nullable: true
                taxes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Taxes'
                  description: ''
            web_url:
              type: string
              example: https://focus.teamleader.eu/order_detail.php?id=31b9d864-da1d-060e-9811-f683896aeb11
            supplier:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - company
                    - contact
                  example: contact
                id:
                  type: string
                  example: e2314517-3cab-4aa9-8471-450e73449040
              nullable: true
            department:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - type: object
                  nullable: true
            deal:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - type: object
                  nullable: true
            project:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - type: object
                  nullable: true
                  description: Only available for users that have access to the old projects module
            assignee:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - type: object
                  nullable: true
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldsResponse'
              description: Only included with request parameter `includes=custom_fields`
    orders.list.request:
      title: orders.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
        page:
          $ref: '#/components/schemas/Page'
        includes:
          type: string
          description: Comma-separated list of optional includes
          example: custom_fields
    orders.list.response:
      title: orders.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 31b9d864-da1d-060e-9811-f683896aeb11
              name:
                type: string
                example: General costs
              order_date:
                type: string
                example: '2016-02-04'
                nullable: true
              order_number:
                type: number
                example: 32
                nullable: true
              delivery_date:
                type: string
                example: '2016-10-14'
                nullable: true
              payment_term:
                allOf:
                  - $ref: '#/components/schemas/PaymentTerm'
                  - type: object
                    nullable: true
              total:
                type: object
                properties:
                  tax_exclusive:
                    $ref: '#/components/schemas/Money'
                  tax_inclusive:
                    $ref: '#/components/schemas/Money'
                  purchase_price_tax_exclusive:
                    allOf:
                      - $ref: '#/components/schemas/Money'
                      - type: object
                        nullable: true
                  purchase_price_tax_inclusive:
                    allOf:
                      - $ref: '#/components/schemas/Money'
                      - type: object
                        nullable: true
                  taxes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Taxes'
                    description: ''
              web_url:
                type: string
                example: https://focus.teamleader.eu/order_detail.php?id=31b9d864-da1d-060e-9811-f683896aeb11
              supplier:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - company
                      - contact
                    example: contact
                  id:
                    type: string
                    example: e2314517-3cab-4aa9-8471-450e73449040
                nullable: true
              department:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - type: object
                    nullable: true
              deal:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - type: object
                    nullable: true
              project:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - type: object
                    nullable: true
                    description: Only available for users that have access to the old projects module
              assignee:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - type: object
                    nullable: true
              custom_fields:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldsResponse'
                description: Only included with request parameter `includes=custom_fields`
    WebHook:
      title: WebHook
      required:
        - url
        - types
      type: object
      properties:
        url:
          type: string
          description: Your webhook URL
          example: https://example.com
        types:
          type: array
          items:
            type: string
            enum:
              - account.deactivated
              - account.deleted
              - call.added
              - call.completed
              - call.deleted
              - call.updated
              - company.added
              - company.deleted
              - company.updated
              - contact.added
              - contact.deleted
              - contact.linkedToCompany
              - contact.unlinkedFromCompany
              - contact.updatedLinkToCompany
              - contact.updated
              - creditNote.booked
              - creditNote.deleted
              - creditNote.peppolSubmissionFailed
              - creditNote.peppolSubmissionSucceeded
              - creditNote.sent
              - creditNote.updated
              - deal.created
              - deal.deleted
              - deal.lost
              - deal.moved
              - deal.updated
              - deal.won
              - incomingCreditNote.added
              - incomingCreditNote.approved
              - incomingCreditNote.bookkeepingSubmissionFailed
              - incomingCreditNote.bookkeepingSubmissionSucceeded
              - incomingCreditNote.deleted
              - incomingCreditNote.refused
              - incomingCreditNote.updated
              - incomingInvoice.added
              - incomingInvoice.approved
              - incomingInvoice.bookkeepingSubmissionFailed
              - incomingInvoice.bookkeepingSubmissionSucceeded
              - incomingInvoice.deleted
              - incomingInvoice.refused
              - incomingInvoice.updated
              - invoice.booked
              - invoice.deleted
              - invoice.drafted
              - invoice.paymentRegistered
              - invoice.paymentRemoved
              - invoice.peppolSubmissionFailed
              - invoice.peppolSubmissionSucceeded
              - invoice.sent
              - invoice.updated
              - meeting.created
              - meeting.completed
              - meeting.deleted
              - meeting.updated
              - milestone.created
              - milestone.updated
              - nextgenProject.created
              - nextgenProject.updated
              - nextgenProject.closed
              - nextgenProject.deleted
              - nextgenTask.completed
              - nextgenTask.created
              - nextgenTask.deleted
              - nextgenTask.updated
              - product.added
              - product.updated
              - product.deleted
              - project.created
              - project.deleted
              - project.updated
              - receipt.added
              - receipt.approved
              - receipt.bookkeepingSubmissionFailed
              - receipt.bookkeepingSubmissionSucceeded
              - receipt.deleted
              - receipt.refused
              - receipt.updated
              - subscription.added
              - subscription.deactivated
              - subscription.deleted
              - subscription.updated
              - task.completed
              - task.created
              - task.deleted
              - task.updated
              - ticket.closed
              - ticket.created
              - ticket.deleted
              - ticket.reopened
              - ticket.updated
              - ticketMessage.added
              - timeTracking.added
              - timeTracking.deleted
              - timeTracking.updated
              - user.deactivated
          description: Array of event types that fire the webhook
    webhooks.list.response:
      title: webhooks.list.response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WebHook'
          description: ''
    cloudPlatforms.url.request:
      title: cloudPlatforms.url.request
      required:
        - type
        - id
      type: object
      properties:
        type:
          type: string
          enum:
            - deal
            - invoice
            - quotation
            - ticket
        id:
          type: string
          example: b7023c11-455e-4fa5-bb96-87f37dbc7d07
    cloudPlatforms.url.response:
      title: cloudPlatforms.url.response
      type: object
      properties:
        data:
          oneOf:
            - title: Response for type=deal
              type: object
              description: Returned when type is `deal`.
              properties:
                public:
                  type: string
                  example: https://teamleader.cloud/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yUmR5yNZ45P_jHDbjAzuk4kRA8YNoM9ckSZOZpMIJmU/
                preview:
                  type: string
                  example: https://teamleader.cloud/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yUmR5yNZ45P_jHDbjAzuk4kRA8YNoM9ckSZOZpMIJmU/?preview=true
            - title: Response for type=invoice, type=quotation, type=ticket
              type: object
              description: Returned when type is `invoice`, `quotation`, or `ticket`.
              properties:
                url:
                  type: string
                  example: https://teamleader.cloud/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.yUmR5yNZ45P_jHDbjAzuk4kRA8YNoM9ckSZOZpMIJmU/
    accounts.projects-v2-status.response:
      title: accounts.projects-v2-status.response
      type: object
      properties:
        data:
          type: object
          properties:
            status:
              type: string
              enum:
                - projects-v2
                - legacy
              example: projects-v2
            will_be_automatically_switched_on:
              type: string
              description: Date when the account will be automatically switched to `projects-v2` version (optional).
              example: '2024-12-31'
    plannableItems.list.request:
      title: plannableItems.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
            types:
              type: array
              items:
                type: string
                enum:
                  - closingDay
                  - dayOffType
                  - meeting
                  - task
                  - call
                  - externalEvent
                example: task
            term:
              type: string
              example: Set-up
            start_date:
              type: string
              example: '2023-10-02'
            end_date:
              type: string
              example: '2023-10-06'
            project_ids:
              type: array
              items:
                type: string
            assignees:
              type: array
              description: To fetch unassigned plannable items, provide `null` instead of the type/id object
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
            work_type_ids:
              type: array
              items:
                type: string
            completion_statuses:
              type: array
              items:
                type: string
                enum:
                  - to_do
                  - done
                example: to_do
            planned_time_statuses:
              type: array
              items:
                type: string
                enum:
                  - unplanned
                  - partially_planned
                  - fully_planned
                  - overbooked
                example: unplanned
        page:
          $ref: '#/components/schemas/Page'
        sort:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Sort'
              - properties:
                  field:
                    type: string
                    enum:
                      - id
                      - end_date
                      - total_duration
                    default: id
                  order:
                    default: asc
    DurationInMinutesFull:
      title: DurationInMinutesFull
      type: object
      properties:
        unit:
          type: string
          enum:
            - minutes
          example: minutes
        value:
          type: number
          example: 60
    plannableItems.list.response:
      title: plannableItems.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 018d55af-d0d7-76be-8185-ee970a7f3826
              source:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: task
              total_duration:
                allOf:
                  - $ref: '#/components/schemas/DurationInMinutesFull'
              planned_duration:
                allOf:
                  - $ref: '#/components/schemas/DurationInMinutesFull'
              unplanned_duration:
                allOf:
                  - $ref: '#/components/schemas/DurationInMinutesFull'
    plannableItems.info.request:
      title: plannableItems.info.request
      type: object
      properties:
        id:
          type: string
          example: 018d79a1-2b99-7fbd-b323-500b01305371
        source:
          allOf:
            - $ref: '#/components/schemas/TypeAndId'
            - properties:
                type:
                  type: string
                  example: task
    plannableItems.info.response:
      title: plannableItems.info.response
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 018d55af-d0d7-76be-8185-ee970a7f3826
            source:
              allOf:
                - $ref: '#/components/schemas/TypeAndId'
                - properties:
                    type:
                      type: string
                      example: task
            total_duration:
              allOf:
                - $ref: '#/components/schemas/DurationInMinutesFull'
            planned_duration:
              allOf:
                - $ref: '#/components/schemas/DurationInMinutesFull'
            unplanned_duration:
              allOf:
                - $ref: '#/components/schemas/DurationInMinutesFull'
    SourceType:
      title: SourceType
      enum:
        - call
        - closingDay
        - dayOffType
        - externalEvent
        - meeting
        - task
      type: string
    reservations.list.request:
      title: reservations.list.request
      type: object
      properties:
        filter:
          type: object
          properties:
            plannable_item_ids:
              type: array
              items:
                type: string
            project_ids:
              type: array
              items:
                type: string
            work_type_ids:
              type: array
              items:
                type: string
            start_date:
              type: string
              example: '2024-01-11'
            end_date:
              type: string
              example: '2024-01-12'
            assignees:
              type: array
              description: To fetch unassigned reservations, provide `null` instead of the type/id object
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
            sources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        $ref: '#/components/schemas/SourceType'
            source_types:
              type: array
              items:
                $ref: '#/components/schemas/SourceType'
            term:
              type: string
        page:
          $ref: '#/components/schemas/Page'
    reservations.list.response:
      title: reservations.list.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 39c64ba9-ebf1-491a-8486-a0b96ff21c07
              plannable_item:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: plannableItem
              date:
                type: string
                example: '2024-01-11'
              duration:
                allOf:
                  - $ref: '#/components/schemas/DurationInMinutesFull'
              assignee:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
              origin:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: dayOff
    reservations.create.request:
      title: reservations.create.request
      type: object
      required:
        - plannable_item_id
        - date
        - duration
        - assignee
      properties:
        plannable_item_id:
          type: string
          example: e82cec33-24c9-4d13-96cb-d515a1660c8d
        date:
          type: string
          example: '2024-01-12'
        duration:
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    reservations.create.response:
      title: reservations.create.response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TypeAndId'
    reservations.update.request:
      title: reservations.update.request
      type: object
      required:
        - id
      properties:
        id:
          type: string
          example: 01878019-c72c-70dc-b097-7e519c775e35
        date:
          type: string
          example: '2024-01-12'
        duration:
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
        assignee:
          allOf:
            - $ref: '#/components/schemas/Assignee'
            - type: object
              required:
                - type
                - id
              properties:
                type:
                  type: string
                  enum:
                    - team
                    - user
                  example: user
    reservations.delete.request:
      title: reservations.delete.request
      type: object
      required:
        - id
      properties:
        id:
          type: string
          example: 01878019-c72c-70dc-b097-7e519c775e35
    Period:
      title: Period
      type: object
      properties:
        start_date:
          type: string
          default: '2023-10-02'
        end_date:
          type: string
          default: '2023-10-06'
    userAvailability.total.request:
      title: userAvailability.total.request
      type: object
      required:
        - period
      properties:
        period:
          allOf:
            - $ref: '#/components/schemas/Period'
            - description: A maximum duration of 20.000 days can be passed
        filter:
          type: object
          properties:
            assignees:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
        page:
          $ref: '#/components/schemas/Page'
    UserAvailability:
      title: UserAvailability
      type: object
      properties:
        gross_time_available:
          description: Total available time based on working hours
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
        net_time_available:
          description: Gross time available minus days off
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
        planned_time:
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
        unplanned_time:
          allOf:
            - $ref: '#/components/schemas/DurationInMinutesFull'
    userAvailability.total.response:
      title: userAvailability.total.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              user:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: user
              availability:
                allOf:
                  - $ref: '#/components/schemas/UserAvailability'
    userAvailability.daily.request:
      title: userAvailability.daily.request
      type: object
      required:
        - period
      properties:
        period:
          allOf:
            - $ref: '#/components/schemas/Period'
            - description: A maximum duration of 100 days can be passed
        filter:
          type: object
          properties:
            assignees:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Assignee'
                  - type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        enum:
                          - team
                          - user
                        example: user
        page:
          $ref: '#/components/schemas/Page'
    userAvailability.daily.response:
      title: userAvailability.daily.response
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              user:
                allOf:
                  - $ref: '#/components/schemas/TypeAndId'
                  - properties:
                      type:
                        type: string
                        example: user
              availabilities:
                type: array
                items:
                  type: object
                  properties:
                    date:
                      type: string
                      example: '2023-10-02'
                    availability:
                      allOf:
                        - $ref: '#/components/schemas/UserAvailability'
x-tagGroups:
  - name: General
    tags:
      - departments
      - users
      - teams
      - custom_fields
      - work_types
      - document_templates
      - currencies
      - notes
      - email_tracking
      - closing_days
      - day_off_types
      - days_off
  - name: CRM
    tags:
      - contacts
      - companies
      - business_types
      - tags
      - addresses
  - name: Deals
    tags:
      - deals
      - deal_pipelines
      - deal_phases
      - deal_sources
      - quotations
      - orders
  - name: Calendar
    tags:
      - meetings
      - calls
      - call_outcomes
      - calendar_events
      - activity_types
  - name: Invoicing
    tags:
      - invoices
      - credit_notes
      - subscriptions
      - tax_rates
      - payment_terms
      - withholding_tax_rates
      - commercial_discounts
      - payment_methods
  - name: Expenses
    tags:
      - expenses
      - bookkeeping_submissions
      - incoming_invoices
      - incoming_credit_notes
      - receipts
  - name: Products
    tags:
      - product_categories
      - products
      - price_lists
      - units_of_measure
  - name: Legacy Projects
    tags:
      - legacy_projects
      - legacy_milestones
  - name: New Projects
    tags:
      - projects
      - external_parties
      - project_lines
      - groups
      - projects_v2_tasks
      - materials
  - name: Planning
    tags:
      - plannable_items
      - reservations
      - user_availability
  - name: Tasks
    tags:
      - tasks
  - name: Time Tracking
    tags:
      - time_tracking
      - timers
  - name: Tickets
    tags:
      - tickets
      - ticket_status
  - name: Files
    tags:
      - files
  - name: Templates
    tags:
      - mail_templates
  - name: Other
    tags:
      - migrating
      - webhooks
      - cloud_platforms
      - accounts
