> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/evo-stock-api/readme.md).

# Evo Stock API

The EvoStock API is a machine-to-machine (M2M) integration API for inventory management operations. It enables external systems to programmatically interact with EvoStock's core inventory data, including sites, products, suppliers, and deliveries.

## Authentication

Authentication uses OAuth2 client credentials. The JWT `sub` claim (equal to the caller's OAuth2 `client_id`) is matched against the `workspaceOrgId` on the Tenant record to resolve the calling organisation. All requests must include a valid Bearer token in the Authorization header.

## Base Path

`/evo/stock/v1`

## Key Resources

| Resource       | Description                                                                                                                                                   |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Sites**      | Query the organisation's site hierarchy, including parent-child relationships and site metadata (type, currency, timezone, address).                          |
| **Products**   | Browse the product catalogue with details such as category, unit of measure, storage temperature, shelf life, allergen info, and costing.                     |
| **Suppliers**  | Access the supplier directory including contact details, payment terms, and external system references.                                                       |
| **Deliveries** | Create, update, and list deliveries with full line-item detail, including quantities received, unit costs, batch/lot tracking, and delivery status lifecycle. |

## Available Endpoints

| Method | Endpoint                      | Description                                            |
| ------ | ----------------------------- | ------------------------------------------------------ |
| `GET`  | `/apim/sites`                 | List all sites for the authenticated organisation      |
| `GET`  | `/apim/products`              | List all products for the authenticated organisation   |
| `GET`  | `/apim/suppliers`             | List all suppliers for the authenticated organisation  |
| `GET`  | `/apim/deliveries`            | List all deliveries for the authenticated organisation |
| `POST` | `/apim/delivery`              | Create a new delivery (optionally with line items)     |
| `POST` | `/apim/delivery/{deliveryId}` | Update an existing delivery                            |

## Pagination

All list endpoints use **cursor-based pagination**. Pass `page_size` (1-500, default 100) and `cursor` query parameters. Each response includes a `pagination` object with `has_next_page` and `next_cursor` to fetch subsequent pages.

## Delivery Lifecycle

Deliveries progress through the following statuses: `PENDING` → `PARTIALLY_RECEIVED` → `COMPLETE` → `CONFIRMED`, with `OVERDUE` and `CANCELLED` as additional states. Deliveries created via this API default to source `INTEGRATION` and status `PENDING`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hos.accessacloud.com/evo-stock-api/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
