Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.
The Admin API (/api/v1/admin/*) exposes complete store management: catalog,
pricing, stock, orders, customers, content, marketing, reports, settings. It’s designed for
backends, integrations (ERP/PIM/billing), and automations — including
AI agents via MCP.
Authentication and permissions
Every call carries a Bearer token:
Authorization: Bearer <token>
The token can be:
a staff user’s token: obtained with POST /auth/login and renewed with the rotating
refresh (see Authentication). For staff accounts, reusing a superseded
refresh token closes the session: don’t share it across processes.
an API token: the recommended credential for integrations and long-running agents. It’s
used as a Bearer, with no login or refresh, has a chosen role and a mandatory expiry (from 1
to 365 days), and can be revoked instantly. An administrator generates it, if the feature is
enabled for the store (GET /admin/api-tokens/status; otherwise 403
tenant_keys.admin_api_disabled).
curl -X POST "$BASE/api/v1/admin/api-tokens" -H "Authorization: Bearer $STAFF" \ -H "Content-Type: application/json" \ -d '{"label":"ERP sync","role":"catalog_manager","expires_in_days":90}'# data.token is shown only once: keep it like a secret.# Revoke: POST /admin/api-tokens/{id}/revoke
Permissions are granular: catalog, sales, customers, marketing, content,
reviews, reports, tax, shipping, system, users. The role of the user or token
decides which ones it has (admin, manager, catalog_manager, sales_manager,
marketing_manager, content_editor, customer_service, accountant): the full matrix is
in GET /admin/roles. Without the area’s permission the response is 403
auth.permission_required. Every call is scoped to its own store (the tenant_id claim).
The Admin API is server-side. Never embed a staff token or an API token in a public
client.
Rules that matter to integrators
Since the October 10, 2026 release the API enforces the rules below. Complete fields, bodies,
and responses are in the API Reference.
Money: who can do what
On top of the area’s permission, some actions check the role:
Action
Who
Refusal
Refund: POST /admin/orders/{id}/refunds, status refunded on a collected order, status cancelled on a collected order that holds a gift voucher
admin, manager, sales_manager
403 order.refund_forbidden
Payment recorded by hand (“mark as paid”): PATCH /admin/orders/{id}/payment
the same plus accountant
403 order.payment_forbidden
A customer’s price group and writes to customer groups
customersandcatalog
403 auth.permission_required
Affiliate money: commission, payee and payment details (payment_method, paypal_email, bank_name, bank_account), reactivation; approving, paying, or rejecting a commission
customersandreports
403 auth.permission_required
Owner, staff users, and API tokens
Every store has one owner: an active administrator, recorded and stable, who doesn’t
change when another account is promoted. GET /auth/me and the user list mark them with
is_owner: true. Only Vellaro support can change the owner.
The owner is protected: password, role, deactivation, deletion, and 2FA reset on their
account answer 403 user.owner_protected. On the other administrators, the same actions can
only be done by the owner (403 user.owner_only). An action that would leave the store
without active administrators gives 409 user.last_admin.
An API token doesn’t manage users or credentials: creating, editing, or deleting staff
users, resetting their 2FA, generating or revoking API tokens and publishable keys answers
403 auth.api_token_forbidden. Reads stay allowed.
Orders, refunds, and returns
PATCH /admin/orders/{id} with "status": "refunded" on a paid or
partially_refunded order performs a real refund of the remaining amount through the
payment gateway: it moves money, like POST /admin/orders/{id}/refunds. If the gateway fails
the response is 502 order.refund_gateway_error and the order stays as it was. On an order
that was never collected the response is 409 order.refund_not_collected: the right status is
cancelled.
Status transitions are validated: one that isn’t allowed gives 409
order.invalid_transition.
comment is an internal note by default; with comment_public: true the customer also
sees it in their history.
A full refund or the cancellation of a paid order also gives back the part paid with a gift
voucher. Stock is restocked only once.
Returns start from an order line: GET /admin/returns/order-context/{order_id} lists
the lines with their returnable quantities, then POST /admin/returns. A variant outside the
order or a quantity beyond what’s returnable gives 422 return.item_not_in_order /
return.quantity_exceeds_order. Return reasons and statuses are a shared, read-only catalog
(403 return.lookup_global on writes).
Explicit refund, also partial (amount omitted = the whole remaining amount):
POST /admin/products saves all the product fields and creates inline variants in the
same transaction. The SKU is unique within the store: a duplicate (even between two inline
variants) gives 409 product.sku_taken and nothing is written. A duplicate slug gives 409
product.slug_taken; the slug of a deleted product is freed automatically.
Special prices and quantity discounts (/admin/products/{id}/specials, /discounts):
the price must be greater than zero, otherwise 422 product.price_rule_not_positive. A
special applies to everyone (customer_group_id: null) or to an active customer group,
within its date window; among several specials the lowest priority wins, then the lowest
price. A special can only lower the price, and cart and checkout apply it.
Sale on a variant: sale_price, sale_start, and sale_end go together (422
product.sale_window_invalid if the window is invalid); to remove it, send all three as
null.
Coupons and gift vouchers
Coupons are validated on create and update: 422 coupon.percentage_out_of_range,
coupon.negative_discount, coupon.dates_inverted; 409 coupon.code_taken. The list has a
status filter (active, scheduled, expired, exhausted, inactive).
DELETE /admin/coupons/{id}really deletes a coupon that was never used (the code
becomes free again) and deactivates one already used: read deleted and deactivated in the
response.
Gift vouchers (/admin/vouchers, marketing permission): code, amount, and balance.
The balance is spent at checkout (voucher_code), with amount_spent, redemption_count,
and the history in GET /admin/vouchers/{id}/history. Here too DELETE only deletes a
voucher that was never spent and deactivates it otherwise.
Subscriptions and recurring plans
A plan (POST /admin/recurrings, system permission) describes the renewal schedule:
Field
Meaning
frequency
unit: day, week, month, quarter, year
duration
interval: charge every this many units (1 = every unit)
cycle
total number of charges (0 = no end). Without a trial it includes the purchase, with a trial it counts the renewals
price
price of each renewal (greater than zero)
trial_status, trial_duration, trial_frequency
the trial only moves the first renewal; with trial_status: true you need trial_duration ≥ 1 (422 recurring.trial_duration_required)
At purchase the customer pays the product price; the first renewal at 9.90 comes after 14
days, then every month, for 12 renewals. trial_price is accepted but not applied.A subscription with every installment charged moves to completed, a terminal state (409
subscription.already_completed on cancel). A plan that has had subscriptions can’t be
deleted (409 recurring.has_subscriptions): deactivate it with {"is_active": false}. If
the store’s plan doesn’t include subscriptions, creation answers 403 plan.required.
Customers and affiliates
Anonymization (right to be forgotten), irreversible: personal data disappears, orders
stay for tax obligations. The body repeats the customer’s current email as a confirmation.
Deactivating a customer (PATCH /admin/customers/{id} with is_active: false) closes all
their sessions at once.
Affiliate commissions (/admin/affiliate-commissions): readable with customers;
approving, marking as paid, or rejecting also requires reports. The summary (/summary)
has one row per affiliate and currency: currencies are never added together.
Reports
An order counts as revenue if it’s collected (paid or partially_refunded, not
refunded); the amount is the net, total minus refunded.
The main figures are in the store’s base currency (the currency field); revenue in other
currencies is kept separately in other_currencies.
“Today”, days, and months follow the store’s time zone, returned in timezone.
Store settings
PUT /admin/settings (system permission) saves the keys of a group. A value outside the
rules blocks the whole save with 422 settings.invalid_value (data.key tells you which).
Group and key
Effect
orders.guest_checkout_allowed
"false" = registered customers only (guest checkout gives 401 checkout.login_required); when missing it’s "true". The old key orders.checkout_guest_enabled is no longer read
orders.min_order_total
minimum order on the subtotal (422 checkout.min_order_not_met below it)
Errors: switch on error_code. A 403 plan.required means the feature isn’t included
in the store’s plan: don’t retry.
Idempotency & bulk: for mass updates (prices, stock), process in batches and
handle 409/422 responses per row.
Audit: every admin mutation is recorded in the store’s audit log.
Soft-delete: deleting a product sets deleted_at (it doesn’t destroy the order
history); deactivating is a different thing (is_active).
Webhooks: to react to events without polling, use webhooks.
Versioning: the API lives under /api/v1 — backward-compatible changes; breaking
changes will go into a new version.
The full reference for the hundreds of admin endpoints is in the
API Reference (the Admin API group), generated from the live OpenAPI schema.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Vellaro","description":"Il motore e-commerce API-first. Costruisci il tuo storefront, la tua app mobile e le tue automazioni AI su Vellaro.","colors":{"primary":"#0b576a","light":"#f7b05f","dark":"#0b576a"},"logo":{"light":"https://mintcdn.com/vellaro/CDVwR-ZaR80yGHu7/logo/vellaro.svg?fit=max\u0026auto=format\u0026n=CDVwR-ZaR80yGHu7\u0026q=85\u0026s=a7c5ae3c45fc8d042cf947f11fc432e2","dark":"https://mintcdn.com/vellaro/CDVwR-ZaR80yGHu7/logo/vellaro.svg?fit=max\u0026auto=format\u0026n=CDVwR-ZaR80yGHu7\u0026q=85\u0026s=a7c5ae3c45fc8d042cf947f11fc432e2"},"favicon":"https://mintcdn.com/vellaro/CDVwR-ZaR80yGHu7/favicon.svg?fit=max\u0026auto=format\u0026n=CDVwR-ZaR80yGHu7\u0026q=85\u0026s=c36c02eac46650cc84584048f28dfd32","navbar":{"links":[{"href":"https://demo.vellaro.io","label":"Storefront demo"}],"primary":{"type":"button","label":"Ottieni una chiave","href":"https://vellaro.io"}},"footer":{"socials":{"website":"https://vellaro.io"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"it","default":true,"href":"introduction"},{"language":"en","href":"en/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vellaro","hasAudioNarration":false,"actualSubdomain":"vellaro","customDomains":["docs.vellaro.io"],"gitSource":{"type":"github","owner":"edhima","repo":"vallero.io","deployBranch":"feat/i18n-backend-admin-sweep","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aed71c2985c6afa94171d67","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"API Reference","count":581},{"language":"default","tag":"Admin API","count":475},{"language":"default","tag":"Storefront API","count":106},{"language":"default","tag":"Integrations \u0026 modules","count":88},{"language":"default","tag":"Content","count":65},{"language":"default","tag":"Orders","count":48},{"language":"default","tag":"Categories \u0026 catalog setup","count":44},{"language":"default","tag":"Products","count":36},{"language":"default","tag":"Imports","count":29},{"language":"default","tag":"Taxes \u0026 geo","count":28},{"language":"it","tag":"Documentazione","count":10},{"language":"en","tag":"Documentation","count":10},{"language":"it","tag":"Inizia","count":5},{"language":"en","tag":"Get started","count":5},{"language":"it","tag":"Guide","count":4},{"language":"en","tag":"Guides","count":4},{"language":"it","tag":"AI \u0026 MCP","count":1},{"language":"it","tag":"API Reference","count":1},{"language":"it","tag":"Model Context Protocol","count":1},{"language":"en","tag":"AI \u0026 MCP","count":1},{"language":"en","tag":"API Reference","count":1},{"language":"en","tag":"Model Context Protocol","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/guides/admin-api","slug":"/en/guides/admin-api","pageMetadata":{"title":"Manage your store via API","description":"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.","href":"/en/guides/admin-api"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Admin API`}),` (`,_jsx(_components.code,{children:`/api/v1/admin/*`}),`) exposes complete store management: catalog,\npricing, stock, orders, customers, content, marketing, reports, settings. It’s designed for\nbackends, integrations (ERP/PIM/billing), and automations — including\n`,_jsx(_components.a,{href:`/en/ai-mcp`,children:`AI agents via MCP`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-and-permissions`,children:`Authentication and permissions`}),`\n`,_jsx(_components.p,{children:`Every call carries a Bearer token:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer \u003ctoken>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The token can be:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`a staff user’s token`}),`: obtained with `,_jsx(_components.code,{children:`POST /auth/login`}),` and renewed with the rotating\nrefresh (see `,_jsx(_components.a,{href:`/en/authentication`,children:`Authentication`}),`). For staff accounts, reusing a superseded\nrefresh token closes the session: don’t share it across processes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`an API token`}),`: the recommended credential for integrations and long-running agents. It’s\nused as a Bearer, with no login or refresh, has a chosen role and a mandatory expiry (from 1\nto 365 days), and can be revoked instantly. An administrator generates it, if the feature is\nenabled for the store (`,_jsx(_components.code,{children:`GET /admin/api-tokens/status`}),`; otherwise 403\n`,_jsx(_components.code,{children:`tenant_keys.admin_api_disabled`}),`).`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/api-tokens\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"label\":\"ERP sync\",\"role\":\"catalog_manager\",\"expires_in_days\":90}'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# data.token is shown only once: keep it like a secret.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Revoke: POST /admin/api-tokens/{id}/revoke`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Permissions are granular: `,_jsx(_components.code,{children:`catalog`}),`, `,_jsx(_components.code,{children:`sales`}),`, `,_jsx(_components.code,{children:`customers`}),`, `,_jsx(_components.code,{children:`marketing`}),`, `,_jsx(_components.code,{children:`content`}),`,\n`,_jsx(_components.code,{children:`reviews`}),`, `,_jsx(_components.code,{children:`reports`}),`, `,_jsx(_components.code,{children:`tax`}),`, `,_jsx(_components.code,{children:`shipping`}),`, `,_jsx(_components.code,{children:`system`}),`, `,_jsx(_components.code,{children:`users`}),`. The role of the user or token\ndecides which ones it has (`,_jsx(_components.code,{children:`admin`}),`, `,_jsx(_components.code,{children:`manager`}),`, `,_jsx(_components.code,{children:`catalog_manager`}),`, `,_jsx(_components.code,{children:`sales_manager`}),`,\n`,_jsx(_components.code,{children:`marketing_manager`}),`, `,_jsx(_components.code,{children:`content_editor`}),`, `,_jsx(_components.code,{children:`customer_service`}),`, `,_jsx(_components.code,{children:`accountant`}),`): the full matrix is\nin `,_jsx(_components.code,{children:`GET /admin/roles`}),`. Without the area’s permission the response is 403\n`,_jsx(_components.code,{children:`auth.permission_required`}),`. Every call is scoped to `,_jsx(_components.strong,{children:`its own store`}),` (the `,_jsx(_components.code,{children:`tenant_id`}),` claim).`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The Admin API is `,_jsx(_components.strong,{children:`server-side`}),`. Never embed a staff token or an API token in a public\nclient.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`rules-that-matter-to-integrators`,children:`Rules that matter to integrators`}),`\n`,_jsxs(_components.p,{children:[`Since the October 10, 2026 release the API enforces the rules below. Complete fields, bodies,\nand responses are in the `,_jsx(_components.a,{href:`/en/api-reference`,children:`API Reference`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`money-who-can-do-what`,children:`Money: who can do what`}),`\n`,_jsx(_components.p,{children:`On top of the area’s permission, some actions check the role:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Action`}),_jsx(_components.th,{children:`Who`}),_jsx(_components.th,{children:`Refusal`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Refund: `,_jsx(_components.code,{children:`POST /admin/orders/{id}/refunds`}),`, status `,_jsx(_components.code,{children:`refunded`}),` on a collected order, status `,_jsx(_components.code,{children:`cancelled`}),` on a collected order that holds a gift voucher`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`admin`}),`, `,_jsx(_components.code,{children:`manager`}),`, `,_jsx(_components.code,{children:`sales_manager`})]}),_jsxs(_components.td,{children:[`403 `,_jsx(_components.code,{children:`order.refund_forbidden`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Payment recorded by hand (“mark as paid”): `,_jsx(_components.code,{children:`PATCH /admin/orders/{id}/payment`})]}),_jsxs(_components.td,{children:[`the same plus `,_jsx(_components.code,{children:`accountant`})]}),_jsxs(_components.td,{children:[`403 `,_jsx(_components.code,{children:`order.payment_forbidden`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A customer’s price group and writes to customer groups`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`customers`}),` `,_jsx(_components.strong,{children:`and`}),` `,_jsx(_components.code,{children:`catalog`})]}),_jsxs(_components.td,{children:[`403 `,_jsx(_components.code,{children:`auth.permission_required`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Affiliate money: commission, payee and payment details (`,_jsx(_components.code,{children:`payment_method`}),`, `,_jsx(_components.code,{children:`paypal_email`}),`, `,_jsx(_components.code,{children:`bank_name`}),`, `,_jsx(_components.code,{children:`bank_account`}),`), reactivation; approving, paying, or rejecting a commission`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`customers`}),` `,_jsx(_components.strong,{children:`and`}),` `,_jsx(_components.code,{children:`reports`})]}),_jsxs(_components.td,{children:[`403 `,_jsx(_components.code,{children:`auth.permission_required`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`owner-staff-users-and-api-tokens`,children:`Owner, staff users, and API tokens`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Every store has `,_jsx(_components.strong,{children:`one owner`}),`: an active administrator, recorded and stable, who doesn’t\nchange when another account is promoted. `,_jsx(_components.code,{children:`GET /auth/me`}),` and the user list mark them with\n`,_jsx(_components.code,{children:`is_owner: true`}),`. Only Vellaro support can change the owner.`]}),`\n`,_jsxs(_components.li,{children:[`The owner is protected: password, role, deactivation, deletion, and 2FA reset on their\naccount answer 403 `,_jsx(_components.code,{children:`user.owner_protected`}),`. On the other administrators, the same actions can\nonly be done by the owner (403 `,_jsx(_components.code,{children:`user.owner_only`}),`). An action that would leave the store\nwithout active administrators gives 409 `,_jsx(_components.code,{children:`user.last_admin`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`An `,_jsx(_components.strong,{children:`API token doesn’t manage users or credentials`}),`: creating, editing, or deleting staff\nusers, resetting their 2FA, generating or revoking API tokens and publishable keys answers\n403 `,_jsx(_components.code,{children:`auth.api_token_forbidden`}),`. Reads stay allowed.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`orders-refunds-and-returns`,children:`Orders, refunds, and returns`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PATCH /admin/orders/{id}`}),` with `,_jsx(_components.code,{children:`\"status\": \"refunded\"`}),` on a `,_jsx(_components.code,{children:`paid`}),` or\n`,_jsx(_components.code,{children:`partially_refunded`}),` order performs a `,_jsx(_components.strong,{children:`real refund`}),` of the remaining amount through the\npayment gateway: it moves money, like `,_jsx(_components.code,{children:`POST /admin/orders/{id}/refunds`}),`. If the gateway fails\nthe response is 502 `,_jsx(_components.code,{children:`order.refund_gateway_error`}),` and the order stays as it was. On an order\nthat was never collected the response is 409 `,_jsx(_components.code,{children:`order.refund_not_collected`}),`: the right status is\n`,_jsx(_components.code,{children:`cancelled`}),`.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Status transitions are validated: one that isn’t allowed gives 409\n`,_jsx(_components.code,{children:`order.invalid_transition`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`comment`}),` is an `,_jsx(_components.strong,{children:`internal note`}),` by default; with `,_jsx(_components.code,{children:`comment_public: true`}),` the customer also\nsees it in their history.`]}),`\n`,_jsx(_components.li,{children:`A full refund or the cancellation of a paid order also gives back the part paid with a gift\nvoucher. Stock is restocked only once.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Returns`}),` start from an order line: `,_jsx(_components.code,{children:`GET /admin/returns/order-context/{order_id}`}),` lists\nthe lines with their returnable quantities, then `,_jsx(_components.code,{children:`POST /admin/returns`}),`. A variant outside the\norder or a quantity beyond what’s returnable gives 422 `,_jsx(_components.code,{children:`return.item_not_in_order`}),` /\n`,_jsx(_components.code,{children:`return.quantity_exceeds_order`}),`. Return reasons and statuses are a shared, read-only catalog\n(403 `,_jsx(_components.code,{children:`return.lookup_global`}),` on writes).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Explicit refund, also partial (`,_jsx(_components.code,{children:`amount`}),` omitted = the whole remaining amount):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/orders/\u003cid>/refunds\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"amount\":\"20.00\",\"reason\":\"Damaged item\",\"restock\":true,\"notify_customer\":true}'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# → { \"data\": { \"transaction\": {...}, \"payment_status\": \"partially_refunded\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"amount_refunded\": \"20.00\", \"restocked\": false } }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`catalog-and-pricing`,children:`Catalog and pricing`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /admin/products`}),` saves `,_jsx(_components.strong,{children:`all`}),` the product fields and creates inline variants in the\nsame transaction. The SKU is unique within the store: a duplicate (even between two inline\nvariants) gives 409 `,_jsx(_components.code,{children:`product.sku_taken`}),` and nothing is written. A duplicate slug gives 409\n`,_jsx(_components.code,{children:`product.slug_taken`}),`; the slug of a deleted product is freed automatically.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/products\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Como 3-seater sofa\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"slug\": \"como-3-seater-sofa\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"category_id\": \"\u003ccategory uuid>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_active\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"variants\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"sku\": \"COMO-3P-GREY\", \"name\": \"Grey\", \"price\": \"1299.00\", \"stock\": 5 },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"sku\": \"COMO-3P-BLUE\", \"name\": \"Blue\", \"price\": \"1299.00\", \"stock\": 2 }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Special prices and quantity discounts`}),` (`,_jsx(_components.code,{children:`/admin/products/{id}/specials`}),`, `,_jsx(_components.code,{children:`/discounts`}),`):\nthe `,_jsx(_components.code,{children:`price`}),` must be greater than zero, otherwise 422 `,_jsx(_components.code,{children:`product.price_rule_not_positive`}),`. A\nspecial applies to everyone (`,_jsx(_components.code,{children:`customer_group_id: null`}),`) or to an active customer group,\nwithin its date window; among several specials the lowest `,_jsx(_components.code,{children:`priority`}),` wins, then the lowest\nprice. A special can only `,_jsx(_components.strong,{children:`lower`}),` the price, and cart and checkout apply it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Sale on a variant`}),`: `,_jsx(_components.code,{children:`sale_price`}),`, `,_jsx(_components.code,{children:`sale_start`}),`, and `,_jsx(_components.code,{children:`sale_end`}),` go together (422\n`,_jsx(_components.code,{children:`product.sale_window_invalid`}),` if the window is invalid); to remove it, send all three as\n`,_jsx(_components.code,{children:`null`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`coupons-and-gift-vouchers`,children:`Coupons and gift vouchers`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Coupons are validated on create and update: 422 `,_jsx(_components.code,{children:`coupon.percentage_out_of_range`}),`,\n`,_jsx(_components.code,{children:`coupon.negative_discount`}),`, `,_jsx(_components.code,{children:`coupon.dates_inverted`}),`; 409 `,_jsx(_components.code,{children:`coupon.code_taken`}),`. The list has a\n`,_jsx(_components.code,{children:`status`}),` filter (`,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`scheduled`}),`, `,_jsx(_components.code,{children:`expired`}),`, `,_jsx(_components.code,{children:`exhausted`}),`, `,_jsx(_components.code,{children:`inactive`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DELETE /admin/coupons/{id}`}),` `,_jsx(_components.strong,{children:`really`}),` deletes a coupon that was never used (the code\nbecomes free again) and deactivates one already used: read `,_jsx(_components.code,{children:`deleted`}),` and `,_jsx(_components.code,{children:`deactivated`}),` in the\nresponse.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Gift vouchers`}),` (`,_jsx(_components.code,{children:`/admin/vouchers`}),`, `,_jsx(_components.code,{children:`marketing`}),` permission): code, amount, and balance.\nThe balance is spent at checkout (`,_jsx(_components.code,{children:`voucher_code`}),`), with `,_jsx(_components.code,{children:`amount_spent`}),`, `,_jsx(_components.code,{children:`redemption_count`}),`,\nand the history in `,_jsx(_components.code,{children:`GET /admin/vouchers/{id}/history`}),`. Here too `,_jsx(_components.code,{children:`DELETE`}),` only deletes a\nvoucher that was never spent and deactivates it otherwise.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`subscriptions-and-recurring-plans`,children:`Subscriptions and recurring plans`}),`\n`,_jsxs(_components.p,{children:[`A plan (`,_jsx(_components.code,{children:`POST /admin/recurrings`}),`, `,_jsx(_components.code,{children:`system`}),` permission) describes the renewal schedule:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`frequency`})}),_jsxs(_components.td,{children:[`unit: `,_jsx(_components.code,{children:`day`}),`, `,_jsx(_components.code,{children:`week`}),`, `,_jsx(_components.code,{children:`month`}),`, `,_jsx(_components.code,{children:`quarter`}),`, `,_jsx(_components.code,{children:`year`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`duration`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`interval`}),`: charge every this many units (1 = every unit)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cycle`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`total number of charges`}),` (0 = no end). Without a trial it includes the purchase, with a trial it counts the renewals`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`price`})}),_jsxs(_components.td,{children:[`price of each `,_jsx(_components.strong,{children:`renewal`}),` (greater than zero)`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`trial_status`}),`, `,_jsx(_components.code,{children:`trial_duration`}),`, `,_jsx(_components.code,{children:`trial_frequency`})]}),_jsxs(_components.td,{children:[`the trial only moves the `,_jsx(_components.strong,{children:`first renewal`}),`; with `,_jsx(_components.code,{children:`trial_status: true`}),` you need `,_jsx(_components.code,{children:`trial_duration`}),` ≥ 1 (422 `,_jsx(_components.code,{children:`recurring.trial_duration_required`}),`)`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name_i18n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Monthly top-up\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"it\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ricarica mensile\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9.90\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"frequency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"month\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"cycle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"trial_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"trial_frequency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"day\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"trial_duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`14`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`At purchase the customer pays the product price; the first renewal at 9.90 comes after 14\ndays, then every month, for 12 renewals. `,_jsx(_components.code,{children:`trial_price`}),` is accepted but not applied.`]}),`\n`,_jsxs(_components.p,{children:[`A subscription with every installment charged moves to `,_jsx(_components.code,{children:`completed`}),`, a terminal state (409\n`,_jsx(_components.code,{children:`subscription.already_completed`}),` on `,_jsx(_components.code,{children:`cancel`}),`). A plan that has had subscriptions can’t be\ndeleted (409 `,_jsx(_components.code,{children:`recurring.has_subscriptions`}),`): deactivate it with `,_jsx(_components.code,{children:`{\"is_active\": false}`}),`. If\nthe store’s plan doesn’t include subscriptions, creation answers 403 `,_jsx(_components.code,{children:`plan.required`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`customers-and-affiliates`,children:`Customers and affiliates`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Anonymization`}),` (right to be forgotten), irreversible: personal data disappears, orders\nstay for tax obligations. The body repeats the customer’s current email as a confirmation.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/customers/\u003cid>/anonymize\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"confirm_email\":\"customer@example.com\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Wrong confirmation email: 422 `,_jsx(_components.code,{children:`customer.anonymize_confirmation`}),`; customer already\nanonymized: 409 `,_jsx(_components.code,{children:`customer.anonymized`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Deactivating a customer (`,_jsx(_components.code,{children:`PATCH /admin/customers/{id}`}),` with `,_jsx(_components.code,{children:`is_active: false`}),`) closes all\ntheir sessions at once.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Affiliate commissions`}),` (`,_jsx(_components.code,{children:`/admin/affiliate-commissions`}),`): readable with `,_jsx(_components.code,{children:`customers`}),`;\napproving, marking as paid, or rejecting also requires `,_jsx(_components.code,{children:`reports`}),`. The summary (`,_jsx(_components.code,{children:`/summary`}),`)\nhas one row per affiliate and currency: currencies are never added together.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`reports`,children:`Reports`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`An order counts as `,_jsx(_components.strong,{children:`revenue`}),` if it’s collected (`,_jsx(_components.code,{children:`paid`}),` or `,_jsx(_components.code,{children:`partially_refunded`}),`, not\n`,_jsx(_components.code,{children:`refunded`}),`); the amount is the `,_jsx(_components.strong,{children:`net`}),`, total minus refunded.`]}),`\n`,_jsxs(_components.li,{children:[`The main figures are in the store’s base currency (the `,_jsx(_components.code,{children:`currency`}),` field); revenue in other\ncurrencies is kept separately in `,_jsx(_components.code,{children:`other_currencies`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`“Today”, days, and months follow the `,_jsx(_components.strong,{children:`store’s time zone`}),`, returned in `,_jsx(_components.code,{children:`timezone`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`store-settings`,children:`Store settings`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PUT /admin/settings`}),` (`,_jsx(_components.code,{children:`system`}),` permission) saves the keys of a group. A value outside the\nrules blocks the whole save with 422 `,_jsx(_components.code,{children:`settings.invalid_value`}),` (`,_jsx(_components.code,{children:`data.key`}),` tells you which).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Group and key`}),_jsx(_components.th,{children:`Effect`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orders.guest_checkout_allowed`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"false\"`}),` = registered customers only (guest checkout gives 401 `,_jsx(_components.code,{children:`checkout.login_required`}),`); when missing it’s `,_jsx(_components.code,{children:`\"true\"`}),`. The old key `,_jsx(_components.code,{children:`orders.checkout_guest_enabled`}),` is no longer read`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orders.min_order_total`})}),_jsxs(_components.td,{children:[`minimum order on the subtotal (422 `,_jsx(_components.code,{children:`checkout.min_order_not_met`}),` below it)`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`payment.stripe_enabled`}),`, `,_jsx(_components.code,{children:`payment.paypal_enabled`}),`, `,_jsx(_components.code,{children:`payment.pokpay_enabled`}),`, `,_jsx(_components.code,{children:`payment.paysera_enabled`}),`, `,_jsx(_components.code,{children:`payment.bank_enabled`}),`, `,_jsx(_components.code,{children:`payment.cod_enabled`})]}),_jsxs(_components.td,{children:[`the checkout accepts only the methods switched on (422 `,_jsx(_components.code,{children:`checkout.payment_method_disabled`}),`); none on = Stripe only`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/settings\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"group\": \"orders\", \"store_id\": null,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"settings\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"key\": \"guest_checkout_allowed\", \"value\": \"false\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"key\": \"min_order_total\", \"value\": \"20.00\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# list products (includes inactive ones, for management)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/products?page=1\u0026page_size=24\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# orders + status change (with validated transitions)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/orders?status=pending\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/admin/orders/\u003cid>\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$STAFF`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"status\":\"processing\" }'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Errors`}),`: switch on `,_jsx(_components.code,{children:`error_code`}),`. A 403 `,_jsx(_components.code,{children:`plan.required`}),` means the feature isn’t included\nin the store’s plan: don’t retry.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Idempotency \u0026 bulk`}),`: for mass updates (prices, stock), process in batches and\nhandle 409/422 responses per row.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Audit`}),`: every admin mutation is recorded in the store’s audit log.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Soft-delete`}),`: deleting a product sets `,_jsx(_components.code,{children:`deleted_at`}),` (it doesn’t destroy the order\nhistory); deactivating is a different thing (`,_jsx(_components.code,{children:`is_active`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Webhooks`}),`: to react to events without polling, use `,_jsx(_components.a,{href:`/en/webhooks`,children:`webhooks`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Versioning`}),`: the API lives under `,_jsx(_components.code,{children:`/api/v1`}),` — backward-compatible changes; breaking\nchanges will go into a new version.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The full reference for the hundreds of admin endpoints is in the\n`,_jsx(_components.a,{href:`/en/api-reference`,children:`API Reference`}),` (the `,_jsx(_components.strong,{children:`Admin API`}),` group), generated from the live OpenAPI schema.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Manage your store via API","description":"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.","href":"/en/guides/admin-api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication and permissions","slug":"authentication-and-permissions","depth":2,"children":[]},{"title":"Rules that matter to integrators","slug":"rules-that-matter-to-integrators","depth":2,"children":[{"title":"Money: who can do what","slug":"money-who-can-do-what","depth":3,"children":[]},{"title":"Owner, staff users, and API tokens","slug":"owner-staff-users-and-api-tokens","depth":3,"children":[]},{"title":"Orders, refunds, and returns","slug":"orders-refunds-and-returns","depth":3,"children":[]},{"title":"Catalog and pricing","slug":"catalog-and-pricing","depth":3,"children":[]},{"title":"Coupons and gift vouchers","slug":"coupons-and-gift-vouchers","depth":3,"children":[]},{"title":"Subscriptions and recurring plans","slug":"subscriptions-and-recurring-plans","depth":3,"children":[]},{"title":"Customers and affiliates","slug":"customers-and-affiliates","depth":3,"children":[]},{"title":"Reports","slug":"reports","depth":3,"children":[]},{"title":"Store settings","slug":"store-settings","depth":3,"children":[]}]},{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Best practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"vellaro","siteName":"Vellaro","title":"Manage your store via API - Vellaro","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"it":{"href":"/guides/admin-api","matchLevel":1},"en":{"href":"/en/guides/admin-api","matchLevel":0}}},"lastModified":"2026-11-05T16:25:43.660Z","originalFileLocation":"en/guides/admin-api.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vellaro\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Manage your store via API - Vellaro\">\u003cmeta data-mint-head property=\"og:description\" content=\"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vellaro\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vellaro.io/en/guides/admin-api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vellaro.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Manage+your+store+via+API\u0026amp;description=Catalog%2C+orders%2C+customers%2C+and+configuration+with+the+Admin+API%2C+and+the+rules+that+matter+to+integrators.\u0026amp;theme=b820f5b71ce5aa6d495245fd\u0026amp;signature=09e4efd32d06f68dc17f3486c23a3c82330a95f522686062f0eec46419f6a601\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Manage your store via API - Vellaro\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vellaro.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Manage+your+store+via+API\u0026amp;description=Catalog%2C+orders%2C+customers%2C+and+configuration+with+the+Admin+API%2C+and+the+rules+that+matter+to+integrators.\u0026amp;theme=b820f5b71ce5aa6d495245fd\u0026amp;signature=09e4efd32d06f68dc17f3486c23a3c82330a95f522686062f0eec46419f6a601\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/vellaro/O-EcI1enAyFiSZlI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vellaro\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0b576a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vellaro.io/en/guides/admin-api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/guides/admin-api.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.vellaro.io/en/guides/admin-api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.vellaro.io/guides/admin-api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.vellaro.io/guides/admin-api\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vellaro.io/#organization\",\"name\":\"Vellaro\",\"url\":\"https://docs.vellaro.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vellaro/CDVwR-ZaR80yGHu7/logo/vellaro.svg?fit=max\u0026auto=format\u0026n=CDVwR-ZaR80yGHu7\u0026q=85\u0026s=a7c5ae3c45fc8d042cf947f11fc432e2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vellaro.io#website\",\"name\":\"Vellaro\",\"url\":\"https://docs.vellaro.io\",\"publisher\":{\"@id\":\"https://docs.vellaro.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vellaro.io/en/guides/admin-api#webpage\",\"url\":\"https://docs.vellaro.io/en/guides/admin-api\",\"name\":\"Manage your store via API\",\"description\":\"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\",\"dateModified\":\"2026-11-05T16:25:43.660Z\",\"isPartOf\":{\"@id\":\"https://docs.vellaro.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vellaro.io/en/guides/admin-api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vellaro.io/en/guides/admin-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.vellaro.io/en/guides/build-storefront\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage your store via API\",\"item\":\"https://docs.vellaro.io/en/guides/admin-api\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.vellaro.io/en/guides/admin-api#article\",\"headline\":\"Manage your store via API\",\"name\":\"Manage your store via API\",\"description\":\"Catalog, orders, customers, and configuration with the Admin API, and the rules that matter to integrators.\",\"url\":\"https://docs.vellaro.io/en/guides/admin-api\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vellaro.io/en/guides/admin-api#webpage\"},\"dateModified\":\"2026-11-05T16:25:43.660Z\",\"publisher\":{\"@id\":\"https://docs.vellaro.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vellaro.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vellaro\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Vellaro\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/guides/admin-api.md","siteName":"Vellaro","nav":{"global":null,"languages":[{"language":"it","default":true,"pages":[{"title":"it","href":"/guides/admin-api"}]},{"language":"en","tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"Vellaro API","href":"/en/introduction"},{"title":"Quickstart","href":"/en/quickstart"},{"title":"Authentication","href":"/en/authentication"},{"title":"Core concepts","href":"/en/concepts"},{"title":"What's new","href":"/en/changelog"}]},{"group":"Guides","pages":[{"title":"Build a storefront","href":"/en/guides/build-storefront"},{"title":"Build a mobile app","description":"iOS, Android, or Flutter on the same Storefront API.","href":"/en/guides/build-mobile"},{"title":"Manage your store via API","href":"/en/guides/admin-api"},{"title":"Webhooks","description":"Receive store events in real time on your endpoint, signed and retried.","href":"/en/webhooks"}]},{"group":"AI \u0026 MCP","pages":[{"title":"AI \u0026 MCP","href":"/en/ai-mcp"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/en/api-reference/mcp"}]}]}]},"basePath":"","title":"Manage your store via API - Vellaro","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}