Get Default Department and Tags for Empty Transaction
curl --request GET \
--url https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tagsimport requests
url = "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"department": {
"id": 123,
"name": "<string>"
},
"tags": [
{
"id": 123,
"name": "<string>",
"group": 123,
"group_name": "<string>"
}
]
}"<unknown>"Accounts Payable
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.
GET
/
coa
/
api
/
v1
/
bill
/
{bill_id}
/
empty-transaction-default-department-tags
Get Default Department and Tags for Empty Transaction
curl --request GET \
--url https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tagsimport requests
url = "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/bill/{bill_id}/empty-transaction-default-department-tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"department": {
"id": 123,
"name": "<string>"
},
"tags": [
{
"id": 123,
"name": "<string>",
"group": 123,
"group_name": "<string>"
}
]
}"<unknown>"