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

# Get Inventory

> Return your merchant's available items for purchase

<Info>
  This endpoint is designed for merchants with small, fixed inventories such as vending machines, kiosks, or simple storefronts.
</Info>

## Use Cases

* **Vending machines** - Display available snacks and drinks
* **Kiosks** - Show menu items with prices
* **Mobile top-up** - List available recharge amounts
* **Simple stores** - Present a catalog of products

## Item Fields

| Field         | Required | Description                         |
| ------------- | -------- | ----------------------------------- |
| `id`          | Yes      | Unique item identifier              |
| `name`        | Yes      | Display name                        |
| `price`       | Yes      | Unit price as decimal string        |
| `description` | No       | Item description                    |
| `quantity`    | No       | Available stock                     |
| `min_qty`     | No       | Minimum order quantity (default: 1) |
| `max_qty`     | No       | Maximum order quantity              |
| `images`      | No       | Array of image URLs                 |
| `url`         | No       | Link to item details page           |

## Example Response

```json theme={null}
{
  "ocid": 500,
  "currency": "USD",
  "items": [
    {
      "id": "item_001",
      "name": "Coca-Cola",
      "description": "330ml can",
      "price": "2.50",
      "quantity": 15,
      "min_qty": 1,
      "max_qty": 5,
      "images": ["https://merchant.example/images/coke.jpg"]
    },
    {
      "id": "item_002",
      "name": "Snickers Bar",
      "description": "52g chocolate bar",
      "price": "1.75",
      "quantity": 8,
      "images": ["https://merchant.example/images/snickers.jpg"]
    }
  ]
}
```

<Note>
  For larger catalogs or dynamic inventory, consider implementing a paginated endpoint or directing users to your web store.
</Note>


## OpenAPI

````yaml merchant-api/endpoint/merchant-api/openapi.json get /inventory
openapi: 3.1.0
info:
  title: Opencharge Merchant API
  description: >-
    API specification for merchants integrating with the Opencharge protocol.
    These endpoints are implemented by merchants and called by payment apps and
    gateways.
  version: 0.1.0
  license:
    name: MIT
servers:
  - url: https://api.merchant.example/opencharge
    description: Example merchant Opencharge endpoint
security: []
paths:
  /inventory:
    get:
      summary: Get inventory
      description: >-
        Return your merchant's full inventory. Designed for small inventories
        such as vending machines or kiosks. Payment apps call this endpoint to
        display available items before creating an order.
      operationId: getInventory
      responses:
        '200':
          description: Inventory retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryResponse'
              example:
                ocid: 500
                currency: USD
                items:
                  - id: item_001
                    name: Coca-Cola
                    description: 330ml can
                    price: '2.50'
                    quantity: 15
                    min_qty: 1
                    max_qty: 5
                    images:
                      - https://merchant.example/images/coke.jpg
                    url: https://merchant.example/products/coca-cola
                  - id: item_002
                    name: Snickers Bar
                    description: 52g chocolate bar
                    price: '1.75'
                    quantity: 8
                    min_qty: 1
                    max_qty: 10
                    images:
                      - https://merchant.example/images/snickers.jpg
                    url: https://merchant.example/products/snickers
components:
  schemas:
    InventoryResponse:
      type: object
      required:
        - ocid
        - items
      description: Your merchant's full inventory listing
      properties:
        ocid:
          type: integer
          description: Your merchant's OCID
        currency:
          type: string
          description: Default ISO 4217 currency code for item prices
        items:
          type: array
          items:
            $ref: '#/components/schemas/InventoryItem'
          description: Available inventory items
    InventoryItem:
      type: object
      required:
        - id
        - name
        - price
      description: An item available for purchase
      properties:
        id:
          type: string
          description: Unique item identifier
        name:
          type: string
          description: Display name
        description:
          type: string
          description: Item description
        price:
          type: string
          description: Unit price as decimal string
        currency:
          type: string
          description: ISO 4217 currency code (overrides response-level currency)
        quantity:
          type: integer
          description: Available stock quantity
        min_qty:
          type: integer
          description: Minimum order quantity
          default: 1
        max_qty:
          type: integer
          description: Maximum order quantity
        images:
          type: array
          items:
            type: string
            format: uri
          description: URLs to item images
        url:
          type: string
          format: uri
          description: URL to item details page

````