Przewodnik
Guide for AI agents
This page is written for AI coding agents (Lovable, Cursor, Claude, ChatGPT, Copilot…) that build a storefront or integration on top of OpenShopy.
Machine-readable entry points
| URL | Contents |
|---|---|
https://your-openshopy-domain/llms.txt | Index of all documentation pages with one-line descriptions |
https://your-openshopy-domain/llms-full.txt | The complete documentation as a single Markdown file |
https://your-openshopy-domain/api/public/docs/<slug>.md | One page as raw Markdown |
https://your-openshopy-domain/api/public/docs/index.json | Page list as JSON |
Every documentation page also has Copy as Markdown and Copy for AI buttons.
Rules to follow
- Base URL is
https://your-openshopy-domain/api/public/v1. All requests and responses are JSON. - Authenticate with
Authorization: Bearer <key>. Use the secret key (os_sk_…) only on a server; use the publishable key (os_pk_…) in browser code. - Money is integer minor units.
12999withPLNmeans 129.99 zł. Never send floats. - Responses are
{ "data": … }with optionalmetafor pagination; errors are{ "error": { "code", "message", "details"? } }. - Pagination:
?page=(from 1) and?limit=(default 25, max 100); readmeta.totalandmeta.total_pages. - Respect rate limits: on
429, wait forRetry-Afterseconds. - Do not build payment-provider integrations. Payment is bank transfer: after checkout redirect the customer to
payment.page_urlfrom the order (or render the bank details fromGET /storeyourself and callPOST /payments/:token/mark-sentwhen the customer says they paid). - Do not calculate prices, taxes, shipping or discounts on the client. Use the cart endpoints; they return authoritative totals.
- Customer accounts use
/customer-auth/*endpoints and an opaque customer token sent asX-Customer-Token. - Images: pass
images: [{ url, alt }]when creating a product, or upload a file (multipart/form-data, fieldfile) or a URL toPOST /products/:id/images. Returned image URLs are public and cacheable. - Retries are not deduplicated. There is no idempotency key support; before retrying a failed
POST, check whether the resource was created.
Prompt you can paste into your agent
text
Build a storefront for my shop using the OpenShopy API.
Read the full documentation first: https://your-openshopy-domain/llms-full.txt
- Use the publishable key in the browser and the secret key only in server code.
- Money values are integers in minor units.
- Use carts + checkout endpoints, then redirect to the order's payment.page_url for bank transfer payment.
- Send analytics events (page_view, product_view, add_to_cart, checkout_started, purchase).
- Implement customer accounts (register, login, password reset, order history) with /customer-auth.Typical integration checklist
- Catalog pages:
GET /products,GET /products/:idOrSlug,GET /collections - Cart drawer:
POST /carts,POST /carts/:token/items,DELETE /carts/:token/items/:variantId,PATCH /carts/:token(to change quantities send the fullitemsarray) - Checkout:
PATCH /carts/:tokenwith email + address → pick fromquote.shipping_options→PATCHshipping_rate_id→POST /carts/:token/checkout - Order confirmation page that links to
payment.page_url - Customer account area: register, login, reset password, orders, addresses
- Order tracking page:
GET /orders/track?number=&email=,GET /customer-auth/me/orders/:idor the hosted payment page - Analytics events
- Back-office sync jobs (server only): products, stock, orders, shipments