> This page is for version V1 (default).
> For other versions, use one of these documentation indexes:
> - V1 (default): https://docs.ottimate.com/v-1/llms.txt

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

# Vendors

### Creating a Vendor

This shows how to create a new vendor associated with your company.

```python
# main.py

vendor_name = f"Sample SDK Vendor {time_now}"
vendor_erp_id = f"VND-SDK-{time_now}"

new_vendor = client.vendors.post_vendors_root(
    ottimate_company_id=ottimate_company_id,
    name=vendor_name,
    erp_vendor_id=vendor_erp_id,
)
ottimate_vendor_id = new_vendor.vendor.get("id")
```

### Fetching Vendors

Fetching all vendors:

```python
# Fetch all the vendors
all_vendors = client.vendors.get_vendors_root(ottimate_company_id=ottimate_company_id)
for vendor in all_vendors.vendors:
    print(f" - Vendor: {vendor.name} (ID: {vendor.id}) ERP Vendor ID - {vendor.erp_vendor_id}")
```

Fetching a specific vendor:

```python
# Fetch specfic vendor by ID
vendor = client.vendors.get_vendors_id(id=<>)
```