> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.josecarlosonate.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.josecarlosonate.com/_mcp/server.

# Introduction

## StockCoreAPI

StockCoreAPI is a RESTful API for managing the core operations of a stock and inventory system. It covers the full lifecycle of product management — from catalog organization and supplier relationships to real-time inventory tracking and stock movement recording.

### Authentication

All requests are authenticated using a **Bearer Token**. Use the `Login` endpoint to obtain a token and `Logout` to invalidate it. The token is stored in the `{{token}}` collection variable and automatically applied to every request.

### Modules

| Folder                | Description                                                                |
| --------------------- | -------------------------------------------------------------------------- |
| **Auth**              | Login and logout endpoints for session management.                         |
| **Products**          | Create, retrieve, and update products in the catalog.                      |
| **Categories**        | Manage product categories and browse products by category.                 |
| **Suppliers**         | Manage supplier records and associate them with products.                  |
| **Product Suppliers** | Attach, update, and detach supplier relationships for individual products. |
| **Inventory**         | View and update stock levels for each product.                             |
| **Stock Movements**   | Record and query stock entries and exits across the system.                |
| **Customers**         | Manage customer records linked to stock operations.                        |
| Orders                | Create and query sales orders and their associated items.                  |

### Variables

* `{{base_url}}` — The base URL of the API server.
* `{{token}}` — The Bearer token used for authentication.