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

# Login

> Exchange a user's email and password for an API token. The token is a Laravel Sanctum personal access token: send it as `Authorization: Bearer <token>` on every other call. Five tries a minute per address. Accounts with two-factor sign-in cannot use this endpoint.



## OpenAPI

````yaml /api-reference/openapi.json post /admin/api/v1/login
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/login:
    post:
      tags:
        - Authentication
      summary: Login
      description: >-
        Exchange a user's email and password for an API token. The token is a
        Laravel Sanctum personal access token: send it as `Authorization: Bearer
        <token>` on every other call. Five tries a minute per address. Accounts
        with two-factor sign-in cannot use this endpoint.
      operationId: authentication-login
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: User email address
                  example: admin@example.com
                password:
                  type: string
                  description: User password
                  example: password
                abilities:
                  type: array
                  items:
                    type: string
                    enum:
                      - read
                      - write
                  description: >-
                    What the token may do. Both by default; ask for `read` alone
                    for reporting tools and AI apps.
                  example:
                    - read
              required:
                - email
                - password
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              example:
                message: Login successful
                token: 1|abcd1234efgh5678ijkl...
                token_type: Bearer
                user:
                  id: 1
                  name: Admin User
                  email: admin@example.com
        '422':
          description: >-
            Missing fields, wrong email or password, or an account with
            two-factor sign-in
          content:
            application/json:
              example:
                message: The provided credentials are incorrect.
                errors:
                  email:
                    - The provided credentials are incorrect.
        '429':
          description: More than five tries in a minute
      security: []
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.