Skip to main content
POST
/
coa
/
api
/
v1
/
credit-memo
/
{credit_memo_id}
/
mark-used
Mark Credit Memo as Used
curl --request POST \
  --url https://api.meetcampfire.com/coa/api/v1/credit-memo/{credit_memo_id}/mark-used \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transaction_id": 123,
  "account_id": 123,
  "amount": 0,
  "payment_date": "2023-12-25",
  "memo": "<string>"
}
'
import requests

url = "https://api.meetcampfire.com/coa/api/v1/credit-memo/{credit_memo_id}/mark-used"

payload = {
"transaction_id": 123,
"account_id": 123,
"amount": 0,
"payment_date": "2023-12-25",
"memo": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transaction_id: 123,
account_id: 123,
amount: 0,
payment_date: '2023-12-25',
memo: '<string>'
})
};

fetch('https://api.meetcampfire.com/coa/api/v1/credit-memo/{credit_memo_id}/mark-used', 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/credit-memo/{credit_memo_id}/mark-used",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transaction_id' => 123,
'account_id' => 123,
'amount' => 0,
'payment_date' => '2023-12-25',
'memo' => '<string>'
]),
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/credit-memo/{credit_memo_id}/mark-used"

payload := strings.NewReader("{\n \"transaction_id\": 123,\n \"account_id\": 123,\n \"amount\": 0,\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.meetcampfire.com/coa/api/v1/credit-memo/{credit_memo_id}/mark-used")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": 123,\n \"account_id\": 123,\n \"amount\": 0,\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/coa/api/v1/credit-memo/{credit_memo_id}/mark-used")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_id\": 123,\n \"account_id\": 123,\n \"amount\": 0,\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
"<unknown>"

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

credit_memo_id
integer
required

ID of the credit memo to mark as used

Body

Serializer for marking a credit memo as used with a transaction.

transaction_id
integer
required
account_id
integer
required
amount
number<double>
required
Required range: -1000000000000000000 < x < 1000000000000000000
payment_date
string<date>
required
memo
string | null

Response

200 - application/json

Credit memo marked as used successfully