paths:
  /api/v1/activities:
    get:
      tags:
        - activities
      summary: "Returns a list of activities"
      description: "Lists all activities related to this company"
      operationId: getActivities
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/activity_include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "Returns the list of activities"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Activity'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/activities/download_entity/{activity_id}":
    get:
      tags:
        - activities
      summary: "Returns a PDF for the given activity"
      description: "Returns a PDF for the given activity"
      operationId: getActivityHistoricalEntityPdf
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/activity_include"
        - name: activity_id
          in: path
          description: "The Activity Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "PDF File"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        404:
          description: "No file exists for the given record"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/activities/entity:
    post:
      tags:
        - activities
      summary: "Entity activity"
      description: "Returns activity for a given entity"
      operationId: postActivitiesEntity
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "Entity activity response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/activities/notes:
    post:
      tags:
        - activities
      summary: "Activity note"
      description: "Creates or updates an activity note"
      operationId: postActivitiesNotes
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "Activity note response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"

  /api/v1/passkeys/login/options:
    post:
      tags:
        - auth
      summary: "Passkey login options"
      operationId: postPasskeyLoginOptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  example: "demo@invoiceninja.com"
              required:
                - email
      responses:
        200:
          description: "Returns passkey authentication options and challenge token"
        404:
          description: "No passkeys registered for this account"
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: "No passkeys registered for this account. Please use password login or register a passkey first."
        401:
          $ref: "#/components/responses/401"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"

  /api/v1/settings/passkeys:
    get:
      tags:
        - settings
      summary: "List passkeys"
      operationId: getSettingsPasskeys
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
      responses:
        200:
          description: "Returns passkeys for the current user"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - settings
      summary: "Create passkey"
      operationId: postSettingsPasskeys
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                challenge_token:
                  type: string
                credential:
                  type: object
                  additionalProperties: true
                name:
                  type: string
              required:
                - challenge_token
                - credential
      responses:
        200:
          description: "Passkey added"
        401:
          $ref: "#/components/responses/401"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"

  /api/v1/settings/passkeys/options:
    post:
      tags:
        - settings
      summary: "Passkey registration options"
      operationId: postSettingsPasskeysOptions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
      responses:
        200:
          description: "Returns passkey registration options and challenge token"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"

  /api/v1/settings/passkeys/{passkey}:
    delete:
      tags:
        - settings
      summary: "Delete passkey"
      operationId: deleteSettingsPasskey
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - name: passkey
          in: path
          required: true
          schema:
            type: string
      responses:
        200:
          description: "Passkey removed"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        default:
          $ref: "#/components/responses/default"

  /api/v1/login:
    post:
      x-codeSamples:
      - lang: php
        label: php
        source: |
          $ninja = new InvoiceNinja("your_token");
          
      - lang: curl
        label: curl
        source: |
          curl --request POST \
            --url 'https://demo.invoiceninja.com/api/v1/login?include=company,token' \
            --header 'X-API-TOKEN: YOUR_API_TOKEN_HERE' \
            --header 'X-Requested-With: XMLHttpRequest' \
            --header 'Accept: application/json'
      tags:
        - auth
      summary: "Login"
      description: |

      operationId: postLogin
      parameters:
        - $ref: "#/components/parameters/X-API-SECRET"
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/login_include"
        - $ref: "#/components/parameters/include_static"
        - $ref: "#/components/parameters/clear_cache"
      requestBody:
        description: |
          User credentials

          ```json
          {
            "email" : "fred@flintstonze.com",
            "password" : "magicpassword123",
            "one_time_password" : "12345",
          }
          ```
        required: true
        content:
          application/json:
            schema:
              properties:
                email:
                  description: "The users email address."
                  type: string
                  example: "demo@invoiceninja.com"
                password:
                  description: "The user password. Optional when performing passkey passwordless login."
                  type: string
                  example: "Password0"
                one_time_password:
                  description: "The one time password if 2FA is enabled"
                  type: string
                  example: "123456"
                passkey_challenge_token:
                  description: "Challenge token returned by passkey login options or second-factor challenge."
                  type: string
                  example: "f8f0cf1f4f6c4de5b6d6c5d4a0f8e5b2b89e1f1a"
                passkey_authentication:
                  description: "WebAuthn assertion payload."
                  type: object
                  additionalProperties: true
              required:
                - email
              type: object
      responses:
        200:
          description: "Returns the company user object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyUser"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/refresh:
    post:
      tags:
        - refresh
      summary: "Refresh data by timestamp"
      description: |
        Refreshes the dataset.  

        This endpoint can be used if you only need to access the most recent data from a certain point in time. For example, if you only want to retrieve The
        most recent data from the last time you accessed the system, you would pass the query parameter ?updated_at=1676173763. (unix timestamp)
      operationId: postRefresh
      parameters:
        - name: updated_at
          in: query
          description: "The unix timestamp from which the refreshed data should be sent from, if no value is passed the system will assume you require all data."
          required: true
          schema:
            type: number
            format: integer
          example: 1676173763
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/include_static"
        - $ref: "#/components/parameters/clear_cache"
      responses:
        200:
          description: "The Company User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyUser"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/yodlee/refresh:
    post:
      tags:
        - yodlee
      summary: "Yodlee Webhook"
      description: "Webhook endpoint for Yodlee. Used to notify the system that a data point can be updated."
      operationId: yodleeRefreshWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: ""
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Credit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations:
    get:
      tags:
        - bank_integrations
      summary: "Returns a list of Bank Integrations"
      description: "Lists all bank integrations"
      operationId: getBankIntegrations
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/bank_integration_include"
        - $ref: "#/components/parameters/index"
        - name: rows
          in: query
          description: "The number of bank integrations to return"
          required: false
          schema:
            type: number
            format: integer
          example: 50
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of bank integrations"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/BankIntegration'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - bank_integrations
      summary: "Adds a bank_integration"
      description: "Adds an bank_integration to a company"
      operationId: storeBankIntegration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_integrations/{id}":
    get:
      tags:
        - bank_integrations
      summary: "Shows a bank_integration"
      description: "Displays a bank_integration by id"
      operationId: showBankIntegration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankIntegration Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - bank_integrations
      summary: "Updates a bank_integration"
      description: "Handles the updating of a bank_integration by id"
      operationId: updateBankIntegration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankIntegration Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - bank_integrations
      summary: "Deletes a bank_integration"
      description: "Handles the deletion of a bank_integration by id"
      operationId: deleteBankIntegration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankIntegration Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_integrations/{id}/edit":
    get:
      tags:
        - bank_integrations
      summary: "Shows a bank_integration for editing"
      description: "Displays a bank_integration by id"
      operationId: editBankIntegration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankIntegration Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations/create:
    get:
      tags:
        - bank_integrations
      summary: "Gets a new blank bank_integration object"
      description: "Returns a blank object with default values"
      operationId: getBankIntegrationsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations/bulk:
    post:
      tags:
        - bank_integrations
      summary: "Performs bulk actions on an array of bank_integrations"
      description: ""
      operationId: bulkBankIntegrations
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Action paramters"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Bulk Action response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations/refresh_accounts:
    post:
      tags:
        - bank_integrations
      summary: "Gets the list of accounts from the remote server"
      description: "Adds an bank_integration to a company"
      operationId: getRefreshAccounts
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations/remove_account/account_id:
    post:
      tags:
        - bank_integrations
      summary: "Removes an account from the integration"
      description: "Removes an account from the integration"
      operationId: getRemoveAccount
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the bank_integration object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_integrations/get_transactions/account_id:
    post:
      tags:
        - bank_integrations
      summary: "Retrieve transactions for a account"
      description: "Retrieve transactions for a account"
      operationId: getAccountTransactions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Retrieve transactions for a account"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankIntegration"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transactions:
    get:
      tags:
        - bank_transactions
      summary: "Gets a list of bank_transactions"
      description: "Lists all bank integrations"
      operationId: getBankTransactions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - name: rows
          in: query
          description: "The number of bank integrations to return"
          required: false
          schema:
            type: number
            format: integer
          example: 50
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of bank integrations"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/BankTransaction'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - bank_transactions
      summary: "Adds a bank_transaction"
      description: "Adds an bank_transaction to a company"
      operationId: storeBankTransaction
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved bank_transaction object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransaction"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_transactions/{id}":
    get:
      tags:
        - bank_transactions
      summary: "Shows a bank_transaction"
      description: "Displays a bank_transaction by id"
      operationId: showBankTransaction
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankTransaction Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransaction"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - bank_transactions
      summary: "Updates a bank_transaction"
      description: "Handles the updating of a bank_transaction by id"
      operationId: updateBankTransaction
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankTransaction Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransaction"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - bank_transactions
      summary: "Deletes a bank_transaction"
      description: "Handles the deletion of a bank_transaction by id"
      operationId: deleteBankTransaction
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankTransaction Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_transactions/{id}/edit":
    get:
      tags:
        - bank_transactions
      summary: "Shows a bank_transaction for editing"
      description: "Displays a bank_transaction by id"
      operationId: editBankTransaction
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The BankTransaction Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransaction"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transactions/create:
    get:
      tags:
        - bank_transactions
      summary: "Gets a new blank bank_transaction object"
      description: "Returns a blank object with default values"
      operationId: getBankTransactionsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank bank_transaction object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransaction"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transactions/bulk:
    post:
      tags:
        - bank_transactions
      summary: "Bulk actions"
      description: ""
      operationId: bulkBankTransactions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Action paramters"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Bulk Action response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transactions/match:
    post:
      tags:
        - bank_transactions
      summary: "Match transactions"
      description: |
        Matching invoices or a payment to a bank transactions.
        
        The API expects the id of the transaction along with either a comma separated list of invoice ids OR the payment id to associate the transaction to.

        Example for matching a transaction to two invoices:

        {"transactions":[{"id":"olejRl5ejN","invoice_ids":"JxboYBLegw,JxboYBLeXX"}]}

        Example for matching a transaction and a paymente:

        {"transactions":[{"id":"olejRl5ejN","payment_id":"JxboYBLeXf"}]}

        Matching expenses.

        You can match an existing expense within Invoice Ninja - or - create a new expense using the following:

        {"transactions":[{"id":"open5pld7A","vendor_id":"gl9avJnaG1","ninja_category_id":""}]}

        To match to an existing expense:

        {"transactions":[{"id":"Jxbo2qKagw","expense_id":"7N1aMM1aWm"}]}

      operationId: matchBankTransactions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Action paramters"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Bulk Action response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transaction_rules:
    get:
      tags:
        - bank_transaction_rules
      summary: "Gets a list of bank_transaction_rules"
      description: "Lists all bank transaction rules"
      operationId: getBankTransactionRules
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - name: rows
          in: query
          description: "The number of bank integrations to return"
          required: false
          schema:
            type: number
            format: integer
          example: 50
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of bank integrations"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/BankTransactionRule'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - bank_transaction_rules
      summary: "Adds a bank_transaction rule"
      description: "Adds an bank_transaction to a company"
      operationId: storeBankTransactionRule
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved bank_transaction rule object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransactionRule"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_transaction_rules/{id}":
    get:
      tags:
        - bank_transaction_rules
      summary: "Shows a bank_transaction"
      description: "Displays a bank_transaction by id"
      operationId: showBankTransactionRule
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Bank Transaction RuleHashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction rule object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransactionRule"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - bank_transaction_rules
      summary: "Updates a bank_transaction Rule"
      description: "Handles the updating of a bank_transaction rule by id"
      operationId: updateBankTransactionRule
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Bank Transaction Rule Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction rule object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransactionRule"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - bank_transaction_rules
      summary: "Deletes a bank_transaction rule"
      description: "Handles the deletion of a bank_transaction rule by id"
      operationId: deleteBankTransactionRule
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Bank Transaction Rule Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/bank_transaction_rules/{id}/edit":
    get:
      tags:
        - bank_transaction_rules
      summary: "Shows a bank_transaction for editing"
      description: "Displays a bank_transaction by id"
      operationId: editBankTransactionRule
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Bank Transaction Rule Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the bank_transaction rule object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransactionRule"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transaction_rules/create:
    get:
      tags:
        - bank_transaction_rules
      summary: "Gets a new blank bank_transaction rule object"
      description: "Returns a blank object with default values"
      operationId: getBankTransactionRulesCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank bank_transaction rule object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankTransactionRule"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/bank_transaction_rules/bulk:
    post:
      tags:
        - bank_transaction_rules
      summary: "Performs bulk actions on an array of bank_transaction rules"
      description: ""
      operationId: bulkBankTransactionRules
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Action paramters"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Bulk Action response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/charts/totals:
    post:
      tags:
        - charts
      summary: "Get chart data"
      description: "Get chart data"
      operationId: getChartTotals
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - name: rows
          in: query
          description: "The chart"
          required: false
          schema:
            type: number
            format: integer
          example: 50
      responses:
        200:
          description: "json dataset of chart data"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/charts/totals_v2:
    post:
      tags:
        - charts
      summary: "Get chart data v2"
      description: "Get chart data (v2)"
      operationId: getChartTotalsV2
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "json dataset of chart data"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        default:
          $ref: "#/components/responses/default"
  /api/v1/charts/chart_summary_v2:
    post:
      tags:
        - charts
      summary: "Get chart summary v2"
      description: "Get chart summary (v2)"
      operationId: getChartSummaryV2
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "json dataset of chart summary"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        default:
          $ref: "#/components/responses/default"
  /api/v1/charts/calculated_fields:
    post:
      tags:
        - charts
      summary: "Get calculated fields"
      description: "Get chart calculated fields"
      operationId: getChartCalculatedFields
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "json dataset of calculated fields"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        default:
          $ref: "#/components/responses/default"

  /api/v1/client_gateway_tokens:
    get:
      tags:
        - client_gateway_tokens
      summary: "List of client payment tokens"
      description: "Lists client_gateway_tokens, search and filters allow fine grained lists to be generated.\n\n    Query parameters can be added to performed more fine grained filtering of the client_gateway_tokens, these are handled by the ClientGatewayTokenFilters class which defines the methods available"
      operationId: getClientGatewayTokens
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of client_gateway_tokens"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/ClientGatewayToken'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - client_gateway_tokens
      summary: "Adds a client payment token"
      description: "Adds a client payment token to a company"
      operationId: storeClientGatewayToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved client payment token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientGatewayToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/client_gateway_tokens/{id}":
    get:
      tags:
        - client_gateway_tokens
      summary: "Shows a client payment token"
      description: "Displays a client payment token by id"
      operationId: showClientGatewayToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The ClientGatewayToken Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the client payment token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientGatewayToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - client_gateway_tokens
      summary: "Updates a client payment token"
      description: "Handles the updating of a client payment token by id"
      operationId: updateClientGatewayToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The ClientGatewayToken Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the client payment token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientGatewayToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - client_gateway_tokens
      summary: "Deletes a client"
      description: "Handles the deletion of a client payment token by id"
      operationId: deleteClientGatewayToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The ClientGatewayToken Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/client_gateway_tokens/{id}/edit":
    get:
      tags:
        - client_gateway_tokens
      summary: "Shows a client payment token for editting"
      description: "Displays a client by id"
      operationId: editClientGatewayToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The ClientGatewayToken Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the client payment token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientGatewayToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/client_gateway_tokens/create:
    get:
      tags:
        - client_gateway_tokens
      summary: "Gets a new blank client payment token object"
      description: "Returns a blank object with default values"
      operationId: getClientGatewayTokensCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank client payment token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientGatewayToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"

  /api/v1/companies:
    get:
      tags:
        - companies
      summary: "Gets a list of companies"
      description: "Lists companies, search and filters allow fine grained lists to be generated.\n\n        Query parameters can be added to performed more fine grained filtering of the companies, these are handled by the CompanyFilters class which defines the methods available"
      operationId: getCompanies
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of companies"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Company'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - companies
      summary: "Adds a company"
      description: "Adds an company to the system"
      operationId: storeCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/companies/create:
    get:
      tags:
        - companies
      summary: "Gets a new blank company object"
      description: "Returns a blank object with default values"
      operationId: getCompaniesCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/companies/{id}":
    get:
      tags:
        - companies
      summary: "Shows an company"
      description: "Displays an company by id"
      operationId: showCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - companies
      summary: "Updates an company"
      description: "Handles the updating of an company by id"
      operationId: updateCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - companies
      summary: "Deletes a company"
      description: "Handles the deletion of an company by id"
      operationId: deleteCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/companies/{id}/edit":
    get:
      tags:
        - companies
      summary: "Shows an company for editting"
      description: "Displays an company by id"
      operationId: editCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/companies/{id}/upload":
    post:
      tags:
        - companies
      summary: "Uploads a document to a company"
      description: "Handles the uploading of a document to a company"
      operationId: uploadCompanies
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      requestBody:
        description: "File Upload Body"
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                _method:
                  type: string
                  example: PUT
                documents:
                  type: array
                  items:
                    description: "Array of binary documents for upload"
                    type: string
                    format: binary
      responses:
        200:
          description: "Returns the client object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/companies/{company}/default":
    post:
      tags:
        - companies
      summary: "Sets the company as the default company."
      description: "Sets the company as the default company."
      operationId: setDefaultCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: company
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  "/api/v1/companies/current":
    post:
      tags:
        - companies
      summary: "Returns the current comapny"
      description: "Returns the current company based on the API token passed in"
      operationId: showCurrentCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the company object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Company"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/company_gateways:
    get:
      tags:
        - company_gateways
      summary: "Gets a list of company_gateways"
      description: "Lists company_gateways, search and filters allow fine grained lists to be generated.\n\n        Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available"
      operationId: getCompanyGateways
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of company_gateways"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyGateway'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - company_gateways
      summary: "Adds a CompanyGateway"
      description: "Adds an CompanyGateway to the system"
      operationId: storeCompanyGateway
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved CompanyGateway object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        429:
          $ref: "#/components/responses/429"
        5XX:
          description: 'Server error'
        default:
          $ref: "#/components/responses/default"
  /api/v1/company_gateways/create:
    get:
      tags:
        - company_gateways
      summary: "Gets a new blank CompanyGateway object"
      description: "Returns a blank object with default values"
      operationId: getCompanyGatewaysCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank CompanyGateway object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/company_gateways/{id}":
    get:
      tags:
        - company_gateways
      summary: "Shows an CompanyGateway"
      description: "Displays an CompanyGateway by id"
      operationId: showCompanyGateway
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The CompanyGateway Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the CompanyGateway object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - company_gateways
      summary: "Updates an CompanyGateway"
      description: "Handles the updating of an CompanyGateway by id"
      operationId: updateCompanyGateway
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The CompanyGateway Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the CompanyGateway object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - company_gateways
      summary: "Deletes a CompanyGateway"
      description: "Handles the deletion of an CompanyGateway by id"
      operationId: deleteCompanyGateway
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The CompanyGateway Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/company_gateways/{id}/edit":
    get:
      tags:
        - company_gateways
      summary: "Shows an CompanyGateway for editting"
      description: "Displays an CompanyGateway by id"
      operationId: editCompanyGateway
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The CompanyGateway Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the CompanyGateway object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/company_gateways/bulk:
    post:
      tags:
        - company_gateways
      summary: "Performs bulk actions on an array of company_gateways"
      description: ""
      operationId: bulkCompanyGateways
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Array of company gateway IDs"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Company Gateways response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyGateway"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/company_ledger:
    get:
      tags:
        - company_ledger
      summary: "Gets a list of company_ledger"
      description: "Lists the company_ledger."
      operationId: getCompanyLedger
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A list of company_ledger"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyLedger'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/company_users:
    post:
      tags:
        - company_user
      summary: "Update a company user record"
      description: "Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users"
      operationId: updateCompanyUser
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "The Company User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyUser"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/connected_account:
    post:
      tags:
        - connected_account
      summary: "Connect an oauth user to an existing user"
      description: "Refreshes the dataset"
      operationId: postConnectedAccount
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/include_static"
        - $ref: "#/components/parameters/clear_cache"
      responses:
        200:
          description: "The Company User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/designs:
    get:
      tags:
        - designs
      summary: "Gets a list of designs"
      description: "Lists designs"
      operationId: getDesigns
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of designs"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Design'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - designs
      summary: "Adds a design"
      description: "Adds an design to a company"
      operationId: storeDesign
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved design object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/designs/{id}":
    get:
      tags:
        - designs
      summary: "Shows a design"
      description: "Displays a design by id"
      operationId: showDesign
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Design Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - designs
      summary: "Updates a design"
      description: "Handles the updating of a design by id"
      operationId: updateDesign
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Design Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the design object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - designs
      summary: "Deletes a design"
      description: "Handles the deletion of a design by id"
      operationId: deleteDesign
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Design Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/designs/{id}/edit":
    get:
      tags:
        - designs
      summary: "Shows a design for editting"
      description: "Displays a design by id"
      operationId: editDesign
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Design Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the design object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/designs/create:
    get:
      tags:
        - designs
      summary: "Gets a new blank design object"
      description: "Returns a blank object with default values"
      operationId: getDesignsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank design object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"

        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/designs/bulk:
    post:
      tags:
        - designs
      summary: "Performs bulk actions on an array of designs"
      description: ""
      operationId: bulkDesigns
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "User credentials"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Design User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Design"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/documents:
    get:
      tags:
        - documents
      summary: "Gets a list of documents"
      description: "Lists documents, search and filters allow fine grained lists to be generated.\n\n    Query parameters can be added to performed more fine grained filtering of the documents, these are handled by the DocumentsFilters class which defines the methods available"
      operationId: getDocuments
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of documents"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Document'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/emails:
    post:
      tags:
        - emails
      summary: "Sends an email for an entity"
      description: "Sends an email for an entity"
      operationId: sendEmailTemplate
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        description: "Required fields to send an email"
        required: true
        content:
          application/json:
            schema:
              required:
                - entity
                - entity_id
                - template
              properties:
                subject:
                  description: "The email subject"
                  type: string
                body:
                  description: "The email body"
                  type: string
                entity:
                  description: "The entity name"
                  type: string
                entity_id:
                  description: "The entity_id"
                  type: string
                cc_email:
                  description: "The email address of a user to be CC'd on the email"
                  type: string
                template:
                  description: "The template required"
                  type: string
                  enum:
                    - email_template_invoice
                    - email_template_quote
                    - email_template_credit
                    - email_template_payment
                    - email_template_payment_partial
                    - email_template_statement
                    - email_template_reminder1
                    - email_template_reminder2
                    - email_template_reminder3
                    - email_template_reminder_endless
                    - email_template_custom1
                    - email_template_custom2
                    - email_template_custom3
                    - email_template_purchase_order
                    - email_quote_template_reminder1
                  example: email_template_invoice
              type: object
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Template"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expense_categories:
    get:
      tags:
        - expense_categories
      summary: "Gets a list of expense_categories"
      description: "Lists tax rates"
      operationId: getExpenseCategorys
      parameters:
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of expense_categories"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/ExpenseCategory'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - expense_categories
      summary: "Adds a expense category"
      description: "Adds an expense category to the system"
      operationId: storeExpenseCategory
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved invoice object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExpenseCategory"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expense_categories/create:
    get:
      tags:
        - expense_categories
      summary: "Gets a new blank Expens Category object"
      description: "Returns a blank object with default values"
      operationId: getExpenseCategoryCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "A blank Expens Category object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExpenseCategory"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/expense_categories/{id}":
    get:
      tags:
        - expense_categories
      summary: "Shows a Expens Category"
      description: "Displays an ExpenseCategory by id"
      operationId: showExpenseCategory
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The ExpenseCategory Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Expens Category object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExpenseCategory"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - expense_categories
      summary: "Updates a tax rate"
      description: "Handles the updating of a tax rate by id"
      operationId: updateExpenseCategory
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The ExpenseCategory Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the ExpenseCategory object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExpenseCategory"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - expense_categories
      summary: "Deletes a ExpenseCategory"
      description: "Handles the deletion of an ExpenseCategory by id"
      operationId: deleteExpenseCategory
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The ExpenseCategory Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/expense_categories/{id}/edit":
    get:
      tags:
        - expense_categories
      summary: "Shows a Expens Category for editting"
      description: "Displays a Expens Category by id"
      operationId: editExpenseCategory
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The ExpenseCategory Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Expens Category object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExpenseCategory"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expense_categories/bulk:
    post:
      tags:
        - expense_categories
      summary: "Performs bulk actions on an array of ExpenseCategorys"
      description: ""
      operationId: bulkExpenseCategorys
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Expens Categorys"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The ExpenseCategory List response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expenses:
    get:
      tags:
        - expenses
      summary: "Gets a list of expenses"
      description: "Lists expenses, search and filters allow fine grained lists to be generated.\n\n    Query parameters can be added to performed more fine grained filtering of the expenses, these are handled by the ExpenseFilters class which defines the methods available"
      operationId: getExpenses
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of expenses"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Expense'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - expenses
      summary: "Adds an expense"
      description: "Adds a expense to a company"
      operationId: storeExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/expenses/{id}":
    get:
      tags:
        - expenses
      summary: "Shows a expense"
      description: "Displays a expense by id"
      operationId: showExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Expense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - expenses
      summary: "Updates a expense"
      description: "Handles the updating of a expense by id"
      operationId: updateExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Expense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - expenses
      summary: "Deletes a expense"
      description: "Handles the deletion of a expense by id"
      operationId: deleteExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Expense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/expenses/{id}/edit":
    get:
      tags:
        - expenses
      summary: "Shows a expense for editing"
      description: "Displays a client by id"
      operationId: editExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Expense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expenses/create:
    get:
      tags:
        - expenses
      summary: "Gets a new blank expense object"
      description: "Returns a blank object with default values"
      operationId: getExpensesCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/expenses/bulk:
    post:
      tags:
        - expenses
      summary: "Performs bulk actions on an array of expenses"
      description: ""
      operationId: bulkExpenses
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "User credentials"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Expense User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/expenses/{id}/upload":
    post:
      tags:
        - expense
      summary: "Uploads a document to a expense"
      description: "Handles the uploading of a document to a expense"
      operationId: uploadExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Expense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      requestBody:
        description: "File Upload Body"
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                _method:
                  type: string
                  example: PUT
                documents:
                  type: array
                  items:
                    description: "Array of binary documents for upload"
                    type: string
                    format: binary
      responses:
        200:
          description: "Returns the Expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Expense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/export:
    post:
      tags:
        - export
      summary: "Export data from the system"
      description: "Export data from the system"
      operationId: getExport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/group_settings:
    get:
      tags:
        - group_settings
      summary: "Gets a list of group_settings"
      description: "Lists group_settings, search and filters allow fine grained lists to be generated.\n\n        Query parameters can be added to performed more fine grained filtering of the group_settings, these are handled by the GroupSettingFilters class which defines the methods available"
      operationId: getGroupSettings
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of group_settings"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/GroupSetting'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - group_settings
      summary: "Adds a GroupSetting"
      description: "Adds an GroupSetting to the system"
      operationId: storeGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved GroupSetting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupSetting"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/group_settings/create:
    get:
      tags:
        - group_settings
      summary: "Gets a new blank GroupSetting object"
      description: "Returns a blank object with default values"
      operationId: getGroupSettingsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank GroupSetting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupSetting"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/group_settings/{id}":
    get:
      tags:
        - group_settings
      summary: "Shows an GroupSetting"
      description: "Displays an GroupSetting by id"
      operationId: showGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The GroupSetting Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the GroupSetting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupSetting"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - group_settings
      summary: "Updates an GroupSetting"
      description: "Handles the updating of an GroupSetting by id"
      operationId: updateGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The GroupSetting Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the GroupSetting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupSetting"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - group_settings
      summary: "Deletes a GroupSetting"
      description: "Handles the deletion of an GroupSetting by id"
      operationId: deleteGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The GroupSetting Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/group_settings/{id}/edit":
    get:
      tags:
        - group_settings
      summary: "Shows an GroupSetting for editting"
      description: "Displays an GroupSetting by id"
      operationId: editGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The GroupSetting Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the GroupSetting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupSetting"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/group_settings/bulk:
    post:
      tags:
        - group_settings
      summary: "Performs bulk actions on an array of group_settings"
      description: ""
      operationId: bulkGroupSettings
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "An array of group_settings ids"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Bulk Action response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/group_settings/{id}/upload":
    post:
      tags:
        - group_settings
      summary: "Uploads a document to a group setting"
      description: "Handles the uploading of a document to a group setting"
      operationId: uploadGroupSetting
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Group Setting Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      requestBody:
        description: "File Upload Body"
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                _method:
                  type: string
                  example: PUT
                documents:
                  type: array
                  items:
                    description: "Array of binary documents for upload"
                    type: string
                    format: binary
      responses:
        200:
          description: "Returns the Group Setting object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/preimport:
    post:
      tags:
        - imports
      summary: "Pre Import CSV data"
      description: |
          The preimport endpoint is the first step when importing CSV data into Invoice Ninja. It validates your file(s) and returns the column headers found in each CSV, allowing you to map them to system fields before performing the actual import.

          **How it works**

          1. Set `import_type` to indicate the entity type (e.g. `invoice`, `quote`, `client`, `product`, `payment`, `vendor`, `expense`).
          2. Attach one or more CSV files using the `files[]` parameter, keyed by entity type:
             - `files[invoice]` — invoice records
             - `files[client]` — client records
             - `files[product]` — product records
             - `files[payment]` — payment records
             - `files[vendor]` — vendor records
             - `files[expense]` — expense records
          3. The response returns the detected column headers for each uploaded file so you can build a field mapping for the subsequent `/api/v1/import` call.

          You may upload multiple entity files in a single request. Only include the entity types relevant to your import.

          **Example**

          ```bash
          curl -X POST 'https://invoiceninja.com/api/v1/preimport' \
            -H 'X-API-TOKEN: YOUR_API_TOKEN_HERE' \
            -H 'Accept: application/json' \
            -F 'import_type=invoice' \
            -F 'files[invoice]=@invoices.csv' \
            -F 'files[client]=@clients.csv'
          ```
      operationId: preimport
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      requestBody:
        description: "The CSV file(s) and import type"
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - import_type
              properties:
                import_type:
                  type: string
                  description: "The type of import being performed"
                  example: "invoice"
                files[invoice]:
                  type: string
                  format: binary
                  description: "CSV file for invoices"
                files[client]:
                  type: string
                  format: binary
                  description: "CSV file for clients"
                files[product]:
                  type: string
                  format: binary
                  description: "CSV file for products"
                files[payment]:
                  type: string
                  format: binary
                  description: "CSV file for payments"
                files[vendor]:
                  type: string
                  format: binary
                  description: "CSV file for vendors"
                files[expense]:
                  type: string
                  format: binary
                  description: "CSV file for expenses"
      responses:
        200:
          description: |
            Returns a hash identifying the uploaded file(s) and a mappings object for each entity type submitted.

            - **hash** — A unique reference to the uploaded file(s). Pass this to `/api/v1/import` when executing the import.
            - **mappings** — An object keyed by entity type (e.g. `invoice`, `client`). Each entity contains:
              - **available** — The system fields that can be mapped to for this entity (e.g. `invoice.number`, `client.name`, `item.cost`).
              - **headers** — A two-dimensional array. The first element contains the column headers detected from your CSV. The second element contains a sample data row, useful for previewing values during field mapping.
              - **hints** — An array of suggested mappings, one per CSV column. Each value is an index into the `available` array representing the best-guess system field for that column, or `null` when no match could be determined.
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                type: object
                properties:
                  hash:
                    type: string
                    description: "Unique reference to the uploaded file(s), required for the subsequent import call."
                    example: "MvKeSwMnhAfgkzdYKgxM5ummxGbLIdNm"
                  mappings:
                    type: object
                    description: "An object keyed by entity type containing field mapping data for each uploaded CSV."
                    additionalProperties:
                      type: object
                      properties:
                        available:
                          type: array
                          description: "System fields available for mapping."
                          items:
                            type: string
                          example: ["invoice.number", "invoice.amount", "client.name", "item.quantity", "item.cost"]
                        headers:
                          type: array
                          description: "A two-element array: the first element is the CSV column headers, the second is a sample data row."
                          items:
                            type: array
                            items:
                              type: string
                          example: [["Client Name", "Invoice Number", "Amount"], ["Acme Corp", "INV-001", "1500.00"]]
                        hints:
                          type: array
                          description: "Suggested mapping indices into the `available` array for each CSV column. A value of null indicates no suggested match."
                          items:
                            type: integer
                            nullable: true
                          example: [4, 0, 2]
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/import:
    post:
      tags:
        - imports
      summary: "Import CSV data"
      description: |
          The import endpoint executes the actual data import. Call this after `/api/v1/preimport` has returned the file hash, available fields, and column headers.

          Using the data from the preimport response, construct a `column_map` that tells the system how each CSV column maps to a system field. The import runs asynchronously — you will receive an email notification once it completes.

          **Request body**

          - **hash** — The unique file reference returned by `/api/v1/preimport`.
          - **import_type** — The source format (e.g. `csv`, `freshbooks`, `invoice2go`, `invoicely`).
          - **skip_header** — Set to `true` to skip the first row of the CSV (the header row).
          - **column_map** — An object keyed by entity type (e.g. `invoice`, `client`). Each entity contains:
            - **mapping** — An object where each key is the CSV column index (as a string) and each value is the target system field from the `available` array, or an empty string `""` to skip that column.

          ---

          ### Available mapping fields

          Each mapping value uses the format `entity.property`. The tables below list every available field per entity type.

          ### Data Matching:
          
          #### Client Matching:
            Matching a record to a client is performed by using the clients email address (first) or the clients (exact) name. If no match is found, a new client is created.

          #### Multi line item invoice/quote/credits/recurring invoice Matching:
            If you need to import multiple line items into an invoice (other other entity) you will want to assign the same (unique) invoice number to each row in the csv file, the system will group together lines where the invoice number is the same and create line items for each row.

          #### Invoice fields (`files[invoice]`)

          | Field | Description |
          |---|---|
          | `invoice.number` | Invoice number |
          | `invoice.user_id` | Assigned user |
          | `invoice.amount` | Invoice amount |
          | `invoice.balance` | Outstanding balance |
          | `invoice.discount` | Discount value |
          | `invoice.po_number` | Purchase order number |
          | `invoice.date` | Invoice date |
          | `invoice.due_date` | Due date |
          | `invoice.terms` | Invoice terms |
          | `invoice.status` | Invoice status |
          | `invoice.public_notes` | Public notes (visible to client) |
          | `invoice.is_sent` | Whether the invoice has been sent |
          | `invoice.private_notes` | Private notes (internal only) |
          | `invoice.uses_inclusive_taxes` | Whether tax amounts are inclusive |
          | `invoice.tax_name1` | Tax name (tier 1) |
          | `invoice.tax_rate1` | Tax rate (tier 1) |
          | `invoice.tax_name2` | Tax name (tier 2) |
          | `invoice.tax_rate2` | Tax rate (tier 2) |
          | `invoice.tax_name3` | Tax name (tier 3) |
          | `invoice.tax_rate3` | Tax rate (tier 3) |
          | `invoice.is_amount_discount` | Whether discount is a fixed amount |
          | `invoice.footer` | Invoice footer |
          | `invoice.partial` | Partial/deposit amount |
          | `invoice.partial_due_date` | Partial payment due date |
          | `invoice.custom_value1` | Custom field 1 |
          | `invoice.custom_value2` | Custom field 2 |
          | `invoice.custom_value3` | Custom field 3 |
          | `invoice.custom_value4` | Custom field 4 |
          | `invoice.custom_surcharge1` | Custom surcharge 1 |
          | `invoice.custom_surcharge2` | Custom surcharge 2 |
          | `invoice.custom_surcharge3` | Custom surcharge 3 |
          | `invoice.custom_surcharge4` | Custom surcharge 4 |
          | `invoice.exchange_rate` | Currency exchange rate |
          | `client.name` | Client name |
          | `client.email` | Client email |
          | `payment.date` | Payment date |
          | `payment.amount` | Payment amount |
          | `payment.transaction_reference` | Payment transaction reference |
          | `item.quantity` | Line item quantity |
          | `item.cost` | Line item unit cost |
          | `item.product_key` | Line item product key |
          | `item.notes` | Line item description |
          | `item.discount` | Line item discount |
          | `item.is_amount_discount` | Whether line item discount is a fixed amount |
          | `item.tax_name1` | Line item tax name (tier 1) |
          | `item.tax_rate1` | Line item tax rate (tier 1) |
          | `item.tax_name2` | Line item tax name (tier 2) |
          | `item.tax_rate2` | Line item tax rate (tier 2) |
          | `item.tax_name3` | Line item tax name (tier 3) |
          | `item.tax_rate3` | Line item tax rate (tier 3) |
          | `item.custom_value1` | Line item custom field 1 |
          | `item.custom_value2` | Line item custom field 2 |
          | `item.custom_value3` | Line item custom field 3 |
          | `item.custom_value4` | Line item custom field 4 |
          | `item.type_id` | Line item type |

          #### Client fields (`files[client]`)

          | Field | Description |
          |---|---|
          | `client.name` | Client name |
          | `client.user_id` | Assigned user |
          | `client.balance` | Account balance |
          | `client.paid_to_date` | Total paid to date |
          | `client.currency_id` | Currency |
          | `client.website` | Website URL |
          | `client.private_notes` | Private notes |
          | `client.industry_id` | Industry |
          | `client.size_id` | Company size |
          | `client.address1` | Address line 1 |
          | `client.address2` | Address line 2 |
          | `client.city` | City |
          | `client.state` | State/province |
          | `client.postal_code` | Postal code |
          | `client.country_id` | Country |
          | `client.custom_value1` | Custom field 1 |
          | `client.custom_value2` | Custom field 2 |
          | `client.custom_value3` | Custom field 3 |
          | `client.custom_value4` | Custom field 4 |
          | `client.shipping_address1` | Shipping address line 1 |
          | `client.shipping_address2` | Shipping address line 2 |
          | `client.shipping_city` | Shipping city |
          | `client.shipping_state` | Shipping state/province |
          | `client.shipping_postal_code` | Shipping postal code |
          | `client.shipping_country_id` | Shipping country |
          | `client.payment_terms` | Default payment terms |
          | `client.vat_number` | VAT/tax number |
          | `client.id_number` | ID number |
          | `client.public_notes` | Public notes |
          | `client.phone` | Phone number |
          | `contact.first_name` | Contact first name |
          | `contact.last_name` | Contact last name |
          | `contact.email` | Contact email |
          | `contact.phone` | Contact phone |
          | `contact.custom_value1` | Contact custom field 1 |
          | `contact.custom_value2` | Contact custom field 2 |
          | `contact.custom_value3` | Contact custom field 3 |
          | `contact.custom_value4` | Contact custom field 4 |

          #### Product fields (`files[product]`)

          | Field | Description |
          |---|---|
          | `product.product_key` | Product key/name |
          | `product.notes` | Product description |
          | `product.cost` | Product cost |
          | `product.price` | Product price |
          | `product.quantity` | Default quantity |
          | `product.tax_name1` | Tax name (tier 1) |
          | `product.tax_rate1` | Tax rate (tier 1) |
          | `product.tax_name2` | Tax name (tier 2) |
          | `product.tax_rate2` | Tax rate (tier 2) |
          | `product.tax_name3` | Tax name (tier 3) |
          | `product.tax_rate3` | Tax rate (tier 3) |
          | `product.custom_value1` | Custom field 1 |
          | `product.custom_value2` | Custom field 2 |
          | `product.custom_value3` | Custom field 3 |
          | `product.custom_value4` | Custom field 4 |
          | `product.image_url` | Product image URL |
          | `product.in_stock_quantity` | In-stock quantity |
          | `product.tax_category` | Tax category |
          | `product.max_quantity` | Maximum quantity |

          #### Payment fields (`files[payment]`)

          | Field | Description |
          |---|---|
          | `payment.number` | Payment number |
          | `payment.user_id` | Assigned user |
          | `payment.amount` | Payment amount |
          | `payment.refunded` | Refunded amount |
          | `payment.applied` | Applied amount |
          | `payment.transaction_reference` | Transaction reference |
          | `payment.private_notes` | Private notes |
          | `payment.custom_value1` | Custom field 1 |
          | `payment.custom_value2` | Custom field 2 |
          | `payment.custom_value3` | Custom field 3 |
          | `payment.custom_value4` | Custom field 4 |
          | `payment.client_id` | Client |
          | `payment.invoice_number` | Invoice number |
          | `payment.date` | Payment date |
          | `payment.method` | Payment method |

          #### Vendor fields (`files[vendor]`)

          | Field | Description |
          |---|---|
          | `vendor.name` | Vendor name |
          | `vendor.phone` | Phone number |
          | `vendor.id_number` | ID number |
          | `vendor.vat_number` | VAT/tax number |
          | `vendor.website` | Website URL |
          | `vendor.first_name` | First name |
          | `vendor.last_name` | Last name |
          | `vendor.email` | Email address |
          | `vendor.currency_id` | Currency |
          | `vendor.public_notes` | Public notes |
          | `vendor.private_notes` | Private notes |
          | `vendor.address1` | Address line 1 |
          | `vendor.address2` | Address line 2 |
          | `vendor.city` | City |
          | `vendor.state` | State/province |
          | `vendor.postal_code` | Postal code |
          | `vendor.country_id` | Country |
          | `vendor.custom_value1` | Custom field 1 |
          | `vendor.custom_value2` | Custom field 2 |
          | `vendor.custom_value3` | Custom field 3 |
          | `vendor.custom_value4` | Custom field 4 |
          | `contact.first_name` | Contact first name |
          | `contact.last_name` | Contact last name |
          | `contact.email` | Contact email |
          | `contact.phone` | Contact phone |
          | `contact.custom_value1` | Contact custom field 1 |
          | `contact.custom_value2` | Contact custom field 2 |
          | `contact.custom_value3` | Contact custom field 3 |
          | `contact.custom_value4` | Contact custom field 4 |

          #### Expense fields (`files[expense]`)

          | Field | Description |
          |---|---|
          | `expense.vendor` | Vendor name |
          | `expense.client` | Client name |
          | `expense.project` | Project name |
          | `expense.category` | Expense category |
          | `expense.amount` | Expense amount |
          | `expense.currency` | Currency |
          | `expense.date` | Expense date |
          | `expense.payment_type` | Payment type |
          | `expense.payment_date` | Payment date |
          | `expense.transaction_reference` | Transaction reference |
          | `expense.public_notes` | Public notes |
          | `expense.private_notes` | Private notes |
          | `expense.tax_name1` | Tax name (tier 1) |
          | `expense.tax_rate1` | Tax rate (tier 1) |
          | `expense.tax_name2` | Tax name (tier 2) |
          | `expense.tax_rate2` | Tax rate (tier 2) |
          | `expense.tax_name3` | Tax name (tier 3) |
          | `expense.tax_rate3` | Tax rate (tier 3) |
          | `expense.uses_inclusive_taxes` | Whether tax amounts are inclusive |
          | `expense.custom_value1` | Custom field 1 |
          | `expense.custom_value2` | Custom field 2 |
          | `expense.custom_value3` | Custom field 3 |
          | `expense.custom_value4` | Custom field 4 |

          #### Quote fields (`files[quote]`)

          | Field | Description |
          |---|---|
          | `quote.number` | Quote number |
          | `quote.user_id` | Assigned user |
          | `quote.amount` | Quote amount |
          | `quote.balance` | Outstanding balance |
          | `quote.discount` | Discount value |
          | `quote.po_number` | Purchase order number |
          | `quote.date` | Quote date |
          | `quote.due_date` | Valid until date |
          | `quote.terms` | Quote terms |
          | `quote.status` | Quote status |
          | `quote.public_notes` | Public notes |
          | `quote.is_sent` | Whether the quote has been sent |
          | `quote.private_notes` | Private notes |
          | `quote.uses_inclusive_taxes` | Whether tax amounts are inclusive |
          | `quote.tax_name1` | Tax name (tier 1) |
          | `quote.tax_rate1` | Tax rate (tier 1) |
          | `quote.tax_name2` | Tax name (tier 2) |
          | `quote.tax_rate2` | Tax rate (tier 2) |
          | `quote.tax_name3` | Tax name (tier 3) |
          | `quote.tax_rate3` | Tax rate (tier 3) |
          | `quote.is_amount_discount` | Whether discount is a fixed amount |
          | `quote.footer` | Quote footer |
          | `quote.partial` | Partial/deposit amount |
          | `quote.partial_due_date` | Partial payment due date |
          | `quote.custom_value1` | Custom field 1 |
          | `quote.custom_value2` | Custom field 2 |
          | `quote.custom_value3` | Custom field 3 |
          | `quote.custom_value4` | Custom field 4 |
          | `quote.custom_surcharge1` | Custom surcharge 1 |
          | `quote.custom_surcharge2` | Custom surcharge 2 |
          | `quote.custom_surcharge3` | Custom surcharge 3 |
          | `quote.custom_surcharge4` | Custom surcharge 4 |
          | `quote.exchange_rate` | Currency exchange rate |
          | `client.name` | Client name |
          | `client.email` | Client email |
          | `payment.date` | Payment date |
          | `payment.amount` | Payment amount |
          | `payment.transaction_reference` | Transaction reference |
          | `item.*` | Same line item fields as invoices |

          #### Recurring invoice fields (`files[recurring_invoice]`)

          Supports all invoice fields above, plus:

          | Field | Description |
          |---|---|
          | `invoice.frequency_id` | Recurrence frequency |
          | `invoice.remaining_cycles` | Remaining billing cycles |
          | `invoice.auto_bill` | Auto-bill setting |
          | `invoice.next_send_date` | Next send date (replaces `invoice.date`) |

          #### Task fields (`files[task]`)

          | Field | Description |
          |---|---|
          | `task.number` | Task number |
          | `task.user_id` | Assigned user |
          | `task.rate` | Hourly rate |
          | `task.description` | Task description |
          | `task.billable` | Whether the task is billable |
          | `task.status` | Task status |
          | `task.start_date` | Start date |
          | `task.end_date` | End date |
          | `task.start_time` | Start time |
          | `task.end_time` | End time |
          | `task.duration` | Duration |
          | `task.custom_value1` | Custom field 1 |
          | `task.custom_value2` | Custom field 2 |
          | `task.custom_value3` | Custom field 3 |
          | `task.custom_value4` | Custom field 4 |
          | `task.notes` | Task notes |
          | `project.name` | Project name |
          | `client.name` | Client name |
          | `client.email` | Client email |

          #### Bank transaction fields (`files[bank_transaction]`)

          | Field | Description |
          |---|---|
          | `transaction.transaction_id` | Transaction ID |
          | `transaction.amount` | Transaction amount |
          | `transaction.currency` | Currency |
          | `transaction.account_type` | Account type |
          | `transaction.category` | Category |
          | `transaction.category_type` | Category type |
          | `transaction.date` | Transaction date |
          | `transaction.bank_account` | Bank account |
          | `transaction.description` | Description |
          | `transaction.base_type` | Base type |
          | `transaction.payment_type_Credit` | Credit amount |
          | `transaction.payment_type_Debit` | Debit amount |
          | `transaction.participant` | Participant reference |
          | `transaction.participant_name` | Participant name |

          ---

          **Example**

          ```bash
          curl -X POST 'https://invoiceninja.com/api/v1/import' \
            -H 'X-API-TOKEN: YOUR_API_TOKEN_HERE' \
            -H 'Content-Type: application/json' \
            -d '{
              "hash": "MvKeSwMnhAfgkzdYKgxM5ummxGbLIdNm",
              "import_type": "csv",
              "skip_header": true,
              "column_map": {
                "invoice": {
                  "mapping": {
                    "0": "client.name",
                    "1": "client.email",
                    "2": "",
                    "3": "invoice.number",
                    "4": "invoice.amount"
                  }
                }
              }
            }'
          ```
      operationId: postImport
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      requestBody:
        description: "The column mapping and file reference for the import"
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - hash
                - import_type
                - column_map
              properties:
                hash:
                  type: string
                  description: "The unique file reference returned by the preimport endpoint."
                  example: "MvKeSwMnhAfgkzdYKgxM5ummxGbLIdNm"
                import_type:
                  type: string
                  description: "The source format of the import."
                  example: "csv"
                skip_header:
                  type: boolean
                  description: "When true, the first row of the CSV is treated as a header row and skipped during import."
                  default: true
                  example: true
                column_map:
                  type: object
                  description: "An object keyed by entity type. Each entity contains a mapping of CSV column indices to system fields."
                  additionalProperties:
                    type: object
                    properties:
                      mapping:
                        type: object
                        description: "Maps CSV column indices (as string keys) to system field names from the `available` array. Use an empty string to skip a column."
                        additionalProperties:
                          type: string
                        example:
                          "0": "client.name"
                          "1": "client.email"
                          "2": ""
                          "3": "invoice.number"
                          "4": "invoice.amount"
      responses:
        200:
          description: "The import has been queued. A notification email will be sent upon completion."
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: "Your import has started, we'll send you an email once it completes."
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/import_json:
    post:
      tags:
        - import
      summary: "Import data from the system"
      description: "Import data from the system"
      operationId: getImportJson
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/apple/confirm_purchase:
    post:
      tags:
        - postmark
      summary: "Processing webhooks from Apple for in app purchases"
      description: "Adds an credit to the system"
      operationId: confirmApplePurchase
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved credit object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/apple/process_webhook:
    post:
      tags:
        - postmark
      summary: "Processing event webhooks from Apple for in purchase / subscription status update"
      description: "Adds an credit to the system"
      operationId: processAppleWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved credit object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/claim_license:
    get:
      tags:
        - claim_license
      summary: "Attempts to claim a white label license"
      description: "Attempts to claim a white label license"
      operationId: getClaimLicense
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - name: license_key
          in: query
          description: "The license hash"
          required: true
          schema:
            type: string
            format: string
          example: d87sh-s755s-s7d76-sdsd8
        - name: product_id
          in: query
          description: "The ID of the product purchased."
          required: true
          schema:
            type: string
            format: string
          example: "1"
      responses:
        200:
          description: Success!
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/logout:
    post:
      tags:
        - logout
      summary: "Logs the user out of their current session"
      description: "Logs the user out of their current session"
      operationId: getLogout
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
      responses:
        200:
          description: "Success message"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/migration/purge/{company}":
    post:
      tags:
        - migration
      summary: "Attempts to purge a company record and all its child records"
      description: "Attempts to purge a company record and all its child records"
      operationId: postPurgeCompany
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: company
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: Success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/migration/purge_save_settings/{company}":
    post:
      tags:
        - migration
      summary: "Attempts to purge a companies child records but save the company record and its settings"
      description: "Attempts to purge a companies child records but save the company record and its settings"
      operationId: postPurgeCompanySaveSettings
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: company
          in: path
          description: "The Company Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: Success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/migration/start:
    post:
      tags:
        - migration
      summary: "Starts the migration from previous version of Invoice Ninja"
      description: "Starts the migration from previous version of Invoice Ninja"
      operationId: postStartMigration
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/X-API-PASSWORD"
        - name: migration
          in: query
          description: "The migraton file"
          required: true
          schema:
            type: object
            format: file
      responses:
        200:
          description: Success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/one_time_token:
    post:
      tags:
        - one_time_token
      summary: "Attempts to create a one time token"
      description: "Attempts to create a one time token"
      operationId: postOneTimeToken
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "The Company User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/payment_terms:
    get:
      tags:
        - payment_terms
      summary: "Gets a list of payment terms"
      description: "Lists payment terms"
      operationId: getPaymentTerms
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of payment terms"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/PaymentTerm'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - payment_terms
      summary: "Adds a Payment"
      description: "Adds a Payment Term to the system"
      operationId: storePaymentTerm
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      requestBody:
        description: "The payment_terms request"
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentTerm"
      responses:
        200:
          description: "Returns the saved Payment object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentTerm"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/payment_terms/create:
    get:
      tags:
        - payment_terms
      summary: "Gets a new blank PaymentTerm object"
      description: "Returns a blank object with default values"
      operationId: getPaymentTermsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank PaymentTerm object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Payment"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/payment_terms/{id}":
    get:
      tags:
        - payment_terms
      summary: "Shows a Payment Term"
      description: "Displays an Payment Term by id"
      operationId: showPaymentTerm
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Payment Term Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Payment Term object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentTerm"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - payment_terms
      summary: "Updates a Payment Term"
      description: "Handles the updating of an Payment Termby id"
      operationId: updatePaymentTerm
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Payment Term Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Payment Term object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentTerm"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - payment_termss
      summary: "Deletes a Payment Term"
      description: "Handles the deletion of an PaymentTerm by id"
      operationId: deletePaymentTerm
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Payment Term Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/payment_terms/{id}/edit":
    get:
      tags:
        - payment_terms
      summary: "Shows an Payment Term for editting"
      description: "Displays an Payment Term by id"
      operationId: editPaymentTerms
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Payment Term Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Payment object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentTerm"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/payment_terms/bulk:
    post:
      tags:
        - payment_terms
      summary: "Performs bulk actions on an array of payment terms"
      description: ""
      operationId: bulkPaymentTerms
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Payment Ter,s"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Payment Terms response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentTerm"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/ping:
    get:
      tags:
        - ping
      summary: "Attempts to ping the API"
      description: "Attempts to ping the API"
      operationId: getPing
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "The company and user name"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
  /api/v1/health_check:
    get:
      tags:
        - health_check
      summary: "Attempts to get a health check from the API"
      description: "Attempts to get a health check from the API"
      operationId: getHealthCheck
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "A key/value map of the system health"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
  /api/v1/last_error:
    get:
      tags:
        - ping
      summary: "Returns the last error"
      description: "Returns the last error from the API"
      operationId: getLastError
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "Last error response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        default:
          $ref: "#/components/responses/default"
  /api/v1/postmark_webhook:
    post:
      tags:
        - postmark
      summary: "Processing webhooks from PostMark"
      description: "Adds an credit to the system"
      operationId: postmarkWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved credit object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Credit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/preview:
    post:
      tags:
        - preview
      summary: "Returns a pdf preview"
      description: "Returns a pdf preview."
      operationId: getPreview
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "The pdf response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/preview/purchase_order:
    post:
      tags:
        - preview
      summary: "Returns a pdf preview for purchase order"
      description: "Returns a pdf preview for purchase order."
      operationId: getPreviewPurchaseOrder
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "The pdf response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"

  /api/v1/recurring_expenses:
    get:
      tags:
        - recurring_expenses
      summary: "Gets a list of recurring_expenses"
      description: "Lists recurring_expenses, search and filters allow fine grained lists to be generated.\n\n    Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available"
      operationId: getRecurringExpenses
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of recurring_expenses"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/RecurringExpense'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - recurring_expenses
      summary: "Adds a recurring expense"
      description: "Adds a recurring expense to a company"
      operationId: storeRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved recurring expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_expenses/{id}":
    get:
      tags:
        - recurring_expenses
      summary: "Shows a recurring expense"
      description: "Displays a recurring expense by id"
      operationId: showRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringExpense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the recurring_expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - recurring_expenses
      summary: "Updates a recurring expense"
      description: "Handles the updating of a recurring expense by id"
      operationId: updateRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringExpense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the recurring expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - recurring_expenses
      summary: "Deletes a recurring expense"
      description: "Handles the deletion of a recurring expense by id"
      operationId: deleteRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringExpense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_expenses/{id}/edit":
    get:
      tags:
        - recurring_expenses
      summary: "Shows a recurring expense for editting"
      description: "Displays a recurring expense by id"
      operationId: editRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringExpense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the recurring expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/recurring_expenses/create:
    get:
      tags:
        - recurring_expenses
      summary: "Gets a new blank recurring expense object"
      description: "Returns a blank object with default values"
      operationId: getRecurringExpensesCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank recurring expense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/recurring_expenses/bulk:
    post:
      tags:
        - recurring_expenses
      summary: "Performs bulk actions on an array of recurring_expenses"
      description: ""
      operationId: bulkRecurringExpenses
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "User credentials"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The RecurringExpense User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_expenses/{id}/upload":
    post:
      tags:
        - recurring_expense
      summary: "Uploads a document to a recurring_expense"
      description: "Handles the uploading of a document to a recurring_expense"
      operationId: uploadRecurringExpense
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringExpense Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      requestBody:
        description: "File Upload Body"
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                _method:
                  type: string
                  example: PUT
                documents:
                  type: array
                  items:
                    description: "Array of binary documents for upload"
                    type: string
                    format: binary
      responses:
        200:
          description: "Returns the RecurringExpense object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringExpense"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/recurring_quotes:
    get:
      tags:
        - recurring_quotes
      summary: "Gets a list of recurring_quotes"
      description: "Lists recurring_quotes, search and filters allow fine grained lists to be generated.\n\n        Query parameters can be added to performed more fine grained filtering of the recurring_quotes, these are handled by the RecurringQuoteFilters class which defines the methods available"
      operationId: getRecurringQuotes
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of recurring_quotes"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/RecurringQuote'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - recurring_quotes
      summary: "Adds a RecurringQuote"
      description: "Adds an RecurringQuote to the system"
      operationId: storeRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/recurring_quotes/create:
    get:
      tags:
        - recurring_quotes
      summary: "Gets a new blank RecurringQuote object"
      description: "Returns a blank object with default values"
      operationId: getRecurringQuotesCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_quotes/{id}":
    get:
      tags:
        - recurring_quotes
      summary: "Shows an RecurringQuote"
      description: "Displays an RecurringQuote by id"
      operationId: showRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringQuote Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - recurring_quotes
      summary: "Updates an RecurringQuote"
      description: "Handles the updating of an RecurringQuote by id"
      operationId: updateRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringQuote Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - recurring_quotes
      summary: "Deletes a RecurringQuote"
      description: "Handles the deletion of an RecurringQuote by id"
      operationId: deleteRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringQuote Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_quotes/{id}/edit":
    get:
      tags:
        - recurring_quotes
      summary: "Shows an RecurringQuote for editting"
      description: "Displays an RecurringQuote by id"
      operationId: editRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringQuote Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/recurring_quotes/bulk:
    post:
      tags:
        - recurring_quotes
      summary: "Performs bulk actions on an array of recurring_quotes"
      description: ""
      operationId: bulkRecurringQuotes
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Hashed ids"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The RecurringQuote response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/recurring_quotes/{id}/{action}":
    get:
      tags:
        - recurring_quotes
      summary: "Performs a custom action on an RecurringQuote"
      description: "Performs a custom action on an RecurringQuote.\n\n    The current range of actions are as follows\n    - clone_to_RecurringQuote\n    - clone_to_quote\n    - history\n    - delivery_note\n    - mark_paid\n    - download\n    - archive\n    - delete\n    - email"
      operationId: actionRecurringQuote
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The RecurringQuote Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
        - name: action
          in: path
          description: "The action string to be performed"
          required: true
          schema:
            type: string
            format: string
          example: clone_to_quote
      responses:
        200:
          description: "Returns the RecurringQuote object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecurringQuote"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/contacts:
    post:
      tags:
        - reports
      summary: "Contact reports"
      description: "Export contact reports"
      operationId: getContactReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/clients:
    post:
      tags:
        - reports
      summary: "Client reports"
      description: "Export client reports"
      operationId: getClientReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/credits:
    post:
      tags:
        - reports
      summary: "Credit reports"
      description: "Export credit reports"
      operationId: getCreditReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/documents:
    post:
      tags:
        - reports
      summary: "Document reports"
      description: "Export document reports"
      operationId: getDocumentReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/expenses:
    post:
      tags:
        - reports
      summary: "Expense reports"
      description: "Export expense reports"
      operationId: getExpenseReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/invoice_items:
    post:
      tags:
        - reports
      summary: "Invoice item reports"
      description: "Export invoice item reports"
      operationId: getInvoiceItemReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/invoices:
    post:
      tags:
        - reports
      summary: "Invoice reports"
      description: "Export invoice reports"
      operationId: getInvoiceReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/payments:
    post:
      tags:
        - reports
      summary: "Payment reports"
      description: "Export payment reports"
      operationId: getPaymentReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/products:
    post:
      tags:
        - reports
      summary: "Product reports"
      description: "Export product reports"
      operationId: getProductReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/product_sales:
    post:
      tags:
        - reports
      summary: "Product Salesreports"
      description: "Export product sales reports"
      operationId: getProductSalesReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/profitloss:
    post:
      tags:
        - reports
      summary: "Profit loss reports"
      description: "Profit loss report"
      operationId: getProfitLossReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/quote_items:
    post:
      tags:
        - reports
      summary: "Quote item reports"
      description: "Export Quote item reports"
      operationId: getQuoteItemReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/quotes:
    post:
      tags:
        - reports
      summary: "Quote reports"
      description: "Export quote reports"
      operationId: getQuoteReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/recurring_invoices:
    post:
      tags:
        - reports
      summary: "Recurring Invoice reports"
      description: "Export recurring invoice reports"
      operationId: getRecurringInvoiceReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/tasks:
    post:
      tags:
        - reports
      summary: "Task reports"
      description: "Export task reports"
      operationId: getTaskReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/activities:
    post:
      tags:
        - reports
      summary: "Activity reports"
      description: "Export activity reports"
      operationId: getActivityReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/client_contacts:
    post:
      tags:
        - reports
      summary: "Client contact reports"
      description: "Export client contact reports"
      operationId: getClientContactReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/ar_detail_report:
    post:
      tags:
        - reports
      summary: "AR detail report"
      description: "Export AR detail report"
      operationId: getARDetailReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/ar_summary_report:
    post:
      tags:
        - reports
      summary: "AR summary report"
      description: "Export AR summary report"
      operationId: getARSummaryReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/client_balance_report:
    post:
      tags:
        - reports
      summary: "Client balance report"
      description: "Export client balance report"
      operationId: getClientBalanceReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/client_sales_report:
    post:
      tags:
        - reports
      summary: "Client sales report"
      description: "Export client sales report"
      operationId: getClientSalesReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/tax_summary_report:
    post:
      tags:
        - reports
      summary: "Tax summary report"
      description: "Export tax summary report"
      operationId: getTaxSummaryReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/tax_period_report:
    post:
      tags:
        - reports
      summary: "Tax period report"
      description: "Export tax period report"
      operationId: getTaxPeriodReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/user_sales_report:
    post:
      tags:
        - reports
      summary: "User sales report"
      description: "Export user sales report"
      operationId: getUserSalesReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/reports/projects:
    post:
      tags:
        - reports
      summary: "Project reports"
      description: "Export project reports"
      operationId: getProjectReport
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenericReportSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/reports/preview/{hash}":
    post:
      tags:
        - reports
      summary: "Report preview"
      description: "Preview a report by hash"
      operationId: getReportPreview
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: hash
          in: path
          description: "The report hash"
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/exports/preview/{hash}":
    post:
      tags:
        - reports
      summary: "Export preview"
      description: "Preview an export by hash"
      operationId: getExportPreview
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: hash
          in: path
          description: "The export hash"
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/self-update:
    post:
      tags:
        - update
      summary: "Performs a system update"
      description: "Performs a system update"
      operationId: selfUpdate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-API-PASSWORD"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Success/failure response"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/self-update/check_version:
    post:
      tags:
        - update
      summary: "Check for available update"
      description: "Checks for an available system update"
      operationId: selfUpdateCheckVersion
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "Version check response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        default:
          $ref: "#/components/responses/default"
  /api/v1/statics:
    get:
      tags:
        - statics
      summary: "Gets a list of statics"
      description: "Lists all statics"
      operationId: getStatics
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A list of static data"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/subscriptions:
    get:
      tags:
        - subscriptions
      summary: "Gets a list of subscriptions"
      description: "Lists subscriptions."
      operationId: getSubscriptions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of subscriptions"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - subscriptions
      summary: "Adds a subscriptions"
      description: "Adds an subscriptions to the system"
      operationId: storeSubscription
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved subscriptions object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/subscriptions/create:
    get:
      tags:
        - subscriptions
      summary: "Gets a new blank subscriptions object"
      description: "Returns a blank object with default values"
      operationId: getSubscriptionsCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank subscriptions object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/subscriptions/{id}":
    get:
      tags:
        - subscriptions
      summary: "Shows an subscriptions"
      description: "Displays an subscriptions by id"
      operationId: showSubscription
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Subscription Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Subscription object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - subscriptions
      summary: "Updates an subscriptions"
      description: "Handles the updating of an subscriptions by id"
      operationId: updateSubscription
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Subscription Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the subscriptions object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - subscriptions
      summary: "Deletes a subscriptions"
      description: "Handles the deletion of an subscriptions by id"
      operationId: deleteSubscription
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Subscription Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/subscriptions/{id}/edit":
    get:
      tags:
        - subscriptions
      summary: "Shows an subscriptions for editting"
      description: "Displays an subscriptions by id"
      operationId: editSubscription
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Subscription Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the invoice object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/subscriptions/bulk:
    post:
      tags:
        - subscriptions
      summary: "Performs bulk actions on an array of subscriptions"
      description: ""
      operationId: bulkSubscriptions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "User credentials"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Subscription response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/scheduler:
    get:
      tags:
        - scheduler
      summary: "Get scheduler status"
      description: "Returns the task scheduler status and job list"
      operationId: getScheduler
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "Scheduler status response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        default:
          $ref: "#/components/responses/default"
  /api/v1/support/messages/send:
    post:
      tags:
        - support
      summary: "Sends a support message to Invoice Ninja team"
      description: "Allows a user to send a support message to the Invoice Ninja Team"
      operationId: supportMessage
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        description: "The message"
        required: true
        content:
          application/json:
            schema:
              properties:
                message:
                  description: "The support message"
                  type: string
              type: string
      responses:
        200:
          description: Success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                type: array
                items:
                  description: "Server response"
                  type: string
                  example: "success"
        400:
          $ref: "#/components/responses/400"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"
  /api/v1/system_logs:
    get:
      tags:
        - system_logs
      summary: "Gets a list of system logs"
      description: "Lists system logs, search and filters allow fine grained lists to be generated.\n     *\n     *      Query parameters can be added to performed more fine grained filtering of the system logs, these are handled by the SystemLogFilters class which defines the methods available"
      operationId: getSystemLogs
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of system logs"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/SystemLog'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/system_logs/{id}":
    get:
      tags:
        - system_logs
      summary: "Shows a system_logs"
      description: "Displays a system_logs by id"
      operationId: showSystemLogs
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The system_logs Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the system_logs object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemLog"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/task_schedulers:
    get:
      tags:
        - task_schedulers
      summary: "Task Scheduler Index"
      description: "Get all schedulers with associated jobs"
      operationId: getTaskSchedulers
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - task_schedulers
      summary: "Create task scheduler with job "
      description: "Create task scheduler with a job (action(job) request should be sent via request also. Example: We want client report to be job which will be run\n     * multiple times, we should send the same parameters in the request as we would send if we wanted to get report, see example"
      operationId: createTaskScheduler
      parameters:
        - $ref: "#/components/parameters/X-API-SECRET"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskSchedulerSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/task_schedulers/create:
    get:
      tags:
        - task_schedulers
      summary: "Gets a new blank scheduler object"
      description: "Returns a blank object with default values"
      operationId: getTaskScheduler
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A blank scheduler object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskSchedulerSchema"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/task_schedulers/{id}":
    get:
      tags:
        - task_schedulers
      summary: "Show given scheduler"
      description: "Get scheduler with associated job"
      operationId: showTaskScheduler
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The Scheduler Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - task_schedulers
      summary: "Update task scheduler "
      description: "Update task scheduler"
      operationId: updateTaskScheduler
      parameters:
        - $ref: "#/components/parameters/X-API-SECRET"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The Scheduler Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskSchedulerSchema"
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - task_schedulers
      summary: "Destroy Task Scheduler"
      description: "Destroy task scheduler and its associated job"
      operationId: destroyTaskScheduler
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The Scheduler Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: success
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        default:
          $ref: "#/components/responses/default"
  /api/v1/task_schedulers/bulk:
    post:
      tags:
        - task_schedulers
      summary: "Performs bulk actions on an array of task_schedulers"
      description: ""
      operationId: bulkTaskSchedulerActions
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "array of ids"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The TaskSchedule response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskSchedulerSchema"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/task_statuses:
    get:
      tags:
        - task_status
      summary: "Gets a list of task statuses"
      description: "Lists task statuses"
      operationId: getTaskStatuses
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of task statuses"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/TaskStatus'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - task_status
      summary: "Adds a TaskStatus"
      description: "Adds a TaskStatusto the system"
      operationId: storeTaskStatus
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      requestBody:
        description: "The task_status request"
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStatus"
      responses:
        200:
          description: "Returns the saved TaskStatus object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/task_statuses/create:
    get:
      tags:
        - task_status
      summary: "Gets a new blank TaskStatus object"
      description: "Returns a blank object with default values"
      operationId: getTaskStatussCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank TaskStatus object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/task_statuses/{id}":
    get:
      tags:
        - task_status
      summary: "Shows a TaskStatus Term"
      description: "Displays an TaskStatusby id"
      operationId: showTaskStatus
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The TaskStatusHashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the TaskStatusobject"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - task_status
      summary: "Updates a TaskStatus Term"
      description: "Handles the updating of an TaskStatus Termby id"
      operationId: updateTaskStatus
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The TaskStatusHashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the TaskStatusobject"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - task_statuss
      summary: "Deletes a TaskStatus Term"
      description: "Handles the deletion of an TaskStatus by id"
      operationId: deleteTaskStatus
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The TaskStatusHashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/task_statuses/{id}/edit":
    get:
      tags:
        - task_status
      summary: "Shows an TaskStatusfor editting"
      description: "Displays an TaskStatusby id"
      operationId: editTaskStatuss
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The TaskStatusHashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the TaskStatus object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/task_statuses/bulk:
    post:
      tags:
        - task_status
      summary: "Performs bulk actions on an array of task statuses"
      description: ""
      operationId: bulkTaskStatuss
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "TaskStatus Ter,s"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The TaskStatus Terms response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStatus"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tax_rates:
    get:
      tags:
        - tax_rates
      summary: "Gets a list of tax_rates"
      description: "Lists tax rates"
      operationId: getTaxRates
      parameters:
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of tax_rates"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/TaxRate'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tax_rates/create:
    get:
      tags:
        - tax_rates
      summary: "Gets a new blank Tax Rate object"
      description: "Returns a blank object with default values"
      operationId: getTaxRateCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "A blank Tax Rate object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/tax_rates/{id}":
    get:
      tags:
        - tax_rates
      summary: "Shows a Tax Rate"
      description: "Displays an TaxRate by id"
      operationId: showTaxRate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The TaxRate Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Tax Rate object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - tax_rates
      summary: "Updates a tax rate"
      description: "Handles the updating of a tax rate by id"
      operationId: updateTaxRate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The TaxRate Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the TaxRate object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - tax_rates
      summary: "Deletes a TaxRate"
      description: "Handles the deletion of an TaxRate by id"
      operationId: deleteTaxRate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The TaxRate Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/tax_rates/{id}/edit":
    get:
      tags:
        - tax_rates
      summary: "Shows a Tax Rate for editting"
      description: "Displays a Tax Rate by id"
      operationId: editTaxRate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: id
          in: path
          description: "The TaxRate Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Tax Rate object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tax_rates/bulk:
    post:
      tags:
        - tax_rates
      summary: "Performs bulk actions on an array of TaxRates"
      description: ""
      operationId: bulkTaxRates
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Tax Rates"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The TaxRate List response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/templates:
    post:
      tags:
        - templates
      summary: "Returns a entity template with the template variables replaced with the Entities"
      description: "Returns a entity template with the template variables replaced with the Entities"
      operationId: getShowTemplate
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      requestBody:
        description: "The template subject and body"
        required: true
        content:
          application/json:
            schema:
              properties:
                subject:
                  description: "The email template subject"
                  type: string
                body:
                  description: "The email template body"
                  type: string
              type: object
      responses:
        200:
          description: "The template response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Template"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/templates/preview/{hash}":
    post:
      tags:
        - templates
      summary: "Preview template by hash"
      description: "Returns a template preview for the given hash"
      operationId: getTemplatePreview
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - name: hash
          in: path
          description: "The template hash"
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "Template preview response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/search:
    post:
      tags:
        - search
      summary: "Search"
      description: "Performs a search across entities"
      operationId: postSearch
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        200:
          description: "Search results"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tokens:
    get:
      tags:
        - tokens
      summary: "Gets a list of company tokens"
      description: "Lists company tokens.\n     *\n     *   Query parameters can be added to performed more fine grained filtering of the tokens, these are handled by the TokenFilters class which defines the methods available"
      operationId: getTokens
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of tokens"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyToken'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - tokens
      summary: "Adds a token"
      description: "Adds an token to a company"
      operationId: storeToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/tokens/{id}":
    get:
      tags:
        - tokens
      summary: "Shows a token"
      description: "Displays a token by id"
      operationId: showToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Token Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - tokens
      summary: "Updates a token"
      description: "Handles the updating of a token by id"
      operationId: updateToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Token Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - tokens
      summary: "Deletes a token"
      description: "Handles the deletion of a token by id"
      operationId: deleteToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Token Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/tokens/{id}/edit":
    get:
      tags:
        - tokens
      summary: "Shows a token for editting"
      description: "Displays a token by id"
      operationId: editToken
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Token Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tokens/create:
    get:
      tags:
        - tokens
      summary: "Gets a new blank token object"
      description: "Returns a blank object with default values"
      operationId: getTokensCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank token object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/tokens/bulk:
    post:
      tags:
        - tokens
      summary: "Performs bulk actions on an array of tokens"
      description: ""
      operationId: bulkTokens
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Token ids"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Token response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyToken"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/users:
    get:
      tags:
        - users
      summary: "Gets a list of users"
      description: "Lists users, search and filters allow fine grained lists to be generated.\n\n    Query parameters can be added to performed more fine grained filtering of the users, these are handled by the UserFilters class which defines the methods available"
      operationId: getUsers
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of users"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - users
      summary: "Adds a User"
      description: "Adds an User to the system"
      operationId: storeUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved User object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/users/create:
    get:
      tags:
        - users
      summary: "Gets a new blank User object"
      description: "Returns a blank object with default values"
      operationId: getUsersCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank User object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/users/{id}":
    get:
      tags:
        - users
      summary: "Shows an User"
      description: "Displays an User by id"
      operationId: showUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The User Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the User object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - users
      summary: "Updates an User"
      description: "Handles the updating of an User by id"
      operationId: updateUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The User Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the User object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - users
      summary: "Deletes a User"
      description: "Handles the deletion of an User by id"
      operationId: deleteUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: token_name
          in: query
          description: "Customized name for the Users API Token"
          required: false
          schema:
            type: string
            format: string
          example: "iOS Device 11 iPad"
        - name: id
          in: path
          description: "The User Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/users/{id}/edit":
    get:
      tags:
        - users
      summary: "Shows an User for editting"
      description: "Displays an User by id"
      operationId: editUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The User Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the User object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/users/bulk:
    post:
      tags:
        - users
      summary: "Performs bulk actions on an array of users"
      description: ""
      operationId: bulkUsers
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "Hashed ids"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/users/{user}/detach_from_company":
    delete:
      tags:
        - users
      summary: "Detach an existing user to a company"
      description: "Detach an existing user from a company"
      operationId: detachUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: user
          in: path
          description: "The user hashed_id"
          required: true
          schema:
            type: string
            format: string
          example: FD767dfd7
      responses:
        200:
          description: "Success response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/users/{user}/invite":
    post:
      tags:
        - users
      summary: "Reconfirm an existing user to a company"
      description: "Reconfirm an existing user from a company"
      operationId: inviteUser
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: user
          in: path
          description: "The user hashed_id"
          required: true
          schema:
            type: string
            format: string
          example: FD767dfd7
      responses:
        200:
          description: "Success response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/users/{user}/reconfirm":
    post:
      tags:
        - users
      summary: "Reconfirm an existing user to a company"
      description: "Reconfirm an existing user from a company"
      operationId: inviteUserReconfirm
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: user
          in: path
          description: "The user hashed_id"
          required: true
          schema:
            type: string
            format: string
          example: FD767dfd7
      responses:
        200:
          description: "Success response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  
  /api/v1/webcron:
    get:
      tags:
        - webcron
      summary: "Executes the task scheduler via a webcron service"
      description: "Executes the task scheduler via a webcron service"
      operationId: getWebcron
      parameters:
        - $ref: "#/components/parameters/X-Requested-With"
      responses:
        200:
          description: "Success response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/webhooks:
    get:
      tags:
        - webhooks
      summary: "Gets a list of Webhooks"
      description: "Lists Webhooks, search and filters allow fine grained lists to be generated.\n     *\n     *      Query parameters can be added to performed more fine grained filtering of the Webhooks, these are handled by the WebhookFilters class which defines the methods available"
      operationId: getWebhooks
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - $ref: "#/components/parameters/index"
        - $ref: "#/components/parameters/per_page_meta"
        - $ref: "#/components/parameters/page_meta"
      responses:
        200:
          description: "A list of Webhooks"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:  
                type: object
                properties:
                  data: 
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
                  meta:
                    $ref: '#/components/schemas/Meta'
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    post:
      tags:
        - webhooks
      summary: "Adds a Webhook"
      description: "Adds an Webhook to a company"
      operationId: storeWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "Returns the saved Webhook object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/webhooks/{id}":
    get:
      tags:
        - webhooks
      summary: "Shows a Webhook"
      description: "Displays a Webhook by id"
      operationId: showWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Webhook Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Webhook object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    put:
      tags:
        - webhooks
      summary: "Updates a Webhook"
      description: "Handles the updating of a Webhook by id"
      operationId: updateWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Webhook Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Webhook object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
    delete:
      tags:
        - Webhooks
      summary: "Deletes a Webhook"
      description: "Handles the deletion of a Webhook by id"
      operationId: deleteWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Webhook Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns a HTTP status"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  "/api/v1/webhooks/{id}/edit":
    get:
      tags:
        - webhooks
      summary: "Shows a Webhook for editting"
      description: "Displays a Webhook by id"
      operationId: editWebhook
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
        - name: id
          in: path
          description: "The Webhook Hashed ID"
          required: true
          schema:
            type: string
            format: string
          example: D2J234DFA
      responses:
        200:
          description: "Returns the Webhook object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/webhooks/create:
    get:
      tags:
        - webhooks
      summary: "Gets a new blank Webhook object"
      description: "Returns a blank object with default values"
      operationId: getWebhooksCreate
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/include"
      responses:
        200:
          description: "A blank Webhook object"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
  /api/v1/webhooks/bulk:
    post:
      tags:
        - webhooks
      summary: "Performs bulk actions on an array of Webhooks"
      description: ""
      operationId: bulkWebhooks
      parameters:
        - $ref: "#/components/parameters/X-API-TOKEN"
        - $ref: "#/components/parameters/X-Requested-With"
        - $ref: "#/components/parameters/index"
      requestBody:
        description: "User credentials"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                description: "Array of hashed IDs to be bulk 'actioned"
                type: integer
                example: 0
      responses:
        200:
          description: "The Webhook User response"
          headers:
            X-MINIMUM-CLIENT-VERSION:
              $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
            X-RateLimit-Remaining:
              $ref: "#/components/headers/X-RateLimit-Remaining"
            X-RateLimit-Limit:
              $ref: "#/components/headers/X-RateLimit-Limit"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        401:
          $ref: "#/components/responses/401"
        403:
          $ref: "#/components/responses/403"
        422:
          $ref: "#/components/responses/422"
        default:
          $ref: "#/components/responses/default"
