API · Agents

TuTiendita API & Agents

Use this document as an integration brief for AI agents exploring catalogs, creating orders and syncing fulfillment states with TuTiendita Online.

1. Discovery & context

  • Each store exposes `https://{subdomain}.tutiendita.online/api/catalog` with metadata about languages, currency, service areas and active methods (pickup/delivery).
  • Catalog responses include structured products (SKU, bilingual name, description, price, inventory, dietary tags) plus merchant-defined substitution rules.

2. Authentication & permissions

  • Order creation uses OAuth 2.1 client credentials issued per store. Request credentials from the merchant or Chimera Labs. Scopes restrict what the agent can do.
  • Send the Bearer token in `Authorization` and include an `agent_id` in every request so the merchant can trace automations.

3. Order creation

  • POST `/api/orders` with SKUs + quantities, fulfillment mode (pickup/delivery), customer contact data and preferred payment method.
  • Backend validates stock and substitution logic. If human confirmation is required, the agent will receive `pending_confirmation` and a webhook once the shop approves.

4. Webhooks & tracking

  • Subscribe to `order.accepted`, `order.ready`, `order.completed` and `order.cancelled` webhooks.
  • Events are signed with HMAC-SHA256 using the secret provided inside the merchant panel. Reject payloads whose signature does not match.

5. Best practices

  • Respect each store’s service windows and rate limits (max 60 requests/minute/store).
  • Always communicate pickup instructions, required documents and substitution rules to the end user.
  • Contact agents@tutiendita.online if you need additional capabilities or long-running sessions.