Smaregi MCP by usefulapi

Read Smaregi stores, products, customers, stock and transactions; manage customers, products, stock.

Sollte ich dies verwenden

Qualität und Sicherheit

A
Qualität der Beschreibung
93%
Vollständigkeit des Schemas
89%
Qualität der Benennung
80%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~8,836Tokens (Tool-Definitionen)
~4.1 KBTypische Antwortgröße
Erhebliche Auswirkung auf die Aufmerksamkeit (6.90% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

{
  "mcpServers": {
    "smaregi": {
      "url": "https://smaregi.usefulapi.io/mcp"
    }
  }
}

Remote-Endpunkte

https://smaregi.usefulapi.io/mcpstreamable-http

Was es kann

Tool-Inventar

Tools (20)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
🟢smaregi_list_stores(fields, sort, page, limit)

List the stores (shops) of the Smaregi contract: id, code, name, address, phone. Use the ids to filter stock and transactions. GET /stores.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_store(store_id, fields)

One store by id. GET /stores/{store_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    }
  },
  "required": [
    "store_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_staffs(fields, sort, page, limit)

List staff members: id, code, name, role, e-mail. Passwords are never returned. GET /staffs.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_staff(staff_id, fields)

One staff member by id. GET /staffs/{staff_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "staff_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    }
  },
  "required": [
    "staff_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_categories(fields, sort, page, limit)

List product categories (departments): id, code, name, parent, level. Use the ids when creating or filtering products. GET /categories.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_category(category_id, fields)

One product category by id. GET /categories/{category_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "category_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    }
  },
  "required": [
    "category_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_products(category_id, product_code, group_code, supplier_product_no, display_flag, ...)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "category_id": {
      "description": "Only products of this category id.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "product_code": {
      "description": "Only the product with this exact product code.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "group_code": {
      "description": "Only products with this group code.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "supplier_product_no": {
      "description": "Only products with this supplier product number.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "display_flag": {
      "description": "1 = shown on the register, 0 = hidden.",
      "type": "string",
      "enum": [
        "0",
        "1"
      ]
    },
    "updated_from": {
      "description": "Only products changed at or after this date-time (ISO 8601 with timezone).",
      "type": "string"
    },
    "updated_to": {
      "description": "Only products changed at or before this date-time (the range may span 31 days at most).",
      "type": "string"
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_product(product_id, with_prices, with_stores, with_reserve_items, with_inventory_reservations, ...)

One product by id, optionally with store prices, bundled items, store assignments, reserved stock, attribute items and order settings. GET /products/{product_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "with_prices": {
      "description": "Add the store/period-specific prices.",
      "type": "boolean"
    },
    "with_stores": {
      "description": "Add the store assignments.",
      "type": "boolean"
    },
    "with_reserve_items": {
      "description": "Add the free-form reserve items.",
      "type": "boolean"
    },
    "with_inventory_reservations": {
      "description": "Add the inventory reservations.",
      "type": "boolean"
    },
    "with_attribute_items": {
      "description": "Add the attribute items.",
      "type": "boolean"
    },
    "with_order_setting": {
      "description": "Add the ordering settings.",
      "type": "boolean"
    }
  },
  "required": [
    "product_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_customers(customer_code, customer_no, customer_id_from, customer_id_to, updated_from, ...)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "customer_code": {
      "description": "Only the customer with this exact customer code.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "customer_no": {
      "description": "Only the customer with this member number.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "customer_id_from": {
      "description": "Only customers with an id at or above this.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "customer_id_to": {
      "description": "Only customers with an id at or below this.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "updated_from": {
      "description": "Only customers changed at or after this date-time (ISO 8601 with timezone).",
      "type": "string"
    },
    "updated_to": {
      "description": "Only customers changed at or before this date-time (31 days at most).",
      "type": "string"
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_customer(customer_id, with_custom_fields, fields)

One customer by id, optionally with the contract's custom fields. Contains personal data. GET /customers/{customer_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "customer_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "with_custom_fields": {
      "description": "Add the custom field values.",
      "type": "boolean"
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    }
  },
  "required": [
    "customer_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_stock(store_id, product_id, updated_from, updated_to, fields, ...)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "store_id": {
      "description": "Only this store id.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "product_id": {
      "description": "Only this product id.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "updated_from": {
      "description": "Only stock changed at or after this date-time (give updated_to as well).",
      "type": "string"
    },
    "updated_to": {
      "description": "Only stock changed at or before this date-time (give updated_from as well).",
      "type": "string"
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_stock_changes(product_id, store_id, target_date, stock_division, fields, ...)

The stock change history of one product in one store: date, amount, division (sale, purchase, transfer, adjustment...). GET /stock/changes/{product_id}/{store_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "target_date": {
      "description": "Only changes of this target date, as Smaregi formats it (yyyy-mm-dd).",
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "stock_division": {
      "description": "Only changes of this stock division code.",
      "type": "string",
      "minLength": 1,
      "maxLength": 10
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "required": [
    "product_id",
    "store_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_list_transactions(from, to, store_id, customer_code, transaction_head_division, ...)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "Start of the window: transaction date-time (when Smaregi received it), ISO 8601 with timezone."
    },
    "to": {
      "type": "string",
      "description": "End of the window (at most 31 days after from)."
    },
    "store_id": {
      "description": "Only this store id.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ]
    },
    "customer_code": {
      "description": "Only this customer code.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "transaction_head_division": {
      "description": "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 miles deducted, 15 value card deposit, 16 receipt.",
      "type": "string",
      "enum": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "11",
        "13",
        "14",
        "15",
        "16"
      ]
    },
    "transaction_uuid": {
      "description": "Only the transaction with this receipt number.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "with_details": {
      "description": "Add the line items: none (default), summary or all. Any other value than none caps limit at 100.",
      "type": "string",
      "enum": [
        "none",
        "summary",
        "all"
      ]
    },
    "fields": {
      "description": "Comma-separated top-level field names to return (e.g. productId,productName); fewer fields = smaller replies.",
      "type": "string",
      "maxLength": 500,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(,[A-Za-z][A-Za-z0-9]*)*$"
    },
    "sort": {
      "description": "Sort order: comma-separated field names, ':desc' for descending (e.g. updDateTime:desc).",
      "type": "string",
      "maxLength": 200,
      "pattern": "^[A-Za-z][A-Za-z0-9]*(:desc)?(,[A-Za-z][A-Za-z0-9]*(:desc)?)*$"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-500 (default 50).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    }
  },
  "required": [
    "from",
    "to"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢smaregi_get_transaction(transaction_id, with_details, with_discounts, with_payments)

One transaction (receipt) by its transaction id (transactionHeadId), optionally with line items, discounts and payments. Contains personal data. GET /transactions/{transaction_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "transaction_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "The transactionHeadId."
    },
    "with_details": {
      "description": "Add the line items.",
      "type": "boolean"
    },
    "with_discounts": {
      "description": "Add the discounts.",
      "type": "boolean"
    },
    "with_payments": {
      "description": "Add the payments.",
      "type": "boolean"
    }
  },
  "required": [
    "transaction_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡smaregi_create_customer(customerCode, customerNo, rank, firstName, lastName, ...)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "customerCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "Customer code (unique per contract)."
    },
    "customerNo": {
      "description": "Customer / member number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "rank": {
      "description": "Member rank.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "firstName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "First name."
    },
    "lastName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "Last name."
    },
    "firstKana": {
      "description": "First name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "lastKana": {
      "description": "Last name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "postCode": {
      "description": "Postal code.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "address": {
      "description": "Address.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "phoneNumber": {
      "description": "Phone number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mobileNumber": {
      "description": "Mobile number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "faxNumber": {
      "description": "Fax number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mailAddress": {
      "description": "E-mail address.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "companyName": {
      "description": "Company name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "departmentName": {
      "description": "Department name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "sex": {
      "description": "Sex: 0 = unknown, 1 = male, 2 = female.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "birthDate": {
      "description": "Birth date, yyyy-mm-dd.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "entryDate": {
      "description": "Enrollment (membership start) date, yyyy-mm-dd; some contracts require it when creating a customer.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "pointExpireDate": {
      "description": "Point expiry date, yyyy-mm-dd; some contracts require it when creating a customer.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mailReceiveFlag": {
      "description": "Whether the customer accepts guidance mail: 0 = refuse, 1 = allow (default).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "note": {
      "description": "Note.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "note2": {
      "description": "Second note.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "storeId": {
      "description": "Store id the customer belongs to.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "status": {
      "description": "Member status: 0 = active, 1 = suspended, 2 = card lost, 3 = withdrawn, 4 = merged.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "customerCode",
    "firstName",
    "lastName"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴smaregi_update_customer(customer_id, customerCode, customerNo, rank, firstName, ...)

WRITE: change fields of one customer (only the fields you pass are changed). Overwrites the old values. PATCH /customers/{customer_id}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "customer_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "customerCode": {
      "description": "Customer code (unique per contract).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "customerNo": {
      "description": "Customer / member number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "rank": {
      "description": "Member rank.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "firstName": {
      "description": "First name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "lastName": {
      "description": "Last name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "firstKana": {
      "description": "First name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "lastKana": {
      "description": "Last name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "postCode": {
      "description": "Postal code.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "address": {
      "description": "Address.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "phoneNumber": {
      "description": "Phone number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mobileNumber": {
      "description": "Mobile number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "faxNumber": {
      "description": "Fax number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mailAddress": {
      "description": "E-mail address.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "companyName": {
      "description": "Company name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "departmentName": {
      "description": "Department name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "sex": {
      "description": "Sex: 0 = unknown, 1 = male, 2 = female.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "birthDate": {
      "description": "Birth date, yyyy-mm-dd.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "entryDate": {
      "description": "Enrollment (membership start) date, yyyy-mm-dd; some contracts require it when creating a customer.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "pointExpireDate": {
      "description": "Point expiry date, yyyy-mm-dd; some contracts require it when creating a customer.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "mailReceiveFlag": {
      "description": "Whether the customer accepts guidance mail: 0 = refuse, 1 = allow (default).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "note": {
      "description": "Note.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "note2": {
      "description": "Second note.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "storeId": {
      "description": "Store id the customer belongs to.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "status": {
      "description": "Member status: 0 = active, 1 = suspended, 2 = card lost, 3 = withdrawn, 4 = merged.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "customer_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡smaregi_create_product(categoryId, productCode, productName, productKana, taxDivision, ...)

WRITE: create a product. categoryId, productName and price are required. Not idempotent. POST /products.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "categoryId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "Category id (smaregi_list_categories)."
    },
    "productCode": {
      "description": "Product code (unique per contract).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "Product name."
    },
    "productKana": {
      "description": "Product name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "taxDivision": {
      "description": "Tax division code (0 = tax included, 1 = tax excluded, 2 = tax free).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productPriceDivision": {
      "description": "Price division: 1 = standard price (default), 2 = open price.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ],
      "description": "Selling price."
    },
    "customerPrice": {
      "description": "Member price.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "cost": {
      "description": "Unit cost.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "description": {
      "description": "Description.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "catchCopy": {
      "description": "Catch copy.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "size": {
      "description": "Size.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "color": {
      "description": "Color.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "tag": {
      "description": "Tag.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "groupCode": {
      "description": "Group code.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "url": {
      "description": "Product URL.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "displayFlag": {
      "description": "Show on the register (0 = hidden, 1 = shown).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "division": {
      "description": "Product division: 0 = normal (default), 1 = prepaid multi-use ticket (only contracts with that feature), 2 = option product.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "salesDivision": {
      "description": "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.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "stockControlDivision": {
      "description": "Stock control: 0 = stock is managed (default), 1 = stock is not managed.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "supplierProductNo": {
      "description": "Supplier's product number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "categoryId",
    "productName",
    "price"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴smaregi_update_product(product_id, categoryId, productCode, productName, productKana, ...)

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}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "categoryId": {
      "description": "Category (department) id, see smaregi_list_categories.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productCode": {
      "description": "Product code (unique per contract).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productName": {
      "description": "Product name.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productKana": {
      "description": "Product name, kana.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "taxDivision": {
      "description": "Tax division code (0 = tax included, 1 = tax excluded, 2 = tax free).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "productPriceDivision": {
      "description": "Price division: 1 = standard price (default), 2 = open price.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "price": {
      "description": "Selling price.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "customerPrice": {
      "description": "Member price.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "cost": {
      "description": "Unit cost.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "description": {
      "description": "Description.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "catchCopy": {
      "description": "Catch copy.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "size": {
      "description": "Size.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "color": {
      "description": "Color.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "tag": {
      "description": "Tag.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "groupCode": {
      "description": "Group code.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "url": {
      "description": "Product URL.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "displayFlag": {
      "description": "Show on the register (0 = hidden, 1 = shown).",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "division": {
      "description": "Product division: 0 = normal (default), 1 = prepaid multi-use ticket (only contracts with that feature), 2 = option product.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "salesDivision": {
      "description": "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.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "stockControlDivision": {
      "description": "Stock control: 0 = stock is managed (default), 1 = stock is not managed.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    },
    "supplierProductNo": {
      "description": "Supplier's product number.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "product_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴smaregi_set_stock(product_id, store_id, stock_amount, memo)

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}.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "stock_amount": {
      "type": "integer",
      "minimum": -1000000000,
      "maximum": 1000000000,
      "description": "The new quantity."
    },
    "memo": {
      "description": "Note stored in the stock history.",
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "product_id",
    "store_id",
    "stock_amount"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴smaregi_adjust_stock(product_id, store_id, stock_amount, memo)

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.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9]{1,18}$"
        },
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      ],
      "description": "Numeric Smaregi id (string or number)."
    },
    "stock_amount": {
      "type": "integer",
      "minimum": -1000000000,
      "maximum": 1000000000,
      "description": "The change: +5 adds five, -3 removes three."
    },
    "memo": {
      "description": "Note stored in the stock history.",
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "product_id",
    "store_id",
    "stock_amount"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet20 Tools