{
  "title": "Agent Lab 2.0 experimental sandbox API",
  "sandbox": true,
  "productionEnabled": false,
  "notice": "Ephemeral synthetic checkout subset; not full protocol conformance or platform onboarding. No real payment, orders or fulfillment.",
  "base": "https://rinatsultan.com/commerce-sandbox",
  "discovery": "/discovery",
  "catalog": "/catalog",
  "authentication": {
    "method": "POST",
    "path": "/session",
    "body": {},
    "header": "Authorization: Bearer <token>",
    "ttlSeconds": 900
  },
  "idempotency": "Required for every checkout mutation; 8–96 ASCII letters, digits, underscore or hyphen. Scoped to demo token. Key reuse with different method/path/body returns 409.",
  "protocols": {
    "acp": {
      "version": "2026-04-17",
      "versionHeader": "API-Version",
      "operations": [
        {
          "method": "POST",
          "path": "/acp/checkout_sessions",
          "body": {
            "line_items": [
              {
                "id": "demo-pizza-set"
              }
            ],
            "currency": "rub",
            "capabilities": {}
          }
        },
        {
          "method": "GET",
          "path": "/acp/checkout_sessions/{id}"
        },
        {
          "method": "POST",
          "path": "/acp/checkout_sessions/{id}",
          "body": {
            "line_items": [
              {
                "id": "demo-pizza-set"
              }
            ]
          }
        },
        {
          "method": "POST",
          "path": "/acp/checkout_sessions/{id}/complete",
          "body": {
            "payment_data": {
              "handler_id": "sandbox",
              "instrument": {
                "type": "sandbox",
                "credential": {
                  "type": "sandbox",
                  "token": "sandbox-only"
                }
              }
            }
          }
        },
        {
          "method": "POST",
          "path": "/acp/checkout_sessions/{id}/cancel",
          "body": {}
        }
      ]
    },
    "ucp": {
      "version": "2026-08-25",
      "versionHeader": "UCP-Version (sandbox-specific; remote negotiation not implemented)",
      "operations": [
        {
          "method": "POST",
          "path": "/ucp/checkout-sessions",
          "body": {
            "line_items": [
              {
                "item": {
                  "id": "demo-pizza-set"
                },
                "quantity": 2
              }
            ]
          }
        },
        {
          "method": "GET",
          "path": "/ucp/checkout-sessions/{id}"
        },
        {
          "method": "PUT",
          "path": "/ucp/checkout-sessions/{id}",
          "body": {
            "line_items": [
              {
                "item": {
                  "id": "demo-pizza-set"
                },
                "quantity": 2
              }
            ]
          }
        },
        {
          "method": "POST",
          "path": "/ucp/checkout-sessions/{id}/complete",
          "body": {
            "payment": {
              "instruments": [
                {
                  "id": "sandbox",
                  "handler_id": "sandbox",
                  "type": "sandbox",
                  "credential": {
                    "type": "sandbox",
                    "token": "sandbox-only"
                  }
                }
              ]
            }
          }
        },
        {
          "method": "POST",
          "path": "/ucp/checkout-sessions/{id}/cancel",
          "body": {}
        }
      ]
    }
  },
  "limitations": [
    "Only catalogue IDs are accepted; price determined by server",
    "No customer fields, tax/shipping extensions, remote profile fetching, signatures, production transactions",
    "ACP pinned request schema represents unit items; repeat IDs to request quantity",
    "UCP discovery is under sandbox namespace, not a production /.well-known/ucp",
    "Session ownership protected by random bearer token; 15-minute lifetime; state lost on restart"
  ],
  "picnicExample": {
    "note": "Prepared synthetic picnic for 20 children and 40 parents, not live supplier search. Quantities below count sets. Budget is a local UI guard; the sandbox processes no actual payments.",
    "currency": "RUB",
    "budget": 25000,
    "total": 23700,
    "items": [
      {
        "id": "demo-pizza-set",
        "quantity": 1
      },
      {
        "id": "demo-sandwich-set",
        "quantity": 5
      },
      {
        "id": "demo-fruit",
        "quantity": 1
      },
      {
        "id": "demo-drinks",
        "quantity": 1
      },
      {
        "id": "demo-delivery",
        "quantity": 1
      },
      {
        "id": "demo-tableware",
        "quantity": 1
      }
    ]
  }
}
