expiry-add-item

POST /api/v1/expiry-add-item 1 credits/call expiry

Save a confirmed scanned item (product, expiry date, quantity).

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

curl -X POST https://rokom.ba/api/v1/expiry-add-item \
  -H "Authorization: Bearer mcpsk_<your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "product_name": "",
  "expiry_date": "",
  "quantity": 0,
  "batch_number": "",
  "barcode": "",
  "confidence_needs_review": false,
  "image_base64": "",
  "media_type": "image/jpeg",
  "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://rokom.ba/mcp",
      "transport": "http",
      "auth": {
        "type": "bearer",
        "token": "mcpsk_<your_api_key>"
      }
    }
  }
}

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

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

import requests

r = requests.post(
    "https://rokom.ba/api/v1/expiry-add-item",
    headers={"Authorization": "Bearer mcpsk_<your_api_key>"},
    json={
  "product_name": "",
  "expiry_date": "",
  "quantity": 0,
  "batch_number": "",
  "barcode": "",
  "confidence_needs_review": false,
  "image_base64": "",
  "media_type": "image/jpeg",
  "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://rokom.ba/api/v1/expiry-add-item", {
  method: "POST",
  headers: {
    "Authorization": "Bearer mcpsk_<your_api_key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "product_name": "",
  "expiry_date": "",
  "quantity": 0,
  "batch_number": "",
  "barcode": "",
  "confidence_needs_review": false,
  "image_base64": "",
  "media_type": "image/jpeg",
  "received_date": ""
}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());

Input

Field Type Required Default Description
product_name string required
maxLength=200 minLength=1
expiry_date string required YYYY-MM-DD
quantity integer required
maximum=100000 minimum=1
batch_number string optional
maxLength=100
barcode string optional
maxLength=32
confidence_needs_review boolean optional False
image_base64 string optional
maxLength=8000000
media_type string optional image/jpeg
pattern=^image/(jpeg|png)$
received_date string optional YYYY-MM-DD, prazno = danas

Output

Field Type Required Default Description
id string required
expiry_date string required
received_date string required
photo_url string optional

Try it

Fires a real POST /api/v1/expiry-add-item from your browser. Charges 1 credit 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.