Skip to main content
POST
Create StatisticalJournal record
Validates all required fields and business rules. Additional validations
  • Fails with 422 if you set an inactive, archived, or draft customer or vendor, or an inactive company.
  • Fails with 422 if a line account is not available to the line’s company, or to the record’s company when the line sets none.
  • A reference that the record or its linked source record already holds passes these checks.

Authorizations

X-API-KEY
string
header
required

Headers

Idempotency-Key
string

Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.

Maximum string length: 255

Query Parameters

apply_default_classifications
boolean
default:true

When false, store submitted line classifications, including an empty list. When omitted, organization defaults apply to new lines with omitted or empty classifications only when the organization setting is enabled.

Body

application/json
account_id
integer
required
date
string<date> | null
memo
string
default:""
items
PublicStatisticalJournalLineSchemaIn · object[]
attachments
AttachmentSchemaOut · object[]
record_status
enum<string>
default:posted
Available options:
draft,
posted,
archived

Response

OK

id
integer
required
number
integer
required
account_id
integer
required
account_name
string
required
account_number
integer
required
period
string<date>
required
date
string<date>
required
memo
string
required
record_status
enum<string>
required
Available options:
draft,
posted,
archived
total_quantity
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
items
PublicStatisticalJournalLineSchemaOut · object[]
required
created_at
string<date-time>
required

Date and time the record was created

updated_at
string<date-time>
required

Date and time the record was last updated

code
string | null
attachments
PublicAttachmentSchemaOut · object[]