Skip to main content
POST
Create Journal

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A journal to create. name, code and category identify it; everything else has a default. code and category cannot be changed afterwards (they drive the numbering and the kind of document the journal holds), so choose them carefully here.

name
string
required

Name of the journal.

Required string length: 1 - 255
code
string
required

Short code, used as a prefix in the numbering. Must be unique within the company (case-insensitive): two journals sharing it would number two documents alike. Not editable afterwards.

Required string length: 1 - 45
category
string
required

What the journal holds. One of ['sales_invoice', 'sales_credit', 'purchases_invoice', 'purchases_credit', 'incoming_sales', 'incoming_purchases']. Not editable afterwards.

is_default
boolean
default:false

Makes this the default journal of its category. Setting it demotes the previous default of the same category in the same operation. A default journal must be active.

active
boolean
default:true

Whether the journal is enabled.

start_number
integer | null

First number of the numbering sequence.

numbering_format
string
default:{code}-{year4}-{seq:5}

Template applied when numbering a document. must look like '{code}-{year4}-{seq:5}': '{code}', a separator ('-' or '/'), one or more of the tokens {year4}, {year2}, {month}, {fys4}, {fys2}, {fye4}, {fye2}, {fy4}, {fy2}, the same kind of separator, then '{seq:N}' with N a single digit 2-8.

Maximum string length: 255
sequence_scope
string
default:never

How often the numbering restarts. One of ['never', 'monthly', 'calendar-year', 'fiscal-year']. Not editable afterwards.

bank_account_id
string | null

Opaque id of a bank account of the company to tie to this journal.

Response

Successful Response

An accounting journal of the company, identified by an opaque id.

A journal groups documents of one kind and drives their numbering. bank_account_id only carries a value on the journals it applies to, and is null elsewhere.

id
string
required

Opaque unique identifier of the journal.

name
string | null
required

Name of the journal.

code
string | null
required

Short code of the journal, used as a prefix in the numbering.

category
string
required

What the journal holds. One of: sales_invoice, sales_credit, purchases_invoice, purchases_credit, incoming_sales, incoming_purchases. A few legacy incoming journals with no direction are returned as plain incoming.

is_default
boolean
required

true when this is the journal used by default for its category.

active
boolean
required

false when the journal is disabled and no longer used.

start_number
integer | null
required

First number of the numbering sequence.

numbering_format
string | null
required

Template applied when numbering a document of this journal.

sequence_scope
string
required

How often the numbering restarts: never, monthly, calendar-year or fiscal-year. A legacy journal carrying a value the numbering does not recognise comes out as unknown (and is numbered as never).

bank_account_id
string | null
required

Opaque id of the bank account tied to this journal, resolvable through GET /bank-accounts/{id}. null when the journal has no bank account.