Smaregi MCP by usefulapi
v1.18.1Read Smaregi stores, products, customers, stock and transactions; manage customers, products, stock.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
smaregi_list_stores List stores
List the stores (shops) of the Smaregi contract: id, code, name, address, phone. Use the ids to filter stock and transactions. GET /stores.
| Parameter | Type | Description |
|---|---|---|
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
smaregi_get_store Get store
One store by id. GET /stores/{store_id}.
| Parameter | Type | Description |
|---|---|---|
store_id * | Numeric Smaregi id (string or number). | |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
smaregi_list_staffs List staff
List staff members: id, code, name, role, e-mail. Passwords are never returned. GET /staffs.
| Parameter | Type | Description |
|---|---|---|
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
smaregi_get_staff Get staff member
One staff member by id. GET /staffs/{staff_id}.
| Parameter | Type | Description |
|---|---|---|
staff_id * | Numeric Smaregi id (string or number). | |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
smaregi_list_categories List categories
List product categories (departments): id, code, name, parent, level. Use the ids when creating or filtering products. GET /categories.
| Parameter | Type | Description |
|---|---|---|
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
smaregi_get_category Get category
One product category by id. GET /categories/{category_id}.
| Parameter | Type | Description |
|---|---|---|
category_id * | Numeric Smaregi id (string or number). | |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
smaregi_list_products List products
List products with id, category, code, name, price, cost and update time. Filter by category, code, group code, display flag or update time (a 31-day maximum range). GET /products.
| Parameter | Type | Description |
|---|---|---|
category_id | Only products of this category id. | |
display_flag | string | 1 = shown on the register, 0 = hidden. |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
group_code | string | Only products with this group code. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
product_code | string | Only the product with this exact product code. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
supplier_product_no | string | Only products with this supplier product number. |
updated_from | string | Only products changed at or after this date-time (ISO 8601 with timezone). |
updated_to | string | Only products changed at or before this date-time (the range may span 31 days at most). |
smaregi_get_product Get product
One product by id, optionally with store prices, bundled items, store assignments, reserved stock, attribute items and order settings. GET /products/{product_id}.
| Parameter | Type | Description |
|---|---|---|
product_id * | Numeric Smaregi id (string or number). | |
with_attribute_items | boolean | Add the attribute items. |
with_inventory_reservations | boolean | Add the inventory reservations. |
with_order_setting | boolean | Add the ordering settings. |
with_prices | boolean | Add the store/period-specific prices. |
with_reserve_items | boolean | Add the free-form reserve items. |
with_stores | boolean | Add the store assignments. |
smaregi_list_customers List customers
List customers (members): id, code, number, name, phone, e-mail, address. Smaregi cannot search by name, phone or e-mail: filter by customer code, member number, id range or update time, or page through. Contains shoppers' personal data. GET /customers.
| Parameter | Type | Description |
|---|---|---|
customer_code | string | Only the customer with this exact customer code. |
customer_id_from | Only customers with an id at or above this. | |
customer_id_to | Only customers with an id at or below this. | |
customer_no | string | Only the customer with this member number. |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
updated_from | string | Only customers changed at or after this date-time (ISO 8601 with timezone). |
updated_to | string | Only customers changed at or before this date-time (31 days at most). |
smaregi_get_customer Get customer
One customer by id, optionally with the contract's custom fields. Contains personal data. GET /customers/{customer_id}.
| Parameter | Type | Description |
|---|---|---|
customer_id * | Numeric Smaregi id (string or number). | |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
with_custom_fields | boolean | Add the custom field values. |
smaregi_list_stock List stock levels
List stock levels per store and product (stockAmount, reserved amount). Filter by store or product. Smaregi only lists a product once its quantity has changed at least once. An update-time filter needs both bounds (31 days at most). GET /stock.
| Parameter | Type | Description |
|---|---|---|
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
product_id | Only this product id. | |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
store_id | Only this store id. | |
updated_from | string | Only stock changed at or after this date-time (give updated_to as well). |
updated_to | string | Only stock changed at or before this date-time (give updated_from as well). |
smaregi_list_stock_changes List stock history
The stock change history of one product in one store: date, amount, division (sale, purchase, transfer, adjustment...). GET /stock/changes/{product_id}/{store_id}.
| Parameter | Type | Description |
|---|---|---|
product_id * | Numeric Smaregi id (string or number). | |
store_id * | Numeric Smaregi id (string or number). | |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
stock_division | string | Only changes of this stock division code. |
target_date | string | Only changes of this target date, as Smaregi formats it (yyyy-mm-dd). |
smaregi_list_transactions List transactions
List sales transactions (receipts) in a time window of at most 31 days: id, date-time, division (1 = normal sale, 2 = deposit, 3 = withdrawal...), store, terminal, customer, totals. Optionally with the line items (limit 100 then). Contains shoppers' personal data. GET /transactions.
| Parameter | Type | Description |
|---|---|---|
from * | string | Start of the window: transaction date-time (when Smaregi received it), ISO 8601 with timezone. |
to * | string | End of the window (at most 31 days after from). |
customer_code | string | Only this customer code. |
fields | string | Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies. |
limit | integer | Results per page, 1-500 (default 50). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
sort | string | Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc). |
store_id | Only this store id. | |
transaction_head_division | string | Transaction division: 1 normal sale, 2 deposit, 3 withdrawal, 4 advance payment, 5 advance refund, 6 points added, 7 points deducted, 8 points expired, 9 coupon ticket, 11 tip, 13 miles added, 14 mile… |
transaction_uuid | string | Only the transaction with this receipt number. |
with_details | string | Add the line items: none (default), summary or all. Any other value than none caps limit at 100. |
smaregi_get_transaction Get transaction
One transaction (receipt) by its transaction id (transactionHeadId), optionally with line items, discounts and payments. Contains personal data. GET /transactions/{transaction_id}.
| Parameter | Type | Description |
|---|---|---|
transaction_id * | The transactionHeadId. | |
with_details | boolean | Add the line items. |
with_discounts | boolean | Add the discounts. |
with_payments | boolean | Add the payments. |
smaregi_create_customer Create customer
WRITE: create a customer (member). customerCode, firstName and lastName are required; the contract's own required-column settings may demand more. Not idempotent: calling twice with a different code creates two customers. POST /customers.
| Parameter | Type | Description |
|---|---|---|
customerCode * | Customer code (unique per contract). | |
firstName * | First name. | |
lastName * | Last name. | |
address | Address. | |
birthDate | Birth date, yyyy-mm-dd. | |
companyName | Company name. | |
customerNo | Customer / member number. | |
departmentName | Department name. | |
entryDate | Enrollment (membership start) date, yyyy-mm-dd; some contracts require it when creating a customer. | |
faxNumber | Fax number. | |
firstKana | First name, kana. | |
lastKana | Last name, kana. | |
mailAddress | E-mail address. | |
mailReceiveFlag | Whether the customer accepts guidance mail: 0 = refuse, 1 = allow (default). | |
mobileNumber | Mobile number. | |
note | Note. | |
note2 | Second note. | |
phoneNumber | Phone number. | |
pointExpireDate | Point expiry date, yyyy-mm-dd; some contracts require it when creating a customer. | |
postCode | Postal code. | |
rank | Member rank. | |
sex | Sex: 0 = unknown, 1 = male, 2 = female. | |
status | Member status: 0 = active, 1 = suspended, 2 = card lost, 3 = withdrawn, 4 = merged. | |
storeId | Store id the customer belongs to. |
smaregi_update_customer Update customer
WRITE: change fields of one customer (only the fields you pass are changed). Overwrites the old values. PATCH /customers/{customer_id}.
| Parameter | Type | Description |
|---|---|---|
customer_id * | Numeric Smaregi id (string or number). | |
address | Address. | |
birthDate | Birth date, yyyy-mm-dd. | |
companyName | Company name. | |
customerCode | Customer code (unique per contract). | |
customerNo | Customer / member number. | |
departmentName | Department name. | |
entryDate | Enrollment (membership start) date, yyyy-mm-dd; some contracts require it when creating a customer. | |
faxNumber | Fax number. | |
firstKana | First name, kana. | |
firstName | First name. | |
lastKana | Last name, kana. | |
lastName | Last name. | |
mailAddress | E-mail address. | |
mailReceiveFlag | Whether the customer accepts guidance mail: 0 = refuse, 1 = allow (default). | |
mobileNumber | Mobile number. | |
note | Note. | |
note2 | Second note. | |
phoneNumber | Phone number. | |
pointExpireDate | Point expiry date, yyyy-mm-dd; some contracts require it when creating a customer. | |
postCode | Postal code. | |
rank | Member rank. | |
sex | Sex: 0 = unknown, 1 = male, 2 = female. | |
status | Member status: 0 = active, 1 = suspended, 2 = card lost, 3 = withdrawn, 4 = merged. | |
storeId | Store id the customer belongs to. |
smaregi_create_product Create product
WRITE: create a product. categoryId, productName and price are required. Not idempotent. POST /products.
| Parameter | Type | Description |
|---|---|---|
categoryId * | Category id (smaregi_list_categories). | |
price * | Selling price. | |
productName * | Product name. | |
catchCopy | Catch copy. | |
color | Color. | |
cost | Unit cost. | |
customerPrice | Member price. | |
description | Description. | |
displayFlag | Show on the register (0 = hidden, 1 = shown). | |
division | Product division: 0 = normal (default), 1 = prepaid multi-use ticket (only contracts with that feature), 2 = option product. | |
groupCode | Group code. | |
productCode | Product code (unique per contract). | |
productKana | Product name, kana. | |
productPriceDivision | Price division: 1 = standard price (default), 2 = open price. | |
salesDivision | Sales accounting: 0 = counted in sales (default), 1 = excluded from sales totals. Does not control whether the product can be sold; use displayFlag to hide it from the register. | |
size | Size. | |
stockControlDivision | Stock control: 0 = stock is managed (default), 1 = stock is not managed. | |
supplierProductNo | Supplier's product number. | |
tag | Tag. | |
taxDivision | Tax division code (0 = tax included, 1 = tax excluded, 2 = tax free). | |
url | Product URL. |
smaregi_update_product Update product
WRITE: change fields of one product (only the fields you pass are changed), for example its price or name. Overwrites the old values. PATCH /products/{product_id}.
| Parameter | Type | Description |
|---|---|---|
product_id * | Numeric Smaregi id (string or number). | |
catchCopy | Catch copy. | |
categoryId | Category (department) id, see smaregi_list_categories. | |
color | Color. | |
cost | Unit cost. | |
customerPrice | Member price. | |
description | Description. | |
displayFlag | Show on the register (0 = hidden, 1 = shown). | |
division | Product division: 0 = normal (default), 1 = prepaid multi-use ticket (only contracts with that feature), 2 = option product. | |
groupCode | Group code. | |
price | Selling price. | |
productCode | Product code (unique per contract). | |
productKana | Product name, kana. | |
productName | Product name. | |
productPriceDivision | Price division: 1 = standard price (default), 2 = open price. | |
salesDivision | Sales accounting: 0 = counted in sales (default), 1 = excluded from sales totals. Does not control whether the product can be sold; use displayFlag to hide it from the register. | |
size | Size. | |
stockControlDivision | Stock control: 0 = stock is managed (default), 1 = stock is not managed. | |
supplierProductNo | Supplier's product number. | |
tag | Tag. | |
taxDivision | Tax division code (0 = tax included, 1 = tax excluded, 2 = tax free). | |
url | Product URL. |
smaregi_set_stock Set stock level
WRITE: set the absolute stock quantity of one product in one store, replacing the current quantity. Use smaregi_adjust_stock for a relative change. PATCH /stock/{product_id}.
| Parameter | Type | Description |
|---|---|---|
product_id * | Numeric Smaregi id (string or number). | |
stock_amount * | integer | The new quantity. |
store_id * | Numeric Smaregi id (string or number). | |
memo | string | Note stored in the stock history. |
smaregi_adjust_stock Adjust stock level
WRITE: add (positive) or subtract (negative) a quantity to the stock of one product in one store. Not idempotent: a repeat applies the change again. POST /stock/{product_id}/add.
| Parameter | Type | Description |
|---|---|---|
product_id * | Numeric Smaregi id (string or number). | |
stock_amount * | integer | The change: +5 adds five, -3 removes three. |
store_id * | Numeric Smaregi id (string or number). | |
memo | string | Note stored in the stock history. |