> ## Documentation Index
> Fetch the complete documentation index at: https://docs.campfire.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Default Department and Tags for Empty Transaction

> Get the default department and tags from the bill line with the largest total amount.

        This endpoint is used to provide default values when creating empty transactions (marking as paid without a transaction).
        The total amount is calculated as: amount + tax.
        If multiple lines have the same total amount, the line with the lowest ID (first created) is selected.
        The department and tags are retrieved directly from the bill line.



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json get /coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags
openapi: 3.0.3
info:
  title: Campfire Developer APIs
  version: 1.0.0
  description: >
    ## Introduction

    Campfire's developer APIs offer granular access to Campfire's core
    accounting,

    revenue recognition, and financial data features.


    These APIs are designed to be used by developers to build custom
    integrations,

    automate workflows, and perform any other programmatic operations.
servers:
  - url: https://api.meetcampfire.com
    description: Production server
security: []
tags:
  - name: Cash Management
    description: Operations related to accounts, transactions, and other bank-related data.
  - name: Core Accounting
    description: >-
      Operations related to core accounting data, such as the chart of accounts,
      entity management, and the general ledger.
  - name: Revenue Recognition
    description: >-
      Operations related to revenue recognition, contract management, and
      contract data aggregation.
  - name: Accounts Receivable
    description: Operations related to invoicing and the AR subledger
  - name: Accounts Payable
    description: Operations related to billing and the AP subledger.
  - name: Financial Statements
    description: Operations related to financial statement generation and data aggregation.
  - name: Settings
    description: Operations related to system and accounting settings configuration.
paths:
  /coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags:
    get:
      tags:
        - Accounts Payable
      summary: Get Default Department and Tags for Empty Transaction
      description: >-
        Get the default department and tags from the bill line with the largest
        total amount.

                This endpoint is used to provide default values when creating empty transactions (marking as paid without a transaction).
                The total amount is calculated as: amount + tax.
                If multiple lines have the same total amount, the line with the lowest ID (first created) is selected.
                The department and tags are retrieved directly from the bill line.
      operationId: coa_api_v1_bill_empty_transaction_default_department_tags_retrieve
      parameters:
        - in: path
          name: bill_id
          schema:
            type: integer
          description: ID of the bill
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  department:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        group:
                          type: integer
                          nullable: true
                        group_name:
                          type: string
                          nullable: true
          description: ''
        '404':
          content:
            application/json:
              schema:
                description: Bill not found
          description: ''
      security:
        - knoxApiToken: []
components:
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````