
MR.Coffee
AI Coffee 40 Bath
29
AI Orders
0
AI Agents
4
Menu Items
Menu
เครื่องดื่ม
฿45
เครื่องดื่ม
฿45
Drinks
฿40
เครื่องดื่ม
฿45
กำลังโหลดหน้า Pugmod...

AI Coffee 40 Bath
29
AI Orders
0
AI Agents
4
Menu Items
เครื่องดื่ม
฿45
เครื่องดื่ม
฿45
Drinks
฿40
เครื่องดื่ม
฿45
Read the platform discovery document
GET https://pugmod.com/.well-known/pugmod.jsonDiscover this store (no auth)
GET https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/capabilities · /menu · /order-schemaRegister once and persist the keyMerchant approval
POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/agents/registerWait for approval (APPROVED / EXPIRED / REVOKED)
GET https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/agents/meOrder: pickup/booking directly, delivery via buyer approval
POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders · POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/prepareTrack by signed webhook or polling
GET https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/<id> · webhook order.updatedPayment intent (PromptPay / cash on delivery)
POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/<id>/paymentMachine-readable source of truth: https://pugmod.com/.well-known/pugmod.json (endpoints, signature profile, webhook keys). The examples below follow it.
กฎสำหรับ AI Agent (Agent rules)
Optional fields: signing_jwk (public JWK; sign this request with it) and webhook_url (must echo the signed webhook.verification challenge).
curl -X POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/agents/register \
-H "Content-Type: application/json" \
-d '{ "agent_name": "MyAssistantAI", "scopes": ["order:create", "order:read"] }'
# 201 → { "agent_id": "...", "api_key": "pgm_...", "approval_status": "PENDING", ... }
# Save api_key now. It is shown only once.curl https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/agents/me -H "Authorization: Bearer pgm_YOUR_SAVED_KEY"
# approval_status: PENDING | APPROVED | EXPIRED | REVOKED
# { "approval_status": "APPROVED", "can_transact": true, "key_expires_at": "...",
# "signing": { "bound": false }, "webhook_url": null }curl https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/capabilities curl https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/menu curl "https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/order-schema?intent=order"
curl -X POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders -H "Authorization: Bearer pgm_YOUR_SAVED_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{ "intent": "order", "items": [{ "id": "312f771d-bff1-4691-b492-38e5519b047a", "quantity": 1 }], "notes": "No chili" }'
# → { "order_id": "...", "status": "pending_confirmation", "total": ..., "tracking_url": "..." }No order is created here. Send continue_url to the buyer; the order exists only after the logged-in buyer confirms (cash on delivery needs an OTP-verified phone).
curl -X POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/prepare -H "Authorization: Bearer pgm_YOUR_SAVED_KEY" \
-H "Content-Type: application/json" \
-d '{ "items": [{ "id": "312f771d-bff1-4691-b492-38e5519b047a", "quantity": 1 }], "delivery_address": "123 Example Rd, Lopburi" }'
# 200 → { "status": "requires_escalation", "continue_url": "https://pugmod.com/aicp/approve#token=...",
# "subtotal": ..., "delivery_fee": ..., "total": ..., "expires_at": ... }Webhooks are signed (ES256, keys in the discovery document). data.status is the status at the event; ignore events whose order_version is older than one you applied.
curl https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/<ORDER_ID> -H "Authorization: Bearer pgm_YOUR_SAVED_KEY"
curl https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/track/<ORDER_ID> -H "Authorization: Bearer pgm_YOUR_SAVED_KEY"
# Webhook body:
# { "type": "order.updated", "api_version": "2026-10-21",
# "data": { "order_id": "...", "status": "preparing", "previous_status": "pending_confirmation",
# "current_status": "ready", "order_version": 3, "occurred_at": "..." } }curl -X POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/<ORDER_ID>/payment -H "Authorization: Bearer pgm_YOUR_SAVED_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{ "provider": "promptpay" }'curl -X POST https://pugmod.com/api/v1/commerce/store/6367b260-da9f-4e8d-8f3b-e201c59c7a23/orders/<ORDER_ID>/cancel -H "Authorization: Bearer pgm_YOUR_SAVED_KEY"
Powered by Pugmod AI Commerce Engine