Update journal entry
curl --request PUT \
--url https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"event": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {},
"auto_adjust_closed_period": true,
"source_event_log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_resource_type": "<string>",
"source_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_operation": "<string>"
}
'import requests
url = "https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}"
payload = {
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"event": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {},
"auto_adjust_closed_period": True,
"source_event_log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_resource_type": "<string>",
"source_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_operation": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
currency: '<string>',
journal_lines: [
{
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credits: 123,
debits: 123,
currency: '<string>',
tags: [
{
reference_tag_type: '<string>',
reference_tag_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reference_tag_content: '<string>'
}
],
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contract_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
invoice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credit_note_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tax_jurisdiction_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
refund_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revenue_contract_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revenue_contract_item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
performance_obligation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_tags: {}
}
],
event: '<string>',
posted_at: '2023-11-07T05:31:56Z',
custom_data: {},
auto_adjust_closed_period: true,
source_event_log_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_resource_type: '<string>',
source_resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_operation: '<string>'
})
};
fetch('https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_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.zenskar.com/accounting_new/journal_entry/{journal_entry_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([
'description' => '<string>',
'currency' => '<string>',
'journal_lines' => [
[
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credits' => 123,
'debits' => 123,
'currency' => '<string>',
'tags' => [
[
'reference_tag_type' => '<string>',
'reference_tag_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reference_tag_content' => '<string>'
]
],
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contract_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'invoice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credit_note_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tax_jurisdiction_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'refund_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revenue_contract_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revenue_contract_item_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'performance_obligation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_tags' => [
]
]
],
'event' => '<string>',
'posted_at' => '2023-11-07T05:31:56Z',
'custom_data' => [
],
'auto_adjust_closed_period' => true,
'source_event_log_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_resource_type' => '<string>',
'source_resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_operation' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/accounting_new/journal_entry/{journal_entry_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<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.put("https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Accounting
Update journal entry
Update a journal entry by its unique identifier for an organisation.
PUT
/
accounting_new
/
journal_entry
/
{journal_entry_id}
Update journal entry
curl --request PUT \
--url https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"event": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {},
"auto_adjust_closed_period": true,
"source_event_log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_resource_type": "<string>",
"source_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_operation": "<string>"
}
'import requests
url = "https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}"
payload = {
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"event": "<string>",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {},
"auto_adjust_closed_period": True,
"source_event_log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_resource_type": "<string>",
"source_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_operation": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
currency: '<string>',
journal_lines: [
{
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credits: 123,
debits: 123,
currency: '<string>',
tags: [
{
reference_tag_type: '<string>',
reference_tag_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reference_tag_content: '<string>'
}
],
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contract_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
invoice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credit_note_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tax_jurisdiction_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
refund_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revenue_contract_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revenue_contract_item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
performance_obligation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_tags: {}
}
],
event: '<string>',
posted_at: '2023-11-07T05:31:56Z',
custom_data: {},
auto_adjust_closed_period: true,
source_event_log_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_resource_type: '<string>',
source_resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_operation: '<string>'
})
};
fetch('https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_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.zenskar.com/accounting_new/journal_entry/{journal_entry_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([
'description' => '<string>',
'currency' => '<string>',
'journal_lines' => [
[
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credits' => 123,
'debits' => 123,
'currency' => '<string>',
'tags' => [
[
'reference_tag_type' => '<string>',
'reference_tag_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reference_tag_content' => '<string>'
]
],
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contract_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'invoice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credit_note_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tax_jurisdiction_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'refund_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revenue_contract_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revenue_contract_item_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'performance_obligation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_tags' => [
]
]
],
'event' => '<string>',
'posted_at' => '2023-11-07T05:31:56Z',
'custom_data' => [
],
'auto_adjust_closed_period' => true,
'source_event_log_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_resource_type' => '<string>',
'source_resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_operation' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/accounting_new/journal_entry/{journal_entry_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<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.put("https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/accounting_new/journal_entry/{journal_entry_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"journal_lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credits\": 123,\n \"debits\": 123,\n \"currency\": \"<string>\",\n \"tags\": [\n {\n \"reference_tag_type\": \"<string>\",\n \"reference_tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference_tag_content\": \"<string>\"\n }\n ],\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"invoice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credit_note_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tax_jurisdiction_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"refund_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revenue_contract_item_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"performance_obligation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_tags\": {}\n }\n ],\n \"event\": \"<string>\",\n \"posted_at\": \"2023-11-07T05:31:56Z\",\n \"custom_data\": {},\n \"auto_adjust_closed_period\": true,\n \"source_event_log_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_resource_type\": \"<string>\",\n \"source_resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_operation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"currency": "<string>",
"journal_lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credits": 123,
"debits": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
{
"reference_tag_type": "<string>",
"reference_tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_tag_content": "<string>"
}
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_jurisdiction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_contract_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performance_obligation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tags": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"posted_at": "2023-11-07T05:31:56Z",
"custom_data": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
journal_lines
(CreateJournalLineRequestSchema · object | CreateJournalLineFromAccountDataRequestSchema · object)[]
required
- CreateJournalLineRequestSchema
- CreateJournalLineFromAccountDataRequestSchema
Show child attributes
Show child attributes
Available options:
pending, forecasted, estimated, posted If True, automatically adjust posted_at to next open period if it falls in a closed period. Set to False to raise PeriodClosedException instead.
Response
Successful Response
Show child attributes
Show child attributes