curl --request PUT \
--url https://api.example.com/api/manual-journals/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'organization-id: <organization-id>' \
--data '
{
"date": "2023-11-07T05:31:56Z",
"entries": [
{
"index": 123,
"accountId": 123,
"credit": 123,
"debit": 123,
"note": "<string>",
"contactId": 123,
"branchId": 123,
"projectId": 123
}
],
"currencyCode": "<string>",
"exchangeRate": 123,
"journalNumber": "<string>",
"journalType": "<string>",
"reference": "<string>",
"description": "<string>",
"branchId": 123,
"publish": true,
"attachments": [
{
"key": "attachments/bills/receipt.pdf"
}
]
}
'import requests
url = "https://api.example.com/api/manual-journals/{id}"
payload = {
"date": "2023-11-07T05:31:56Z",
"entries": [
{
"index": 123,
"accountId": 123,
"credit": 123,
"debit": 123,
"note": "<string>",
"contactId": 123,
"branchId": 123,
"projectId": 123
}
],
"currencyCode": "<string>",
"exchangeRate": 123,
"journalNumber": "<string>",
"journalType": "<string>",
"reference": "<string>",
"description": "<string>",
"branchId": 123,
"publish": True,
"attachments": [{ "key": "attachments/bills/receipt.pdf" }]
}
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: '<authorization>',
'organization-id': '<organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
date: '2023-11-07T05:31:56Z',
entries: [
{
index: 123,
accountId: 123,
credit: 123,
debit: 123,
note: '<string>',
contactId: 123,
branchId: 123,
projectId: 123
}
],
currencyCode: '<string>',
exchangeRate: 123,
journalNumber: '<string>',
journalType: '<string>',
reference: '<string>',
description: '<string>',
branchId: 123,
publish: true,
attachments: [{key: 'attachments/bills/receipt.pdf'}]
})
};
fetch('https://api.example.com/api/manual-journals/{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.example.com/api/manual-journals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2023-11-07T05:31:56Z',
'entries' => [
[
'index' => 123,
'accountId' => 123,
'credit' => 123,
'debit' => 123,
'note' => '<string>',
'contactId' => 123,
'branchId' => 123,
'projectId' => 123
]
],
'currencyCode' => '<string>',
'exchangeRate' => 123,
'journalNumber' => '<string>',
'journalType' => '<string>',
'reference' => '<string>',
'description' => '<string>',
'branchId' => 123,
'publish' => true,
'attachments' => [
[
'key' => 'attachments/bills/receipt.pdf'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"organization-id: <organization-id>"
],
]);
$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.example.com/api/manual-journals/{id}"
payload := strings.NewReader("{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
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.put("https://api.example.com/api/manual-journals/{id}")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/manual-journals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"date": "2024-03-20",
"journalNumber": "MJ-2024-001",
"amount": 1000,
"isPublished": false,
"createdAt": "2024-03-20T09:00:00Z",
"formattedAmount": "$1,000.00",
"formattedDate": "Mar 20, 2024",
"formattedCreatedAt": "Mar 20, 2024",
"entries": [
{
"index": 1,
"accountId": 1,
"credit": 1000,
"debit": 0,
"note": "Payment for services",
"contactId": 1,
"branchId": 1,
"projectId": 1,
"account": {},
"contact": {},
"branch": {}
}
],
"journalType": "General",
"reference": "REF-001",
"currencyCode": "USD",
"exchangeRate": 1,
"description": "Monthly journal entry",
"publishedAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T09:30:00Z",
"branchId": 1,
"formattedPublishedAt": "Mar 20, 2024",
"attachments": [
"<string>"
]
}Edit the given manual journal.
curl --request PUT \
--url https://api.example.com/api/manual-journals/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'organization-id: <organization-id>' \
--data '
{
"date": "2023-11-07T05:31:56Z",
"entries": [
{
"index": 123,
"accountId": 123,
"credit": 123,
"debit": 123,
"note": "<string>",
"contactId": 123,
"branchId": 123,
"projectId": 123
}
],
"currencyCode": "<string>",
"exchangeRate": 123,
"journalNumber": "<string>",
"journalType": "<string>",
"reference": "<string>",
"description": "<string>",
"branchId": 123,
"publish": true,
"attachments": [
{
"key": "attachments/bills/receipt.pdf"
}
]
}
'import requests
url = "https://api.example.com/api/manual-journals/{id}"
payload = {
"date": "2023-11-07T05:31:56Z",
"entries": [
{
"index": 123,
"accountId": 123,
"credit": 123,
"debit": 123,
"note": "<string>",
"contactId": 123,
"branchId": 123,
"projectId": 123
}
],
"currencyCode": "<string>",
"exchangeRate": 123,
"journalNumber": "<string>",
"journalType": "<string>",
"reference": "<string>",
"description": "<string>",
"branchId": 123,
"publish": True,
"attachments": [{ "key": "attachments/bills/receipt.pdf" }]
}
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: '<authorization>',
'organization-id': '<organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
date: '2023-11-07T05:31:56Z',
entries: [
{
index: 123,
accountId: 123,
credit: 123,
debit: 123,
note: '<string>',
contactId: 123,
branchId: 123,
projectId: 123
}
],
currencyCode: '<string>',
exchangeRate: 123,
journalNumber: '<string>',
journalType: '<string>',
reference: '<string>',
description: '<string>',
branchId: 123,
publish: true,
attachments: [{key: 'attachments/bills/receipt.pdf'}]
})
};
fetch('https://api.example.com/api/manual-journals/{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.example.com/api/manual-journals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2023-11-07T05:31:56Z',
'entries' => [
[
'index' => 123,
'accountId' => 123,
'credit' => 123,
'debit' => 123,
'note' => '<string>',
'contactId' => 123,
'branchId' => 123,
'projectId' => 123
]
],
'currencyCode' => '<string>',
'exchangeRate' => 123,
'journalNumber' => '<string>',
'journalType' => '<string>',
'reference' => '<string>',
'description' => '<string>',
'branchId' => 123,
'publish' => true,
'attachments' => [
[
'key' => 'attachments/bills/receipt.pdf'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"organization-id: <organization-id>"
],
]);
$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.example.com/api/manual-journals/{id}"
payload := strings.NewReader("{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
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.put("https://api.example.com/api/manual-journals/{id}")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/manual-journals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-11-07T05:31:56Z\",\n \"entries\": [\n {\n \"index\": 123,\n \"accountId\": 123,\n \"credit\": 123,\n \"debit\": 123,\n \"note\": \"<string>\",\n \"contactId\": 123,\n \"branchId\": 123,\n \"projectId\": 123\n }\n ],\n \"currencyCode\": \"<string>\",\n \"exchangeRate\": 123,\n \"journalNumber\": \"<string>\",\n \"journalType\": \"<string>\",\n \"reference\": \"<string>\",\n \"description\": \"<string>\",\n \"branchId\": 123,\n \"publish\": true,\n \"attachments\": [\n {\n \"key\": \"attachments/bills/receipt.pdf\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"date": "2024-03-20",
"journalNumber": "MJ-2024-001",
"amount": 1000,
"isPublished": false,
"createdAt": "2024-03-20T09:00:00Z",
"formattedAmount": "$1,000.00",
"formattedDate": "Mar 20, 2024",
"formattedCreatedAt": "Mar 20, 2024",
"entries": [
{
"index": 1,
"accountId": 1,
"credit": 1000,
"debit": 0,
"note": "Payment for services",
"contactId": 1,
"branchId": 1,
"projectId": 1,
"account": {},
"contact": {},
"branch": {}
}
],
"journalType": "General",
"reference": "REF-001",
"currencyCode": "USD",
"exchangeRate": 1,
"description": "Monthly journal entry",
"publishedAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T09:30:00Z",
"branchId": 1,
"formattedPublishedAt": "Mar 20, 2024",
"attachments": [
"<string>"
]
}Headers
Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.
"Bearer bc_1234567890abcdef"
Required if Authorization is a JWT token. The organization ID to operate within.
Path Parameters
The manual journal id
Body
Journal date
Journal entries
Show child attributes
Show child attributes
Currency code
Exchange rate
Journal number
Journal type
Reference
Description
Branch ID
Publish status
Attachments
Show child attributes
Show child attributes
Response
The manual journal has been successfully edited.
Manual Journal ID
1
Journal date
"2024-03-20"
Journal number
"MJ-2024-001"
Total amount
1000
Published status
false
Created date
"2024-03-20T09:00:00Z"
Formatted amount
"$1,000.00"
Formatted date
"Mar 20, 2024"
Formatted created date
"Mar 20, 2024"
Journal entries
Show child attributes
Show child attributes
Journal type
"General"
Reference number
"REF-001"
Currency code
"USD"
Exchange rate
1
Description
"Monthly journal entry"
Published date
"2024-03-20T10:00:00Z"
Updated date
"2024-03-20T09:30:00Z"
Branch ID
1
Formatted published date
"Mar 20, 2024"
Attachments