autocount-connector

Connects to the AutoCount AOTG API to read and write stock balances, invoices, debtor aging, and purchase orders.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill autocount-connector-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autocount-connector
Source: https://github.com/tapway/shogun-os/tree/main/skills/retail/autocount-connector
Command: npx skills add https://github.com/tapway/shogun-os --skill autocount-connector-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve? Retail and accounting teams need live data from AutoCount, Malaysia's widely used SMB accounting software, but manually exporting stock balances, invoices, and debtor aging reports is slow and error-prone. This Skill provides programmatic read/write access to the AutoCount AOTG REST API so agents and scripts can query and update accounting data directly. ## Core Features & Use Cases - Inventory & Sales Reads: Query stock balances (optionally by SKU), sales invoices filtered by date, debtor aging reports, and purchase orders filtered by status. - Write Operations: Create sales invoices with line items and post stock adjustments such as damaged-inventory write-offs. - Standardized Results: Every method returns a consistent dict with success, data, and error keys, plus typed exceptions for auth and API failures. - Use Case: A retail manager agent checks whether SKU PROD-001 is in stock before confirming a customer order, then pulls all invoices since the start of the month to build a daily sales dashboard. ## Quick Start Set the AUTOCOUNT_API_URL, AUTOCOUNT_API_KEY, and AUTOCOUNT_COMPANY_DB environment variables, then ask the agent to check the current stock balance for a given SKU using the AutoCount connector.

Frequently Asked Questions about autocount-connector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect Python to the AutoCount AOTG API?

Create an AutoCountAdapter with your API URL, API key, and company database, or set the AUTOCOUNT_API_URL, AUTOCOUNT_API_KEY, and AUTOCOUNT_COMPANY_DB environment variables. Call connect() to verify connectivity against the /system/info endpoint.

How do I check stock balance in AutoCount programmatically?

Call read_stock_balance() on the adapter to get all stock balances, or pass a sku argument to filter for a single item. The result is a standardized dict with a data field containing the stock records.

Can I create sales invoices in AutoCount from a script?

Yes, write_sales_invoice(data) posts a new invoice to the /sales/invoices endpoint. The payload includes customer_code, date, line items with sku, quantity and unit_price, and an optional reference number.

What Python dependencies does the AutoCount connector need?

The connector requires Python 3.8 or later and the requests library, installed with pip install requests. All other functionality uses the Python standard library.

Why am I getting a 401 Unauthorized error from AutoCount?

A 401 response means authentication failed, usually due to an invalid or expired API key or an incorrect company database name. Verify AUTOCOUNT_API_KEY and AUTOCOUNT_COMPANY_DB, then rerun the connect or health command.

When should I not use the AutoCount connector?

Do not use it for syncing products to a master store, which belongs to a dedicated product-sync skill, or for non-AutoCount accounting systems such as QuickBooks or Xero. It is also not intended for direct customer-facing operations.