cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/journal_entries/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"accounting_period_ids": [
"<string>"
],
"accounts": [],
"contract_ids": [
"<string>"
],
"customer_ids": [
"<string>"
],
"end_time": "2023-11-07T05:31:56Z",
"event_types": [],
"expand": "<string>",
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"journal_entry_ids": [
"<string>"
],
"limit": 500,
"offset": 1,
"pob_ids": [
"<string>"
],
"sort": [
{
"field": "<string>"
}
],
"source_entity_ids": [
"<string>"
],
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.journal_entries.query_journal_entry()
# 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.queryJournalEntry({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.JournalEntries.QueryJournalEntry(ctx, types.JournalFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListJournalEntriesResponse != nil {
// handle response
}
}{
"items": [
{
"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"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Journal Entries
Query journal entries
Use when listing journal entries by period, event type, account, customer, contract, performance obligation or source. Returns a paginated list with lines.
POST
/
journal_entries
/
search
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/journal_entries/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"accounting_period_ids": [
"<string>"
],
"accounts": [],
"contract_ids": [
"<string>"
],
"customer_ids": [
"<string>"
],
"end_time": "2023-11-07T05:31:56Z",
"event_types": [],
"expand": "<string>",
"filters": [
{
"field": "<string>",
"value": {
"array": [
"<string>"
],
"boolean": true,
"date": "<string>",
"number": 123,
"string": "<string>"
}
}
],
"journal_entry_ids": [
"<string>"
],
"limit": 500,
"offset": 1,
"pob_ids": [
"<string>"
],
"sort": [
{
"field": "<string>"
}
],
"source_entity_ids": [
"<string>"
],
"start_time": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.journal_entries.query_journal_entry()
# 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.queryJournalEntry({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.JournalEntries.QueryJournalEntry(ctx, types.JournalFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListJournalEntriesResponse != nil {
// handle response
}
}{
"items": [
{
"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"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Body
application/json
Filter

