cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/journal_entries/{id} \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.journal_entries.get_journal_entry(id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.journalEntries.getJournalEntry("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.JournalEntries.GetJournalEntry(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.JournalEntryResponse != nil {
// handle response
}
}{
"accounting_period_id": "<string>",
"business_date": "2023-11-07T05:31:56Z",
"contract_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_id": "<string>",
"event_type": "invoice_finalized",
"id": "<string>",
"lines": [
{
"account": "cash",
"amount": "<string>",
"direction": "debit",
"id": "<string>",
"pob_id": "<string>"
}
],
"reversal_of": "<string>",
"source_entity_id": "<string>",
"source_entity_type": "subscription"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Journal Entries
Get journal entry
Use when you need one revenue recognition journal entry with its debit and credit lines. The journal is derived from billing and recognition and is read-only.
GET
/
journal_entries
/
{id}
cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/journal_entries/{id} \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.journal_entries.get_journal_entry(id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.journalEntries.getJournalEntry("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.JournalEntries.GetJournalEntry(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.JournalEntryResponse != nil {
// handle response
}
}{
"accounting_period_id": "<string>",
"business_date": "2023-11-07T05:31:56Z",
"contract_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_id": "<string>",
"event_type": "invoice_finalized",
"id": "<string>",
"lines": [
{
"account": "cash",
"amount": "<string>",
"direction": "debit",
"id": "<string>",
"pob_id": "<string>"
}
],
"reversal_of": "<string>",
"source_entity_id": "<string>",
"source_entity_type": "subscription"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Response
OK

