> ## 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 lot

> Create a new lot



## OpenAPI

````yaml /api-reference/openapi.json post /admin/api/v1/inventories/lots
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/inventories/lots:
    post:
      tags:
        - Inventory
      summary: Create lot
      description: Create a new lot
      operationId: inventory-lots-create-lot
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Lot/serial number. Must not be greater than 255 characters.
                  example: LOT-2026-001
                product_id:
                  type: integer
                  description: >-
                    Tracked product ID. The `id` of an existing record in the
                    products_products table.
                  example: 1
                reference:
                  type: string
                  description: >-
                    Internal lot reference. Must not be greater than 255
                    characters.
                  nullable: true
                  example: BATCH-A1
                description:
                  type: string
                  description: Lot description.
                  nullable: true
                  example: Primary production batch.
              required:
                - name
                - product_id
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                data:
                  id: 1
                  name: LOT/0001/2021
                  description: <p></p>
                  reference: null
                  properties: null
                  expiry_reminded: false
                  expiration_date: null
                  use_date: null
                  removal_date: null
                  alert_date: null
                  created_at: '2026-02-26T05:40:23.000000Z'
                  updated_at: '2026-02-26T05:40:46.000000Z'
                message: Lot 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.