expiry-edit-item

POST /api/v1/expiry-edit-item 0 credits/call expiry

Correct a data-entry mistake on an already-saved item — product name, expiry date, quantity, received date, or batch number. Distinct from expiry-update-quantity (daily recount ritual): this is for fixing a typo at any time, not the routine 'what's left today' check. Only fields actually provided are changed; the rest are left untouched.

Sign in + create an API key on the keys page to authenticate calls.

curl -X POST https://www.rokom.ba/api/v1/expiry-edit-item \
  -H "Authorization: Bearer mcpsk_<your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "item_id": "",
  "product_name": "",
  "expiry_date": "",
  "received_date": ""
}'

Add this server to Claude Desktop's claude_desktop_config.json. The endpoint becomes a callable tool inside Claude. See the MCP setup guide for the full walk-through.

{
  "mcpServers": {
    "this-api": {
      "url": "https://www.rokom.ba/mcp",
      "transport": "http",
      "auth": {
        "type": "bearer",
        "token": "mcpsk_<your_api_key>"
      }
    }
  }
}

Inside Claude this endpoint surfaces as the tool expiry-edit-item.

Standard requests — no custom SDK needed. pip install requests first.

import requests

r = requests.post(
    "https://www.rokom.ba/api/v1/expiry-edit-item",
    headers={"Authorization": "Bearer mcpsk_<your_api_key>"},
    json={
  "item_id": "",
  "product_name": "",
  "expiry_date": "",
  "received_date": ""
},
)
r.raise_for_status()
print(r.json())

Plain fetch. Works in Node 18+, Deno, Bun, and any modern browser.

const r = await fetch("https://www.rokom.ba/api/v1/expiry-edit-item", {
  method: "POST",
  headers: {
    "Authorization": "Bearer mcpsk_<your_api_key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "item_id": "",
  "product_name": "",
  "expiry_date": "",
  "received_date": ""
}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());

Input

Field Type Required Default Description
item_id string required
product_name string optional
maxLength=200
expiry_date string optional YYYY-MM-DD; prazno = ne mijenjaj
quantity integer | null optional
received_date string optional YYYY-MM-DD; prazno = ne mijenjaj
batch_number string | null optional

Output

Field Type Required Default Description
ok boolean required
id string required
product_name string required
expiry_date string required
received_date string required
quantity integer required
status string required

Try it

Fires a real POST /api/v1/expiry-edit-item from your browser. Charges 0 credits per call against your account.

Sign in to use Try it. You'll need an API key from the keys page to authenticate the call.