Skip to main content
PATCH
/
coa
/
api
/
v1
/
debit-memo
/
{id}
Partial Update Debit Memo
curl --request PATCH \
  --url https://api.meetcampfire.com/coa/api/v1/debit-memo/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "lines": [
    {
      "account": 123,
      "debit_memo": 123,
      "description": "<string>",
      "amount": 0,
      "tax": 0,
      "tax_description": "<string>",
      "tag_ids": [
        0
      ],
      "tag_group_ids": [
        0
      ],
      "tax_rate": 123,
      "department": 123
    }
  ],
  "debit_memo_number": "<string>",
  "migrated_journal_id": 123,
  "chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ref_number": "<string>",
  "debit_memo_date": "2023-12-25",
  "applied_date": "2023-12-25",
  "message_on_debit_memo": "<string>",
  "source_id": "<string>",
  "source": "<string>",
  "currency": "<string>",
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "total_amount": 0,
  "amount_used": 0,
  "chat_id": -1,
  "entity": 123,
  "vendor": 123,
  "debit_account": 123,
  "journal_entry": 123,
  "voided_journal_entry": 123
}
'
import requests

url = "https://api.meetcampfire.com/coa/api/v1/debit-memo/{id}"

payload = {
"lines": [
{
"account": 123,
"debit_memo": 123,
"description": "<string>",
"amount": 0,
"tax": 0,
"tax_description": "<string>",
"tag_ids": [0],
"tag_group_ids": [0],
"tax_rate": 123,
"department": 123
}
],
"debit_memo_number": "<string>",
"migrated_journal_id": 123,
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref_number": "<string>",
"debit_memo_date": "2023-12-25",
"applied_date": "2023-12-25",
"message_on_debit_memo": "<string>",
"source_id": "<string>",
"source": "<string>",
"currency": "<string>",
"exchange_rate": 0,
"exchange_rate_book": 0,
"total_amount": 0,
"amount_used": 0,
"chat_id": -1,
"entity": 123,
"vendor": 123,
"debit_account": 123,
"journal_entry": 123,
"voided_journal_entry": 123
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
lines: [
{
account: 123,
debit_memo: 123,
description: '<string>',
amount: 0,
tax: 0,
tax_description: '<string>',
tag_ids: [0],
tag_group_ids: [0],
tax_rate: 123,
department: 123
}
],
debit_memo_number: '<string>',
migrated_journal_id: 123,
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ref_number: '<string>',
debit_memo_date: '2023-12-25',
applied_date: '2023-12-25',
message_on_debit_memo: '<string>',
source_id: '<string>',
source: '<string>',
currency: '<string>',
exchange_rate: 0,
exchange_rate_book: 0,
total_amount: 0,
amount_used: 0,
chat_id: -1,
entity: 123,
vendor: 123,
debit_account: 123,
journal_entry: 123,
voided_journal_entry: 123
})
};

fetch('https://api.meetcampfire.com/coa/api/v1/debit-memo/{id}', 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/debit-memo/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'lines' => [
[
'account' => 123,
'debit_memo' => 123,
'description' => '<string>',
'amount' => 0,
'tax' => 0,
'tax_description' => '<string>',
'tag_ids' => [
0
],
'tag_group_ids' => [
0
],
'tax_rate' => 123,
'department' => 123
]
],
'debit_memo_number' => '<string>',
'migrated_journal_id' => 123,
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ref_number' => '<string>',
'debit_memo_date' => '2023-12-25',
'applied_date' => '2023-12-25',
'message_on_debit_memo' => '<string>',
'source_id' => '<string>',
'source' => '<string>',
'currency' => '<string>',
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'total_amount' => 0,
'amount_used' => 0,
'chat_id' => -1,
'entity' => 123,
'vendor' => 123,
'debit_account' => 123,
'journal_entry' => 123,
'voided_journal_entry' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.meetcampfire.com/coa/api/v1/debit-memo/{id}"

payload := strings.NewReader("{\n \"lines\": [\n {\n \"account\": 123,\n \"debit_memo\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"debit_memo_number\": \"<string>\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ref_number\": \"<string>\",\n \"debit_memo_date\": \"2023-12-25\",\n \"applied_date\": \"2023-12-25\",\n \"message_on_debit_memo\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"total_amount\": 0,\n \"amount_used\": 0,\n \"chat_id\": -1,\n \"entity\": 123,\n \"vendor\": 123,\n \"debit_account\": 123,\n \"journal_entry\": 123,\n \"voided_journal_entry\": 123\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.meetcampfire.com/coa/api/v1/debit-memo/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"account\": 123,\n \"debit_memo\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"debit_memo_number\": \"<string>\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ref_number\": \"<string>\",\n \"debit_memo_date\": \"2023-12-25\",\n \"applied_date\": \"2023-12-25\",\n \"message_on_debit_memo\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"total_amount\": 0,\n \"amount_used\": 0,\n \"chat_id\": -1,\n \"entity\": 123,\n \"vendor\": 123,\n \"debit_account\": 123,\n \"journal_entry\": 123,\n \"voided_journal_entry\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/coa/api/v1/debit-memo/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lines\": [\n {\n \"account\": 123,\n \"debit_memo\": 123,\n \"description\": \"<string>\",\n \"amount\": 0,\n \"tax\": 0,\n \"tax_description\": \"<string>\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"tax_rate\": 123,\n \"department\": 123\n }\n ],\n \"debit_memo_number\": \"<string>\",\n \"migrated_journal_id\": 123,\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ref_number\": \"<string>\",\n \"debit_memo_date\": \"2023-12-25\",\n \"applied_date\": \"2023-12-25\",\n \"message_on_debit_memo\": \"<string>\",\n \"source_id\": \"<string>\",\n \"source\": \"<string>\",\n \"currency\": \"<string>\",\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"total_amount\": 0,\n \"amount_used\": 0,\n \"chat_id\": -1,\n \"entity\": 123,\n \"vendor\": 123,\n \"debit_account\": 123,\n \"journal_entry\": 123,\n \"voided_journal_entry\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "lines": [
    {
      "id": 123,
      "account_number": "<string>",
      "account_name": "<string>",
      "department_name": "<string>",
      "tags": [
        {}
      ],
      "tax_rate_name": "<string>",
      "tax_rate_value": 0,
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "account": 123,
      "description": "<string>",
      "amount": 0,
      "tax": 0,
      "tax_description": "<string>",
      "tag_ids": [
        0
      ],
      "tag_group_ids": [
        0
      ],
      "tax_rate": 123,
      "department": 123
    }
  ],
  "payments": [
    {
      "id": 123,
      "payment_journal_entry_order": "<string>",
      "voided_journal_entry_order": "<string>",
      "bill": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "debit_memo": 123,
      "payment_journal_entry": 123,
      "currency": "<string>",
      "amount": 0,
      "payment_date": "2023-12-25",
      "voided_date": "2023-12-25",
      "payment_transaction": 123,
      "voided_journal_entry": 123
    }
  ],
  "amount_remaining": 123,
  "entity_name": "<string>",
  "entity_currency": "<string>",
  "vendor_name": "<string>",
  "debit_account_number": "<string>",
  "debit_account_name": "<string>",
  "attachments": [
    {
      "id": 123,
      "customer": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": 123,
      "created_by_name": "<string>",
      "created_by_email": "<string>",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "url": "<string>",
      "s3_path": "<string>",
      "app": "<string>",
      "model": "<string>",
      "is_deleted": false,
      "deleted_at": "2023-11-07T05:31:56Z",
      "s3_content_type": "<string>",
      "s3_content_length": 1073741823,
      "object_id": 1073741823
    }
  ],
  "voided_date": "2023-12-25",
  "voided_journal_entry_order": "<string>",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "search_vector": "<string>",
  "search_text": "<string>",
  "debit_memo_date": "2023-12-25",
  "created_at": "2023-11-07T05:31:56Z",
  "customer": 123,
  "entity": 123,
  "debit_memo_number": "<string>",
  "ref_number": "<string>",
  "applied_date": "2023-12-25",
  "message_on_debit_memo": "<string>",
  "source_id": "<string>",
  "source": "<string>",
  "currency": "<string>",
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "total_amount": 0,
  "amount_used": 0,
  "chat_id": -1,
  "vendor": 123,
  "debit_account": 123,
  "journal_entry": 123,
  "voided_journal_entry": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

id
integer
required

Body

lines
object[]
debit_memo_number
string
migrated_journal_id
integer | null
write-only
chat_uuid
string<uuid>
write-only
ref_number
string | null
Maximum string length: 120
debit_memo_date
string<date>
applied_date
string<date> | null
message_on_debit_memo
string | null
source_id
string | null
Maximum string length: 120
source
string | null
Maximum string length: 120
application_status
  • open - Open
  • partially_used - Partially Used
  • used - Used
  • voided - Voided
Available options:
open,
partially_used,
used,
voided
currency
string
Maximum string length: 3
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
total_amount
number<double>

Sum of all line item amounts

Required range: -1000000000000000000 < x < 1000000000000000000
amount_used
number<double>

Sum of all non-voided payment amounts

Required range: -1000000000000000000 < x < 1000000000000000000
chat_id
integer | null
Required range: -2147483648 <= x <= 2147483647
tax_behavior
  • inclusive - Inclusive
  • exclusive - Exclusive
Available options:
inclusive,
exclusive
entity
integer
vendor
integer | null
debit_account
integer | null
journal_entry
integer | null
voided_journal_entry
integer | null

Response

200 - application/json
id
integer
required
read-only
lines
object[]
required
payments
object[]
required
read-only
amount_remaining
number<double>
required
read-only

Calculate amount remaining from database fields

entity_name
string
required
read-only
entity_currency
string
required
read-only
vendor_name
string
required
read-only
debit_account_number
string
required
read-only
debit_account_name
string | null
required
read-only

Combines account number and name in the format "number - name"

attachments
object[]
required
read-only
voided_date
string<date>
required
read-only
voided_journal_entry_order
string
required
read-only
last_modified_at
string<date-time>
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
search_vector
string | null
required
read-only
search_text
string | null
required
read-only
debit_memo_date
string<date>
required
created_at
string<date-time>
required
read-only
customer
integer
required
read-only
entity
integer
required
debit_memo_number
string
ref_number
string | null
Maximum string length: 120
applied_date
string<date> | null
message_on_debit_memo
string | null
source_id
string | null
Maximum string length: 120
source
string | null
Maximum string length: 120
application_status
  • open - Open
  • partially_used - Partially Used
  • used - Used
  • voided - Voided
Available options:
open,
partially_used,
used,
voided
currency
string
Maximum string length: 3
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
total_amount
number<double>

Sum of all line item amounts

Required range: -1000000000000000000 < x < 1000000000000000000
amount_used
number<double>

Sum of all non-voided payment amounts

Required range: -1000000000000000000 < x < 1000000000000000000
chat_id
integer | null
Required range: -2147483648 <= x <= 2147483647
tax_behavior
  • inclusive - Inclusive
  • exclusive - Exclusive
Available options:
inclusive,
exclusive
vendor
integer | null
debit_account
integer | null
journal_entry
integer | null
voided_journal_entry
integer | null