Search Documentation
Search for a documentation page...
API Reference
The YNS REST API provides programmatic access to your store's data. All endpoints are scoped to the authenticated store and served under /api/v1/.
Base URL
All API requests are made to your store's domain:
Authentication
Every request requires a Bearer token in the Authorization header. API keys are managed in your store's admin settings under Settings → API → API keys.
Each API key is scoped to a single store. All data returned is isolated to that store. Keys can also be scoped to specific capabilities — see API Key Scopes for the full list.
Request Format
- Content-Type:
application/jsonfor POST, PATCH, and PUT requests - Query parameters for filtering and pagination on GET requests
- Path parameters use UUID v7 identifiers or URL slugs (e.g.
/products/classic-tee)
Response Format
All responses return JSON. Successful list responses use this shape:
Single resource responses return the object directly:
Pagination
List endpoints support offset-based pagination:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10-50 | Max items to return (1-100) |
offset | number | 0 | Items to skip |
Some endpoints (inventory) use cursor-based pagination with a cursor parameter instead.
Error Responses
Errors return an appropriate HTTP status code with a JSON body:
| Status | Meaning |
|---|---|
400 | Validation error — invalid parameters or request body |
401 | Unauthorized — missing or invalid API key |
403 | Forbidden — API key is missing the required scope for this endpoint |
404 | Not found — resource doesn't exist |
409 | Conflict — slug or unique constraint violation |
500 | Server error |
OpenAPI Spec
The full OpenAPI 3.1 specification is available at:
This spec is auto-generated from the actual Zod schemas used in route handlers, so it's always in sync with the API.
Available Endpoints
| Resource | Endpoints |
|---|---|
| Store | Read the store profile, theme, enabled modules, languages, and currencies |
| Localization | Serve translated content and per-currency prices |
| Products | List, create, get, update, delete, batch, CSV import, variants, reviews, filters, reset catalog |
| Variants | Get, update, and delete product variants |
| Bundles | List, create, get, update, and delete product bundles |
| Collections | List, create, get, update, delete, and CSV membership import |
| Categories | List, create, get, update, and delete, with nesting |
| Brands | List, create, get, update, delete, and assign products |
| Inventory | List stock levels and adjust inventory |
| Search | Full-text product search |
| Reviews | Moderate reviews, plus list and create per product |
| Orders | List, get, update, shipments, labels, and refunds |
| Carts | Create, get, delete, line items, coupons, and checkout redirect |
| Customers | List, get, update, addresses, and customer orders |
| Coupons | List, create, get, update, and delete discount codes |
| Promotions | List, create, get, update, and delete automatic promotions |
| Subscription Plans | Recurring plans products can attach to |
| Loyalty | Settings, tiers, and campaigns |
| Shipping | List, create, get, update, and delete shipping methods |
| Addons | Connected services, carrier connections, and InstaView images |
| Tax Rates | List, create, get, update, and delete manual tax rates |
| Pickup Locations | Collection points offered at checkout |
| Events | List, create, get, update, attendees, check-in roster, and networking directory |
| Tickets | Buyer ticket lookup, attendee profiles, and door check-in |
| Posts | Blog post CRUD and per-post comments |
| Blog Categories | List, create, get, update, and delete blog categories |
| Post Comments | Moderate, approve, reject, and delete comments |
| Subscribers | List, create, import, and delete newsletter subscribers |
| Availability Notifications | Register a back-in-stock alert request |
| Newsletters | Draft, send, and retry newsletter campaigns |
| Contact Messages | Storefront messages: list, read, reply, and delete |
| Media | Upload files, ingest remote URLs, and manage the media library |
| Imports | Start and track catalog import jobs |
| Images | AI image generation and generation history |
| Brand Kit | Get, update, and delete the store's brand kit |
| Socials | Get and set social profile links |
| Analytics | Overview metrics and sales reporting |
| Settings | Store settings and checkout consents |
| Team | Members, invitations, and ownership transfer |
| Domain | Connect, verify, and remove a custom domain |
| Legal Pages | List, create, get, and update legal documents |
| Support Cases | Open, track, update, and reply to support cases |
| Feedback Sessions | Start, comment on, cancel, and finalize feedback sessions |
| Publish | Trigger a storefront publish and poll its status |