> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erp.arukz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create journal

> Create a new journal



## OpenAPI

````yaml /api-reference/openapi.json post /admin/api/v1/accounts/journals
openapi: 3.0.3
info:
  title: ARUKZ ERP API
  version: v1
  description: >-
    The REST API of ARUKZ ERP: sales, purchases, inventory, products, partners,
    accounts, projects and reference data. Every call acts as the user whose
    token it carries and sees only that user's company.
servers:
  - url: https://erp.arukz.com
    description: ARUKZ ERP (hosted)
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Sign in for a token and sign out.
  - name: Sales
    description: Quotations, sales orders and their lines, deliveries and invoices.
  - name: Purchases
    description: Purchase orders, receipts, bills, agreements and vendor price lists.
  - name: Inventory
    description: >-
      Warehouses, locations, lots, stock quantities, receipts, deliveries,
      transfers and scrap.
  - name: Products
    description: 'The product catalogue: categories, attributes, variants and packaging.'
  - name: Partners
    description: Customers, vendors, contacts, addresses and bank accounts.
  - name: Accounts
    description: >-
      Invoices, bills, credit notes, refunds, taxes, journals and the chart of
      accounts.
  - name: Projects
    description: Projects, tasks, stages and milestones.
  - name: Reference data
    description: Currencies and rates, banks, countries, states and units of measure.
paths:
  /admin/api/v1/accounts/journals:
    post:
      tags:
        - Accounts
      summary: Create journal
      description: Create a new journal
      operationId: accounts-journals-create-journal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Journal name. Must not be greater than 255 characters.
                  example: Bank Journal
                code:
                  type: string
                  description: >-
                    Journal code (max 5 chars). Must not be greater than 5
                    characters.
                  example: BNK
                type:
                  type: string
                  description: Journal type.
                  enum:
                    - sale
                    - purchase
                    - cash
                    - bank
                    - credit
                    - general
                  example: bank
                company_id:
                  type: integer
                  description: >-
                    Company ID. The `id` of an existing record in the companies
                    table.
                  nullable: true
                  example: 1
                currency_id:
                  type: integer
                  description: >-
                    Currency ID. The `id` of an existing record in the
                    currencies table.
                  nullable: true
                  example: 1
                default_account_id:
                  type: integer
                  description: >-
                    Default account ID. The `id` of an existing record in the
                    accounts_accounts table.
                  nullable: true
                  example: 1
                suspense_account_id:
                  type: integer
                  description: >-
                    Suspense account ID. The `id` of an existing record in the
                    accounts_accounts table.
                  nullable: true
                  example: 2
                profit_account_id:
                  type: integer
                  description: >-
                    Profit account ID. The `id` of an existing record in the
                    accounts_accounts table.
                  nullable: true
                  example: 3
                loss_account_id:
                  type: integer
                  description: >-
                    Loss account ID. The `id` of an existing record in the
                    accounts_accounts table.
                  nullable: true
                  example: 4
                bank_account_id:
                  type: integer
                  description: >-
                    Bank account ID. The `id` of an existing record in the
                    partners_bank_accounts table.
                  nullable: true
                  example: 1
                color:
                  type: string
                  description: Journal color (hex). Must not be greater than 7 characters.
                  nullable: true
                  example: '#3b82f6'
                show_on_dashboard:
                  type: boolean
                  description: Show on dashboard.
                  nullable: true
                  example: false
                refund_order:
                  type: boolean
                  description: Refund order flag.
                  nullable: true
                  example: false
                payment_order:
                  type: boolean
                  description: Payment order flag.
                  nullable: true
                  example: false
                inbound_payment_method_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_payment_method_lines table.
                        example: 16
                      payment_method_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_payment_methods table.
                        example: 16
                      name:
                        type: string
                        description: Must not be greater than 255 characters.
                        example: 'n'
                      payment_account_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_accounts table.
                        nullable: true
                        example: 16
                    required:
                      - name
                      - payment_method_id
                  description: >-
                    Inbound payment method lines (for BANK, CASH, CREDIT_CARD
                    journals). Include id for update, omit for create.
                  nullable: true
                  example:
                    - payment_method_id: 1
                      name: Manual
                      payment_account_id: 5
                outbound_payment_method_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_payment_method_lines table.
                        example: 16
                      payment_method_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_payment_methods table.
                        example: 16
                      name:
                        type: string
                        description: Must not be greater than 255 characters.
                        example: 'n'
                      payment_account_id:
                        type: integer
                        description: >-
                          The `id` of an existing record in the
                          accounts_accounts table.
                        nullable: true
                        example: 16
                    required:
                      - name
                      - payment_method_id
                  description: >-
                    Outbound payment method lines (for BANK, CASH, CREDIT_CARD
                    journals). Include id for update, omit for create.
                  nullable: true
                  example:
                    - payment_method_id: 2
                      name: Electronic
                      payment_account_id: 6
              required:
                - code
                - name
                - type
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                data:
                  id: 1
                  name: Customer Invoices
                  code: INV
                  type: sale
                  color: '11'
                  sort: 5
                  show_on_dashboard: 1
                  refund_order: 1
                  payment_order: 0
                  company_id: 1
                  currency_id: 1
                  default_account_id: 27
                  suspense_account_id: null
                  profit_account_id: null
                  loss_account_id: null
                  bank_account_id: null
                  creator_id: 1
                  created_at: null
                  updated_at: null
                message: Journal created successfully.
        '401':
          description: Unauthenticated
          content:
            application/json:
              example:
                message: Unauthenticated.
        '422':
          description: Validation error
          content:
            application/json:
              example:
                message: The given data was invalid.
                errors:
                  name:
                    - The name field is required.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API token from [Sign in](/api-reference/authentication), sent as
        `Authorization: Bearer <token>`. Tokens last 30 days.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.