openapi: 3.0.1
info:
  title: Elevate Admin API
  description: >
    ### Admin Level Management


    Currently provides read-only access to list admin entities required by other
    endpoints.

    Maintenance of these entities is available via the Elevate frontend or by
    contacting the Elevate support team.


    #### Definitions


    * Contract Owner - the party with which a Customer is contracted to purchase
    products and services - segregates Customers for reporting and/or branding
    purposes.


    * Billing Cycle - means of segregating a Contract Owner's Customer base into
    separate billing processes which have different start days.


    * Supplier - the third party supplier of the product or service - allows for
    a number of different accounts with each supplier.


    * Invoice Document Profile - defines the configuration used to generate
    invoices for Customers. This is used on creation of Sites only.


    * Admin Contact - a configurable contact usable across the entire platform
    that can receive tripwire, usage cap, and auto-close notifications.


    * Email Template - a named template of text and substituted values that is
    used to send emails from the system.


    * Invoice Marketing Information - for a given sub-brand and invoice
    template, the marketing information used to populate the invoice template
    slots. This might be blank, text, images or rich text.
  version: '1.46'
servers:
  - url: https://rest.elevatebilling.com/v1
tags:
  - name: contract-owners
    description: Contract owners segregate Customers for reporting and/or branding purposes
  - name: billing-cycles
    description: >-
      Billing cycles segregate a Contract Owner's Customer base into separate
      billing processes
  - name: suppliers
    description: >-
      The third party supplier of a product or service available to be billed
      via Elevate
  - name: invoice-document-profiles
    description: >-
      Invoice Document Profiles determine the invoice and summary layouts for
      billing
  - name: invoice-templates
    description: Document templates used to define the invoice structure and look and feel
  - name: invoice-summary-templates
    description: >-
      Document templates used to define the invoice summary structure and look
      and feel
  - name: invoice-summary-template-components
    description: >-
      Document summary template components used to define the invoice summary
      structure and look and feel
  - name: electronic-summary-templates
    description: >-
      Document templates used to define the electronic summary structure and
      look and feel
  - name: invoice-marketing-info
    description: >-
      Marketing information used to define the contents of the invoice template
      slots for a sub-brand
  - name: invoice-marketing-info-preview
    description: Generate a preview with fake data and the invoice marketing information
  - name: admin-contacts
    description: >-
      Administration contacts used to receive tripwire, usage cap, and
      auto-close notifications
  - name: commission-agents
    description: Commission agents can be set against customers to manage commission
  - name: email-templates
    description: Email templates used to communicate via email
  - name: custom-field-definitions
    description: >-
      Custom field definition are used to store additional information about
      entities in Elevate
  - name: invoice-group-tag-labels
    description: >-
      An optional grouping identifier for mid-month charges (such as
      bill-immediately ad-hoc product inventories and bill-immediately charges).
      Charges with the same invoice group tag will be invoiced together,
      generating one invoice per unique tag
paths:
  /contract-owners:
    get:
      tags:
        - contract-owners
      summary: Get a list of available contract owners
      operationId: getContractOwners
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContractOwner'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
    post:
      tags:
        - contract-owners
      summary: Create a new contract owner
      operationId: createContractOwner
      x-si-permissions:
        - CREATE_CONTRACT_OWNER
      x-si-apply-impact-of-change: true
      security:
        - bearerAuth: []
      requestBody:
        description: New contract owner
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractOwner'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwner'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwner'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
  /contract-owners/{contract_owner_id}:
    get:
      tags:
        - contract-owners
      summary: Get a specific contract owner
      operationId: getContractOwner
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      parameters:
        - name: contract_owner_id
          in: path
          description: Contract owner identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Contract owner found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwner'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
    patch:
      tags:
        - contract-owners
      summary: Update a contract_owner
      operationId: updateContractOwner
      x-si-json-patch: true
      x-si-allow-patch:
        - /availableFrom
        - /availableTo
        - /bankAccountName
        - /bankAccountNumber
        - /bankSortCode
        - /bankSwiftCode
        - /bankIban
        - /coBccEmailAddress
        - /companyRegistrationNumber
        - /mandatoryAccountReferenceForSite
        - /mandatoryBankPaymentForDirectDebit
        - /prePopulatedFraudPlanId
        - /siBccEmailAddress
        - /taxRegistrationNumber
        - /enableBalanceCarryForward
        - /invoiceCombiningType
        - /invoiceEmailSubject
        - /invoiceNumberFormat
        - /address
        - /emailTemplateId
        - /invoiceNumberLabel
        - /localeId
        - /invoicePresentationName
        - /summaryInvoiceNumberLabel
        - /priceDecimalPlaces
        - /priceRoundingMode
        - /accountingCostCentre
        - /companyRegistrationNumberLabel
        - /invoiceTaxLabel
        - /forceBillingDefault
        - /taxExemptLabel
        - /netAccountingAdjustmentNominalCode
        - /taxAccountingAdjustmentNominalCode
        - /netAccountingAdjustmentTaxCode
        - /taxAccountingAdjustmentTaxCode
        - /attachInvoiceToEmail
        - /billingPeriodEndDateLabel
        - /invoiceCustomerAccountNumberLabel
        - /summaryCustomerAccountNumberLabel
        - /invoiceDateLabel
        - /productReferenceLabel
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER
      security:
        - bearerAuth: []
      parameters:
        - name: contract_owner_id
          in: path
          description: Contract owner identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              UpdateBankInfo:
                value:
                  - op: replace
                    path: /bankIban
                    value: AL472121100900000002356987411
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwner'
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /contract-owner-sub-brands:
    get:
      tags:
        - contract-owner-sub-brands
      summary: Get a list of available contract owner sub-brands
      operationId: getContractOwnerSubBrands
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: contractOwnerId
          in: query
          description: Contract owner identifier
          required: false
          schema:
            $ref: '#/components/schemas/IdParam'
        - name: activeCustomersBillingCycleId
          in: query
          description: >-
            Filter sub-brands that are used by active customers and associated
            to the billing cycle identifier
          required: false
          schema:
            $ref: '#/components/schemas/StringFilterParam'
        - name: adhocBillRunId
          in: query
          description: Filter sub-brands that are associated to the adhoc bill run
          required: false
          schema:
            $ref: '#/components/schemas/StringFilterParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContractOwnerSubBrand'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    head:
      tags:
        - contract-owner-sub-brands
      summary: Check if contract owner sub-brands exist
      operationId: checkContractOwnerSubBrands
      x-si-response-headers: true
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: contractOwnerId
          in: query
          description: Contract owner identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
        - name: activeCustomersBillingCycleId
          in: query
          description: >-
            Filter for sub-brands that are used by customers who are active and
            associated to the billing cycle identifier
          required: false
          schema:
            $ref: '#/components/schemas/StringFilterParam'
        - name: adhocBillRunId
          in: query
          description: Filter sub-brands that are associated to the adhoc bill run
          required: false
          schema:
            $ref: '#/components/schemas/StringFilterParam'
      responses:
        '200':
          description: Exists
          headers:
            X-Total-Count:
              schema:
                type: integer
                description: Total number of sub-brands
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    post:
      tags:
        - contract-owner-sub-brands
      summary: Create a new contract owner sub brand
      operationId: createContractOwnerSubBrand
      x-si-permissions:
        - CREATE_CONTRACT_OWNER_SUB_BRAND
      x-si-apply-impact-of-change: true
      security:
        - bearerAuth: []
      requestBody:
        description: New contract owner sub brand
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ContractOwnerSubBrandAndLogo'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwnerSubBrand'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwnerSubBrand'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
  /contract-owner-sub-brands/{contractOwnerSubBrandId}:
    patch:
      tags:
        - contract-owner-sub-brands
      summary: Update a contract_owner sub brand
      operationId: updateContractOwnerSubBrand
      x-si-json-patch: true
      x-si-json-multi-part-patch: true
      x-si-allow-patch:
        - /createdAt
        - /updatedAt
        - /accountNumberFormat
        - /attachInvoiceToEmail
        - /bacsReference
        - /bankAccountName
        - /bankAccountNumber
        - /bankSortCode
        - /billingPeriodEndDateLabel
        - /companyRegistrationNumber
        - /companyRegistrationNumberLabel
        - /customerServiceEmail
        - /customerServiceTelephoneNumber
        - /customerServiceWebSite
        - /defaultSubBrand
        - /emailBillingFromAddress
        - /iban
        - /invoiceCustomerAccountNumberLabel
        - /invoiceDateLabel
        - /invoiceEmailSubject
        - /invoiceNumberFormat
        - /invoiceNumberLabel
        - /invoicePresentationName
        - /invoiceTaxLabel
        - /name
        - /ofcomRid
        - /productReferenceLabel
        - /summaryCustomerAccountNumberLabel
        - /summaryInvoiceNumberLabel
        - /swiftCode
        - /taxExemptLabel
        - /vatRegistrationNumber
        - /address
        - /emailTemplateId
        - /prePopulatedTripwirePlanId
        - /invoiceNotesLabel
        - /address/businessName
        - /address/address1
        - /address/address2
        - /address/address3
        - /address/town
        - /address/county
        - /address/postcode
        - /address/country
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: contractOwnerSubBrandId
          in: path
          description: Contract owner sub brand identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: multipartFile
                  description: Logo file content in image formats (png,jpg,etc)
                  format: binary
                patch:
                  $ref: '#/components/schemas/PatchRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOwnerSubBrand'
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
    get:
      tags:
        - contract-owner-sub-brands
      summary: Get a specific contract owner sub brand
      operationId: getContractOwnerSubBrand
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: contractOwnerSubBrandId
          in: path
          description: Contract owner sub brand identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Contract owner sub brand found
          content:
            multipart/form-data:
              schema:
                $ref: '#/components/schemas/ContractOwnerSubBrandAndLogo'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    delete:
      tags:
        - contract-owner-sub-brands
      summary: Delete a contract owner sub brand
      description: Delete a contract owner sub brand
      operationId: deleteContractOwnerSubBrand
      x-si-permissions:
        - DELETE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: contractOwnerSubBrandId
          in: path
          description: Contract sub brand identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /billing-cycles:
    get:
      tags:
        - billing-cycles
      summary: Get a list of available billing cycles
      operationId: getBillingCycles
      x-si-permissions:
        - VIEW_BILLING_CYCLE
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BillingCycle'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
    post:
      tags:
        - billing-cycles
      summary: Create a new billing cycle
      operationId: createBillingCycle
      x-si-permissions:
        - CREATE_BILLING_CYCLE
      security:
        - bearerAuth: []
      parameters:
        - name: defaultBillRunStartsOn
          in: header
          description: >-
            Start date override for the generated open bill run when the billing
            cycle is created
          required: false
          schema:
            type: string
      requestBody:
        description: New billing cycle
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillingCycle'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingCycle'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingCycle'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
  /billing-cycles/{billing_cycle_id}:
    get:
      tags:
        - billing-cycles
      summary: Get a specific billing cycle
      operationId: getBillingCycle
      x-si-permissions:
        - VIEW_BILLING_CYCLE
      security:
        - bearerAuth: []
      parameters:
        - name: billing_cycle_id
          in: path
          description: Billing cycle identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Billing cycle found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingCycle'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
    patch:
      tags:
        - billing-cycles
      summary: Update a billing cycle
      operationId: updateBillingCycle
      x-si-json-patch: true
      x-si-allow-patch:
        - /name
        - /startDayOfPeriod
        - /lengthOfPeriod
        - /periodUnit
        - /maxBackDateableUsageInDays
        - /currencyCode
        - /groupName
        - /maxDaysBeforeCloseable
        - /maxDaysAfterCloseable
        - /defaultInvoiceDate
        - /completionType
        - /autoCloseHour
        - /autoCloseMinute
        - /autoCloseOffsetDays
        - /autoCloseUserId
        - /billingCycleRules/
        - /billingCycleRules/.*
        - /billingCycleRules/.*/ruleName
        - /billingCycleRules/.*/thresholdPercentage
        - /billingCycleRules/.*/thresholdMinValue
        - /billingCycleRules/.*/thresholdMaxValue
        - /billingCycleRules/.*/active
        - /billingCycleRules/.*/comparisonPeriod
        - /billingCycleRules/.*/comparisonBasedOn
      x-si-permissions:
        - UPDATE_BILLING_CYCLE
      security:
        - bearerAuth: []
      parameters:
        - name: billing_cycle_id
          in: path
          description: Billing cycle identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              RenameBillingCycle:
                value:
                  - op: replace
                    path: /name
                    value: MyNewName
              AddNewRule:
                value:
                  - op: add
                    path: /billingCycleRules/-
                    value:
                      type: REVENUE
                      thresholdPercentage: 50
                      comparisonDirection: BOTH
                      active: 'false'
                      comparisonPeriod: THREE_PERIODS
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingCycle'
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
    delete:
      tags:
        - billing-cycles
      summary: Delete a billing cycle
      operationId: deleteBillingCycle
      x-si-permissions:
        - DELETE_BILLING_CYCLE
      security:
        - bearerAuth: []
      parameters:
        - name: billing_cycle_id
          in: path
          description: Billing cycle identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
        - name: cascade
          in: header
          description: >-
            Cascade the delete to any other cycles with the same group name,
            True or False
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /suppliers:
    get:
      tags:
        - suppliers
      summary: Get a list of available suppliers
      operationId: getSuppliers
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: accountNumber
          in: query
          description: Filter by supplier account number
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: supplierAccountId
          in: query
          description: Filter by supplier account identifier
          required: false
          schema:
            $ref: '#/components/schemas/IdFilterParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Supplier'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /invoice-document-profiles:
    get:
      tags:
        - invoice-document-profiles
      summary: Get a list of available invoice document profiles
      operationId: getInvoiceDocumentProfiles
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceDocumentProfile'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /invoice-summary-templates:
    get:
      tags:
        - invoice-summary-templates
      summary: Get a list of invoice summary templates e.g. Service Charges,
      operationId: getInvoiceSummaryTemplates
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceSummaryTemplate'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /invoice-templates:
    get:
      tags:
        - invoice-templates
      summary: Get a list of invoice templates e.g. Enterprise Invoice Blue,
      operationId: getInvoiceTemplates
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: contractOwnerId
          in: query
          description: Filter by contractOwnerId
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceTemplate'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /invoice-summary-template-components:
    get:
      tags:
        - invoice-summary-template-components
      summary: Get a list of invoice summary template components e.g. Service Charges
      operationId: getInvoiceSummaryTemplateComponents
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceSummaryTemplateComponent'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /invoice-summary-template-components/{invoiceSummaryTemplateComponentId}:
    get:
      tags:
        - invoice-summary-template-components
      summary: Get a specific invoice summary template component
      operationId: getInvoiceSummaryTemplateComponent
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceSummaryTemplateComponentId
          in: path
          description: Invoice summary template component identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceSummaryTemplateComponent'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /electronic-summary-templates:
    get:
      tags:
        - electronic-summary-templates
      summary: Get a list of electronic summary templates
      operationId: getElectronicSummaryTemplates
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ElectronicSummaryTemplate'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
        '501':
          description: Not Implemented Yet
          content: {}
  /electronic-summary-templates/{electronicSummaryTemplateId}:
    get:
      tags:
        - electronic-summary-templates
      summary: Get a specific electronic summary template
      operationId: getElectronicSummaryTemplate
      x-si-permissions:
        - VIEW_SITE
      security:
        - bearerAuth: []
      parameters:
        - name: electronicSummaryTemplateId
          in: path
          description: Electronic summary template identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElectronicSummaryTemplate'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '412':
          description: Precondition Failed
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /email-templates:
    get:
      tags:
        - email-templates
      summary: Get a list of email templates
      operationId: getEmailTemplates
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailTemplate'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /invoice-marketing-info:
    get:
      tags:
        - invoice-marketing-info
      summary: >-
        Get a list of invoice marketing information for sub-brand and invoice
        template
      operationId: getInvoiceMarketingInfos
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: contractOwnerSubBrandId
          in: query
          description: Filter by contract owner sub-brand id
          schema:
            $ref: '#/components/schemas/IdFilterParam'
          required: false
        - name: invoiceTemplateId
          in: query
          description: Filter by invoice template id
          schema:
            $ref: '#/components/schemas/IdFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceMarketingInfo'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    head:
      tags:
        - invoice-marketing-info
      summary: Check if invoice marketing info record exist
      operationId: checkInvoiceMarketingInfos
      x-si-response-headers: true
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: contractOwnerSubBrandId
          in: query
          description: Filter by contract owner sub-brand id
          schema:
            $ref: '#/components/schemas/IdFilterParam'
          required: false
        - name: invoiceTemplateId
          in: query
          description: Filter by invoice template id
          schema:
            $ref: '#/components/schemas/IdFilterParam'
          required: false
      responses:
        '200':
          description: Exists
          headers:
            X-Total-Count:
              schema:
                type: integer
                description: Total number of invoice marketing info records
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    post:
      tags:
        - invoice-marketing-info
      summary: >-
        Create new invoice marketing info details for a sub-brand and invoice
        template
      operationId: createInvoiceMarketingInfo
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      x-si-apply-impact-of-change: true
      security:
        - bearerAuth: []
      requestBody:
        description: New invoice marketing info details
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/InvoiceMarketingInfoAndFiles'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceMarketingInfo'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
  /invoice-marketing-info/{invoiceMarketingInfoId}:
    patch:
      tags:
        - invoice-marketing-info
      summary: Update a invoice marketing info record
      operationId: updateInvoiceMarketingInfo
      x-si-json-patch: true
      x-si-json-multi-part-patch4: true
      x-si-allow-patch:
        - /contractOwnerSubBrandId
        - /invoiceTemplateId
        - /slot1
        - /slot1/type
        - /slot1/textContent
        - /slot2
        - /slot2/type
        - /slot2/textContent
        - /slot3
        - /slot3/type
        - /slot3/textContent
        - /slot4
        - /slot4/type
        - /slot4/textContent
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceMarketingInfoId
          in: path
          description: Invoice marketing info record identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file1:
                  type: multipartFile
                  description: Slot 1 file content (jpeg,png,gif,bmp,tiff,rtf)
                  format: binary
                file2:
                  type: multipartFile
                  description: Slot 2 file content (jpeg,png,gif,bmp,tiff,rtf)
                  format: binary
                file3:
                  type: multipartFile
                  description: Slot 3 file content (jpeg,png,gif,bmp,tiff,rtf)
                  format: binary
                file4:
                  type: multipartFile
                  description: Slot 4 file content (jpeg,png,gif,bmp,tiff,rtf)
                  format: binary
                patch:
                  $ref: '#/components/schemas/PatchRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              UpdateText:
                value:
                  - op: replace
                    path: /slot1/textContent
                    value: I like Edam Cheese
              ChangeRTF:
                value:
                  - op: replace
                    path: /slot1/type
                    value: RTF
              ChangeImageAndRTFFile:
                value:
                  - op: replace
                    path: /slot2/type
                    value: IMAGE
                  - op: replace
                    path: /slot3/type
                    value: RTF
              RemoveSlot:
                value:
                  - op: remove
                    path: /slot2
              ChangeTextToImage:
                value:
                  - op: replace
                    path: /slot1/type
                    value: IMAGE
              ChangeImageToText:
                value:
                  - op: replace
                    path: /slot1/type
                    value: TEXT
                  - op: replace
                    path: /slot1/textContent
                    value: Hello everyone
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceMarketingInfo'
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
    get:
      tags:
        - invoice-marketing-info
      summary: Get a specific invoice marketing info record
      operationId: getInvoiceMarketingInfo
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceMarketingInfoId
          in: path
          description: Invoice marketing info record identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Invoice marketing info found
          content:
            multipart/form-data:
              schema:
                $ref: '#/components/schemas/InvoiceMarketingInfoAndFiles'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    delete:
      tags:
        - invoice-marketing-info
      summary: Delete an invoice marketing info record
      description: Delete an invoice marketing info record
      operationId: deleteInvoiceMarketingInfo
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceMarketingInfoId
          in: path
          description: Invoice marketing info record identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /invoice-marketing-info-trial-preview:
    post:
      tags:
        - invoice-marketing-info-trial-preview
      summary: Generate a preview invoice PDF for passed in invoice marketing info
      operationId: generateInvoiceTrialPreviewPDF
      x-si-permissions:
        - VIEW_SITE
      x-si-filterable: false
      security:
        - bearerAuth: []
      requestBody:
        description: Invoice marketing info details
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/InvoiceMarketingInfoAndFiles'
        required: true
      responses:
        '200':
          description: A PDF file
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /invoice-marketing-info-preview:
    post:
      tags:
        - invoice-marketing-info-preview
      summary: Generate a preview invoice PDF for invoice marketing info
      operationId: generateInvoicePreviewPDF
      x-si-permissions:
        - VIEW_SITE
      x-si-filterable: false
      security:
        - bearerAuth: []
      requestBody:
        description: Invoice marketing info identifier
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceMarketingInfoId'
        required: true
      responses:
        '200':
          description: A PDF file
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /admin-contacts:
    get:
      tags:
        - admin-contacts
      summary: Get a list of available admin contacts
      operationId: getAdminContacts
      x-si-permissions:
        - VIEW_MY_ELEVATE_CONTACTS
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AdminContact'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
    post:
      tags:
        - admin-contacts
      summary: Create a new admin contact
      operationId: createAdminContact
      x-si-permissions:
        - CREATE_MY_ELEVATE_CONTACTS
      security:
        - bearerAuth: []
      requestBody:
        description: New admin contact
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminContact'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminContact'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminContact'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
  /admin-contacts/{adminContactId}:
    get:
      tags:
        - admin-contacts
      summary: Get a specific admin contact
      operationId: getAdminContact
      x-si-permissions:
        - VIEW_MY_ELEVATE_CONTACTS
      security:
        - bearerAuth: []
      parameters:
        - name: adminContactId
          in: path
          description: Admin contact identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Admin contact found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminContact'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
    patch:
      tags:
        - admin-contacts
      summary: Update an admin contact
      operationId: updateAdminContact
      x-si-json-patch: true
      x-si-allow-patch:
        - /name
        - /role
        - /telephoneNumber
        - /alternativeTelephoneNumber
        - /email
        - /receiveSmsFraudAlert
        - /receiveEmailFraudAlert
        - /receiveEmailUsageCapAlert
        - /receiveEmailBillRunClosureAlert
        - /receiveEmailDuplicateCallsSummaryAlert
        - /receiveEmailDuplicateCallsReminderAlert
        - /receiveEmailContractRenewalAlert
      x-si-permissions:
        - UPDATE_MY_ELEVATE_CONTACTS
      security:
        - bearerAuth: []
      parameters:
        - name: adminContactId
          in: path
          description: Admin contact identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              Rename:
                value:
                  - op: replace
                    path: /name
                    value: Tommy Tynan
              ChangeEmailAndPhoneNumber:
                value:
                  - op: replace
                    path: /telephoneNumber
                    value: '01225191420'
                  - op: replace
                    path: /alternativeTelephoneNumber
                    value: '01225191421'
                  - op: replace
                    path: /email
                    value: tommy.tynan@argyle.co.uk
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminContact'
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
    delete:
      tags:
        - admin-contacts
      summary: Delete an admin contact
      operationId: deleteAdminContact
      x-si-permissions:
        - DELETE_MY_ELEVATE_CONTACTS
      security:
        - bearerAuth: []
      parameters:
        - name: adminContactId
          in: path
          description: Admin contact identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
  /commission-agents:
    get:
      tags:
        - commission-agents
      summary: Get a list of available commission agents
      operationId: getCommissionAgents
      x-si-permissions:
        - VIEW_CONTRACT_OWNER
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: name
          in: query
          description: Filter by name
          required: false
          style: form
          explode: true
          schema:
            $ref: '#/components/schemas/StringFilterParam'
        - name: type
          in: query
          description: Filter by type
          required: false
          style: form
          explode: true
          schema:
            $ref: '#/components/schemas/StringFilterParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommissionAgent'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /custom-field-definitions:
    get:
      tags:
        - custom-field-definitions
      summary: Get a list of custom field definitions
      operationId: getCustomFieldDefinitions
      x-si-permissions:
        - VIEW_CUSTOM_FIELD
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: entityLevel
          in: query
          description: Filter by entity level (e.g. CUSTOMER, SITE)
          required: false
          schema:
            $ref: '#/components/schemas/CustomFieldEntityLevel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomFieldDefinition'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    post:
      tags:
        - custom-field-definitions
      summary: Create a new custom field definition
      operationId: createCustomFieldDefinition
      x-si-permissions:
        - CREATE_CUSTOM_FIELD
      security:
        - bearerAuth: []
      requestBody:
        description: New custom field definition
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomFieldDefinition'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinition'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinition'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /custom-field-definitions/{customFieldDefinitionId}:
    get:
      tags:
        - custom-field-definitions
      summary: Get a specific custom field definition
      operationId: getCustomFieldDefinition
      x-si-permissions:
        - VIEW_CUSTOM_FIELD
      security:
        - bearerAuth: []
      parameters:
        - name: customFieldDefinitionId
          in: path
          description: Custom field definition identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Custom field definition found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinition'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    patch:
      tags:
        - custom-field-definitions
      summary: Update a custom field definition
      operationId: updateCustomFieldDefinition
      x-si-json-patch: true
      x-si-allow-patch:
        - /label
      x-si-permissions:
        - UPDATE_CUSTOM_FIELD
      security:
        - bearerAuth: []
      parameters:
        - name: customFieldDefinitionId
          in: path
          description: Custom field definition identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              Rename:
                value:
                  - op: replace
      responses:
        '200':
          description: Custom field definition updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinition'
        '400':
          description: Invalid input
        '404':
          description: Custom field definition not found
    delete:
      tags:
        - custom-field-definitions
      summary: Delete a custom field definition
      operationId: deleteCustomFieldDefinition
      x-si-permissions:
        - DELETE_CUSTOM_FIELD
      security:
        - bearerAuth: []
      parameters:
        - name: customFieldDefinitionId
          in: path
          description: Custom field definition identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: Invalid Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /contract-owner-sub-brands/{contractOwnerSubBrandId}/invoice-group-tag-labels:
    get:
      tags:
        - invoice-group-tag-labels
      summary: Get invoice group tag labels for a contract owner sub-brand
      operationId: getInvoiceGroupTagLabels
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      x-si-filterable: true
      parameters:
        - name: contractOwnerSubBrandId
          in: path
          description: Contract owner sub-brand identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - name: label
          in: query
          description: Filter by label name
          schema:
            $ref: '#/components/schemas/StringFilterParam'
          required: false
        - name: showOnInvoice
          in: query
          description: Filter by showOnInvoice flag
          schema:
            type: boolean
          required: false
      responses:
        '200':
          description: OK
          headers:
            X-Total-Count:
              schema:
                type: integer
                description: Total number of invoice group tag labels
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceGroupTagLabel'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    post:
      tags:
        - invoice-group-tag-labels
      summary: Create a new invoice group tag label
      operationId: createInvoiceGroupTagLabel
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      x-si-apply-impact-of-change: true
      security:
        - bearerAuth: []
      parameters:
        - name: contractOwnerSubBrandId
          in: path
          description: Contract owner sub-brand identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: New invoice group tag label
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceGroupTagLabel'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceGroupTagLabel'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /invoice-group-tag-labels/{invoiceGroupTagLabelId}:
    get:
      tags:
        - invoice-group-tag-labels
      summary: Get a specific invoice group tag label
      operationId: getInvoiceGroupTagLabel
      x-si-permissions:
        - VIEW_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceGroupTagLabelId
          in: path
          description: Invoice group tag label identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceGroupTagLabel'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    patch:
      tags:
        - invoice-group-tag-labels
      summary: Update an invoice group tag label
      operationId: updateInvoiceGroupTagLabel
      x-si-json-patch: true
      x-si-allow-patch:
        - /label
        - /showOnInvoice
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceGroupTagLabelId
          in: path
          description: Invoice group tag label identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      requestBody:
        description: A set of JSONPatch operations to be performed
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            examples:
              UpdateLabel:
                value:
                  - op: replace
                    path: /label
                    value: Cost Center
              UpdateShowOnInvoice:
                value:
                  - op: replace
                    path: /showOnInvoice
                    value: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceGroupTagLabel'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
    delete:
      tags:
        - invoice-group-tag-labels
      summary: Delete an invoice group tag label
      operationId: deleteInvoiceGroupTagLabel
      x-si-permissions:
        - UPDATE_CONTRACT_OWNER_SUB_BRAND
      security:
        - bearerAuth: []
      parameters:
        - name: invoiceGroupTagLabelId
          in: path
          description: Invoice group tag label identifier
          required: true
          schema:
            $ref: '#/components/schemas/IdParam'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    ContractOwnerSubBrandAndLogo:
      type: object
      properties:
        subBrand:
          $ref: '#/components/schemas/ContractOwnerSubBrand'
          required: true
        logo:
          type: multipartFile
          description: Logo file content in image formats (png,jpg,etc)
          format: binary
    ContractOwner:
      required:
        - name
        - availableFrom
        - taxRegistrationNumber
        - address
        - emailBillingFromAddress
        - invoiceCombiningType
        - invoiceEmailSubject
        - enableBalanceCarryForward
        - emailTemplateId
        - invoiceNumberLabel
        - localeId
        - summaryInvoiceNumberLabel
        - priceDecimalPlaces
        - taxExemptLabel
        - billingPeriodEndDateLabel
        - invoiceCustomerAccountNumberLabel
        - summaryCustomerAccountNumberLabel
        - invoiceDateLabel
        - productReferenceLabel
      x-si-class-validation: |
        @After(first = "availableTo", second = "availableFrom")
      type: object
      properties:
        id:
          description: Contract owner identifier
          type: integer
          readOnly: true
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        name:
          type: string
          description: Contract owner name
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        availableFrom:
          description: Contract owner is available from
          type: string
          format: date
        availableTo:
          description: Contract owner is available to
          type: string
          format: date
        bankAccountName:
          type: string
          description: Bank account name
          minLength: 0
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        bankAccountNumber:
          type: string
          description: Bank account number
          minLength: 8
          maxLength: 10
          pattern: '[0-9]+'
        bankSortCode:
          type: string
          description: Bank sort code
          minLength: 6
          maxLength: 6
          pattern: '[0-9]+'
        bankSwiftCode:
          type: string
          description: Bank SWIFT/BIC code
          minLength: 8
          maxLength: 11
          pattern: '[0-9A-Z]*'
          example: AAAABB11222
        bankIban:
          type: string
          description: >-
            International Bank Account Number (IBAN), which you can use when
            making or receiving international payments
          minLength: 4
          maxLength: 34
          pattern: '[0-9A-Z]*'
          example: GB29NWBK60161331926819
        companyRegistrationNumber:
          type: string
          description: Company registration number
          minLength: 0
          maxLength: 20
          pattern: '[A-Za-z0-9]*'
        coBccEmailAddress:
          description: Email address for contract owner
          type: string
          minLength: 0
          maxLength: 50
          pattern: >-
            (^$)|([a-zA-Z0-9.!#$%&'\*\+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)
        mandatoryAccountReferenceForSite:
          description: Mandatory account reference for site
          type: boolean
          default: false
        prePopulatedFraudPlanId:
          description: >-
            When creating a customer, its tripwireId will be pre-populated with
            this identifier
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        siBccEmailAddress:
          description: Email address for SI
          type: string
          minLength: 1
          maxLength: 50
          pattern: >-
            [a-zA-Z0-9.!#$%&'\*\+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*
        taxRegistrationNumber:
          description: Tax registration number
          type: string
          minLength: 1
          maxLength: 50
          pattern: ([A-Za-z0-9\p{L}\s]*)
        address:
          $ref: '#/components/schemas/Address'
        customerServiceTelephoneNumber:
          description: Customer service telephone number
          type: string
          minLength: 0
          maxLength: 26
          pattern: ^$|[a-zA-Z0-9\p{L}\s()@&.,-_£|]{4,100}
        customerServiceWebsite:
          description: Customer service website
          type: string
          minLength: 0
          maxLength: 255
        customerServiceEmail:
          description: Customer service email
          type: string
          minLength: 0
          maxLength: 255
          pattern: >-
            (^$)|[a-zA-Z0-9.!#$%&'\*\+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*
        emailBillingFromAddress:
          description: Email billing from address
          type: string
          minLength: 1
          maxLength: 50
          pattern: >-
            [a-zA-Z0-9.!#$%&'\*\+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*
        invoiceCombiningType:
          $ref: '#/components/schemas/InvoiceCombiningType'
        invoiceNumberFormat:
          description: Invoice number format
          type: string
          minLength: 0
          maxLength: 50
        invoiceEmailSubject:
          description: Invoice email subject
          type: string
          minLength: 1
          maxLength: 200
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        minimumItemisationValueInPence:
          description: Minimum itemisation value in pence
          type: number
        mandatoryBankPaymentForDirectDebit:
          description: >-
            Specifies whether bank payment details are mandatory for direct
            debit
          type: boolean
          default: false
        createdDate:
          readOnly: true
          description: Date when this contract profile was created
          type: string
          format: date-time
        updatedDate:
          readOnly: true
          description: Contract owner updated date
          type: string
          format: date-time
        enableBalanceCarryForward:
          description: Enable balance carry forward
          type: boolean
        emailTemplateId:
          description: Email template identifier
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        invoiceNumberLabel:
          type: string
          description: Invoice number label on the generated pdf invoice document
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        localeId:
          description: Locale identifier
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        invoicePresentationName:
          type: string
          description: Invoice presentation name
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        summaryInvoiceNumberLabel:
          type: string
          description: Invoice number  label on the generated pdf invoice summary document
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        priceDecimalPlaces:
          description: >-
            Number of decimal places to show on the screen for rated records
            etc.
          type: integer
          readOnly: true
          format: int64
          example: 1
        priceRoundingMode:
          $ref: '#/components/schemas/RoundingMode'
        accountingCostCentre:
          type: string
          description: Accounting cost centre code
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        companyRegistrationNumberLabel:
          type: string
          description: Company registration number label on generated invoice pdf document
          default: Company Number
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        invoiceTaxLabel:
          type: string
          description: Invoice Tax label on the generated invoice pdf document
          default: VAT Number
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        forceBillingDefault:
          description: >-
            Auto populate force billing on rental product inventories at
            creation
          type: boolean
        taxExemptLabel:
          type: string
          description: >-
            If a site is marked as Tax Exempt, text message to appear on the
            generated pdf invoice document
          default: VAT Exempt
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        netAccountingAdjustmentNominalCode:
          type: string
          description: >-
            Nominal code to be used for an adjustment line added for the net
            value in the account export file
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        taxAccountingAdjustmentNominalCode:
          type: string
          description: >-
            Nominal code to be used for an adjustment line added for the tax
            value in the account export file
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        netAccountingAdjustmentTaxCode:
          type: string
          description: >-
            Tax code to be used for an adjustment line added for the net value
            in the account export file
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        taxAccountingAdjustmentTaxCode:
          type: string
          description: >-
            Tax code to be used for an adjustment line added for the tax value
            in the account export file
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        attachInvoiceToEmail:
          description: >-
            Should the pdf invoice be attached to the invoice email? If the
            email includes a link to the invoice, set this to False
          type: boolean
        billingPeriodEndDateLabel:
          type: string
          default: Billing Period (Ending)
          description: Billing period end date label on the generated invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        invoiceCustomerAccountNumberLabel:
          type: string
          default: Account number
          description: Customer account number label on the generated invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        summaryCustomerAccountNumberLabel:
          type: string
          default: Account number
          description: Customer account number label on the generated invoice summary
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        invoiceDateLabel:
          type: string
          default: Date (And Tax Point)
          description: Invoice Date label on the generated invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        productReferenceLabel:
          type: string
          description: Product reference label to show on the screen
          default: Product Reference
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        features:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Feature'
    InvoiceCombiningType:
      description: Invoice combining type
      type: string
      enum:
        - NONE
        - COMBINE_ALL
        - COMBINE_INDIVIDUALLY
        - COMBINE_ALL_DUPLEX
        - COMBINE_INDIVIDUALLY_DUPLEX
    RoundingMode:
      description: >
        Specifies a rounding behavior for numerical operations capable of
        discarding precision. Default is HALF_UP.


        * UP = Rounding mode to round away from zero.  Always increments the
        digit prior to a non-zero discarded fraction.  Note that this rounding
        mode never decreases the magnitude of the calculated value. Examples,
        5.5 -> 6, 2.6 -> 3, 1.1 -> 2, -1.1 -> -2

        * DOWN = Rounding mode to round towards zero.  Never increments the
        digit prior to a discarded fraction (i.e., truncates).  Note that this
        rounding mode never increases the magnitude of the calculated value.
        Examples, 5.5 -> 5, 2.6 -> 2, 1.1 -> 1, -1.1 -> -1

        * CEILING = Rounding mode to round towards positive infinity.  If the
        result is positive, behaves as for UP, if negative, behaves as for DOWN.
        Note that this rounding mode never decreases the calculated value.
        Examples, 5.5 -> 6, 2.6 -> 3, 1.1 -> 2, -1.1 -> -1

        * FLOOR = Rounding mode to round towards negative infinity.  If the
        result is positive, behave as for DOWN if negative, behave as for UP. 
        Note that this rounding mode never increases the calculated value.
        Examples, 5.5 -> 5, 2.6 -> 2, 1.1 -> 1, -1.1 -> -2

        * HALF_UP = Rounding mode to round towards "nearest neighbor" unless
        both neighbors are equidistant, in which case round up. Behaves as for
        UP if the discarded fraction is &ge; 0.5; otherwise, behaves as for
        DOWN.  Note that this is the rounding mode commonly taught at school.
        Examples, 5.5 -> 6, 2.6 -> 3, 1.1 -> 1, -1.1 -> -1

        * HALF_DOWN = Rounding mode to round towards "nearest neighbor" unless
        both neighbors are equidistant, in which case round down.  Behaves as
        for UP if the discarded fraction is &gt; 0.5; otherwise, behaves as for
        DOWN. Examples, 5.5 -> 5, 2.6 -> 3, 1.1 -> 1, -1.1 -> -1

        * HALF_EVEN = Rounding mode to round towards the "nearest neighbor"
        unless both neighbors are equidistant, in which case, round owards the
        even neighbor.  Behaves as for HALF_UP if the digit to the left of the
        discarded fraction is odd; behaves as for HALF_DOWN if it's even.  Note
        that this is the rounding mode that statistically minimizes cumulative
        error when applied repeatedly over a sequence of calculations. It is
        sometimes known as "Banker's rounding," and is chiefly used in the USA.
        Examples, 5.5 -> 6, 2.6 -> 2, 1.1 -> 1, -1.1 -> -1
      type: string
      enum:
        - UP
        - DOWN
        - CEILING
        - FLOOR
        - HALF_UP
        - HALF_DOWN
        - HALF_EVEN
    ContractOwnerSubBrand:
      required:
        - name
        - billingPeriodEndDateLabel
        - invoiceCustomerAccountNumberLabel
        - invoiceDateLabel
        - invoiceNumberLabel
        - invoiceEmailSubject
        - productReferenceLabel
        - summaryCustomerAccountNumberLabel
        - summaryInvoiceNumberLabel
        - taxExemptLabel
        - contractOwnerId
        - defaultSubBrand
        - vatRegistrationNumber
        - address
        - emailTemplateId
        - emailBillingFromAddress
        - taxExemptLabel
      type: object
      properties:
        id:
          description: Identifier
          type: integer
          readOnly: true
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        createdAt:
          description: Created at
          type: string
          format: date
          example: '2023-10-05 16:40:04'
        updatedAt:
          description: Updated at
          type: string
          format: date
          example: '2023-10-05 16:40:04'
        accountNumberFormat:
          type: string
          description: Account number format
          minLength: 0
          maxLength: 255
          example: SI0000
        attachInvoiceToEmail:
          type: boolean
          description: Attach invoice to email
          example: '0x01'
        bacsReference:
          type: string
          description: Bacs reference
          minLength: 0
          maxLength: 255
          example: Bacs Reference
        bankAccountName:
          type: string
          description: Bank account name
          minLength: 0
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Bank Account Name
        bankAccountNumber:
          type: string
          description: Bank account number
          minLength: 0
          maxLength: 255
          pattern: '[0-9]*'
          example: '1234567890'
        summaryCustomerAccountNumberLabel:
          type: string
          description: >-
            An alternative name for the “account number” label that will appear
            on the invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Summary customer account number label
        bankSortCode:
          type: string
          description: Bank sort code
          minLength: 0
          maxLength: 255
          pattern: '[0-9]*'
          example: '123456'
        swiftCode:
          type: string
          description: >-
            SWIFT - ISO 9362 is an international standard for Business
            Identifier Codes
          minLength: 8
          maxLength: 11
          pattern: '[0-9A-Z]*'
          example: DEUTDEFFXXX
        billingPeriodEndDateLabel:
          type: string
          description: >-
            An alternative name for the “End date” label that will appear on the
            invoice
          minLength: 1
          maxLength: 50
          example: Billing Period (Ending)
        companyRegistrationNumber:
          type: string
          description: Company registration number to appear on the invoice
          minLength: 0
          maxLength: 255
          pattern: '[A-Za-z0-9]*'
          example: CompanyReg123
        companyRegistrationNumberLabel:
          type: string
          description: >-
            An alternative name for the “Company registration number” label that
            will appear on the invoice
          minLength: 0
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Company Number
        vatRegistrationNumber:
          type: string
          description: VAT registration number to appear on the invoice
          minLength: 0
          maxLength: 255
          example: Vat registration Number123
        customerServiceEmail:
          type: string
          description: Customer service email address to appear on the invoice
          minLength: 0
          maxLength: 255
          pattern: >-
            (^$)|[a-zA-Z0-9.!#$%&'\*\+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*
          example: customer@email.com
        customerServiceTelephoneNumber:
          type: string
          description: Customer service telephone number to appear on the invoice
          minLength: 0
          maxLength: 255
          pattern: ^$|[a-zA-Z0-9\p{L}\s()@&.,-_£|]{4,100}
          example: 123-456-7890
        customerServiceWebSite:
          type: string
          description: Customer service web site to appear on the invoice
          example: https://www.customerservice.com
        defaultSubBrand:
          type: boolean
          description: Whether this sub brand is the default for the contract owner in hand
          example: true
        emailBillingFromAddress:
          type: string
          description: Email billing 'from' address
          minLength: 0
          maxLength: 255
          example: billing@example.com
        iban:
          type: string
          description: IBAN Number to appear on the invoice
          minLength: 4
          maxLength: 34
          pattern: '[0-9A-Z]*'
          example: IBAN1234567890
        invoiceCustomerAccountNumberLabel:
          type: string
          description: >-
            An alternative name for the customer “Account number” label that
            will appear on the invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Account Label
        invoiceDateLabel:
          type: string
          description: >-
            An alternative name for the “Invoice date” label that will appear on
            the invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Invoice Date Label
        invoiceEmailSubject:
          type: string
          description: Invoice email subject text
          minLength: 1
          maxLength: 200
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Invoice Email Subject
        invoiceNumberFormat:
          type: string
          description: Invoice number format
          minLength: 0
          maxLength: 255
          example: InvoiceFormat123
        invoiceNumberLabel:
          type: string
          description: >-
            An alternative name for the “Invoice number” label that will appear
            on the invoice
          minLength: 1
          maxLength: 50
          example: Invoice Number Label
        invoicePresentationName:
          type: string
          description: Invoice presentation name
          minLength: 0
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Invoice Presentation Name
        invoiceTaxLabel:
          type: string
          description: >-
            An alternative name for the “Tax” label that will appear on the
            invoice
          minLength: 0
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Invoice Tax Label
        name:
          type: string
          description: Name
          minLength: 0
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: bcn
        ofcomRid:
          type: string
          description: Ofcom Reseller identification codes (RID)
          minLength: 0
          maxLength: 255
          example: OfcomRID123
        productReferenceLabel:
          type: string
          description: >-
            An alternative name for the “Product reference” label that will
            appear on the invoice summary
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Product Reference Label
        summaryInvoiceNumberLabel:
          type: string
          description: >-
            An alternative name for the “invoice number” label that will appear
            on the invoice summary
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Summary invoice number label
        taxExemptLabel:
          type: string
          description: >-
            If the invoice is set to Tax Exempt, a standard text to show on the
            invoice
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Tax exempt label
        address:
          $ref: '#/components/schemas/Address'
        contractOwnerId:
          description: Contract Owner identifier
          type: integer
          example: 1
        emailTemplateId:
          description: Email template identifier to be used for the invoice email
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        prePopulatedTripwirePlanId:
          description: >-
            When creating a new customer, pre-populate this Tripwire plan
            identifier
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        invoiceNotesLabel:
          type: string
          description: Notes to appear on the invoice
          minLength: 0
          maxLength: 100
          example: Invoice notes label
    InvoiceGroupTagLabel:
      required:
        - label
        - contractOwnerSubBrandId
      type: object
      properties:
        id:
          description: Invoice group tag label identifier
          type: integer
          readOnly: true
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        label:
          type: string
          description: >-
            Label name used to categorise invoice charges (e.g., 'Cost Centre',
            'PO Number', 'Department')
          minLength: 1
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`'',|!_—–\(\)\\/\-\+\.\?\*\$]*'
          example: Cost Centre
        contractOwnerSubBrandId:
          description: Contract owner sub-brand identifier
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        showOnInvoice:
          type: boolean
          description: Display this label and its value on customer invoices
          default: true
          example: true
    BillingCycle:
      required:
        - name
        - periodUnit
        - currencyCode
        - completionType
        - startDayOfPeriod
      type: object
      properties:
        id:
          description: Billing cycle identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        name:
          type: string
          description: Billing cycle name
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        startDayOfPeriod:
          description: >-
            Start day of period. If using a monthly billing cycle, then this
            would be the day of the month from 1 to 28. If using as weekly or
            daily billing cycle, then this would be the day of the week from 1
            (Mon) to 7 (Sun)
          type: integer
          format: int32
          minimum: 1
          maximum: 28
        lengthOfPeriod:
          description: >-
            This is the length of the billing period and should be set to one by
            default which is the monthly billing cycle. A value of three would
            indicate that it is a quarterly billing cycle.
          type: integer
          format: int32
          minimum: 1
          maximum: 12
          default: 1
          example: 1
        periodUnit:
          $ref: '#/components/schemas/RentalProductUnit'
        maxDaysBeforeCloseable:
          description: >-
            The number of days before the periodEndDate that the billing period
            can be closed. e.g it should be defaulted to a sensible value like
            15 days and prevent the closure the billing run too early (for
            example trying to close the 31st March 2014 bill run on 13th March
            2014).
          type: integer
          format: int32
          minimum: 1
          maximum: 9999
          default: 15
          example: 15
        maxDaysAfterCloseable:
          description: >-
            The number of days after the periodEndDate that the billing period
            can be closed. e.g it should be defaulted to a sensible value like
            15 days and prevent the closure the billing run too late (for
            example trying to close the 31st March 2014 bill run on 30th April
            2014).
          type: integer
          format: int32
          minimum: 1
          maximum: 9999
          default: 15
          example: 15
        maxBackDateableUsageInDays:
          description: >-
            Any usage records in this bill cycle will not be billed out if older
            than this setting
          type: integer
          format: int32
          minimum: 0
        currencyCode:
          $ref: '#/components/schemas/CurrencyCode'
        defaultInvoiceDate:
          $ref: '#/components/schemas/BillRunDefaultInvoiceDates'
        completionType:
          $ref: '#/components/schemas/CompletionType'
        autoCloseHour:
          description: Hour to automatically close the bill run at
          type: integer
          format: int32
          minimum: 0
          maximum: 23
        autoCloseMinute:
          description: Minute to automatically close the bill run at
          type: integer
          format: int32
          minimum: 0
          maximum: 59
        autoCloseOffsetDays:
          description: >-
            Number of days after bill run period end date to automatically close
            the bill run. Must be within the maxDaysBeforeCloseable and
            maxDaysAfterCloseable boundaries
          type: integer
          format: int32
          minimum: -9999
          maximum: 9999
        autoCloseUserId:
          description: Identifier of user who will automatically close the bill run
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        billingCycleRules:
          type: array
          items:
            $ref: '#/components/schemas/BillingCycleRule'
        billingCycleStats:
          type: array
          items:
            $ref: '#/components/schemas/BillingCycleStat'
        contractOwnerCustomerCounts:
          type: array
          items:
            $ref: '#/components/schemas/ContractOwnerCustomerCount'
        groupName:
          type: string
          description: >-
            a name to tag this billing cycle with. This is used to group billing
            cycles together for bulk processing
          minLength: 0
          maxLength: 50
          pattern: '[a-zA-Z0-9\p{L}\s\+\/\-\._\&amp;#=,:@()]*'
    BillingCycleRule:
      type: object
      required:
        - type
        - active
        - comparisonPeriod
        - comparisonBasedOn
      properties:
        id:
          description: Billing cycle rule identifier
          type: integer
          readOnly: true
          format: int64
          example: 1
        type:
          $ref: '#/components/schemas/ComparisonRule'
        thresholdPercentage:
          description: Percentage to compare to past period average
          type: integer
          format: int32
          minimum: 1
          maximum: 500
        thresholdMinValue:
          description: Min value to compare to past period average
          type: integer
          format: int64
          minimum: 0
          maximum: 50000
        thresholdMaxValue:
          description: Min value to compare to past period average
          type: integer
          format: int64
          minimum: 0
          maximum: 50000
        active:
          description: Active rule
          type: boolean
        comparisonPeriod:
          $ref: '#/components/schemas/ComparisonPeriods'
        comparisonBasedOn:
          $ref: '#/components/schemas/ComparisonBasedOn'
    BillingCycleStat:
      type: object
      required:
        - type
        - value
        - comparisonPeriod
      properties:
        type:
          $ref: '#/components/schemas/ComparisonRule'
        value:
          description: Mean value for period
          type: integer
          format: int64
        comparisonPeriod:
          $ref: '#/components/schemas/ComparisonPeriods'
    ContractOwnerCustomerCount:
      type: object
      required:
        - id
        - count
      properties:
        id:
          description: Contract owner identifier
          type: integer
          readOnly: true
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        count:
          description: >-
            number of customers associated to the contract owner in the billing
            cycle
          type: integer
          readOnly: true
          format: int64
    CompletionType:
      description: How to auto-complete a bill run
      type: string
      enum:
        - DISABLED
        - CLOSE_ONLY
        - CLOSE_AND_FINALIZE
    ComparisonPeriods:
      description: Comparison periods
      type: string
      enum:
        - THREE_PERIODS
        - SIX_PERIODS
        - TWELVE_PERIODS
    ComparisonBasedOn:
      description: Comparison rule based on
      type: string
      enum:
        - VALUE
        - AVERAGE
    ComparisonRule:
      description: Comparison rules
      type: string
      enum:
        - REVENUE
        - USAGE_SUSPENSE_COUNT
        - RENTAL_SUSPENSE_COUNT
        - MAX_INVOICE_VALUE
    Supplier:
      required:
        - name
      type: object
      properties:
        id:
          description: Supplier identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        name:
          type: string
          description: Supplier name
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        ftpDownloadEnabled:
          description: is the supplier enabled for ftp downloads
          type: boolean
          default: false
        supplierAccounts:
          description: A list of supplier accounts for this supplier
          type: array
          items:
            $ref: '#/components/schemas/SupplierAccount'
    SupplierAccount:
      required:
        - accountNumber
      type: object
      properties:
        id:
          description: Supplier account identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        accountNumber:
          type: string
          description: Supplier account number
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        lastSuccessfulConnection:
          type: string
          description: Date and time of last successful connection to server
          format: date-time
        lastSuccessfulDownload:
          type: string
          description: Date and time of last successful download from server
          format: date-time
        lastSuccessfulCDRDownload:
          type: string
          description: Date and time of last successful CDR file download from server
          format: date-time
        lastSuccessfulSDRDownload:
          type: string
          description: Date and time of last successful SDR file download from server
          format: date-time
        ftpDownloadEnabled:
          description: is the supplier account enabled for ftp downloads
          type: boolean
          default: false
    InvoiceDocumentProfile:
      required:
        - name
      type: object
      properties:
        id:
          description: Invoice document profile identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        name:
          type: string
          description: Invoice document profile name
          minLength: 1
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        invoiceTemplateId:
          description: Invoice template identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        invoiceSummaryTemplateId:
          description: Invoice summary template identifier
          readOnly: true
          type: integer
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        defaultInvoiceDocumentProfile:
          description: is the document profile default
          type: boolean
          default: true
        electronicSummaryTemplateIds:
          description: Electronic summary template identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
        invoiceSummaryComponentIds:
          description: Invoice summary component identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
        contractOwnerId:
          description: Contract Owner Identifier
          type: integer
          format: int32
          x-si-validation: '@ValidId'
    EmailTemplate:
      required:
        - name
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of email template
          readOnly: true
          format: int64
          example: 1
        name:
          type: string
          description: Name of the email template
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
    InvoiceTemplate:
      required:
        - name
        - numberOfMarketingSlots
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of invoice template
          readOnly: true
          format: int64
          example: 1
        numberOfMarketingSlots:
          type: integer
          description: The number of marketing slots in the template up to a maximum of 4
          readOnly: true
          format: int64
          example: 1
        slot1ImageRatio:
          type: string
          description: Ratio of width and height for a slot1 marketing image
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        slot2ImageRatio:
          type: string
          description: Ratio of width and height for a slot1 marketing image
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        slot3ImageRatio:
          type: string
          description: Ratio of width and height for a slot1 marketing image
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        slot4ImageRatio:
          type: string
          description: Ratio of width and height for a slot1 marketing image
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        name:
          type: string
          description: Name of the Invoice template
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        contractOwnerIds:
          description: Contract owner identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
    InvoiceSummaryTemplate:
      required:
        - name
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of invoice template
          readOnly: true
          format: int64
          example: 1
        name:
          type: string
          description: Name of the invoice template
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        contractOwnerIds:
          description: Contract owner identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
    InvoiceSummaryTemplateComponent:
      required:
        - name
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of invoice summary template component
          readOnly: true
          format: int64
          example: 1
        name:
          type: string
          description: Name of the invoice summary template component
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        contractOwnerIds:
          description: Contract owner identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
    ElectronicSummaryTemplate:
      required:
        - name
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of electronic summary template
          readOnly: true
          format: int64
          example: 1
        name:
          type: string
          description: Name of the electronic summary template
          minLength: 1
          maxLength: 255
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        contractOwnerIds:
          description: Contract owner identifiers
          type: array
          items:
            type: integer
            format: int32
            x-si-validation: '@ValidId'
            example: 1
    AdminContact:
      required:
        - name
        - role
      type: object
      properties:
        id:
          description: Admin contact identifier
          readOnly: true
          type: integer
          format: int64
          example: 1
          x-si-validation: '@ValidId'
        name:
          maxLength: 100
          minLength: 1
          pattern: ^[\w\p{L}\s%£@&#=':;`’,|!_—–()\\\/\-+.?*$\[\]€^{}”<>"~]*$
          type: string
          description: Admin contact name
        role:
          $ref: '#/components/schemas/AdminContactRole'
        telephoneNumber:
          maxLength: 100
          minLength: 4
          pattern: ^$|[a-zA-Z0-9\p{L}\s()@&.,-_Â£|]{4,100}
          type: string
          description: Contact telephone number
        alternativeTelephoneNumber:
          maxLength: 100
          minLength: 4
          pattern: ^$|[a-zA-Z0-9\p{L}\s()@&.,-_Â£|]{4,100}
          type: string
        email:
          maxLength: 255
          minLength: 1
          pattern: >-
            ^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$
          type: string
          description: Contact email address
        receiveSmsFraudAlert:
          description: is the admin contact set to receive fraud alerts via SMS
          type: boolean
          default: false
        receiveEmailFraudAlert:
          description: is the admin contact set to receive fraud alerts via email
          type: boolean
          default: false
        receiveEmailUsageCapAlert:
          description: is the admin contact set to receive usage cap alerts via email
          type: boolean
          default: false
        receiveEmailBillRunClosureAlert:
          description: >-
            is the admin contact set to receive bill run auto-closure alerts via
            email
          type: boolean
          default: false
        receiveEmailDuplicateCallsSummaryAlert:
          description: >-
            is the admin contact set to receive duplicate calls summary alerts
            via email
          type: boolean
          default: false
        receiveEmailDuplicateCallsReminderAlert:
          description: >-
            is the admin contact set to receive duplicate calls reminder alerts
            via email
          type: boolean
          default: false
        receiveEmailContractRenewalAlert:
          description: >-
            is the admin contact set to receive contracts renewal reminder
            alerts via email
          type: boolean
          default: false
    AdminContactRole:
      type: string
      description: Admin contact roles
      enum:
        - GENERAL
        - ACCOUNTS
        - TECHNICAL
        - SALES
    CommissionAgent:
      required:
        - name
        - companyNumber
        - type
        - availableFromDate
        - address
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of commission agent
          format: int64
          readOnly: true
          example: 1
        name:
          maxLength: 255
          minLength: 1
          pattern: '[\w\p{L}\s%£@&#='':;`,!_—–\(\)\\/\-\+\.\?\*\$]*'
          type: string
          description: Name of the commission agent
          readOnly: true
        contractOwnerId:
          description: Contract Owner identifier
          type: integer
          example: 1
        accountNumber:
          maxLength: 255
          minLength: 1
          type: string
          description: Account number of the commission agent
          readOnly: true
        accountsReference:
          maxLength: 255
          minLength: 1
          type: string
          description: Accounts reference of the commission agent
          readOnly: true
        vatRegNumber:
          maxLength: 255
          minLength: 1
          type: string
          description: Vat registration number of the commission agent
          readOnly: true
        address:
          $ref: '#/components/schemas/Address'
        companyNumber:
          maxLength: 255
          minLength: 1
          type: string
          description: Company number of the commission agent
          readOnly: true
        type:
          $ref: '#/components/schemas/CommissionAgentType'
        parentAgentCommissionId:
          type: integer
          description: Internal identifier of the parent commission agent
          format: int64
          readOnly: true
          example: 1
        availableFromDate:
          type: string
          description: Commission agent start date
          format: date
        availableToDate:
          type: string
          description: Commission agent end date
          format: date
        usageCommissionPaidOn:
          $ref: '#/components/schemas/CommissionPaidOn'
        usageCommissionPercentage:
          type: number
          description: Usage commission percentage
          format: decimal
        rentalCommissionPaidOn:
          $ref: '#/components/schemas/CommissionPaidOn'
        rentalCommissionPercentage:
          type: number
          description: Rental commission percentage
          format: decimal
        adhocCommissionPaidOn:
          $ref: '#/components/schemas/CommissionPaidOn'
        adhocCommissionPercentage:
          type: number
          description: Adhoc commission percentage
          format: decimal
        paymentTermsInDays:
          maximum: 400
          minimum: 0
          type: integer
          description: Payment terms in days
          format: int32
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
    InvoiceMarketingInfo:
      required:
        - contractOwnerSubBrandId
        - invoiceTemplateId
      type: object
      properties:
        id:
          description: Invoice Marketing Info record identifier
          type: integer
          readOnly: true
          format: int64
          example: 1
        contractOwnerSubBrandId:
          description: Contract Owner Sub-Brand Identifier
          type: integer
          format: int32
          x-si-validation: '@ValidId'
        invoiceTemplateId:
          description: Invoice Template Identifier
          type: integer
          format: int32
          x-si-validation: '@ValidId'
        createdDate:
          readOnly: true
          description: Date when this record was created
          type: string
          format: date-time
        updatedDate:
          readOnly: true
          description: Date when this record was last updated
          type: string
          format: date-time
        slot1:
          $ref: '#/components/schemas/InvoiceMarketingInfoSlot'
        slot2:
          $ref: '#/components/schemas/InvoiceMarketingInfoSlot'
        slot3:
          $ref: '#/components/schemas/InvoiceMarketingInfoSlot'
        slot4:
          $ref: '#/components/schemas/InvoiceMarketingInfoSlot'
    InvoiceMarketingInfoAndFiles:
      required:
        - invoiceMarketingInfo
      type: object
      properties:
        invoiceMarketingInfo:
          $ref: '#/components/schemas/InvoiceMarketingInfo'
        file1:
          type: multipartFile
          description: File content (jpeg,png,gif,bmp,tiff,rtf)
          format: binary
        file2:
          type: multipartFile
          description: File content (jpeg,png,gif,bmp,tiff,rtf)
          format: binary
        file3:
          type: multipartFile
          description: File content (jpeg,png,gif,bmp,tiff,rtf)
          format: binary
        file4:
          type: multipartFile
          description: File content (jpeg,png,gif,bmp,tiff,rtf)
          format: binary
    InvoiceMarketingInfoSlot:
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SlotType'
        textContent:
          description: Text content
          type: string
    InvoiceMarketingInfoId:
      required:
        - invoiceMarketingInfoId
      type: object
      properties:
        invoiceMarketingInfoId:
          description: Invoice Marketing Info record identifier
          type: integer
          format: int64
          example: 1
    CommissionAgentType:
      type: string
      description: Commission Agent Type
      enum:
        - INTERNAL
        - EXTERNAL
    CommissionPaidOn:
      type: string
      description: Commission to be paid on
      enum:
        - PROFIT
        - TURNOVER
    SlotType:
      description: Content type for a slot
      type: string
      enum:
        - TEXT
        - IMAGE
        - RTF
    Feature:
      type: string
      enum:
        - USAGE
        - USAGE_TRIPWIRE
        - FULL_CUSTOMER
        - MATCHMAKER
      description: >-
        This API provides feature switches for controlling usage (USAGE),
        customer information (FULL_CUSTOMER), matchmaker (MATCHMAKER), and
        tripwire functionality (USAGE_TRIPWIRE).
    PageParam:
      description: Page of results to show
      minimum: 1
      type: integer
      format: int32
      example: 1
    ResultsPerPageParam:
      description: Results to return per page
      maximum: 1000
      minimum: 1
      type: integer
      format: int32
      example: 100
    SortParam:
      description: >-
        Comma-delimited list of the fields to sort by - defaults to ascending
        order, suffix :desc to change
      example: id,name | name:desc
      type: string
    FieldsParam:
      description: >-
        Comma-delimited list of the field(s) to return if only a subset is
        required
      example: id,name
      type: string
    StringFilterParam:
      description: >-
        Filter by this string value where value can optionally be prefixed
        (in:|like:)
      example: xyz | in:x,y | like:xyz
      type: string
    CountryCode:
      description: ISO 3166 alpha-2 code representing country
      type: string
      minLength: 2
      maxLength: 2
      pattern: '[A-Z]{2}'
      example: GB
    Address:
      required:
        - address1
        - town
        - postcode
        - country
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier for address entry
          readOnly: true
          format: int64
          x-si-validation: '@ValidId'
          example: 1
        businessName:
          type: string
          description: Business name
          minLength: 0
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        address1:
          type: string
          description: Address line 1
          minLength: 1
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        address2:
          type: string
          description: Address line 2
          minLength: 0
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        address3:
          type: string
          description: Address line 3
          minLength: 0
          maxLength: 100
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        town:
          type: string
          description: Town
          minLength: 1
          maxLength: 50
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        county:
          type: string
          description: County
          minLength: 0
          maxLength: 30
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        postcode:
          type: string
          description: Postcode
          minLength: 0
          maxLength: 20
          pattern: '[a-zA-Z0-9\p{L}@.\-\+_\s]+'
        country:
          $ref: '#/components/schemas/CountryCode'
    IdParam:
      description: Identifier
      minimum: 1
      type: integer
      format: int64
      example: 1
    PatchDocument:
      description: A JSONPatch document as defined by RFC 6902
      required:
        - op
        - path
      type: object
      properties:
        op:
          type: string
          description: The JSON Patch operation to be performed
          x-si-exclude: true
          enum:
            - add
            - remove
            - replace
            - move
            - copy
            - test
        path:
          type: string
          description: A JSON-Pointer
        value:
          type: object
          properties: {}
          description: The value to be used within the operations
        from:
          type: string
          description: A string containing a JSON Pointer value
    PatchRequest:
      type: array
      description: >-
        JSON Patch is a format for describing changes to a JSON document as
        specified in RFC 6902. Refer to [jsonpatch.com](http://jsonpatch.com/)
        for more information
      items:
        $ref: '#/components/schemas/PatchDocument'
    RentalProductUnit:
      description: Rental product unit
      type: string
      enum:
        - DAILY
        - WEEKLY
        - MONTHLY
    CurrencyCode:
      description: ISO 4217 3-character currency code
      type: string
      minLength: 3
      maxLength: 3
      pattern: '[A-Z]{3}'
      example: GBP
    BillRunDefaultInvoiceDates:
      description: Default invoice dates
      type: string
      enum:
        - TODAY
        - END_OF_BILL_RUN
        - END_OF_BILL_RUN_PLUS_ONE
    IdFilterParam:
      description: Filter by this numeric id value
      example: '0'
      type: string
    PaymentMethod:
      description: Payment method
      type: string
      enum:
        - CHEQUE
        - DIRECT_DEBIT
        - CANCELLED_DD
        - CANCELLED_CARD
        - CREDIT_CARD
        - PAYPAL
        - BACS
        - POST_OFFICE_PAYMENT_CARD
        - EZYPAY
        - GO_CARDLESS
        - GC_INSTANT_BANK_PAYMENTS
        - STRIPE
        - STRIPE_CARD
        - STRIPE_DD
        - FINASTRA
        - FAST_PAY
        - OTHER
    CustomFieldEntityLevel:
      description: Indicates the entity level the custom field applies to
      type: string
      enum:
        - USAGE_PRODUCT
        - RENTAL_PRODUCT
        - RENTAL_PRODUCT_INVENTORY
        - SITE
        - CUSTOMER
    CustomFieldDefinition:
      type: object
      required:
        - label
        - entityLevel
      properties:
        id:
          readOnly: true
          type: integer
          format: int64
          description: Unique identifier for the custom field definition
          example: 1
        label:
          type: string
          description: Display label for the custom field
          minLength: 1
          maxLength: 100
          example: Additional field definition label
          pattern: '[\w\p{L}\s%£@&#='':;`’,|!_—–\(\)\\/\-\+\.\?\*\$]*'
        entityLevel:
          $ref: '#/components/schemas/CustomFieldEntityLevel'
          description: The entity level this custom field applies to
          example: CUSTOMER
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    page:
      name: page
      in: query
      description: Page of results to show
      schema:
        $ref: '#/components/schemas/PageParam'
      required: true
    pageSize:
      name: pageSize
      description: Results to return per page
      in: query
      schema:
        $ref: '#/components/schemas/ResultsPerPageParam'
      required: true
    sort:
      name: sort
      in: query
      description: >-
        Comma-delimited list of the fields to sort by - defaults to ascending
        order, suffix :desc to change
      schema:
        $ref: '#/components/schemas/SortParam'
      required: false
    fields:
      name: fields
      in: query
      description: >-
        Comma-delimited list of the field(s) to return if only a subset is
        required
      schema:
        $ref: '#/components/schemas/FieldsParam'
      required: false
