# Shopkit REST API

Shopkit REST API

The Shopkit API is a RESTful API that allows you to interact with your
Shopkit store programmatically.

Use it to manage products, process orders, handle customer data, configure
shipping, manage coupons, set up webhooks, upload media files, and access
store statistics.

## Authentication

Authentication is required for all requests using an API key.
Create your API key in the store administration area under
Account settings > Developers > API.

Do not share your API keys with other users or store them in insecure places.

Three authentication methods are available:
1. **HTTP Header**: `X-API-KEY: YOUR_API_KEY`
2. **URL Parameter**: `?X-API-KEY=YOUR_API_KEY`
3. **OAuth 2.0 Bearer token**: `Authorization: Bearer ACCESS_TOKEN`

### OAuth 2.0

Apps that serve many stores use OAuth 2.0 (authorization code with PKCE `S256`)
instead of asking each store for its API key. Each store grants `{module}:read`
(GET) or `{module}:write` (GET, POST, PUT, DELETE) scopes, limited to what the
approving user can do, and can reduce or revoke the access at any time. Access tokens
last 1 hour and refresh tokens 90 days. A request outside the granted scopes returns
**403** with `"error": "insufficient_scope"`; an expired or revoked token returns **401**.
Server metadata (RFC 8414): `https://shopk.it/.well-known/oauth-authorization-server`.

Full guide (app registration, authorization, tokens, scopes, limits):
[OAuth 2.0 documentation](https://shopk.it/developers/oauth). AI assistants connect
through the [Shopkit MCP server](https://shopk.it/developers/mcp).

## User-Agent Requirement

All requests must include a valid `User-Agent` header.
Requests without a User-Agent will be rejected.

## Format

The API only supports JSON. All timestamps follow the ISO 8601 standard:
`YYYY-MM-DDTHH:MM:SS+HH:MM`

### HTTP Methods

| Method | Description |
|--------|-------------|
| GET    | Retrieve resources |
| POST   | Create resources |
| PUT    | Update resources or perform custom actions |
| DELETE | Remove resources |

### Content-Type

If you are sending data to the API (POST/PUT), you need to set the
`Content-Type` header to `application/json`.

## Rate Limiting

You can make up to 3600 requests per hour.

## Pagination

Requests that return multiple items are paginated to 25 items by default.
You can specify further pages with the `page` parameter. For some resources,
you can set a custom page size up to 50 with the `limit` parameter.

Note that omitting the `page` parameter will return the first page.
Note that for technical reasons not all endpoints respect the `limit` parameter.

All paginated responses include an `X-Total-Count` header with the total
number of items. The response also includes `previous` and `next` URL
references for navigating between pages.

## Errors

The API returns standard HTTP error codes for client errors:
**400** (Bad Request), **401** (Unauthorized), **404** (Not Found),
**409** (Conflict), and **413** (Payload Too Large).

Error responses return a JSON object with a `message` field describing
the issue.

- Server: https://api.shopk.it/v1 (API server)

## Operations

### GET /store (Get Store)

Retrieve store details, settings, and configuration. settings.order_auto_archive_days (integer from 1 to 365, 90 by default) is the number of days after creation when the store's orders are archived automatically; settings.order_auto_archive_delivered (boolean) tells whether paid and delivered orders are archived automatically. Both are read only.

Responses:
- 200: Store information retrieved successfully (Store)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /store/account (Get Store Account)

Retrieve the store's Shopkit account: plan with its features and limits, subscription (status, end of the period, days left), use of the store against the plan limits (products, storage, locations, users), billing data and the saved card (brand and last 4 digits). Read-only. With an API key it is the store owner's; OAuth apps need the Shopkit account area and the authorizing user must be the store owner. Not available to other users.

Responses:
- 200: Account retrieved successfully (StoreAccount)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 503: The account data is temporarily unavailable (Error)

### GET /store/account/payments (List Store Account Payments)

Retrieve the payments and payment requests of the store to Shopkit, most recent first, as in the Shopkit back office: plans, apps, templates, domains, services, current account top-ups and credits, paid, unpaid or refunded. What is paid with the current account is a movement of it (see store/account/balance), except top-ups and credits. Each payment has its fiscal documents with a link that opens it after signing in to the store admin as the owner; the invoice number is in store/account/invoices. Same access as store/account.

Parameters:
- `type` (query, string ("plan", "app", "template", "domain", "service", "account_balance", "credit", "other")): Filter by type: plan, app, template, domain, service, account_balance (current account top-up), credit, other
- `status` (query, string ("paid", "unpaid", "refunded")): Filter by status: paid, unpaid, refunded
- `from` (query, string): Payments from this date, format yyyy-mm-dd (the payment date, or the request date while unpaid)
- `to` (query, string): Payments until this date, format yyyy-mm-dd
- `q` (query, string): Search in the description and the Multibanco reference, or an amount (max 100 characters)
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Payments retrieved successfully (StoreAccountPayments)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 503: The account data is temporarily unavailable (Error)

### GET /store/account/invoices (List Store Account Invoices)

Retrieve the fiscal documents that Shopkit issued to the store (invoices, receipts, credit notes, debit notes), most recent first, or search them by the public number, whole or a part of it (FT 2026/8277, 2026/8277, 8277), or by the total with VAT (615,00). Only the store's own InvoiceXpress customer is read: a document of another store is never returned. Each document has its number, date, status, amounts, the payment it belongs to and the links of its PDF, receipt and credit note, which open it after signing in to the store admin as the owner. Pages of up to 30, with the total in X-Total-Count. Same access as store/account.

Parameters:
- `q` (query, string): Search by the public number (whole or a part of it) or by the total with VAT (max 50 characters)
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 30, max: 30)

Responses:
- 200: Invoices retrieved successfully (StoreAccountInvoices)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 503: The account data is temporarily unavailable (Error)

### GET /store/account/balance (Get Store Account Balance)

Retrieve the store's current account with Shopkit: the balance (negative when there is debt), the amount reserved by shipments created and not yet charged, the automatic top-up (on, minimum balance and amount to top up) and the movements: first the reserved charges (shipments created and not yet debited, state reserved), then, most recent first, the top-ups, credits and debits (state completed or debited). A charge is reserved or debited, never both. A shipping or pickup charge has its concrete origin (order, tracking code, pickup code) and a debit the credits that came back for it. Same access as store/account.

Parameters:
- `page` (query, integer): Page number of the movements (default: 1)
- `limit` (query, integer): Movements per page (default: 25, max: 50)

Responses:
- 200: Balance retrieved successfully (StoreAccountBalance)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 503: The account data is temporarily unavailable (Error)

### GET /store/account/activity (List Store Account Activity)

Retrieve the activity log, the latest 50 events, most recent first. The store owner (and the API key) reads the activity of the whole store, or of one user with user; any other user reads only their own, with user set to their id, and gets 403 for the store's, the owner's or a colleague's. An app connected by a user (OAuth or MCP, with the Shopkit account area granted) acts as that user, so a collaborator's app reads their own activity; the rest of store/account is the owner's.

Parameters:
- `user` (query, integer): Only the activity of this user of the store

Responses:
- 200: Activity retrieved successfully (StoreAccountActivity)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 503: The account data is temporarily unavailable (Error)

### GET /product (List Products)

Retrieve a list of products or a single product by id or handle.

Parameters:
- `id` (query, integer): Product identifier, whatever its status; if provided, all other params are ignored
- `ids` (query, string): Comma-separated product identifiers (max 50, more answer 400)
- `handle` (query, string): Product URL slug; if provided, all filter params are ignored
- `category` (query, integer): Filter by category identifier
- `status` (query, string): Filter by status: 1 (active), 2 (hidden), 3 (out of stock), 4 (coming soon); comma-separated for multiple
- `status_alias` (query, string): Filter by status alias: all, active, hidden, out_of_stock, soon; comma-separated for multiple
- `reference` (query, string): Filter by product SKU/reference
- `featured` (query, string ("true", "false")): Filter featured products with query values true or false
- `new` (query, string ("true", "false")): Filter new products with query values true or false
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)
- `q` (query, string): Search query string to filter products by title, description, or reference

Responses:
- 200: Products retrieved successfully (list of Product, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product (Create Product)

Create a new product. Requires a title, price (unless price_on_request), and at least one category.
Prices are written before tax unless prices_include_tax is true: when the store shows prices with tax, GET returns price and price_promo with the product's tax included, so send a price read there with prices_include_tax true, or divide it by 1 + tax/100 (93.48 read with 23% tax is 76). A wholesale_exclusive product returns its wholesale price as price: do not send that one as price.

Body: ProductInput

Responses:
- 201: Product created successfully (Product)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /product/{id} (Get Product)

Retrieve a single product by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier, whatever its status; if provided, all other params are ignored

Responses:
- 200: Products retrieved successfully (Product)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id} (Update Product)

Update an existing product. Omitted fields keep their value; a sent 0 is applied to weight, shipping, position, stock_notify and tax, brand 0 removes the brand, and an empty string clears a text field, price_promo or cost_per_item (an empty title or handle keeps its value).
On a product with variants and variants_same_values, the values sent apply to every variant. Without variants_same_values, prices, price on request, weight, shipping and stock live on each variant: sent to the product they are ignored, set them with PUT /product/{id}/option/{id_option}.
A product with variants shows the price, weight and shipping of its default variant: the first active variant, in position order, that can be sold (price on request, in stock, or stock not managed or sold on backorder); without one, the first active variant. Changing that variant changes what the product shows.
Prices are written before tax unless prices_include_tax is true: when the store shows prices with tax, GET returns price and price_promo with the product's tax included, so send a price read there back with prices_include_tax true, or divide it by 1 + tax/100 (93.48 read with 23% tax is 76). A wholesale_exclusive product returns its wholesale price as price, and a product in a campaign its campaign price as price_promo: do not send those back.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductUpdateInput

Responses:
- 200: Product updated successfully (Product)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)
- 422: Unprocessable entity (Error)

### DELETE /product/{id} (Delete Product)

Delete a product permanently. This action cannot be undone.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment or query string)

Responses:
- 204: Product deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/search (Search Products)

Search products by query across specified fields. Omitting fields searches every searchable field.

Parameters:
- `query` (query, string, required): Search term
- `fields` (query, string): Comma-separated searchable fields: title, description, handle, brand, options, categories, tags, reference, barcode (omitted: searches every searchable field)
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Search results retrieved successfully (list of Product, with paging)
- 400: Bad request: a message naming the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/option_group (List Product Option Groups)

Retrieve option groups for a product, or a single group by id.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Product option groups retrieved successfully (array of ProductOptionGroup)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product/{id}/option_group (Create Product Option Group)

Create a new option group for a product. A product has at most 3 option groups.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductOptionGroupInput

Responses:
- 200: Product option group created; the body lists all the product's option groups, the new one included (array of ProductOptionGroup)
- 400: Bad request: invalid id, or a message naming the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/option_group/{id_option_group} (Get Product Option Group)

Retrieve a single product option group by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option_group` (path, integer, required): Option group identifier (required, via URL segment)

Responses:
- 200: Product option groups retrieved successfully (ProductOptionGroup)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id}/option_group/{id_option_group} (Update Product Option Group)

Update an existing option group and its option values.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option_group` (path, integer, required): Option group identifier (required, via URL segment)

Body: ProductOptionGroupInput

Responses:
- 200: Product option group updated successfully (ProductOptionGroup)
- 400: Bad request: invalid id, or a message naming the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /product/{id}/option_group/{id_option_group} (Delete Product Option Group)

Delete a product option group and all its generated options.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option_group` (path, integer, required): Option group identifier (required, via URL segment)

Responses:
- 204: Product option group deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /product/{id}/option (List Product Options)

Retrieve product options, or a single option by id.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Product options retrieved successfully (array of ProductOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/option/{id_option} (Get Product Option)

Retrieve a single product option by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option` (path, integer, required): Option identifier (required, via URL segment)

Responses:
- 200: Product options retrieved successfully (ProductOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id}/option/{id_option} (Update Product Option)

Update a product option's price, stock, or other attributes. Changing an option makes the product's variants stop sharing the same values (variants_same_values becomes false); the other options keep theirs. From then on, a variant without its own image returns the no-img placeholder as image; send image to give it one.
Prices are written before tax unless prices_include_tax is true: when the store shows prices with tax, GET returns the variant's prices (price, price_promo, price_wholesale) with the tax included, so send a price read there back with prices_include_tax true, or divide it by 1 + tax/100 (93.48 read with 23% tax is 76). For a wholesale_exclusive product GET returns the wholesale prices instead, with the tax included only when the store shows wholesale prices with tax: do not send the price read there back as price, it is the variant's price_wholesale. In a campaign GET returns the campaign price as price_promo: do not send it back.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option` (path, integer, required): Option identifier (required, via URL segment)

Body: ProductOptionInput

Responses:
- 200: Product option updated successfully (ProductOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /product/{id}/option/{id_option} (Delete Product Option)

Deactivate a product option. The option is kept but deactivated, so it is no longer offered for sale, and it can be reactivated with the update endpoint (active=true). Triggers the product updated event and webhooks.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_option` (path, integer, required): Option identifier (required, via URL segment)

Responses:
- 204: Product option deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /category (List Categories)

Retrieve a list of categories or a single category by id or handle.

Parameters:
- `id` (query, integer): Category identifier; if provided, all other params are ignored
- `handle` (query, string): Category URL slug; if provided, all filter params are ignored
- `active` (query, string ("true", "false")): Filter by active status with query values true or false
- `is_parent` (query, string ("true", "false")): Filter parent categories with query values true or false
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Categories retrieved successfully (list of Category, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /category (Create Category)

Create a new product category. Use parent_id to create subcategories.

Body: CategoryInput

Responses:
- 201: Category created successfully (Category)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /category/{id} (Get Category)

Retrieve a single category by its unique identifier.

Parameters:
- `id` (path, integer, required): Category identifier; if provided, all other params are ignored

Responses:
- 200: Categories retrieved successfully (Category)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /category/{id} (Update Category)

Update an existing product category. Omitted fields keep their value, and a subcategory updated without parent_id stays under its parent. A sent 0 is applied to position, parent_id 0 turns a subcategory into a main category, and an empty string clears a text field (an empty title or handle keeps its value). Main categories cannot be converted to subcategories.

Parameters:
- `id` (path, integer, required): Category identifier (required, via URL segment)

Body: CategoryUpdateInput

Responses:
- 200: Category updated successfully (Category)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /category/{id} (Delete Category)

Delete a product category permanently. Returns 409 if the category still has products assigned.

Parameters:
- `id` (path, integer, required): Category identifier (required, via URL segment or query string)

Responses:
- 204: Category deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /brand (List Brands)

Retrieve a list of brands or a single brand by id or handle.

Parameters:
- `id` (query, integer): Brand identifier; if provided, all other params are ignored
- `handle` (query, string): Brand URL slug; if provided, all filter params are ignored
- `active` (query, string ("true", "false")): Filter by active status with query values true or false
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Brands retrieved successfully (list of Brand, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /brand (Create Brand)

Create a product brand. Only title is required; handle is generated from the title when omitted and position defaults to 0. When image is a URL it is imported into the media library in the background, so it may appear in the response shortly after creation.

Body: BrandInput

Responses:
- 201: Brand created successfully (Brand)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 409: Already exists (Error)

### GET /brand/{id} (Get Brand)

Retrieve a single brand by its unique identifier.

Parameters:
- `id` (path, integer, required): Brand identifier; if provided, all other params are ignored

Responses:
- 200: Brands retrieved successfully (Brand)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /brand/{id} (Update Brand)

Update an existing product brand. Omitted fields keep their value; a sent 0 is applied to position, and an empty string clears a text field (an empty title or handle keeps its value).

Parameters:
- `id` (path, integer, required): Brand identifier (required, via URL segment)

Body: BrandUpdateInput

Responses:
- 200: Brand updated successfully (Brand)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /brand/{id} (Delete Brand)

Delete a product brand permanently. Returns 409 if the brand still has products assigned.

Parameters:
- `id` (path, integer, required): Brand identifier (required, via URL segment or query string)

Responses:
- 204: Brand deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /extra_option (List Extra Options)

Retrieve a list of product extra options or a single extra option by id.

Parameters:
- `id` (query, integer): Extra option identifier; if provided, all other params are ignored
- `type` (query, string ("input", "textarea", "select", "checkbox", "date", "color")): Filter by field type
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Extra options retrieved successfully (ExtraOption)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /extra_option (Create Extra Option)

Create a new product extra option. Options are required for select and color types.

Body: ExtraOptionCreateInput

Responses:
- 201: Extra option created successfully (ExtraOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /extra_option/{id} (Get Extra Option)

Retrieve a single extra option by its unique identifier.

Parameters:
- `id` (path, integer, required): Extra option identifier; if provided, all other params are ignored

Responses:
- 200: Extra options retrieved successfully (ExtraOption)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /extra_option/{id} (Update Extra Option)

Update an existing extra option. Only provided fields are updated. The type field is immutable.

Parameters:
- `id` (path, integer, required): Extra option identifier (required, via URL segment)

Body: ExtraOptionUpdateInput

Responses:
- 200: Extra option updated successfully (ExtraOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /extra_option/{id} (Delete Extra Option)

Permanently delete an extra option from the store catalog. It is also removed from every product it was assigned to. This cannot be undone.

Parameters:
- `id` (path, integer, required): Extra option identifier (required, via URL segment or query string)

Responses:
- 204: Extra option deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /extra_option_scheme (List Extra Option Schemes)

Retrieve a list of color/pattern schemes used by color-type extra options, or a single scheme by id.

Parameters:
- `id` (query, integer): Scheme identifier; if provided, all other params are ignored
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Extra option schemes retrieved successfully (ExtraOptionScheme)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /extra_option_scheme (Create Extra Option Scheme)

Create a new color or pattern scheme. Exactly one of color or file must be provided.

Body: ExtraOptionSchemeInput

Responses:
- 201: Extra option scheme created successfully (ExtraOptionScheme)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /extra_option_scheme/{id} (Get Extra Option Scheme)

Retrieve a single extra option scheme by its unique identifier.

Parameters:
- `id` (path, integer, required): Scheme identifier; if provided, all other params are ignored

Responses:
- 200: Extra option schemes retrieved successfully (ExtraOptionScheme)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /extra_option_scheme/{id} (Update Extra Option Scheme)

Update an existing color or pattern scheme. Only provided fields are updated. Setting color clears file and vice versa.

Parameters:
- `id` (path, integer, required): Scheme identifier (required, via URL segment)

Body: ExtraOptionSchemeUpdateInput

Responses:
- 200: Extra option scheme updated successfully (ExtraOptionScheme)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /extra_option_scheme/{id} (Delete Extra Option Scheme)

Permanently delete a color/pattern scheme. Fails with 409 if the scheme is the only one assigned to a color extra option.

Parameters:
- `id` (path, integer, required): Scheme identifier (required, via URL segment or query string)

Responses:
- 204: Extra option scheme deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /product/{id}/extra_option (List Product Extra Options)

Retrieve all extra options assigned to a product, or a single assignment by extra option id.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Product extra options retrieved successfully (array of ProductExtraOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product/{id}/extra_option (Assign Extra Option to Product)

Attach an existing extra option to a product. Returns 400 if the option is already assigned.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductExtraOptionInput

Responses:
- 201: Extra option assigned to product successfully (ProductExtraOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /product/{id}/extra_option/{id_extra_option} (Get Product Extra Option)

Retrieve a single product extra option by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_extra_option` (path, integer, required): Extra option identifier; if provided, returns a single assignment

Responses:
- 200: Product extra options retrieved successfully (ProductExtraOption)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /product/{id}/extra_option/{id_extra_option} (Unassign Extra Option from Product)

Detach an extra option from a product without deleting the extra option itself.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_extra_option` (path, integer, required): Extra option identifier (required, via URL segment)

Responses:
- 204: Extra option unassigned from product successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/tab (List Product Tabs)

Retrieve all tabs attached to a product, or a single tab by its positional index.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Product tabs retrieved successfully (array of ProductTab)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product/{id}/tab (Create Product Tab)

Append a new tab to a product. Text tabs require title and content; page tabs reference an existing page by id.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductTabInput

Responses:
- 201: Product tab created successfully (ProductTab)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/tab/{tab_index} (Get Product Tab)

Retrieve a single product tab by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `tab_index` (path, integer, required): Zero-based tab index; if provided, returns a single tab

Responses:
- 200: Product tabs retrieved successfully (ProductTab)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id}/tab/{tab_index} (Update Product Tab)

Update an existing product tab. Tab type cannot be changed; delete and recreate instead.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `tab_index` (path, integer, required): Zero-based tab index (required, via URL segment)

Body: ProductTabUpdateInput

Responses:
- 200: Product tab updated successfully (ProductTab)
- 400: Bad request: invalid id or tab index, or a message naming the invalid field or the rule, such as a GPSR tab, which cannot be edited through the API (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /product/{id}/tab/{tab_index} (Delete Product Tab)

Remove a tab from a product. GPSR tabs cannot be deleted via the API.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `tab_index` (path, integer, required): Zero-based tab index (required, via URL segment)

Responses:
- 204: Product tab deleted successfully
- 400: Bad request: invalid id or tab index, or a GPSR tab, which cannot be deleted through the API (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/quantity_tier (List Product Quantity Tiers)

Retrieve all quantity-based price tiers attached to a product, or a single tier by id.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Quantity tiers retrieved successfully (array of ProductQuantityTier)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product/{id}/quantity_tier (Create Product Quantity Tier)

Add a new quantity-based price tier to a product. Tiers cannot overlap and only the last tier per wholesale context may leave qty_to open. Each tier must fit within the product's purchase limits for its wholesale context: qty_from must be greater than or equal to min_quantity (or min_quantity_wholesale) and no greater than max_quantity (or max_quantity_wholesale), and qty_to (when set) must not exceed max_quantity (or max_quantity_wholesale).

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductQuantityTierCreateInput

Responses:
- 201: Quantity tier created successfully (ProductQuantityTier)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Conflict (Error)

### GET /product/{id}/quantity_tier/{id_tier} (Get Product Quantity Tier)

Retrieve a single product quantity tier by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_tier` (path, integer, required): Quantity tier identifier; if provided, returns the single tier

Responses:
- 200: Quantity tiers retrieved successfully (ProductQuantityTier)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id}/quantity_tier/{id_tier} (Update Product Quantity Tier)

Update an existing quantity-based price tier. Only provided fields are changed and the result must not overlap any other tier in the same wholesale context. The resulting tier must fit within the product's purchase limits for its wholesale context: qty_from must be greater than or equal to min_quantity (or min_quantity_wholesale) and no greater than max_quantity (or max_quantity_wholesale), and qty_to (when set) must not exceed max_quantity (or max_quantity_wholesale).

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_tier` (path, integer, required): Quantity tier identifier (required, via URL segment)

Body: ProductQuantityTierUpdateInput

Responses:
- 200: Quantity tier updated successfully (ProductQuantityTier)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /product/{id}/quantity_tier/{id_tier} (Delete Product Quantity Tier)

Remove a quantity-based price tier from a product.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_tier` (path, integer, required): Quantity tier identifier (required, via URL segment)

Responses:
- 204: Empty Quantity tier deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /order (List Orders)

Retrieve a list of orders or a single order by id. The order retrieved by id also carries, in payment, what happened to the payment: status, failure, gateway_id, reference_expires_at, attempts and paid_after_cancel.

Parameters:
- `id` (query, integer): Order identifier; if provided, all other params are ignored
- `ids` (query, string): Comma-separated order identifiers (max 50, more answer 400; all in one page); if provided, the filters, page and limit are ignored
- `status` (query, string): Filter by numeric status: 1 (pending), 2 (processing), 3 (sent), 4 (canceled), 5 (waiting_confirmation), 6 (waiting_payment), 7 (waiting_stock), 8 (delivered), 9 (returned), 10 (pickup_available), 11 (waiting_shipment), 12 (waiting_return); comma-separated for multiple
- `status_alias` (query, string): Filter by status alias: all, pending, processing, sent, canceled, waiting_confirmation, waiting_payment, waiting_stock, delivered, returned, pickup_available, waiting_shipment, waiting_return; comma-separated for multiple
- `paid` (query, string ("true", "false")): Filter by payment status with query values true or false
- `is_new` (query, string ("true", "false")): Filter unread/new orders with query values true or false
- `shipped` (query, string ("true", "false")): Filter shipment status with query values true or false
- `invoice` (query, string ("true", "false")): Filter invoice presence with query values true or false
- `return_request` (query, string ("true", "false")): Filter orders whose client requested a return (true) or not (false), as return_request in each order
- `archived` (query, string ("0", "1")): Filter by archive state: 1 (archived orders only) or 0 (active orders only). Without it, archived and active orders are returned, with archived and archived_at in each order. Any other value returns 400
- `date_filter` (query, string ("today", "yesterday", "last_week", "last_month")): Predefined date range: today, yesterday, last_week, last_month
- `date_from` (query, string): Start date filter (format: yyyy-mm-dd)
- `date_to` (query, string): End date filter (format: yyyy-mm-dd, must be >= date_from)
- `date_type` (query, string ("created_at", "update_at", "sent_at", "paid_at")): Date field to filter on: created_at, update_at, sent_at, paid_at
- `coupon_code` (query, string): Filter orders by coupon code used
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)
- `q` (query, string): Search query string to filter orders by ID, reference, client name, or email
- `tags` (query, string): Comma-separated tag names to filter by
- `client_email` (query, string): Filter by client email address
- `client_hash` (query, string): Filter by client MD5 hash (alternative to client_email); a value that is not an MD5 hash returns 400

Responses:
- 200: Orders retrieved successfully (list of Order, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks, with the accepted values for the status, status_alias, date_filter and date_type filters (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /order (Create Order)

Create an order for an existing client (client.id) or a new one (client.email plus addresses). Prices, taxes and totals come from the store catalogue, unless the sale's own prices are sent (products[].price_with_tax, shipping_price_with_tax). This is a real order: stock is deducted, a payment is generated with the payment gateway (unless the order is paid or canceled), the customer receives the order confirmation email (disable with notify_client=false) plus SMS or WhatsApp notifications when enabled, and the order created event and webhooks fire. Returns 409 when a product is out of stock.

Body: OrderCreateInput

Responses:
- 201: Order created successfully (Order)
- 400: Bad request: an empty body, an id in the URL, or a message naming the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: A product is out of stock, or another order was changing a product's stock (repeat the request) (Error)

### GET /order/{id} (Get Order)

Retrieve a single order by its unique identifier.

Parameters:
- `id` (path, integer, required): Order identifier; if provided, all other params are ignored

Responses:
- 200: Orders retrieved successfully (Order)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks, with the accepted values for the status, status_alias, date_filter and date_type filters (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /order/{id} (Update Order)

Update an order (status, payment, tracking, invoice, notes, tags) or bulk update up to 50 orders. Unless notify_client is false (or the change only touches tags, notes or flags), the customer is emailed about the change. Status changes fire the matching events and webhooks; canceling an order restores its stock, and marking it paid can trigger automatic invoicing.

Parameters:
- `id` (path, integer, required): Order identifier (required, via URL segment or body; use "bulk" segment for batch)

Body: OrderInput

Responses:
- 200: Order updated successfully (Order)
- 400: Bad request: invalid id, or a message naming the missing or invalid field and the rule it breaks, with the accepted values for status and status_alias; in bulk, each order answers with its own message (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: The order is archived and the request changes something other than archived false; or, for an edit of its products, the order can no longer be edited, a product is out of stock, or another order was changing a product's stock (repeat the request) (Error)
- 413: Content Too Large (Error)

### DELETE /order/{id} (Delete Order)

Permanently delete an order and its data; it cannot be restored. Only an archived or canceled order without an issued invoice can be deleted; any other order answers 409 with the reason in message and is kept. The order is removed from the store and its search index, stock is not restored, the customer is not notified, and the order deleted event and webhook fire.

Parameters:
- `id` (path, integer, required): Order identifier (required, via URL segment or query string)

Responses:
- 204: Order deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: The order is neither archived nor canceled, or has an issued invoice; message gives the reason (Error)

### POST /order/{id}/invoice (Create Order Invoice)

Issue the invoice of an order through the store's active invoicing app (400 when none is active). This creates a real invoice that cannot be edited afterwards, stores its URL on the order, fires the order invoice event and, depending on the app configuration, emails it to the customer. Returns 409 when the order already has an invoice. A 200 response with a message means the invoicing app refused the request. Bulk requests support up to 50 orders.

Parameters:
- `id` (path, integer, required): Order identifier (required, via URL segment or body; use "bulk" segment for batch)

Responses:
- 200: Invoice request processed but not successfully created
- 201: Invoice created successfully
- 400: Bad request: no invoicing app active, invalid id, or in bulk an empty list or an order without a valid id (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: The order already has an invoice, or is archived (unarchive it with PUT /order/{id} archived false first) (Error)
- 413: Content Too Large (Error)

### GET /order/{id}/pdf (Get Order PDF)

Download an order detail as a PDF document. Returns the PDF file directly with Content-Type: application/pdf.

Parameters:
- `id` (path, integer, required): Order identifier (required, via URL segment)

Responses:
- 200: PDF document (Content-Type: application/pdf)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /order/{id}/events (List Order Events)

Retrieve the event history and audit trail for an order.

Parameters:
- `id` (path, integer, required): Order identifier (required, via URL segment)

Responses:
- 200: Order events retrieved successfully (array of OrderEvent)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /client (List Clients)

Retrieve a list of clients or a single client by hash, id, or email.

Parameters:
- `hash` (query, string): Client MD5 hash or numeric id; if provided, all filter params are ignored
- `email` (query, string): Client email address (converted to hash for lookup)
- `registered` (query, boolean): Filter by registration type (true for registered, false for guests)
- `cart` (query, boolean): Filter clients with active cart
- `wishlist` (query, boolean): Filter clients with wishlist
- `accepts_marketing` (query, boolean): Filter by marketing opt-in
- `banned` (query, boolean): Filter banned clients
- `wholesale` (query, string): Filter by wholesale status: true, false, pending; comma-separated for multiple
- `tags` (query, string): Comma-separated tag names to filter by
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)
- `q` (query, string): Search query string to filter clients by name, email, or company

Responses:
- 200: Clients retrieved successfully (list of Client, with paging)
- 400: Bad request: invalid hash, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /client (Create Client)

Create a client with email and name plus optional addresses and marketing preferences. The client is always created as a registered account (a random password is generated when password is omitted) and the signup email, which includes the password, is sent unless send_signup_email is false. Returns 409 when the email already exists. Fires the client created event and webhooks.

Body: ClientCreateInput

Responses:
- 201: Client created; the body is an array holding the new client (array of Client)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 409: Already exists (Error)

### GET /client/{id} (Get Client)

Retrieve a single client by its unique identifier.

Parameters:
- `id` (path, integer, required): Resource ID

Responses:
- 200: Clients retrieved successfully (array of Client)
- 400: Bad request: invalid hash, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /client/{id} (Update Client)

Update an existing client's profile, addresses, or marketing preferences. Only provided fields are updated.

Parameters:
- `id` (path, integer, required): Client numeric id or MD5 hash (required, via URL segment)

Body: ClientUpdateInput

Responses:
- 200: Client updated; the body is an array holding the updated client (array of Client)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /client/{id} (Delete Client)

Delete a client: the login is removed, the wishlist emptied and the client is marked as deleted, while the record and its orders are kept for order history. Fires the client deleted event and webhooks and removes the client from the search index.

Parameters:
- `id` (path, integer, required): Client numeric id (required, via URL segment)
- `hash` (query, string): Client MD5 hash (alternative to id, via URL segment)

Responses:
- 204: Client deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /shipping (List Shipping Methods)

Retrieve available shipping methods for a given destination, weight, and order value.

Parameters:
- `country_code` (query, string, required): ISO 3166-1 alpha-3 destination country code (e.g. PRT, ESP, GBR)
- `weight` (query, integer): Total order weight in grams
- `value` (query, number): Total order value for rate calculation

Responses:
- 200: Shipping methods retrieved successfully (array of ShippingMethod)
- 400: Bad request: a message naming the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /shipment (List Shipments)

Retrieve a list of shipments or a single shipment by tracking code. When tracking code is provided, returns shipment detail with tracking events.

Parameters:
- `tracking_code` (query, string): Tracking code of a single shipment (also accepted as the {id} URL segment of /shipment/{id}); if provided, returns the shipment detail with tracking events
- `carrier` (query, string): Filter by carrier slug: correos_express, ctt, dhl_express, dhl_globalmail, dhl_parcel, dpd, fedex, gls, mrw, nacex, rangel, seur, tnt, ups, vasp, other; comma-separated for multiple, or all; an unknown value returns 400 naming the accepted values
- `paid` (query, string ("true", "false")): Filter by payment status with query values true or false
- `status` (query, string): Filter by shipment status: expedited, accepted, out_for_delivery, pickup_available, delivery_unsuccessful, returned, delivered; comma-separated for multiple, or all; an unknown value returns 400 naming the accepted values
- `date_from` (query, string): Start date filter (format: yyyy-mm-dd, max 1 year lookback)
- `date_to` (query, string): End date filter (format: yyyy-mm-dd, must be >= date_from)
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)
- `q` (query, string): Search query string to filter shipments by tracking code or order ID

Responses:
- 200: Shipments retrieved successfully (list of Shipment, with paging)
- 400: Bad request: the message names the invalid field and the accepted values (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /shipment/{tracking_code} (Get Shipment)

Retrieve a single shipment by its unique identifier.

Parameters:
- `tracking_code` (path, string, required): Tracking code of a single shipment (also accepted as the {id} URL segment of /shipment/{id}); if provided, returns the shipment detail with tracking events

Responses:
- 200: Shipments retrieved successfully (Shipment)
- 400: Bad request: the message names the invalid field and the accepted values (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /shipment/carrier (List Shipment Carriers)

Retrieve the list of available shipment carriers.

Responses:
- 200: Shipping carriers retrieved successfully (array of ShippingCarrier)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /coupon (Get Coupons)

Retrieve all coupons, or a single coupon by id or code. The response is always an array, with one element when id or code is given. The list is not paginated. Requires access to the promotions module (403 otherwise).

Parameters:
- `id` (query, integer): Coupon identifier
- `code` (query, string): Coupon code

Responses:
- 200: Coupons retrieved successfully (array of Coupon)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)

### POST /coupon (Create Coupon)

Create a discount coupon (percent, money or free shipping) that applies to all orders or to selected categories, products, brands or tags. The code must be unique in the store (409 otherwise). Fires the coupon created event and webhooks. The response is an array with the created coupon. Requires access to the promotions module (403 otherwise).

Body: CouponCreateInput

Responses:
- 201: Coupon created successfully, as a one-element array (array of Coupon)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /coupon/{id} (Get Coupon)

Retrieve a single coupon by its unique identifier.

Parameters:
- `id` (path, integer, required): Coupon identifier

Responses:
- 200: Coupons retrieved successfully (array of Coupon)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)

### PUT /coupon/{id} (Update Coupon)

Update an existing discount coupon. Only provided fields are updated, and the rules that compare two fields (value and type, orders_under and orders_over, date_to and date_from, shipping and applies_to) check them against the stored ones. The coupon code cannot be changed after creation.

Parameters:
- `id` (path, integer, required): Coupon identifier (required, via URL segment)

Body: CouponUpdateInput

Responses:
- 200: Coupon updated successfully (Coupon)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /coupon/{id} (Delete Coupon)

Permanently delete a discount coupon. It stops working immediately and cannot be restored; orders that already used it keep their discount. Returns 409 when the coupon is in use by the abandoned carts recovery or by the product reviews app. Fires the coupon deleted event and webhooks.

Parameters:
- `id` (path, integer, required): Coupon identifier (required, via URL segment or query string)

Responses:
- 204: Coupon deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /webhook (List Webhooks)

Retrieve a list of webhooks or a single webhook by id. The list is not paginated.

Parameters:
- `id` (query, integer): Webhook identifier; if provided, all other params are ignored
- `active` (query, string ("true", "false")): Filter by active status with query values true or false
- `event` (query, string ("order_canceled", "order_deleted", "order_created", "order_updated", "order_paid", "order_sent", "order_change_status", "product_created", "product_updated", "product_deleted", "order_invoice", "client_created", "client_updated", "client_deleted", "order_shipping", "order_delivered", "shipping_expedited", "order_change_payment", "order_payment_failed", "order_returned", "order_pickup_available", "newsletter_subscribed", "newsletter_unsubscribed", "product_updated_stock", "order_waiting_shipment", "shipping_pickup", "coupon_created", "coupon_deleted", "cart_abandoned_notify", "order_tag_added", "client_tag_added", "client_wholesale_accepted", "client_wholesale_revoked", "client_wholesale_requested", "order_invoiced", "order_unpaid", "coupon_updated", "order_waiting_return", "order_archived", "order_unarchived")): Filter by event type: order_canceled, order_deleted, order_created, order_updated, order_paid, order_sent, order_change_status, product_created, product_updated, product_deleted, order_invoice, client_created, client_updated, client_deleted, order_shipping, order_delivered, shipping_expedited, order_change_payment, order_payment_failed, order_returned, order_pickup_available, newsletter_subscribed, newsletter_unsubscribed, product_updated_stock, order_waiting_shipment, shipping_pickup, coupon_created, coupon_deleted, cart_abandoned_notify, order_tag_added, client_tag_added, client_wholesale_accepted, client_wholesale_revoked, client_wholesale_requested, order_invoiced, order_unpaid, coupon_updated, order_waiting_return, order_archived, order_unarchived

Responses:
- 200: Webhooks retrieved successfully (array of Webhook)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /webhook (Create Webhook)

Create a new webhook subscription for an event. Created with an OAuth app's access token, the response
includes secret, only this once: the webhook's X-Webhook-Signature uses it instead of the store's client
secret, and revoking the app's access deletes the webhook. A store has one webhook per event and url: the same
url can take other events, and the same event and url again answer 409 with the id of the existing webhook.

Body: WebhookInput

Responses:
- 201: Webhook created successfully (Webhook)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 409: The store already has a webhook with that event and url (its id comes in id) (Error)

### GET /webhook/{id} (Get Webhook)

Retrieve a single webhook by its unique identifier.

Parameters:
- `id` (path, integer, required): Webhook identifier; if provided, all other params are ignored

Responses:
- 200: Webhooks retrieved successfully (Webhook)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /webhook/{id} (Update Webhook)

Update the url, event or active status of a webhook subscription. Only provided fields are updated, and at
least one is required. An OAuth app cannot update the webhooks of installed apps or of other OAuth apps, and
changes the url or the event only to an event of an area it can read, as when it creates one.

Parameters:
- `id` (path, integer, required): Webhook identifier (required, via URL segment or query string)

Body: WebhookUpdateInput

Responses:
- 200: Webhook updated successfully (Webhook)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the OAuth app has no access to that event (Error)
- 404: Not found (Error)
- 409: Another webhook of the store already has that event and url (its id comes in id), or the webhook could not be updated (Error)

### DELETE /webhook/{id} (Delete Webhook)

Delete a webhook subscription permanently.

Parameters:
- `id` (path, integer, required): Webhook identifier (required, via URL segment or query string)

Responses:
- 204: Webhook deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /webhook/log (List Webhook Logs)

Retrieve the webhook deliveries of the store, most recent first, or a single delivery by id, as listed in Settings > Developers > Webhooks. The url has only the scheme and host, because the path and the query string may carry secrets. A single delivery adds response, the body the receiving service answered with, cut to 1000 characters (response_truncated is true when it was cut, and null when response is null; response is null for old deliveries whose stored body cannot be told apart from the response headers). code and elapsed are null while the delivery has no recorded answer. time is when the delivery was queued until it gets an answer or gives up, and from then on when it finished. An OAuth app sees only the deliveries of the events of the areas it can read and the user who authorized it can still see, and gets response (null otherwise) only for its own webhooks. Requires the Developers permission.

Parameters:
- `id` (query, integer): Delivery identifier (optional, via URL segment or query string); if provided, all other params are ignored
- `event` (query, string): Filter by event type, as in the delivery (for example order_paid)
- `code` (query, integer): Filter by the HTTP status code the receiving service answered with (0 when it did not answer); deliveries without a recorded answer are not matched
- `resource_id` (query, integer): Filter by the id of the record the event is about (the order number in order events, the client, coupon or product id in theirs), only among the 1000 most recent deliveries of the store; records of different types can share an id, so combine it with event to keep one type; the id is read from the payload, and a client's from its hash in the payload, so a delivery whose payload has neither is not found
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Deliveries retrieved successfully (list of WebhookLog, with paging)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 503: The logs are temporarily unavailable (Error)

### GET /webhook/log/{id} (Get Webhook Log)

Retrieve a single webhook log by its unique identifier.

Parameters:
- `id` (path, integer, required): Delivery identifier (required, via URL segment or query string); if provided, all other params are ignored

Responses:
- 200: Deliveries retrieved successfully (WebhookLog)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)
- 503: The logs are temporarily unavailable (Error)

### GET /api_log (List API Logs)

Retrieve the latest calls made with the store's API key, most recent first, as listed in Settings > Developers > API. Calls made with an OAuth access token or by Shopkit itself are not included. Reads of this log are not logged themselves, so they never appear in it nor shift its pages. Requires the Developers permission (for OAuth apps, the developers:read scope).

Parameters:
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Calls retrieved successfully (list of ApiLog, with paging)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 503: The logs are temporarily unavailable (Error)

### GET /redirect (List Redirects)

Retrieve a list of redirects or a single redirect by id. Requires the Pro plan. Redirects only send visitors on
while redirects_enabled in GET /store is true.

Parameters:
- `id` (query, integer): Redirect identifier; if provided, all other params are ignored
- `redirect_type` (query, string ("301", "302")): Filter by HTTP status code
- `source_match_type` (query, string ("exact", "prefix", "regex")): Filter by source match type
- `active` (query, string ("true", "false")): Filter by active status
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Redirects retrieved successfully (list of Redirect, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the store's plan does not include redirects (Error)
- 404: Not found (Error)

### POST /redirect (Create Redirect)

Create a new URL redirect. Requires the Pro plan. Redirects only send visitors on while redirects_enabled in
GET /store is true.

Body: RedirectInput

Responses:
- 201: Redirect created successfully (Redirect)
- 400: Bad request: the message names the missing or invalid field and the rule it breaks, with the accepted values for redirect_type and source_match_type (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the store's plan does not include redirects (Error)
- 409: Already exists (Error)

### GET /redirect/{id} (Get Redirect)

Retrieve a single redirect by its unique identifier.

Parameters:
- `id` (path, integer, required): Redirect identifier; if provided, all other params are ignored

Responses:
- 200: Redirects retrieved successfully (Redirect)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the store's plan does not include redirects (Error)
- 404: Not found (Error)

### PUT /redirect/{id} (Update Redirect)

Update an existing redirect. Only provided fields are updated. Redirects only send visitors on while
redirects_enabled in GET /store is true.

Parameters:
- `id` (path, integer, required): Redirect identifier (required, via URL segment or body)

Body: RedirectUpdateInput

Responses:
- 200: Redirect updated successfully (Redirect)
- 400: Bad request: invalid id, no updatable field sent, or a message naming the invalid field and the rule it breaks, with the accepted values for redirect_type and source_match_type (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the store's plan does not include redirects (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /redirect/{id} (Delete Redirect)

Permanently delete a URL redirect; the source URL stops redirecting immediately and the deletion cannot be undone. Fires the redirect deleted event. Requires a plan that includes redirects (403 otherwise).

Parameters:
- `id` (path, integer, required): Redirect identifier (required, via URL segment)

Responses:
- 204: Redirect deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or the store's plan does not include redirects (Error)
- 404: Not found (Error)

### GET /page (List Pages)

Retrieve a list of custom pages or a single page by id.

Parameters:
- `id` (query, integer): Page identifier; if provided, all other params are ignored
- `static` (query, string ("true", "false")): Filter by page type: static (system) pages or content pages
- `q` (query, string): Search query string to filter pages by title, content, or handle
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Pages retrieved successfully (list of Page, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /page (Create Page)

Create a new custom page. Static (system) pages cannot be created via the API.

Body: PageCreateInput

Responses:
- 201: Page created successfully (Page)
- 400: Bad request: the message names the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 409: Already exists (Error)

### GET /page/{id} (Get Page)

Retrieve a single page by its unique identifier.

Parameters:
- `id` (path, integer, required): Page identifier; if provided, all other params are ignored

Responses:
- 200: Pages retrieved successfully (Page)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /page/{id} (Update Page)

Update an existing custom page. Only provided fields are updated. The handle
of a static (system) page cannot be changed.

Parameters:
- `id` (path, integer, required): Page identifier (required, via URL segment or body)

Body: PageUpdateInput

Responses:
- 200: Page updated successfully (Page)
- 400: Bad request: invalid id, no updatable field sent, only the handle sent for a static page, or a message naming the invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /page/{id} (Delete Page)

Delete an existing custom page. Static (system) pages cannot be deleted.

Parameters:
- `id` (path, integer, required): Page identifier (required, via URL segment)

Responses:
- 204: Page deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not found (Error)

### GET /media (List Media)

Retrieve a list of media files or a single file by id or checksum.

Parameters:
- `id` (query, integer): Media identifier; if provided, all other params are ignored
- `checksum` (query, string): Media MD5 checksum; if provided, all filter params are ignored
- `hash` (query, string): Media hash for async upload tracking
- `type` (query, string ("all", "image", "file", "digital_file")): Filter by media type: all, image, file, digital_file (default: all)
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)
- `q` (query, string): Search query string to filter media by filename or description

Responses:
- 200: Media files retrieved successfully (list of Media, with paging)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /media (Upload Media)

Import a media file from a public URL or base64-encoded content. Either url or file is required. The response contains only the media hash: the file is processed in the background, so fetch it afterwards with the media list filtered by hash.
File size limits: images 10 MB, videos 100 MB, documents 25 MB.
Supported formats: JPEG, PNG, GIF, WebP, SVG, MP4, WebM, MOV,
PDF, DOC/DOCX, XLS/XLSX, PPT/PPTX.
Videos need a plan with video quality; they are compressed and get a poster image, as in the admin.
A file the store's media library already has is not imported again: the hash returned finds it at once.

Body: object
- `url` (string): Public URL of the file to import (takes priority over file param); required unless file is sent
- `file` (string): Base64 URL-safe encoded file content (used when url is not provided); required unless url is sent

Responses:
- 201: Media queued for processing; the body holds only its hash (MediaHash)
- 400: Bad request: the message names the missing or invalid field (url or file) and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 403: The store's plan does not include videos (Error)
- 409: Already exists (Error)

### GET /media/{id} (Get Media)

Retrieve a single media by its unique identifier.

Parameters:
- `id` (path, integer, required): Media identifier; if provided, all other params are ignored

Responses:
- 200: Media files retrieved successfully (Media)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### DELETE /media/{id} (Delete Media)

Delete a media file permanently from storage. Products or categories using this image will lose the reference.

Parameters:
- `id` (path, integer, required): Media identifier (required, via URL segment)
- `checksum` (query, string): Media MD5 checksum (alternative to id, via URL segment)

Responses:
- 204: Media file deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /stats (Get Statistics)

Retrieve store statistics for a given metric and date range.

`resume`, `visitors`, `orders` and `live` are the original metrics: fixed contract, default to
the last 7 days, and a range over 365 days is silently narrowed to the last 365 days ending at
`date_to` instead of rejected, keeping existing integrations working.

Every other metric reuses the exact model methods the merchant admin stats pages use, so the
numbers match the admin. They default to the last 30 days when no dates are given, to the 30
days ending on `date_to` when only `date_to` is given, and to the days from `date_from` until
today when only `date_from` is given; they floor
`date_from` at the store's statistics start date, and reject a range over 365 days with 400.
Metrics marked (advanced) return 403 `plan_locked` on stores without the detailed-statistics
plan setting, exactly like the admin. Traffic counts unique visitors (people) in the period; fields
named `visits` keep that name and hold visitors, while bounce rate and average duration are per visit:
- `overview` — visitors, orders, revenue and conversion rate for the period vs. the previous one.
- `chart` — daily visitors/orders/revenue/conversion-rate series for the period; `compare=1` adds
  the same series for the immediately preceding period of equal length (`prev_*` keys), left out when
  that period ends before the statistics start date.
- `sales` (advanced) — daily paid orders, revenue, returns and returns value.
- `sales_breakdown` (advanced) — revenue decomposition (subtotal, shipping, tax, discounts, returns).
- `returned_products` (advanced) — products with the most returned units in the period.
- `customers` (advanced) — customer KPIs (new, repeat, B2B, AOV, LTV) and the top spenders.
  `new_customers` counts customers whose first paid order falls in the period; `repeat_customers`
  counts customers with 2 or more paid orders in the period. The two can overlap (a new customer
  with two orders in the period is in both), so their sum can exceed `total_customers`.
- `loyalty` (advanced) — rewards points earned/redeemed and the sales they drove.
- `cohort` (advanced) — monthly cohort retention matrix. Lists closed months only: the month of
  `date_to` is left out unless `date_to` is its last day.
- `profitability` (advanced; also needs the profitability-analysis plan option, otherwise 403
  `plan_locked`, like the admin section) — revenue, COGS, profit and margin, with the same three lists as the admin
  page: `top_products` (highest profit first), `bottom_products` (lowest margin first; with few products
  both lists hold the same items) and `top_categories` (highest profit first). There is no list of the
  least profitable categories: order `top_categories` by `margin_pct` ascending to get it.
  `revenue_products` and `revenue_series` count only sales of products with a cost per item, so
  revenue − COGS = profit; all four are null when no product sold in the period has a cost.
  `coverage_pct` is the share of order lines with a cost; `coverage_revenue_pct` is the share of
  product revenue (net of returns) that comes from products with a cost, 0 when there is no product revenue.
- `funnel` (advanced) — visitors per checkout step (cart, data, confirmation, order).
- `carts` (advanced) — abandoned cart totals and recovery rate.
- `payment_methods` (advanced) — paid/unpaid orders, success rate and time-to-pay by method.
- `expeditions` (advanced) — shipment KPIs, carriers and top destinations.
- `origins` (advanced) — where paid orders came from (ads, organic search, social, sales channels…),
  the same origin as the orders list, with daily sales per origin, sources, campaigns, sales channels
  and landing pages, the specific source (Instagram, Google, WhatsApp…) that stands out in orders,
  average order value, items per order and return rate (`highlights`) and the per-origin totals behind them (`by_origin`). Origin is recorded from
  `available_from`; earlier orders count as no source.
- `channels` — visitors by acquisition channel.
- `channels_conversions` — conversions by acquisition channel.
- `utm` — visitors by UTM campaign.
- `heatmap` — visitors and orders by day of week and hour.
- `search` — top store search keywords.
- `map` — visitors by country, with `orders` and `revenue` (sum of order totals) of the paid, non-cancelled
  orders paid in the period by delivery country. Portugal includes the Azores and Madeira. A country with
  orders and no visitors is listed with `visits` 0.
- `map_conversions` — conversions by country.
- `visits` — visitors, pageviews, bounce rate and average visit duration, with the previous period.
- `demographics` — age and gender of the visitors, each with `visits` (visitors), `share` (percentage of the
  visitors with a known value) and `conversion_rate` (percentage of them who completed a purchase). `age` has
  the groups 18–24, 25–34, 35–44, 45–54 and 55+, `gender` has Feminino, Masculino and Outro; groups
  without visitors are left out. The data comes from the advanced mode of the store's Statistics app: without
  it the response is `{"enabled": false, "age": [], "gender": []}`.
- `live_full` (advanced) — real-time active visitors and today's commerce funnel; ignores dates.
- `product` (advanced) — a single product's stats; requires `id`, 404s if it isn't from this store.
  A product without sales nor returns in the period returns the same shape with zero values and `has_sales: false`
  (a product only returned in the period has `has_sales: true`, with the returns and a negative profit).
  Without a cost per item on its sales (`profitability.has_cost: false`), `profitability.profit`,
  `profitability.margin_pct` and the `chart.margin` series are null.

Money values and rates are rounded to 2 decimals (fractions such as `abandon_rate` and `bounce_rate`
in the original metrics, to 4); `growth` values are rounded to 1 decimal, like the admin's variation chips.

`conversion_rate` (in `overview`, `chart`, `resume` and the previous-period blocks) is the share of
visitors who completed a checkout in the store, as a percentage 0-100: visitors with a purchase event ÷
visitors in the period, both measured by the traffic analytics, rounded to 2 decimals, null without
measured visitors. `orders` and `orders_count` are instead the paid orders counted by payment date from
the store's database, including orders created in the admin or through the API and orders paid after
they were placed, so `orders ÷ visits` of the same response does not reproduce `conversion_rate`.

When the requested period for the other metrics is adjusted (`date_to` in the future is cut to today,
`date_from` before the statistics start date is raised to it), the data and the dates returned are those
of the adjusted period, and the response carries a `warning` string saying so (responses that are plain
lists carry none). A period that ends before the statistics start date is adjusted to that first day
(`date_from` = `date_to` = the start date), with the same `warning`. `date_from` later than `date_to` is
a 400. In `overview`, when the previous period would start before the statistics start date, `previous`
and every `growth` value are null; this is always the case for that adjusted first day.
`growth` values are percentage changes, except for metrics that are already percentages
(`conversion_rate`, `gross_margin_pct`, `repeat_purchase_rate`, `abandonment_rate`, `recovery_rate`,
`success_rate`), which are the difference in percentage points.

A metric that depends on Umami and can't reach it returns 503 with a `message`, instead of a
misleading 200.

Parameters:
- `metric` (query, string ("resume", "visitors", "orders", "live", "overview", "chart", "sales", "sales_breakdown", "returned_products", "customers", "loyalty", "cohort", "profitability", "funnel", "carts", "payment_methods", "expeditions", "origins", "channels", "channels_conversions", "utm", "heatmap", "search", "map", "map_conversions", "visits", "demographics", "live_full", "product"), required): Statistic type to retrieve (required, via URL segment or query string)
- `date_from` (query, string): Start date for the stats period (format: yyyy-mm-dd). If omitted with date_to set: the 30 days ending on date_to (resume, visitors and orders: the 7 days ending on date_to); with no dates: the last 30 days (resume, visitors and orders: the last 7). An empty string counts as omitted
- `date_to` (query, string): End date for the stats period (format: yyyy-mm-dd, must be >= date_from). If omitted: today. An empty string counts as omitted
- `id` (query, integer): Product identifier (required when metric=product, via query string)
- `compare` (query, string ("true", "false")): Add the previous period's series (metric=chart only)

Responses:
- 200: Statistics retrieved successfully (Statistics)
- 400: Bad request (unknown metric, invalid date, date_to before date_from, range over 365 days, missing id for metric=product) (Error)
- 401: Bad credentials (Error)
- 403: Plan does not include detailed statistics (Error)
- 404: Product not found (Error)
- 503: Statistics temporarily unavailable (Error)

### GET /custom_field (List Custom Fields)

Retrieve a list of custom field definitions, or a single custom field by id.

Parameters:
- `id` (query, integer): Custom field identifier; if provided, all other params are ignored
- `type` (query, string ("input", "textarea", "select")): Filter by field type
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Custom fields retrieved successfully (CustomField)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /custom_field (Create Custom Field)

Create a new custom field definition. Options are required for select type. Filters are only supported for select type.

Body: CustomFieldCreateInput

Responses:
- 201: Custom field created successfully (CustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /custom_field/{id} (Get Custom Field)

Retrieve a single custom field by its unique identifier.

Parameters:
- `id` (path, integer, required): Custom field identifier; if provided, all other params are ignored

Responses:
- 200: Custom fields retrieved successfully (CustomField)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /custom_field/{id} (Update Custom Field)

Update an existing custom field. Only provided fields are updated. The type field is immutable.

Parameters:
- `id` (path, integer, required): Custom field identifier (required, via URL segment)

Body: CustomFieldUpdateInput

Responses:
- 200: Custom field updated successfully (CustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /custom_field/{id} (Delete Custom Field)

Permanently delete a custom field and all associated product values.

Parameters:
- `id` (path, integer, required): Custom field identifier (required, via URL segment or query string)

Responses:
- 204: Custom field deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /product/{id}/custom_field (List Product Custom Field Values)

Retrieve all custom field values set on a product, or values for a single custom field.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Responses:
- 200: Product custom field values retrieved successfully (array of ProductCustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /product/{id}/custom_field (Set Product Custom Field Value)

Assign a custom field and its value(s) to a product. Values must match the field type (array of allowed options for select, string for input/textarea).

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)

Body: ProductCustomFieldCreateInput

Responses:
- 201: Product custom field value set successfully (ProductCustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)
- 500: The value could not be saved (Error)

### GET /product/{id}/custom_field/{id_custom_field} (Get Product Custom Field)

Retrieve a single product custom field by its unique identifier.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_custom_field` (path, integer, required): Custom field identifier; if provided, returns values for that field only

Responses:
- 200: Product custom field values retrieved successfully (ProductCustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /product/{id}/custom_field/{id_custom_field} (Update Product Custom Field Value)

Update the value(s) of a custom field already assigned to a product. Values must match the field type.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_custom_field` (path, integer, required): Custom field identifier (required, via URL segment)

Body: ProductCustomFieldUpdateInput

Responses:
- 200: Product custom field value updated successfully (ProductCustomField)
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)
- 500: The value could not be saved (Error)

### DELETE /product/{id}/custom_field/{id_custom_field} (Remove Product Custom Field Value)

Remove the value(s) of a custom field from a product without deleting the custom field definition.

Parameters:
- `id` (path, integer, required): Product identifier (required, via URL segment)
- `id_custom_field` (path, integer, required): Custom field identifier (required, via URL segment)

Responses:
- 204: Product custom field value removed successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /blog/post (List Blog Posts)

Retrieve a list of blog posts or a single post by id or handle.

Parameters:
- `id` (query, integer): Post identifier; if provided, all other params are ignored
- `handle` (query, string): Post URL slug; if provided, all filter params are ignored
- `tag` (query, string): Filter by tag handle
- `active` (query, string ("true", "false")): Filter by active status with query values true or false
- `q` (query, string): Search posts by title, text, date, or handle
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Blog posts retrieved successfully (list of BlogPost, with paging)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### POST /blog/post (Create Blog Post)

Create a blog post. title and text are required; the post is published immediately (active defaults to true) and a future date schedules it. handle is generated from the title, tags are comma-separated and created when missing, image must be the id of an image in the media library and author_id a user of the store. Fires the blog created event.

Body: BlogPostCreateInput

Responses:
- 201: Blog post created successfully (BlogPost)
- 400: Bad request: the message names the missing or invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### GET /blog/post/{id} (Get Blog Post)

Retrieve a single blog post by its unique identifier.

Parameters:
- `id` (path, integer, required): Post identifier; if provided, all other params are ignored

Responses:
- 200: Blog posts retrieved successfully (BlogPost)
- 400: Bad request: invalid id, or a message naming the invalid filter and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### PUT /blog/post/{id} (Update Blog Post)

Update an existing blog post. Only provided fields are updated.

Parameters:
- `id` (path, integer, required): Post identifier (required, via URL segment)

Body: BlogPostUpdateInput

Responses:
- 200: Blog post updated successfully (BlogPost)
- 400: Bad request: invalid id, or a message naming the invalid field and the rule it breaks (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)
- 409: Already exists (Error)

### DELETE /blog/post/{id} (Delete Blog Post)

Permanently delete a blog post together with its tag links. It disappears from the store blog immediately and cannot be restored. Fires the blog deleted event.

Parameters:
- `id` (path, integer, required): Post identifier (required, via URL segment or query string)

Responses:
- 204: Blog post deleted successfully
- 400: Bad request (Error)
- 401: Bad credentials (Error)
- 404: Not found (Error)

### GET /blog/tag (List Blog Tags)

Retrieve a list of the store's blog tags.

Parameters:
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Blog tags retrieved successfully (list of BlogTag, with paging)
- 400: Bad request (Error)
- 401: Bad credentials (Error)

### GET /blog/author (List Blog Authors)

Retrieve a list of the store's users, to pick an id for a blog post's author_id.

Parameters:
- `page` (query, integer): Page number (default: 1)
- `limit` (query, integer): Results per page (default: 25, max: 50)

Responses:
- 200: Blog authors retrieved successfully (list of BlogAuthor, with paging)
- 400: Bad request (Error)
- 401: Bad credentials (Error)

### GET /theme (Get Theme)

Current values of the store's active theme in the Theme Editor: options (colours, fonts, sizes, what to show),
objects (navigation, homepage, homepage blocks, gallery, popups) and read-only resolved values (media URLs,
inherited colours, font stacks, and the titles of the pages, categories, brands, tags and products the navigation
and the homepage point to). Options and objects can be sent back as they are to PUT /theme. Media fields and
items take a media id from GET /media; navigation and homepage items take ids from GET /page, /category, /brand
and /product (tags: the tags of GET /product). The result is large: to find specific fields use GET /theme/field with q, which also returns their
current value.

Responses:
- 200: Theme retrieved successfully (Theme)
- 401: Bad credentials (Error)
- 403: The account lacks full access to Appearance (view, edit and delete), which the Theme Editor needs (Error)

### PUT /theme (Update Theme)

Partial change of the store's active theme through the Theme Editor pipeline: the same validation, CSS
compilation and saving as the visual editor. Run it first with mode "dry_run" (validates and compiles, saves
nothing); "publish" changes the live store and keeps the theme as it was as a version in the Theme Editor
history, so the merchant can go back. Options not sent keep their value; an object sent replaces that object
(navigation: only the locations sent). An option the active theme does not use (its "themes" in GET
/theme/field) can only be sent with the value it already has or its default (an empty default is left out of
GET /theme/field), which is what sending all the options back needs. Objects hold at most 5 popups, 3 homepage
blocks, 3 template images and 6 items in gallery, mobile_gallery and footer_images; each popup shows on one
page ("location"); the "target_blank" fields take true or false. A slider takes a number between its min and
max, a whole number when its "validation" in GET /theme/field is integer (the step is the visual editor's
increment). "changed" lists the options and objects sent, also those sent with the value they already have.
For a design change, read GET /theme/guide first: the Theme Editor takes every change it has an option for,
before any custom code.

Body: object
- `options` (object): Fields to change, by name (GET /theme/field), e.g. {"basecolor": "#1a73e8"}
- `objects` (object): Objects to replace, by type, in the shape GET /theme returns them
- `mode` (string ("dry_run", "publish")): "dry_run" validates and compiles without saving; "publish" changes the live store

Responses:
- 200: Theme change validated and compiled (dry_run) or published (ThemeUpdate)
- 400: Invalid JSON body (Error)
- 401: Bad credentials (Error)
- 403: The account lacks full access to Appearance (view, edit and delete), which the Theme Editor needs (Error)
- 422: Invalid change: validation_errors or compile_errors say why (ThemeError)
- 500: Publishing failed (ThemeError)

### GET /theme/field (List Theme Fields)

Fields of the store's active theme in the Theme Editor, with their type, allowed values, validation, current
value, default value and the titles of the tab and panel the editor shows them under (panel is the technical
name). The catalogue has about 300 fields: without q nor panel the result is the summary of its panels (panel,
titles, subpanels and number of fields); find fields with q (every word, accents ignored, in the name, label,
panel, subpanel or options, e.g. "cor", "cor botao", "banner", "fonte") and/or panel. total says how many match;
fields has the first limit of them. Change them with PUT /theme.

Parameters:
- `q` (query, string): Words to find, all of them, in the field name, label, panel, subpanel or options
- `panel` (query, string): Only the fields of a panel, by the start of its technical name (e.g. "theme-options-general > logo")
- `limit` (query, integer): Fields to return when filtering (default: 20, max: 100)

Responses:
- 200: Theme fields, or the summary of the panels, retrieved successfully (ThemeFields)
- 400: q, panel or limit is a list, or limit is not a whole number from 1 to 100 (Error)
- 401: Bad credentials (Error)
- 403: The account lacks full access to Appearance (view, edit and delete), which the Theme Editor needs (Error)

### GET /theme/guide (Get Theme Guide)

Read before changing the store's design. The guide says where each change goes (content, Theme Editor options,
then custom CSS, JS and HTML for layout and structure, without copying the theme) and the rules of custom code that
break the store when missed. Also the active theme's CSS variables with their current values and the size of
the custom code already there. With path, the structure of that page as the store serves it (one element per
line: tag, id, classes and the start of its own text), to take selectors from. Open to whoever can see
Appearance, as GET /theme/code: the CSS variables are in the CSS the store already serves.

Parameters:
- `path` (query, string): Path of a page of the store's site, e.g. "/" for the homepage or the path of a product's url

Responses:
- 200: Guide retrieved successfully (ThemeGuide)
- 400: path is not a path of the store's site (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 422: The store did not serve the page (a store in maintenance, a path that does not exist, or a redirect) (Error)

### GET /theme/code (Get Theme Code)

The store's custom code, from Appearance > Advanced: custom_css (CSS added to every page), custom_js (JavaScript
on every page), head_html and footer_html (HTML, rendered as Twig with the store's data, at the end of the
<head> and of the <body> of every page). An empty string is no code.

Responses:
- 200: Custom code retrieved successfully (ThemeCode)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)

### PUT /theme/code (Update Theme Code)

Change the store's custom code, as Appearance > Advanced in the admin: only the fields sent change. The checks
are the admin's: custom_css must compile as LESS (it is stored compiled), head_html and footer_html must be valid
Twig; custom_js is not checked and is stored as sent. Run it first with mode "dry_run" (validates,
saves nothing); "publish" changes the live store on every page, including the checkout, and keeps the code it
replaces as a version (GET /theme/version). Each field replaces the whole stored value: send what is there
(GET /theme/code) with only your block changed. Read GET /theme/guide first: what belongs in the Theme Editor
instead, the selectors of the page, and the CSS the compiler breaks.

Body: object
- `custom_css` (string): CSS or LESS added to every page
- `custom_js` (string): JavaScript added to every page
- `head_html` (string): HTML at the end of the <head>, rendered as Twig
- `footer_html` (string): HTML at the end of the <body>, rendered as Twig
- `mode` (string ("dry_run", "publish")): "dry_run" validates without saving; "publish" changes the live store

Responses:
- 200: Code validated (dry_run) or published (ThemeCodeUpdate)
- 400: Invalid JSON body (Error)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 422: Invalid change: validation_errors says why, by field (ThemeError)
- 500: Saving failed (ThemeError)

### GET /theme/template (List Theme Templates or Get a Theme Template)

The store's e-mail templates (order, abandoned cart, sign-up, password recovery, reviews, rewards, stock alert,
digital products, ...) and system pages (maintenance, 404, payment change, and login on a store whose theme is its
own copy), from Appearance > Advanced.
Without a name, the list says which ones the store changed. With a name (GET /theme/template/{name}), its Twig
code (the store's, or the original when the store has not changed it) and its e-mail subjects (Twig too).

Parameters:
- `name` (query, string): Template name, e.g. "email-order" (via URL segment)

Responses:
- 200: Templates retrieved successfully (ThemeTemplates)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not a template (Error)

### GET /theme/template/{name} (Get Theme Template)

Retrieve a single theme template by its unique identifier.

Parameters:
- `name` (path, string, required): Template name, e.g. "email-order" (via URL segment)

Responses:
- 200: Retrieved successfully (ThemeTemplate)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not a template (Error)

### PUT /theme/template/{name} (Update Theme Template)

Change an e-mail template or a system page, as Appearance > Advanced in the admin: source is the Twig code,
subjects the e-mail's subjects (Twig too) by setting (GET /theme/template/{name}); only what is sent changes.
The code and the subjects must be valid Twig and an e-mail must render, with the store's data and a sample customer
and order. A system page is checked as Twig only: it renders when a visitor opens it, so an error in its data
(such as a division by zero) shows there. Run it first with mode "dry_run": it saves nothing and returns the
rendered e-mail in preview (subject and html). "publish" changes what customers receive and see, and keeps the template it replaces as a version
(GET /theme/version). The maintenance and 404 pages change only after the store is launched.

Parameters:
- `name` (path, string, required): Template name, e.g. "email-order" (via URL segment)

Body: object
- `source` (string): Twig code of the template
- `subjects` (object): E-mail subjects by setting, e.g. {"signup_email_subject": "Bem-vindo a {{ store.name }}"}
- `mode` (string ("dry_run", "publish")): "dry_run" validates and previews without saving; "publish" changes the live store

Responses:
- 200: Template validated and previewed (dry_run) or published (ThemeTemplateUpdate)
- 400: Invalid JSON body (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or a maintenance or 404 page before the store is launched (Error)
- 404: Not a template (Error)
- 422: Invalid change: validation_errors says why, by field (source, subjects.<setting>) (ThemeError)
- 500: Saving failed (ThemeError)

### POST /theme/template/{name}/restore (Restore Theme Template)

Go back to the original code of an e-mail template or a system page, as "Reverter para valores de origem" in the
admin. The e-mail subjects stay. The store's code is kept as a version (GET /theme/version), so it can come back.

Parameters:
- `name` (path, string, required): Template name, e.g. "email-order" (via URL segment)

Responses:
- 200: Original template restored (ThemeTemplate)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)
- 404: Not a template (Error)
- 500: Restoring failed (Error)

### GET /theme/version (List Theme Versions or Get a Theme Version)

Versions of the store's appearance kept before each change, newest first, the last 25 of each asset: the Theme
Editor options (asset "theme", the versions the editor lists), each custom code tab ("css", "javascript", "html")
and each template (its name). Changes in the admin and through the API keep them. Without an id, the list
(without content); with an id (GET /theme/version/{id}), the version with its content. The content of a version of
the theme options needs full access to Appearance, as GET /theme. Go back to one with
POST /theme/version/{id}/restore.

Parameters:
- `id` (query, integer): Version identifier (via URL segment)
- `asset` (query, string): Only the versions of an asset: theme, css, javascript, html or a template name

Responses:
- 200: Versions retrieved successfully (ThemeVersions)
- 400: Not an asset (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or a version of the theme options read by an account without full access to Appearance (view, edit and delete) (Error)
- 404: Not found (Error)

### GET /theme/version/{id} (Get Theme Version)

Retrieve a single theme version by its unique identifier.

Parameters:
- `id` (path, integer, required): Version identifier (via URL segment)

Responses:
- 200: Retrieved successfully (ThemeVersion)
- 400: Not an asset (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or a version of the theme options read by an account without full access to Appearance (view, edit and delete) (Error)
- 404: Not found (Error)

### POST /theme/version/{id}/restore (Restore Theme Version)

Go back to a version from GET /theme/version: the Theme Editor options of the version over the current ones (as
the editor loads a version), or the code of a custom code tab or of a template, with the same checks as a change.
Run it first with mode "dry_run" (validates, saves nothing); "publish" changes the live store and keeps what it
replaces as a new version. A version of the theme options needs full access to Appearance, as the Theme Editor.

Parameters:
- `id` (path, integer, required): Version identifier (via URL segment)

Body: object
- `mode` (string ("dry_run", "publish")): "dry_run" validates without saving; "publish" changes the live store

Responses:
- 200: Version validated (dry_run) or published (ThemeVersionRestore)
- 400: Invalid JSON body (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or a version of the theme options restored by an account without full access to Appearance (view, edit and delete) (Error)
- 404: Not found (Error)
- 409: The version cannot be restored (ThemeError)
- 422: Invalid version: validation_errors or compile_errors say why (ThemeError)
- 500: Publishing failed (ThemeError)

### GET /theme/catalog (List Themes)

The themes for the store, as Templates in the admin: each with its price before VAT, whether the store can use it
(free, bought or in its plan) and whether it is active; and the store's custom template, made and edited in the
admin. Themes are bought in the admin, at admin_url.

Responses:
- 200: Themes retrieved successfully (ThemeCatalog)
- 401: Bad credentials (Error)
- 403: Forbidden (Error)

### POST /theme/catalog/{id}/activate (Activate Theme)

Make a theme the store can use its active theme, as Ativar in Templates in the admin; "custom" as the id
activates the store's custom template. The Theme Editor options are kept as a version first; with
reset_options true they go back to the theme's original ones (as "Versão original" in the admin). The storefront
changes at once: the call takes about 30 seconds, while the theme's stylesheet reaches the CDN.

Parameters:
- `id` (path, string, required): Theme identifier from GET /theme/catalog, or "custom" (via URL segment)

Body: object
- `reset_options` (boolean): Put back the theme's original Theme Editor options

Responses:
- 200: Theme activated; the themes after the change (ThemeCatalog)
- 400: Invalid JSON body (Error)
- 401: Bad credentials (Error)
- 403: Forbidden, or a theme the store cannot use (buy it at admin_url) (Error)
- 404: Not found (Error)
- 409: The store has no custom template (Error)
- 422: reset_options is not a boolean (Error)
- 500: Saving failed (Error)

## Schemas

### Store

Store settings, configuration, and theme information

- `username` (string): Store unique username/handle
- `name` (string): Store name
- `country_code` (string): Store country code (ISO 3166-1 alpha-3)
- `description` (string): Store description
- `notice` (string): Store notice message displayed to customers
- `show_email` (boolean): Whether the store email is publicly visible
- `enable_shipping_methods` (boolean): Whether shipping methods selection is enabled
- `redirects_enabled` (boolean): Whether URL redirects are switched on for the store; while off, no redirect sends visitors on, even the active ones. Switched in the admin
- `email` (string): Store contact email
- `phone` (string): Store contact phone number
- `cellphone` (string): Store mobile phone number
- `address` (string): Store physical address
- `latitude` (string): Store location latitude
- `longitude` (string): Store location longitude
- `currency` (string): Store currency code (ISO 4217)
- `footer_info` (string): Footer information text
- `page_title` (string): Store page title for SEO
- `meta_description` (string, nullable): Store meta description for SEO
- `meta_tags` (string, nullable): Store meta tags for SEO
- `storefront_language` (string): Storefront display language
- `settings` (object): Store configuration settings organized by feature area
- `settings.abandoned` (object)
- `settings.abandoned.carts_automatic_notifications` (boolean)
- `settings.abandoned.carts_client_notification` (string, nullable)
- `settings.abandoned.carts_coupon` (string, nullable)
- `settings.abandoned.carts_email_lead` (string, nullable)
- `settings.abandoned.carts_notification_type` (string, nullable)
- `settings.abandoned.carts_send_after` (string, nullable)
- `settings.brands` (object)
- `settings.brands.per_page` (integer, nullable)
- `settings.brands.sorting` (string)
- `settings.cart` (object)
- `settings.cart.field_billing_phone` (string)
- `settings.cart.field_company` (string)
- `settings.cart.field_delivery_phone` (string)
- `settings.cart.field_fiscal_id` (string)
- `settings.cart.page_privacy` (object, nullable)
- `settings.cart.page_privacy.created_at` (string)
- `settings.cart.page_privacy.handle` (string)
- `settings.cart.page_privacy.id` (string)
- `settings.cart.page_privacy.title` (string)
- `settings.cart.page_privacy.updated_at` (string)
- `settings.cart.page_privacy.url` (string)
- `settings.cart.page_terms` (object, nullable)
- `settings.cart.related_products_intelligent` (boolean)
- `settings.cart.users_registration` (string)
- `settings.categories` (object)
- `settings.categories.per_page` (integer, nullable)
- `settings.categories.sorting` (string)
- `settings.category` (object)
- `settings.category.default_order` (string)
- `settings.domain` (object)
- `settings.domain.offer` (string)
- `settings.order_auto_archive_days` (integer): Days after creation when orders are archived automatically, from 1 to 365 (90 by default). Read only
- `settings.order_auto_archive_delivered` (boolean): Whether paid and delivered orders are archived automatically. Read only
- `settings.order_return_active` (boolean, nullable)
- `settings.order_return_page` (object, nullable)
- `settings.order_return_request` (boolean, nullable)
- `settings.order_return_time` (integer, nullable)
- `settings.products` (object)
- `settings.products.per_page_catalog` (integer, nullable)
- `settings.products.per_page_home` (integer)
- `settings.related` (object)
- `settings.related.products_active` (boolean)
- `settings.related.products_title` (string)
- `settings.related.products_type` (string)
- `settings.require` (object)
- `settings.require.tfa_authentication` (boolean)
- `settings.rewards` (object)
- `settings.rewards.active` (boolean)
- `settings.rewards.anniversary` (boolean)
- `settings.rewards.anniversary_ratio` (integer)
- `settings.rewards.birthday_email_subject` (string)
- `settings.rewards.birthday_email_text` (string)
- `settings.rewards.exclude` (one of string, boolean): false when not set
- `settings.rewards.exclude_items` (array of string)
- `settings.rewards.expire` (integer)
- `settings.rewards.filter` (string)
- `settings.rewards.message_account` (string)
- `settings.rewards.message_birthday` (string)
- `settings.rewards.message_checkout` (string)
- `settings.rewards.message_confirm` (string)
- `settings.rewards.message_login` (string)
- `settings.rewards.message_newsletter` (string)
- `settings.rewards.message_page` (one of string, boolean): false when not set
- `settings.rewards.message_product` (string)
- `settings.rewards.message_redeem_checkout` (string)
- `settings.rewards.message_reviews` (string)
- `settings.rewards.message_saved_account` (string)
- `settings.rewards.newsletter` (boolean)
- `settings.rewards.newsletter_email_subject` (string)
- `settings.rewards.newsletter_email_text` (string)
- `settings.rewards.newsletter_ratio` (integer)
- `settings.rewards.order_email_subject` (string)
- `settings.rewards.order_email_text` (string)
- `settings.rewards.order_ratio` (integer)
- `settings.rewards.page` (string, nullable)
- `settings.rewards.plural_label` (one of string, boolean): false when not set
- `settings.rewards.redeem_exclude` (one of string, boolean): false when not set
- `settings.rewards.redeem_exclude_items` (array of string)
- `settings.rewards.redeem_maximum` (integer)
- `settings.rewards.redeem_minimum` (integer)
- `settings.rewards.redeem_ratio` (number)
- `settings.rewards.reviews` (boolean)
- `settings.rewards.reviews_email_subject` (string)
- `settings.rewards.reviews_email_text` (string)
- `settings.rewards.reviews_ratio` (integer)
- `settings.rewards.send_emails_birthday` (boolean)
- `settings.rewards.send_emails_expiring` (boolean)
- `settings.rewards.send_emails_newsletter` (boolean)
- `settings.rewards.send_emails_order` (boolean)
- `settings.rewards.send_emails_reviews` (boolean)
- `settings.rewards.send_emails_signup` (boolean)
- `settings.rewards.signup` (boolean)
- `settings.rewards.signup_email_subject` (string)
- `settings.rewards.signup_email_text` (string)
- `settings.rewards.signup_ratio` (integer)
- `settings.rewards.singular_label` (one of string, boolean): false when not set
- `settings.rewards.tax_settings` (one of string, boolean): false when not set
- `settings.shipping` (object)
- `settings.shipping.blacklist` (string, nullable)
- `settings.shipping.whitelist_auto_recharge` (boolean, nullable)
- `settings.tax` (object)
- `settings.tax.customer_country` (string, nullable)
- `settings.tax.location` (string, nullable)
- `settings.tax.validate_vies` (string)
- `settings.taxes` (object)
- `settings.taxes.automate_eu` (string, nullable)
- `settings.taxes.customer_country` (string)
- `settings.taxes.geolocation` (string, nullable)
- `settings.taxes.included` (string)
- `settings.taxes.legacy` (string, nullable)
- `settings.taxes.location` (string)
- `settings.taxes.location_country_code` (string)
- `settings.taxes.location_country_code_alpha2` (string)
- `settings.taxes.use_billing_address` (string, nullable)
- `settings.taxes.validate_vies` (string, nullable)
- `settings.wholesale` (object)
- `settings.wholesale.checkbox_label` (one of string, boolean): false when not set
- `settings.wholesale.client_signup` (boolean)
- `settings.wholesale.filter` (one of string, boolean): false when not set
- `settings.wholesale.show_exclusive_only` (boolean)
- `settings.wholesale.show_regular_price` (boolean)
- `settings.wholesale.taxes_included` (boolean)
- `url` (string): Full store URL
- `theme` (string): Current active theme identifier
- `theme_origin` (string): Original theme identifier before customization
- `theme_last_modified` (integer): Theme last modification timestamp (Unix epoch)
- `has_custom_template` (boolean): Whether the store has a custom template
- `navigation` (object): Store navigation menus
- `navigation.primary` (array of object)
- `navigation.primary[].menu_text` (string)
- `navigation.primary[].menu_type` (string)
- `navigation.primary[].menu_url` (string)
- `navigation.primary[].menu_item` (one of integer, string): Linked item: the numeric identifier of a page, category, brand or product, or the handle of a system page (home, catalog, ...); null or an empty string on a URL item
- `navigation.primary[].menu_item_handle` (string, nullable)
- `navigation.primary[].target_blank` (boolean)
- `navigation.secondary` (array of object)
- `navigation.secondary[].menu_text` (string)
- `navigation.secondary[].menu_type` (string)
- `navigation.secondary[].menu_url` (string)
- `navigation.secondary[].menu_item` (one of integer, string): Linked item: the numeric identifier of a page, category, brand or product, or the handle of a system page (home, catalog, ...); null or an empty string on a URL item
- `navigation.secondary[].menu_item_handle` (string, nullable)
- `navigation.secondary[].target_blank` (boolean)
- `navigation.catalogs_menus` (array of object)
- `navigation.catalogs_menus[].menu_text` (string)
- `navigation.catalogs_menus[].menu_type` (string)
- `navigation.catalogs_menus[].menu_url` (string)
- `navigation.catalogs_menus[].menu_item` (string)
- `navigation.catalogs_menus[].target_blank` (boolean)
- `payments` (object): Available payment methods
- `payments.credit_card` (object)
- `payments.credit_card.active` (boolean)
- `payments.credit_card.alias` (string)
- `payments.credit_card.countries` (one of boolean, array)
- `payments.credit_card.default` (boolean)
- `payments.credit_card.description` (string)
- `payments.credit_card.filter` (string)
- `payments.credit_card.gateway` (string)
- `payments.credit_card.image` (string)
- `payments.credit_card.logo` (string)
- `payments.credit_card.message` (string)
- `payments.credit_card.method` (string)
- `payments.credit_card.title` (string)
- `payments.credit_card.type` (string)
- `payments.credit_card.value` (integer)
- `payments.credit_card.value_percent` (integer)
- `payments.multibanco` (object)
- `payments.multibanco.active` (boolean)
- `payments.multibanco.alias` (string)
- `payments.multibanco.countries` (one of boolean, array)
- `payments.multibanco.default` (boolean)
- `payments.multibanco.description` (string)
- `payments.multibanco.filter` (string)
- `payments.multibanco.gateway` (string)
- `payments.multibanco.image` (string)
- `payments.multibanco.logo` (string)
- `payments.multibanco.max_date` (one of integer, string): Days the payment reference stays valid: an integer (or null) until the setting is saved in the admin, a string afterwards
- `payments.multibanco.message` (string)
- `payments.multibanco.method` (string)
- `payments.multibanco.title` (string)
- `payments.multibanco.type` (string)
- `payments.multibanco.value` (integer)
- `payments.multibanco.value_percent` (integer)
- `payments.mbway` (object)
- `payments.mbway.accept_terms` (boolean)
- `payments.mbway.active` (boolean)
- `payments.mbway.alias` (string)
- `payments.mbway.countries` (one of boolean, array)
- `payments.mbway.data` (object, nullable): Payment gateway credentials and configuration
- `payments.mbway.default` (boolean)
- `payments.mbway.description` (string)
- `payments.mbway.filter` (string)
- `payments.mbway.gateway` (string)
- `payments.mbway.image` (string)
- `payments.mbway.logo` (string)
- `payments.mbway.message` (string)
- `payments.mbway.method` (string)
- `payments.mbway.title` (string)
- `payments.mbway.type` (string)
- `payments.mbway.value` (integer)
- `payments.mbway.value_percent` (integer)
- `payments.paypal` (object)
- `payments.paypal.active` (boolean)
- `payments.paypal.alias` (string)
- `payments.paypal.countries` (one of string, boolean): false when not set
- `payments.paypal.default` (boolean)
- `payments.paypal.description` (string)
- `payments.paypal.email` (string)
- `payments.paypal.filter` (string)
- `payments.paypal.gateway` (string)
- `payments.paypal.image` (string)
- `payments.paypal.logo` (string)
- `payments.paypal.message` (string)
- `payments.paypal.method` (string)
- `payments.paypal.title` (string)
- `payments.paypal.type` (string)
- `payments.paypal.value` (integer)
- `payments.paypal.value_percent` (integer)
- `payments.wallets` (object)
- `payments.wallets.active` (boolean)
- `payments.wallets.alias` (string)
- `payments.wallets.countries` (one of boolean, array)
- `payments.wallets.default` (boolean)
- `payments.wallets.description` (string)
- `payments.wallets.filter` (string)
- `payments.wallets.gateway` (string)
- `payments.wallets.image` (string)
- `payments.wallets.logo` (string)
- `payments.wallets.message` (string)
- `payments.wallets.method` (string)
- `payments.wallets.title` (string)
- `payments.wallets.type` (string)
- `payments.wallets.value` (integer)
- `payments.wallets.value_percent` (integer)
- `payments.payshop` (object)
- `payments.payshop.active` (boolean)
- `payments.payshop.alias` (string)
- `payments.payshop.countries` (one of string, boolean): false when not set
- `payments.payshop.default` (boolean)
- `payments.payshop.description` (string)
- `payments.payshop.filter` (string)
- `payments.payshop.gateway` (string)
- `payments.payshop.image` (string)
- `payments.payshop.logo` (string)
- `payments.payshop.max_date` (one of integer, string): Days the payment reference stays valid: an integer (or null) until the setting is saved in the admin, a string afterwards
- `payments.payshop.message` (string)
- `payments.payshop.method` (string)
- `payments.payshop.title` (string)
- `payments.payshop.type` (string)
- `payments.payshop.value` (integer)
- `payments.payshop.value_percent` (integer)
- `payments.bank_transfer` (object)
- `payments.bank_transfer.active` (boolean)
- `payments.bank_transfer.alias` (string)
- `payments.bank_transfer.countries` (one of boolean, array)
- `payments.bank_transfer.default` (boolean)
- `payments.bank_transfer.description` (string)
- `payments.bank_transfer.filter` (string)
- `payments.bank_transfer.gateway` (string)
- `payments.bank_transfer.image` (string)
- `payments.bank_transfer.message` (string)
- `payments.bank_transfer.method` (string)
- `payments.bank_transfer.title` (string)
- `payments.bank_transfer.type` (string)
- `payments.bank_transfer.value` (integer)
- `payments.bank_transfer.value_percent` (integer)
- `payments.on_delivery` (object)
- `payments.on_delivery.active` (boolean)
- `payments.on_delivery.alias` (string)
- `payments.on_delivery.countries` (one of string, boolean): false when not set
- `payments.on_delivery.default` (boolean)
- `payments.on_delivery.description` (string)
- `payments.on_delivery.filter` (string)
- `payments.on_delivery.gateway` (string)
- `payments.on_delivery.image` (string)
- `payments.on_delivery.message` (string)
- `payments.on_delivery.method` (string)
- `payments.on_delivery.title` (string)
- `payments.on_delivery.type` (string)
- `payments.on_delivery.value` (number)
- `payments.on_delivery.value_percent` (integer)
- `payments.pick_up` (object)
- `payments.pick_up.active` (boolean)
- `payments.pick_up.alias` (string)
- `payments.pick_up.countries` (one of string, boolean): false when not set
- `payments.pick_up.default` (boolean)
- `payments.pick_up.description` (string)
- `payments.pick_up.filter` (string)
- `payments.pick_up.gateway` (string)
- `payments.pick_up.image` (string)
- `payments.pick_up.message` (string)
- `payments.pick_up.method` (string)
- `payments.pick_up.title` (string)
- `payments.pick_up.type` (string)
- `payments.pick_up.value` (integer)
- `payments.pick_up.value_percent` (integer)
- `payments.custom` (object)
- `payments.custom.active` (boolean)
- `payments.custom.alias` (string)
- `payments.custom.countries` (one of string, boolean): false when not set
- `payments.custom.default` (boolean)
- `payments.custom.description` (string)
- `payments.custom.filter` (string)
- `payments.custom.gateway` (string)
- `payments.custom.message` (string)
- `payments.custom.method` (string)
- `payments.custom.title` (string)
- `payments.custom.type` (string)
- `payments.custom.value` (integer)
- `payments.custom.value_percent` (integer)
- `locations` (array of object): Store physical locations for pickup and returns, each with id, title, name, address, address_extra, city, zip_code, country, country_code, phone, default, and return
- `locations[].id` (string)
- `locations[].title` (string)
- `locations[].name` (string)
- `locations[].address` (string)
- `locations[].address_extra` (string)
- `locations[].city` (string)
- `locations[].zip_code` (string)
- `locations[].country` (string)
- `locations[].country_code` (string)
- `locations[].phone` (string)
- `locations[].default` (boolean)
- `locations[].return` (boolean)
- `order_paid_default_status` (string): Default status for paid orders
- `currency_sign` (string): Currency symbol
- `domain` (string): Store domain
- `logo` (string): Store logo image URL
- `favicon` (string): Store favicon URL
- `basecolor` (string): Store primary/base color (hex)
- `basecolor_contrast` (string): Contrast color for base color (hex)
- `secondarycolor` (string): Store secondary color (hex)
- `secondarycolor_contrast` (string): Contrast color for secondary color (hex)
- `category_default_order` (string): Default product ordering within categories
- `categories_sorting` (string): Categories list sorting order
- `brands_sorting` (string): Brands list sorting order
- `products_per_page_home` (string): Number of products displayed on the homepage
- `products_per_page_catalog` (string): Number of products per page in catalog
- `categories_per_page` (string): Number of categories per page
- `brands_per_page` (string): Number of brands per page
- `facebook` (string): Facebook page URL
- `twitter` (string): Twitter/X profile URL
- `instagram` (string): Instagram profile URL
- `pinterest` (string): Pinterest profile URL
- `youtube` (string): YouTube channel URL
- `linkedin` (string): LinkedIn page URL
- `tiktok` (string): TikTok profile URL
- `show_branding` (boolean): Whether Shopkit branding is displayed in the store
- `is_ssl` (boolean): Whether SSL is enabled for the store
- `maintenance` (boolean): Whether the store is in maintenance mode: closed to customers until the merchant publishes it in the admin
- `assets` (object): Theme asset URLs
- `assets.url` (string)
- `assets.images` (string)
- `assets.css` (string)
- `assets.plugins` (string)
- `assets.scripts` (string)
- `images_header` (array of string): Header/slider image URLs
- `featured_blocks` (array of object): Featured content blocks displayed on the storefront
- `featured_blocks[].title` (string)
- `featured_blocks[].description` (string)
- `featured_blocks[].icon` (string)
- `dark_mode` (boolean): Whether dark mode is enabled
- `taxes_included` (boolean): Whether product prices include taxes
- `dashboard_language` (string): Admin dashboard language

### Product

Product details including pricing, stock, images, variants, metadata, campaign info, and storefront URLs

- `id` (integer)
- `title` (string)
- `reference` (string, nullable)
- `barcode` (string, nullable)
- `price` (number, nullable): Regular price, with the product's tax included when the store shows prices with tax (settings.taxes.included in GET /store) and the product is taxed, otherwise as saved. For a wholesale_exclusive product it is the wholesale price, with the tax included only when the store shows wholesale prices with tax. POST and PUT take the price before tax: to send back a value read here with tax included, divide it by 1 + tax/100
- `price_formatted` (string, nullable)
- `price_promo` (number, nullable): Promotional or campaign price, with tax included under the same rule as price
- `price_promo_formatted` (string, nullable)
- `cost_per_item` (number, nullable): Merchant-only cost per item; used for margin/profit (never exposed on the public storefront)
- `profit` (number, nullable): Calculated gross profit (price − cost_per_item); merchant-only, null when cost_per_item is unset
- `margin` (number, nullable): Calculated margin percentage ((profit / price) × 100); merchant-only, null when cost_per_item is unset or price is 0
- `profit_wholesale` (number, nullable): Calculated gross profit on the wholesale/B2B price (net wholesale price − cost_per_item); merchant-only, null when cost_per_item or the wholesale price is unset
- `margin_wholesale` (number, nullable): Calculated margin percentage on the wholesale/B2B price ((profit_wholesale / net wholesale price) × 100); merchant-only, null when cost_per_item or the wholesale price is unset, or the wholesale price is 0
- `price_wholesale` (number, nullable): Wholesale price before tax, as saved
- `price_wholesale_formatted` (string, nullable)
- `price_non_wholesale` (number, nullable)
- `price_non_wholesale_formatted` (string, nullable)
- `promo_show_percentage` (boolean)
- `price_promo_percentage` (number, nullable)
- `price_on_request` (boolean)
- `created_at` (string)
- `status` (integer (1, 2, 3, 4)): 1=active, 2=hidden, 3=out_of_stock, 4=soon
- `status_alias` (string ("active", "hidden", "out_of_stock", "soon"))
- `position` (integer)
- `origin_country` (string, nullable)
- `harmonized_code` (string, nullable)
- `eprel` (object, nullable): EPREL energy-label data for regulated products. Derived fields may be absent when EPREL sync did not succeed; only `id` and `group` are guaranteed.
- `eprel.id` (string): EPREL registration number
- `eprel.group` (string): EPREL product group slug
- `eprel.class` (string ("APPP", "APP", "AP", "A", "B", "C", "D", "E", "F", "G"), nullable): Energy efficiency class. EPREL encodes `+` as `P`: `AP` = `A+`, `APP` = `A++`, `APPP` = `A+++`.
- `eprel.scale` (string, nullable): Energy efficiency class scale
- `eprel.model` (string, nullable): EPREL model identifier
- `eprel.brand` (string, nullable): Supplier or trademark
- `eprel.label_url` (string, nullable): EPREL energy label URL
- `eprel.sheet_url` (string, nullable): EPREL product information sheet URL
- `eprel.icons` (array of string): Energy-label thumbnail URLs. Single A-G icon for most groups; up to three A-E icons for tyres (fuel efficiency, wet grip, external rolling noise).
- `eprel.synced_at` (integer, nullable): Unix timestamp of the last successful EPREL sync
- `shipping` (number)
- `shipping_alone` (boolean)
- `featured` (boolean)
- `new` (boolean)
- `is_promotion` (boolean)
- `description` (string, nullable)
- `description_short` (string)
- `excerpt` (string)
- `video_url` (string, nullable)
- `video_embed_url` (one of string, boolean)
- `file` (string, nullable)
- `tax` (number)
- `taxable` (boolean)
- `reduced_rate` (string, nullable): EU VAT reduced rate identifier — see [valid identifiers](https://shopk.it/developers/vat-rates-eu?lang=en#reduced-rates)
- `meta_description` (string, nullable)
- `meta_tags` (string, nullable)
- `handle` (string)
- `page_title` (string, nullable)
- `weight` (integer)
- `sales` (integer)
- `variants_same_values` (boolean): True while all variants share the product's price and stock; changing an option (PUT /product/{id}/option/{id_option}) makes it false. Read-only
- `updated_at` (string)
- `wholesale` (boolean)
- `wholesale_exclusive` (boolean)
- `related_products` (one of ProductRelatedProducts, object)
- `related_products_ids` (string, nullable)
- `related_products_title` (string, nullable)
- `id_campaign` (string, nullable): Campaign identifier when the product is associated with a campaign
- `campaign_start_date` (string, nullable)
- `campaign_end_date` (string, nullable)
- `campaign` (one of ProductCampaign, object)
- `type` (string ("physical", "digital"))
- `stock_threshold` (string, nullable)
- `client_tags_option` (string, nullable)
- `promo` (boolean)
- `url` (string)
- `add_cart_url` (string)
- `wishlist` (ProductWishlist)
- `permalink` (string)
- `image` (ProductImage)
- `images` (array of ProductImage): Gallery images except the cover, which is returned in `image`, plus the images of the product variants. A product with one gallery image and no variant images returns an empty array.
- `price_without_tax` (number, nullable): Price before tax that applies now: the promotional or campaign price when there is one, otherwise the regular price
- `price_with_tax` (number, nullable): price_without_tax with the product's tax added
- `is_vendible` (boolean)
- `price_vendible` (number, nullable)
- `price_vendible_formatted` (string, nullable)
- `rewards` (integer, nullable)
- `categories` (array of ProductCategory)
- `brand` (one of ProductBrand, object)
- `tags` (array of ProductTag)
- `clients_tags` (array of ProductTag)
- `options` (array of ProductOption)
- `option_groups` (array of ProductOptionGroup)
- `price_range` (array of number)
- `price_min` (number, nullable)
- `price_max` (number, nullable)
- `stock` (ProductStock)
- `rating` (one of ProductRating, object)
- `custom_fields` (object, nullable)
- `extra_options` (object, nullable)
- `digital_files` (array of ProductDigitalFile)
- `digital_settings` (object, nullable): Digital delivery settings; null for physical products.
- `digital_settings.allowed_downloads` (integer, nullable): Downloads allowed per purchase; null for unlimited.
- `digital_settings.allowed_days` (integer, nullable): Days the download stays available after purchase; null for no expiry.
- `digital_settings.send_updated_files` (boolean)
- `tabs` (array of ProductTab)
- `guarantee` (object, nullable): Commercial guarantee for a physical product.
- `guarantee.type` (string ("producer", "store"))
- `guarantee.years` (number)
- `guarantee.brand` (string)
- `guarantee.model` (string)
- `guarantee.garan` (boolean): Show GARAN only for producer guarantees longer than two years.
- `guarantee.terms_file` (integer, nullable): Media identifier of the guarantee terms PDF.

### ProductInput

Input payload for creating a product; title and categories are always required, price is required unless price_on_request is enabled, price_wholesale is required when wholesale is enabled

- `title` (string): Product title (required for creation)
- `reference` (string): SKU / product reference code
- `barcode` (string): EAN, ISBN, UPC, GTIN or other barcode
- `price` (number): Price before tax, saved as sent: the store adds the product's tax when it shows prices with tax. GET /product then returns price with the tax included: send a value read there with prices_include_tax true, or divide it by 1 + tax/100. For a wholesale_exclusive product GET returns the wholesale price as price: do not send that one back as price. Required unless price_on_request is enabled; on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `prices_include_tax` (boolean): true: price and price_promo are sent with the product's tax included (the tax GET /product returns) and saved before tax. price_wholesale is always before tax
- `price_wholesale` (number): Wholesale price before tax (required when wholesale is enabled and price_on_request is off, must be <= price); needs wholesale on the product (already on, or wholesale: true in the same request) and a plan with wholesale, 400 otherwise; to remove it, send wholesale: false. On PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `price_promo` (one of number, string): Promotional price before tax (must be lower than price). Pass empty string to clear; on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `cost_per_item` (one of number, string): Merchant-only cost per item; used for margin/profit (never exposed to customers). Pass empty string to clear
- `promo_show_percentage` (boolean): Show discount as percentage badge
- `price_on_request` (boolean): Enable price on request, hides price; on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `status` (integer (1, 2, 3, 4)): Product status: 1 (active), 2 (hidden), 3 (out of stock), 4 (coming soon)
- `position` (integer): Sort position for manual ordering
- `shipping` (number): Additional shipping cost for this product; on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `shipping_alone` (boolean): Ship this product separately from other items
- `featured` (boolean): Mark product as featured
- `new` (boolean): Mark product as new
- `is_promotion` (boolean): Mark product as in promotion
- `description` (string): Full product description (allows HTML)
- `excerpt` (string): Short plain-text description
- `video_url` (string): Embeddable video URL (YouTube or Vimeo)
- `file` (string): Downloadable file URL for digital products
- `tax` (number): Deprecated, use taxable: not a percentage. Above 0 turns tax on at the store's rate (the product then shows that rate, e.g. 23), 0 turns it off; without the legacy tax settings the value itself is not stored
- `taxable` (boolean): Apply tax to this product
- `reduced_rate` (string): EU VAT reduced rate identifier — see [valid identifiers](https://shopk.it/developers/vat-rates-eu?lang=en#reduced-rates)
- `wholesale` (boolean): Enable wholesale pricing
- `wholesale_exclusive` (boolean): Restrict product to wholesale customers only
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `page_title` (string): Custom page title for SEO
- `weight` (integer): Product weight in grams; on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `origin_country` (string): Country of origin code (ISO 3166-1 alpha-3, 3 chars)
- `harmonized_code` (string): Harmonized System (HS) code for customs: one of the 6-digit codes of the HS nomenclature; any other non-empty value returns 400
- `eprel_id` (string): EPREL registration number (positive integer, requires eprel_product_group).

> **Note:** Sync is best-effort. When EPREL is unreachable, the product saves with `eprel.id`/`group` and no `synced_at` — retry later. When EPREL confirms the pair is not registered (404), the merchant sees a warning in the product detail page; stored data is preserved.
- `eprel_product_group` (string ("airconditioners", "dishwashers2019", "electronicdisplays", "hotwaterstoragetanks", "lightsources", "localspaceheaters", "ovens", "professionalrefrigeratedstoragecabinets", "rangehoods", "refrigeratingappliances2019", "refrigeratingappliancesdirectsalesfunction", "residentialventilationunits", "smartphonestablets20231669", "solidfuelboilerpackages", "solidfuelboilers", "spaceheaterpackages", "spaceheaters", "tumbledryers20232534", "tyres", "washerdriers2019", "washingmachines2019", "waterheaterpackages", "waterheaters")): EPREL product group slug (requires eprel_id)
- `images` (array of string): Array of image URLs (max 10). The first URL becomes the cover image. They are imported asynchronously, so they are not in this response yet. On update, a non-empty list replaces the whole gallery; an empty array leaves the current images untouched.
- `categories` (array of integer): Array of category identifiers (required for creation)
- `brand` (integer): Brand identifier (integer); 0 removes the brand. The response embeds the full brand object.
- `tags` (array of string): Array of tag name strings
- `stock_enabled` (boolean): Enable stock management for this product (needs a plan with stock management; stays off while price_on_request is true). While it is off, stock_qty, stock_backorder, stock_show and stock_notify are ignored and left empty
- `stock_qty` (integer): Units in stock (requires stock_enabled); on PUT to a product with variants without variants_same_values it is ignored, set it on each variant with PUT /product/{id}/option/{id_option}
- `stock_backorder` (boolean): Allow orders when out of stock (requires stock_enabled)
- `stock_show` (boolean): Display available stock to customers (requires stock_enabled)
- `stock_sold_single` (boolean): Limit to 1 unit per order (requires stock_enabled)
- `stock_notify` (integer): Minimum stock level that triggers a notification (requires stock_enabled)
- `min_quantity` (integer): Minimum purchase quantity per order
- `max_quantity` (integer): Maximum purchase quantity per order (must be >= min_quantity)
- `min_quantity_wholesale` (integer): Minimum purchase quantity for wholesale/B2B clients (requires wholesale)
- `max_quantity_wholesale` (integer): Maximum purchase quantity for wholesale/B2B clients (requires wholesale)
- `min_quantity_enforce_extras` (boolean): Enforce min_quantity even when the product has extra options selected
- `tier_sum_variants` (boolean): Sum variant quantities together when applying quantity tier discounts
- `guarantee` (object, nullable): Commercial guarantee. Omit to preserve; null removes it. Submitted fields merge with the stored guarantee. Terms files are managed in the store administration.
- `guarantee.type` (string ("producer", "store"))
- `guarantee.years` (number)
- `guarantee.brand` (string)
- `guarantee.model` (string)
- `guarantee.garan` (boolean): Show GARAN only for producer guarantees longer than two years.
- `type` (string ("physical", "digital")): Product type, set on creation only. Digital products require the plan option for digital product files.
- `digital_files` (array of object): Digital products only: at least 1 entry, at most the plan limit. A file is downloaded asynchronously into the store's digital files and appears on the product after processing; a link is an external URL the customer is redirected to. Files still to be downloaded are added after the entries already resolved, in the order the download queue processes them, and are not returned in digital_files until then. Sending the list replaces all entries, including files still to be downloaded (send a file again with its original url to keep it); omitting it keeps them.
- `digital_files[].type` (string ("file", "link"))
- `digital_files[].title` (string)
- `digital_files[].url` (string): Max 255 characters for a link, 2048 for a file.
- `digital_settings` (object): Digital products only. Defaults on creation: unlimited downloads, no expiry, send_updated_files true.
- `digital_settings.allowed_downloads` (integer, nullable): Downloads allowed per purchase; null for unlimited.
- `digital_settings.allowed_days` (integer, nullable): Days the download stays available after purchase; null for no expiry.
- `digital_settings.send_updated_files` (boolean): Send updated files to customers automatically.
- `notify_updated_files` (boolean): Write-only, digital products only. When true and send_updated_files is on, e-mails the customers who bought the product about the updated files. Cannot be sent while the product has files or images still to be downloaded, including digital_files entries of type file in the same request (400); send it in a later request once those files appear in digital_files.

### ProductUpdateInput

Input payload for updating a product; no field is required and omitted fields keep their value. A sent 0 is applied to weight, shipping, position, stock_notify and tax, brand 0 removes the brand, and an empty string clears a text field, price_promo or cost_per_item (an empty title or handle keeps its value)

- `title` (string): Product title
- `reference` (string): SKU / product reference code
- `barcode` (string): EAN, ISBN, UPC, GTIN or other barcode
- `price` (number): Price before tax, saved as sent: GET /product returns price with the product's tax included when the store shows prices with tax, so send a value read there back with prices_include_tax true, or divide it by 1 + tax/100. For a wholesale_exclusive product GET returns the wholesale price as price: do not send that one back as price. When sent it cannot be empty. Required when price_on_request is switched off on a product that has price on request
- `prices_include_tax` (boolean): true: price and price_promo are sent with the product's tax included (the tax GET /product returns) and saved before tax; a price equal to the current one with tax, to the cent, keeps it. price_wholesale is always before tax
- `price_wholesale` (number): Wholesale price before tax (must be <= price)
- `price_promo` (one of number, string): Promotional price before tax (must be lower than price). Pass empty string to clear
- `cost_per_item` (one of number, string): Merchant-only cost per item; used for margin/profit (never exposed to customers). Pass empty string to clear
- `promo_show_percentage` (boolean): Show discount as percentage badge
- `price_on_request` (boolean): Enable price on request, hides price
- `status` (integer (1, 2, 3, 4)): Product status: 1 (active), 2 (hidden), 3 (out of stock), 4 (coming soon)
- `position` (integer): Sort position for manual ordering
- `shipping` (number): Additional shipping cost for this product
- `shipping_alone` (boolean): Ship this product separately from other items
- `featured` (boolean): Mark product as featured
- `new` (boolean): Mark product as new
- `is_promotion` (boolean): Mark product as in promotion
- `description` (string): Full product description (allows HTML)
- `excerpt` (string): Short plain-text description
- `video_url` (string): Embeddable video URL (YouTube or Vimeo)
- `file` (string): URL of the public attachment shown on the product page (the "File" field in the admin); digital product files go in digital_files
- `type` (string ("physical", "digital")): Product type, set on creation only (default physical). On update only the stored value is accepted. Digital products require the plan option for digital product files.
- `digital_files` (array of object): Digital products only: at least 1 entry, at most the plan limit. A file is downloaded asynchronously into the store's digital files and appears on the product after processing; a link is an external URL the customer is redirected to. Files still to be downloaded are added after the entries already resolved, in the order the download queue processes them, and are not returned in digital_files until then. Sending the list replaces all entries, including files still to be downloaded (send a file again with its original url to keep it); omitting it keeps them.
- `digital_files[].type` (string ("file", "link"))
- `digital_files[].title` (string)
- `digital_files[].url` (string): Max 255 characters for a link, 2048 for a file.
- `digital_settings` (object): Digital products only. On update, omitted fields keep their value. Defaults on creation: unlimited downloads, no expiry, send_updated_files true.
- `digital_settings.allowed_downloads` (integer, nullable): Downloads allowed per purchase; null for unlimited.
- `digital_settings.allowed_days` (integer, nullable): Days the download stays available after purchase; null for no expiry.
- `digital_settings.send_updated_files` (boolean): Send updated files to customers automatically.
- `notify_updated_files` (boolean): Write-only, digital products only. When true and send_updated_files is on, e-mails the customers who bought the product about the updated files. Cannot be sent while the product has files or images still to be downloaded, including digital_files entries of type file in the same request (400); send it in a later request once those files appear in digital_files.
- `tax` (number): Tax percentage (deprecated, use taxable instead)
- `taxable` (boolean): Apply tax to this product
- `reduced_rate` (string): EU VAT reduced rate identifier — see [valid identifiers](https://shopk.it/developers/vat-rates-eu?lang=en#reduced-rates)
- `wholesale` (boolean): Enable wholesale pricing
- `wholesale_exclusive` (boolean): Restrict product to wholesale customers only
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `page_title` (string): Custom page title for SEO
- `weight` (integer): Product weight in grams
- `origin_country` (string): Country of origin code (ISO 3166-1 alpha-3, 3 chars)
- `harmonized_code` (string): Harmonized System (HS) code for customs: one of the 6-digit codes of the HS nomenclature; any other non-empty value returns 400
- `eprel_id` (string): EPREL registration number (positive integer, requires eprel_product_group).

> **Note:** Sync is best-effort. When EPREL is unreachable, the product saves with `eprel.id`/`group` and no `synced_at` — retry later. When EPREL confirms the pair is not registered (404), the merchant sees a warning in the product detail page; stored data is preserved.
- `eprel_product_group` (string ("airconditioners", "dishwashers2019", "electronicdisplays", "hotwaterstoragetanks", "lightsources", "localspaceheaters", "ovens", "professionalrefrigeratedstoragecabinets", "rangehoods", "refrigeratingappliances2019", "refrigeratingappliancesdirectsalesfunction", "residentialventilationunits", "smartphonestablets20231669", "solidfuelboilerpackages", "solidfuelboilers", "spaceheaterpackages", "spaceheaters", "tumbledryers20232534", "tyres", "washerdriers2019", "washingmachines2019", "waterheaterpackages", "waterheaters")): EPREL product group slug (requires eprel_id)
- `images` (array of string): Array of image URLs (max 10). The first URL becomes the cover image. They are imported asynchronously, so they are not in this response yet. On update, a non-empty list replaces the whole gallery; an empty array leaves the current images untouched.
- `categories` (array of integer): Array of category identifiers
- `brand` (integer): Brand identifier (integer). The response embeds the full brand object.
- `tags` (array of string): Array of tag name strings
- `stock_enabled` (boolean): Enable stock management for this product (needs a plan with stock management; stays off while price_on_request is true). While it is off, stock_qty, stock_backorder, stock_show and stock_notify are ignored and left empty; send stock_enabled true in the same request to set them
- `stock_qty` (integer): Units in stock (requires stock_enabled)
- `stock_backorder` (boolean): Allow orders when out of stock (requires stock_enabled)
- `stock_show` (boolean): Display available stock to customers (requires stock_enabled)
- `stock_sold_single` (boolean): Limit to 1 unit per order (requires stock_enabled)
- `stock_notify` (integer): Minimum stock level that triggers a notification (requires stock_enabled)
- `min_quantity` (integer): Minimum purchase quantity per order
- `max_quantity` (integer): Maximum purchase quantity per order (must be >= min_quantity)
- `min_quantity_wholesale` (integer): Minimum purchase quantity for wholesale/B2B clients (requires wholesale)
- `max_quantity_wholesale` (integer): Maximum purchase quantity for wholesale/B2B clients (requires wholesale)
- `min_quantity_enforce_extras` (boolean): Enforce min_quantity even when the product has extra options selected
- `tier_sum_variants` (boolean): Sum variant quantities together when applying quantity tier discounts
- `guarantee` (object, nullable): Commercial guarantee. Omit to preserve; null removes it. Submitted fields merge with the stored guarantee. Terms files are managed in the store administration.
- `guarantee.type` (string ("producer", "store"))
- `guarantee.years` (number)
- `guarantee.brand` (string)
- `guarantee.model` (string)
- `guarantee.garan` (boolean): Show GARAN only for producer guarantees longer than two years.

### ProductOptionGroup

Option group for product variants (e.g. Size, Color)

- `id` (integer)
- `title` (string)
- `options` (array of ProductOptionGroupOption)

### ProductOptionGroupInput

Input payload for creating or updating a product option group

- `title` (string): Option group title, e.g. "Size" or "Color" (required)
- `options` (array of string): Array of option value strings, e.g. ["S","M","L"], non-empty and different from each other ignoring case (required)

### ProductOption

Product variant payload returned by variant endpoints and embedded product options

- `id` (integer)
- `id_variant_1` (integer, nullable)
- `id_variant_2` (integer, nullable)
- `id_variant_3` (integer, nullable)
- `title` (string)
- `price_non_wholesale` (number, nullable)
- `price_non_wholesale_formatted` (string, nullable)
- `price` (number, nullable): Variant price, with the product's tax included when the store shows prices with tax (settings.taxes.included in GET /store) and the product is taxed, otherwise as saved. For a wholesale_exclusive product it is the wholesale price, with the tax included only when the store shows wholesale prices with tax. POST and PUT take the price before tax: to send back a value read here with tax included, divide it by 1 + tax/100
- `price_formatted` (string, nullable)
- `price_promo` (number, nullable): Variant promotional or campaign price, with tax included under the same rule as price
- `price_promo_formatted` (string, nullable)
- `cost_per_item` (number, nullable): Merchant-only cost per item for this variant; used for margin/profit (never exposed on the public storefront)
- `profit` (number, nullable): Calculated gross profit for this variant (price − cost_per_item); merchant-only, null when cost_per_item is unset
- `margin` (number, nullable): Calculated margin percentage for this variant ((profit / price) × 100); merchant-only, null when cost_per_item is unset or price is 0
- `profit_wholesale` (number, nullable): Calculated gross profit for this variant on the wholesale/B2B price (net wholesale price − cost_per_item); merchant-only, null when cost_per_item or the wholesale price is unset
- `margin_wholesale` (number, nullable): Calculated margin percentage for this variant on the wholesale/B2B price ((profit_wholesale / net wholesale price) × 100); merchant-only, null when cost_per_item or the wholesale price is unset, or the wholesale price is 0
- `price_wholesale` (number, nullable): Variant wholesale price, with tax included under the same rule as price
- `price_wholesale_formatted` (string, nullable)
- `min_quantity` (integer, nullable)
- `max_quantity` (integer, nullable)
- `min_quantity_wholesale` (integer, nullable)
- `max_quantity_wholesale` (integer, nullable)
- `price_without_tax` (number, nullable): Variant price before tax that applies now: the promotional or campaign price when there is one, otherwise the regular price
- `price_with_tax` (number, nullable): price_without_tax with the product's tax added
- `promo` (boolean)
- `price_promo_percentage` (number, nullable)
- `price_on_request` (boolean)
- `stock` (integer, nullable)
- `shipping` (number)
- `weight` (integer)
- `reference` (string, nullable)
- `barcode` (string, nullable)
- `active` (boolean)
- `url` (string)
- `image` (ProductImage)
- `wishlist` (ProductWishlist)
- `rewards` (integer, nullable)
- `is_vendible` (boolean)
- `price_vendible` (number, nullable)
- `price_vendible_formatted` (string, nullable)

### ProductOptionInput

Input payload for updating a product option; at least one field with a value is required

- `price` (number): Variant price before tax, saved as sent (GET returns it with the tax included when the store shows prices with tax, and returns the wholesale price instead for a wholesale_exclusive product)
- `prices_include_tax` (boolean): true: price, price_promo and price_wholesale are sent with the product's tax included (the tax GET /product returns) and saved before tax; a price equal to the current one with tax, to the cent, keeps it
- `price_wholesale` (number): Variant wholesale price before tax (requires wholesale enabled on product)
- `price_promo` (one of number, string): Variant promotional price before tax (must be lower than variant price). Pass empty string to clear
- `cost_per_item` (one of number, string): Merchant-only cost per item for this variant; used for margin/profit (never exposed to customers). Pass empty string to clear
- `price_on_request` (boolean): Enable price on request for this variant
- `stock` (integer): Stock quantity for this variant. Ignored while the product's stock_enabled is false or the plan has no stock management; set stock_enabled true with PUT /product/{id}
- `shipping` (number): Additional shipping cost for this variant
- `weight` (integer): Variant weight in grams
- `reference` (string): Variant SKU / reference code
- `barcode` (string): Variant barcode (EAN, ISBN, UPC, GTIN)
- `active` (boolean): Enable or disable this variant
- `image` (string): Public URL of the image to upload. The response returns processed variants (thumb, square, full, alt).

### Category

Product category with full details

- `id` (integer)
- `title` (string)
- `is_parent` (boolean)
- `is_child` (boolean)
- `parent` (integer)
- `parent_title` (string, nullable)
- `description` (string)
- `position` (integer)
- `active` (boolean)
- `handle` (string)
- `page_title` (string, nullable)
- `meta_description` (string, nullable)
- `meta_tags` (string, nullable)
- `num_products` (integer)
- `filter` (string ("all", "non_wholesale", "only_wholesale")): Customers who see the category: all, non_wholesale (only customers without wholesale) or only_wholesale (only wholesale customers)
- `url` (string)
- `permalink` (string)
- `image` (object)
- `image.thumb` (string)
- `image.square` (string)
- `image.full` (string)
- `image.alt` (string, nullable)
- `image.video_url` (string, nullable)
- `parents` (one of Category, object): Recursive parent category chain, null if top-level
- `children` (array of Category): Child categories, null if no children
- `created_at` (string): Creation timestamp in ISO 8601 format
- `updated_at` (string): Last update timestamp in ISO 8601 format

### CategorySimple

Simplified category reference with basic fields

- `id` (integer)
- `title` (string)
- `handle` (string)

### CategoryInput

Input payload for creating or updating a category

- `title` (string): Category title (required for creation)
- `active` (boolean): Set category as active or hidden; true when created without it, unchanged when updated without it
- `parent_id` (integer): Parent category identifier for creating a subcategory (max 2 nesting levels)
- `description` (string): Category description (allows HTML)
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `image` (string): Public URL of the image to upload. The response returns processed variants (thumb, square, full, alt).
- `position` (integer): Sort position for manual ordering
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords

### CategoryUpdateInput

Input payload for updating a category; no field is required and omitted fields keep their value, and a subcategory updated without parent_id stays under its parent. A sent 0 is applied to position, parent_id 0 turns a subcategory into a main category, and an empty string clears a text field (an empty title or handle keeps its value)

- `title` (string): Category title
- `active` (boolean): Set category as active or hidden; unchanged when omitted
- `parent_id` (integer): Parent category identifier; a main category cannot become a subcategory; 0 turns a subcategory into a main category, and a subcategory updated without parent_id stays under its parent
- `description` (string): Category description (allows HTML)
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `image` (string): Public URL of the image to upload; an empty string removes the current image. The response returns processed variants (thumb, square, full, alt).
- `position` (integer): Sort position for manual ordering
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords

### Brand

Product brand with full details

- `id` (integer)
- `title` (string)
- `description` (string)
- `manufacturer` (string, nullable)
- `responsible` (string, nullable)
- `importer` (string, nullable)
- `brand_url` (string, nullable)
- `position` (integer)
- `active` (boolean)
- `handle` (string)
- `page_title` (string, nullable)
- `meta_description` (string, nullable)
- `meta_tags` (string, nullable)
- `num_products` (integer): Number of products associated with this brand
- `url` (string): Storefront URL for this brand
- `permalink` (string): Permanent URL for this brand
- `image` (object): Brand image in multiple sizes
- `image.thumb` (string)
- `image.square` (string)
- `image.full` (string)
- `image.alt` (string, nullable)
- `image.video_url` (string, nullable)
- `created_at` (string): Creation timestamp in ISO 8601 format
- `updated_at` (string): Last update timestamp in ISO 8601 format

### BrandSimple

Simplified brand reference with basic fields

- `id` (integer)
- `title` (string)
- `handle` (string)

### BrandInput

Input payload for creating or updating a brand

- `title` (string): Brand name (required for creation)
- `active` (boolean): Set brand as active or hidden; true when created without it, unchanged when updated without it
- `description` (string): Brand description (allows HTML)
- `manufacturer` (string): Manufacturer name (EU product safety regulation)
- `responsible` (string): Responsible person (EU product safety regulation)
- `importer` (string): Importer name (EU product safety regulation)
- `brand_url` (string): Brand website URL
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `image` (string): Public URL of the brand logo to upload. The response returns processed variants (thumb, square, full, alt).
- `position` (integer): Sort position for manual ordering
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords

### BrandUpdateInput

Input payload for updating a brand; no field is required and omitted fields keep their value; a sent 0 is applied to position, and an empty string clears a text field (an empty title or handle keeps its value)

- `title` (string): Brand name
- `active` (boolean): Set brand as active or hidden; unchanged when omitted
- `description` (string): Brand description (allows HTML)
- `manufacturer` (string): Manufacturer name (EU product safety regulation)
- `responsible` (string): Responsible person (EU product safety regulation)
- `importer` (string): Importer name (EU product safety regulation)
- `brand_url` (string): Brand website URL
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `image` (string): Public URL of the brand logo to upload; an empty string removes the current logo. The response returns processed variants (thumb, square, full, alt).
- `position` (integer): Sort position for manual ordering
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords

### Order

Order details including items, totals, shipping, payment, and status

- `id` (integer)
- `hash` (string)
- `total` (number)
- `subtotal` (number)
- `product_tax` (number)
- `total_tax` (number)
- `discount` (number)
- `shipping` (object): Shipping cost breakdown
- `shipping.value` (number)
- `shipping.tax` (number)
- `shipping.tax_percent` (number)
- `shipping.discount` (number)
- `shipping.discount_percent` (number)
- `coupon_code` (string, nullable)
- `coupon_discount` (string)
- `coupon_discount_tax` (string)
- `rewards` (object): Loyalty rewards information
- `rewards.earned` (boolean)
- `rewards.redeemed` (boolean)
- `rewards.total_earned` (integer)
- `rewards.total_redeemed` (integer)
- `rewards.discount` (number)
- `rewards.tax` (number)
- `profitability` (object): Order profitability derived from per-line cost snapshots captured at sale time. Lines without recorded cost are excluded from cost_total but counted in lines_total.
- `profitability.revenue_products` (number): Product revenue used as the profit/margin base: product subtotal (without tax) net of discounts and rewards; excludes shipping and payment fees
- `profitability.cost_total` (number): Sum of cost_per_item × quantity for lines with recorded cost
- `profitability.profit_gross` (number, nullable): revenue_products minus cost_total (gross profit); null when no line has a recorded cost
- `profitability.margin_pct` (number, nullable): (profit_gross / revenue_products) × 100; null when there is no cost data or revenue_products is 0
- `profitability.lines_with_cost` (integer): Number of order lines with a recorded cost snapshot
- `profitability.lines_total` (integer): Total number of order lines
- `created_at` (string): Creation timestamp in ISO 8601 format
- `update_at` (string, nullable): Last update timestamp in ISO 8601 format
- `sent_at` (string, nullable)
- `delivered_at` (string, nullable)
- `paid_at` (string, nullable)
- `currency` (string)
- `status` (integer (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
- `paid` (boolean)
- `is_new` (boolean)
- `archived` (boolean): Whether the order is archived
- `archived_at` (string, nullable): Date and time the order was archived, null when it is not archived
- `invoice_url` (string, nullable)
- `weight` (integer)
- `observations` (string)
- `note` (string)
- `client_note` (string)
- `custom_field` (array of object)
- `custom_field[].title` (string)
- `custom_field[].data` (array of object)
- `custom_field[].data[].key` (string)
- `custom_field[].data[].value` (string)
- `custom_field[].internal` (object, nullable): Internal metadata for this custom field entry
- `tracking_code` (string)
- `tracking_carrier` (string)
- `tracking_created_at` (string)
- `tracking_url` (string)
- `return_tracking_code` (string)
- `return_tracking_carrier` (string)
- `return_tracking_created_at` (string)
- `return_tracking_url` (string)
- `return_request` (string, nullable)
- `expected_arrival_from` (string, nullable)
- `expected_arrival_until` (string, nullable)
- `shipping_url` (string)
- `return_url` (string)
- `at_code` (string)
- `tax_exemption` (string, nullable)
- `tax_settings` (object, nullable): Tax configuration for the order
- `tax_settings.included` (string)
- `tax_settings.customer_country` (string)
- `tax_settings.location` (string)
- `tax_settings.validate_vies` (string, nullable)
- `tax_settings.use_billing_address` (string, nullable)
- `tax_settings.geolocation` (string, nullable)
- `tax_settings.automate_eu` (string, nullable)
- `tax_settings.legacy` (string, nullable)
- `tax_settings.location_country_code` (string)
- `tax_settings.location_country_code_alpha2` (string)
- `wholesale` (boolean)
- `billing_info_same_delivery` (string)
- `is_digital` (boolean)
- `payment` (object): Payment details
- `payment.data` (any): Payment-specific data (varies by method); e.g. the IBAN string for bank transfer, an object for other gateways
- `payment.value` (number)
- `payment.tax` (number)
- `payment.tax_percent` (number)
- `payment.title` (string)
- `payment.method` (string, nullable)
- `payment.type` (string, nullable)
- `payment.gateway` (string, nullable)
- `payment.url` (string, nullable): Storefront payment page URL for the customer to complete payment; null when the order cannot be paid there (already paid, canceled, or a method without an online payment step such as pick_up or on_delivery).
- `payment.status` (string ("paid", "pending", "failed", "expired", "canceled")): Only in the order retrieved by id. paid; pending (not paid yet, also while the client confirms at the bank); failed (the gateway declined it, see failure); expired (the reference expired unpaid); canceled (the order or the payment was canceled).
- `payment.failure` (object, nullable): Only in the order retrieved by id. Why an unpaid payment did not go through, when the gateway recorded a reason; null otherwise.
- `payment.failure.code` (string ("card_declined", "insufficient_funds", "expired_card", "incorrect_cvc", "authentication_required", "expired", "canceled", "declined")): card_declined, insufficient_funds, expired_card, incorrect_cvc, authentication_required (waiting for the client to confirm at the bank or in the MB WAY app), expired, canceled or declined.
- `payment.failure.gateway_code` (string): The code as the gateway recorded it.
- `payment.gateway_id` (string, nullable): Only in the order retrieved by id. The payment identifier at the gateway (e.g. the Stripe payment intent), to match it in the gateway's dashboard; null when unknown.
- `payment.reference_expires_at` (string, nullable): Only in the order retrieved by id. When the payment reference expires: a day (yyyy-mm-dd) or an ISO 8601 instant; null when the gateway did not record a full date.
- `payment.attempts` (array of object): Only in the order retrieved by id. The payment attempts recorded with the gateway, oldest first; null when none is recorded (gateways without payment records, such as classic EasyPay Multibanco or PayPal). More than one paid attempt is a duplicate payment.
- `payment.attempts[].gateway` (string)
- `payment.attempts[].method` (string)
- `payment.attempts[].gateway_id` (string, nullable): The attempt identifier at the gateway; null when unknown.
- `payment.attempts[].status` (string): The attempt status recorded by Shopkit, e.g. pending or paid.
- `payment.attempts[].gateway_status` (string, nullable): The status as the gateway returned it; null when not recorded.
- `payment.attempts[].amount` (number, nullable)
- `payment.attempts[].created_at` (string, nullable)
- `payment.attempts[].paid_at` (string, nullable)
- `payment.paid_after_cancel` (boolean, nullable): Only in the order retrieved by id. true when the payment arrived after the order was canceled; false when paid without a cancellation before it; null when not paid.
- `status_alias` (string ("pending", "processing", "sent", "canceled", "waiting_confirmation", "waiting_payment", "waiting_stock", "delivered", "returned", "pickup_available", "waiting_shipment", "waiting_return"))
- `status_description` (string)
- `coupon` (object, nullable): Coupon details if applied
- `coupon.code` (string, nullable)
- `coupon.type` (string, nullable)
- `coupon.value` (number)
- `coupon.discount` (number)
- `shipment_method` (string, nullable)
- `shipment_method_id` (integer, nullable)
- `shipment_type` (string, nullable)
- `tracking_status` (object): Current tracking event status
- `tracking_status.event_alias` (string, nullable)
- `tracking_status.event_description` (string, nullable)
- `attribution` (object): Traffic source the order is attributed to, and where the order was created. Orders placed without a storefront visit (API, order import) carry resource_origin and the sales_channel the caller declared; every other field is null for them, and for storefront orders whose visit was not captured.
- `attribution.sales_channel` (string, nullable): Sales channel slug the order is attributed to (e.g. google_shopping, facebook_store, instagram_store, or a custom channel such as POS)
- `attribution.sales_channel_title` (string, nullable): Human-readable name for sales_channel
- `attribution.sales_channel_order_id` (string, nullable): Order number on the sales channel (e.g. the marketplace order id)
- `attribution.sales_channel_order_url` (string, nullable): Order page on the sales channel
- `attribution.resource_origin` (string, nullable): Where the order was created: storefront, api or import (app-ios and app-android for orders the merchant apps create through the API). Null for orders created before this field existed
- `attribution.source` (string, nullable): Traffic source (e.g. google, facebook, newsletter)
- `attribution.medium` (string, nullable): Traffic medium (e.g. cpc, organic, email, referral, social)
- `attribution.campaign` (string, nullable): Campaign name
- `attribution.content` (string, nullable): Campaign content, used to differentiate similar content or links within the same ad
- `attribution.term` (string, nullable): Campaign term, typically the paid search keyword
- `attribution.ad_campaign_id` (string, nullable): Campaign identifier declared by the ad or email platform (Google Ads gad_campaignid, utm_id, or Mailchimp mc_cid)
- `attribution.referrer` (string, nullable): Referrer host of the visit that led to the order (e.g. google.com)
- `attribution.referrer_url` (string, nullable): Referrer host and path, without the query string. Only present when the referring site allows the path to be sent
- `attribution.landing_page` (string, nullable): First page path visited in the session that led to the order
- `attribution.click_id_type` (string, nullable): Type of click identifier captured (e.g. gclid, fbclid)
- `attribution.captured_at` (string, nullable): Timestamp when the attribution data was captured
- `permalink` (string)
- `client` (object): Client information for the order
- `client.id` (string)
- `client.hash` (string)
- `client.name` (string): Name of whoever buys: the billing name when the order has its own billing address (a gift shipped to someone else), otherwise the delivery name
- `client.email` (string)
- `client.company` (string, nullable)
- `client.fiscal_id` (string, nullable)
- `client.is_registered` (boolean): Whether the order's client currently has an account (client type registered), as is_registered on the client resource; false for guests, deleted clients and orders without a client
- `client.picture` (string, nullable)
- `client.delivery` (object)
- `client.delivery.name` (string, nullable)
- `client.delivery.phone` (string, nullable)
- `client.delivery.address` (string)
- `client.delivery.address_extra` (string, nullable)
- `client.delivery.country_code` (string, nullable)
- `client.delivery.country_code_alpha_2` (string, nullable)
- `client.delivery.zip_code` (string, nullable)
- `client.delivery.city` (string, nullable)
- `client.delivery.country` (string, nullable)
- `client.billing` (object)
- `client.billing.same_as_delivery` (boolean)
- `client.billing.name` (string)
- `client.billing.phone` (string, nullable)
- `client.billing.address` (string)
- `client.billing.address_extra` (string, nullable)
- `client.billing.country_code` (string, nullable)
- `client.billing.country_code_alpha_2` (string, nullable)
- `client.billing.zip_code` (string, nullable)
- `client.billing.city` (string, nullable)
- `client.billing.country` (string, nullable)
- `client.address` (string)
- `client.postcode` (string, nullable)
- `client.town` (string, nullable)
- `client.country` (string)
- `client.country_code` (string)
- `client.phone` (string, nullable)
- `tags` (array of object)
- `tags[].id` (integer)
- `tags[].title` (string)
- `tags[].handle` (string)
- `tags[].id_module` (integer)
- `tags[].id_item` (integer)
- `tags[].id_item_int` (integer, nullable)
- `tags[].total_items` (integer)
- `tags[].created_at` (string)
- `l10n` (object): Localization settings
- `l10n.tax_id_abbr` (string)
- `l10n.tax_name` (string)
- `products_count` (integer)
- `products_quantity` (integer)
- `products` (array of object)
- `products[].id` (integer, nullable)
- `products[].id_original` (integer, nullable): Product identifier saved with the order line, kept after the product is deleted (id is then 0); null on extra option lines
- `products[].title` (string)
- `products[].option` (string, nullable)
- `products[].id_option` (string, nullable): Variant identifier as a numeric string; null when the product has no variant
- `products[].reference` (string, nullable)
- `products[].barcode` (string, nullable)
- `products[].price` (number)
- `products[].price_with_tax` (number)
- `products[].price_without_tax` (number)
- `products[].tax` (number)
- `products[].quantity` (integer)
- `products[].discount` (number)
- `products[].subtotal` (number)
- `products[].subtotal_with_tax` (number)
- `products[].subtotal_without_tax` (number)
- `products[].discount_percent` (number)
- `products[].weight` (integer)
- `products[].origin_country` (string, nullable)
- `products[].origin_country_alpha_2` (string, nullable)
- `products[].harmonized_code` (string, nullable)
- `products[].type` (string)
- `products[].url` (string, nullable)
- `products[].description_short` (string, nullable)
- `products[].image` (object)
- `products[].image.thumb` (string)
- `products[].image.square` (string)
- `products[].image.full` (string)
- `products[].image.alt` (string, nullable)
- `products[].image.video_url` (string, nullable)
- `products[].is_product` (boolean)
- `products[].extras` (array of object): Product extras (conditional)
- `products[].extras[].title` (string)
- `products[].extras[].value` (string)
- `products[].extras[].price` (number)
- `products[].extras[].tax` (number)
- `products[].extras[].quantity` (integer)
- `products[].extras[].subtotal` (number)
- `products[].files` (array of object): Digital product files (conditional)
- `products[].files[].title` (string)
- `products[].files[].url` (string)
- `products[].files[].size` (string, nullable)
- `products[].files[].ext` (string)
- `products[].files[].downloads` (integer)

### OrderInput

Input payload for updating an order

- `id` (integer): Order ID
- `status` (integer (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)): Order status ID
- `status_alias` (string ("pending", "processing", "sent", "canceled", "waiting_confirmation", "waiting_payment", "waiting_stock", "delivered", "returned", "pickup_available", "waiting_shipment", "waiting_return")): Order status alias. Ignored when the request also has status, which takes precedence
- `paid` (boolean): Mark order as paid or unpaid
- `is_new` (boolean): Mark order as new/unread or seen
- `archived` (boolean): true archives the order, false unarchives it. An archived order accepts no other change without archived false (409)
- `invoice_url` (string): External invoice URL
- `invoice_file` (string): Invoice PDF as base64 URL-safe encoded string
- `tracking_url` (string): Shipment tracking page URL
- `tracking_code` (string): Shipment tracking code
- `tracking_carrier` (string): Shipping carrier slug (auto-detected from tracking_url if not provided)
- `shipping_url` (string): Shipping label download URL
- `return_tracking_url` (string): Return shipment tracking page URL
- `return_tracking_code` (string): Return shipment tracking code
- `return_tracking_carrier` (string): Return shipping carrier slug
- `return_url` (string): Return shipping label download URL
- `at_code` (string): Portuguese tax authority transport document code (alphanumeric)
- `pickup_code` (string): Pickup point access code for the customer
- `expected_arrival_from` (string): Earliest expected delivery date (format: yyyy-mm-dd)
- `expected_arrival_until` (string): Latest expected delivery date (format: yyyy-mm-dd, must be >= expected_arrival_from)
- `note` (string): Internal order note (visible to staff only)
- `client_note` (string): Order note visible to the customer
- `notify_client` (boolean): Send email notification to client about this update
- `tags` (array of string): Array of tag name strings (replaces existing tags)
- `client_id` (integer): Client identifier of the store to associate to an order without client (created without client details). The order takes the client's email, company, fiscal ID and addresses; the client is not notified. Returns 400 when the order already has another client or the client does not exist or is banned; the client the order already has changes nothing
- `products` (array of object): Edits the order's content: every product the order keeps, in the format of POST /order, replacing its products. Required to send any of coupon_code, shipment_method_id, shipping_price_with_tax, pickup_point, payment_method, payment_note, pick_up_location, mbway_phone, bizum_phone or client; those not sent stay as the order has them. The order is validated and priced as POST /order creates one with these products, at the store's current prices unless price_with_tax is sent (the sale's own prices are not kept from the order: send products[].price_with_tax and shipping_price_with_tax again to keep them), and keeps its id, client, status, payment state, dates and redeemed reward points; status, paid and the other order fields sent in the same request are applied after the edit, as in a request without products. Only an order that is not archived, sent, delivered, returned, waiting for return or canceled, and has no shipment, can be edited (409 with the reason in message otherwise). The stock changes by the difference between the order's products and the ones sent (409 when a product is out of stock); a coupon the order already has keeps applying and counts as used once. An unpaid order whose Multibanco or Payshop reference no longer matches its total gets a new one; when the gateway cannot generate it, the order is edited and keeps its previous payment details (payment.data). A paid order moves its product sales to the products it now has and e-mails the client the files of a digital product it gains. note, client_note and tags sent with products are saved with the edit; client_id, and archived false on an archived order, are not accepted with products (400: send them in their own request). Fires one order_updated webhook event and records the edit in the order history (a new payment reference also fires the payment gateway's own, as when it is generated in the order detail); an edit that leaves the order as it was fires none and records nothing. Earned reward points already credited do not change, and neither does an invoice already issued for the order (invoice_url): it keeps the products and total it was issued with
- `products[].id` (integer): Product identifier
- `products[].id_option` (integer): Product option/variant identifier
- `products[].quantity` (integer): Quantity to order
- `products[].price_with_tax` (number): Unit price the buyer paid, tax included, as in POST /order. Sent on every line or on none, not combined with coupon_code
- `products[].extra_options` (array of object): Selected extra options: each entry identifies the extra option by id or alias and gives the chosen value
- `products[].extra_options[].id` (integer): Extra option identifier
- `products[].extra_options[].alias` (string): Extra option alias (alternative to id)
- `products[].extra_options[].value` (string): Chosen value
- `coupon_code` (string): Coupon code of the order, with products; an empty string removes it. Not combined with products[].price_with_tax or shipping_price_with_tax, also when the coupon is the order's (send coupon_code empty to remove it); an order with redeemed reward points does not take them either. On an order with redeemed reward points, a new coupon that does not combine with reward points returns 400 (Reward points are not compatible with this coupon); the coupon the order already has stays
- `shipment_method_id` (integer): Shipping method identifier, with products. Not accepted when the order's payment method, sent or kept, is pick_up (400)
- `shipping_price_with_tax` (number): Shipping the buyer paid, tax included, with products, as in POST /order
- `pickup_point` (string): Carrier pickup point, with products, as in POST /order
- `payment_method` (string): Payment method slug of an unpaid order, with products, as in POST /order; a paid order keeps the payment method it was paid with (400 for another one)
- `payment_note` (string): How the sale was paid, with products and payment_method external, as in POST /order (up to 30 characters)
- `pick_up_location` (integer): Pickup location identifier, with products and payment_method pick_up, as in POST /order
- `mbway_phone` (string): MB WAY phone number (valid Portuguese mobile number), required with products when an unpaid order's payment_method changes to mbway
- `bizum_phone` (string): Bizum phone number (valid Spanish mobile number), required with products when an unpaid order's payment_method changes to bizum
- `client` (object): The client details saved on the order, with products. Fields not sent stay as the order has them, an empty one stays empty, and the client's own record does not change; a billing address with same_as_delivery follows the delivery address. An order without client takes them only once a client is associated to it (client_id, in its own request), 400 otherwise
- `client.name` (string): Client name of an order without its own client record: the delivery and billing addresses that have the order's name take it
- `client.email` (string): Client email saved on the order
- `client.company` (string): Company name
- `client.fiscal_id` (string): Tax identification number
- `client.delivery` (object): Delivery address, in the format of POST /order
- `client.delivery.name` (string): Recipient full name
- `client.delivery.phone` (string): Contact phone number
- `client.delivery.address` (string): Street address
- `client.delivery.address_extra` (string): Additional address line (apartment, floor, etc.)
- `client.delivery.country_code` (string): Country code, as in POST /order
- `client.delivery.zip_code` (string): Postal/ZIP code
- `client.delivery.city` (string): City name
- `client.billing` (object): Billing address, in the format of POST /order
- `client.billing.same_as_delivery` (boolean): Use delivery address as billing address
- `client.billing.name` (string): Billing contact full name
- `client.billing.phone` (string): Contact phone number
- `client.billing.address` (string): Street address
- `client.billing.address_extra` (string): Additional address line (apartment, floor, etc.)
- `client.billing.country_code` (string): Country code, as in POST /order
- `client.billing.zip_code` (string): Postal/ZIP code
- `client.billing.city` (string): City name

### OrderCreateInput

Input payload for creating a new order

- `client` (object): Client object; use client.id for an existing client, or client.email plus addresses for a new one. The client must carry an identity (id, email, name or an address field). For a buyer the sales channel does not identify, send client with only client.delivery country_code (and city when known): the order is created without client (no client record, no email or SMS to the client, no automatic invoice)
- `client.id` (integer): Existing client identifier
- `client.email` (string): Client email (required for new clients, that is when client.id is not sent)
- `client.name` (string): Client full name
- `client.password` (string): Account password (only used when create_account is true)
- `client.create_account` (boolean): Create a registered account instead of a guest
- `client.send_signup_email` (boolean): Send the account registration email to the new client (it shows the password only when client.password is omitted and one is generated); only used with create_account. Independent of notify_client. When omitted, the email is sent
- `client.company` (string): Company name
- `client.fiscal_id` (string): Tax identification number
- `client.delivery` (object): Delivery address; required for orders with non-digital products (address, zip_code, city and country_code)
- `client.delivery.name` (string): Recipient full name
- `client.delivery.phone` (string): Contact phone number
- `client.delivery.address` (string): Street address
- `client.delivery.address_extra` (string): Additional address line (apartment, floor, etc.)
- `client.delivery.country_code` (string): ISO 3166-1 alpha-3 country code
- `client.delivery.zip_code` (string): Postal/ZIP code
- `client.delivery.city` (string): City name
- `client.billing` (object): Billing address; required when all products are digital, and otherwise unless same_as_delivery is true (address, zip_code, city and country_code)
- `client.billing.same_as_delivery` (boolean): Use delivery address as billing address
- `client.billing.name` (string): Billing contact full name
- `client.billing.phone` (string): Contact phone number
- `client.billing.address` (string): Street address
- `client.billing.address_extra` (string): Additional address line (apartment, floor, etc.)
- `client.billing.country_code` (string): ISO 3166-1 alpha-3 country code
- `client.billing.zip_code` (string): Postal/ZIP code
- `client.billing.city` (string): City name
- `products` (array of object): Order line items
- `products[].id` (integer): Product identifier
- `products[].id_option` (integer): Product option/variant identifier; required when the product has options, and must be an active variant of that product: a variant of another product, or one sent to a product without variants, returns 400
- `products[].quantity` (integer): Quantity to order
- `products[].price_with_tax` (number): Unit price the buyer paid, tax included, with any sales channel promotion applied. Sent on every line or on none, not combined with coupon_code or reward_points. A price on request product can be ordered only with price_with_tax
- `products[].extra_options` (one of array, object): Selected extra options, as objects with id or alias plus value (and optional quantity); extra options marked as required in the product must be present. An object keyed by extra option alias (alias: value) is also accepted
- `shipment_method_id` (integer): Shipping method identifier (GET /shipping). Not required when shipping_price_with_tax is sent; otherwise required when the order has at least one non-digital product, payment_method is not pick_up, the store has shipping methods enabled and at least one method is available for the destination country, weight and value. Not accepted with payment_method pick_up, which is collection at the store; ignored in the other cases where it is not required
- `shipping_price_with_tax` (number): Shipping the buyer paid, tax included, not combined with coupon_code or reward_points. With external prices on a paid order, no payment method fee nor payment method amount limit applies and the order total is the sum of the values sent (up to 999999999.99); on an unpaid order, the payment method fee and amount limits apply as at checkout and the total is that sum plus the fee
- `payment_method` (string): Payment method slug; must be active in the store for the order amount. Required when the order amount (products after discounts, or the final total with shipping and taxes) is greater than 0; can only be omitted for orders that total 0. Use external for a sale paid outside the store's payment methods (cash, a card terminal, a bank transfer made elsewhere): it is not offered at checkout, has no fee and no payment link, and the order can be created as paid or unpaid. An order without client has nobody to ask for the payment: unpaid, it only accepts bank_transfer, cash, custom, external, on_delivery or pick_up, and any other method needs paid true (400 otherwise)
- `payment_note` (string): How the sale was paid, only used when payment_method is external (up to 30 characters); it is returned in payment.data.note and follows the payment title on the order, e.g. "External Payment · Christmas fair"
- `pick_up_location` (integer): Pickup location identifier, required when payment_method is pick_up and the store has more than one pickup location; with a single one it is used automatically
- `pickup_point` (string): Carrier pickup point (DPD Pickup, CTT delivery points or DHL Service Points) as "number - name (city)", up to 255 characters. Only accepted when shipment_method_id is a shipping method of one of those carriers' apps (400 with any other method); without it the point is chosen when the order is shipped. It is not checked against the carrier. Returned in custom_field
- `mbway_phone` (string): MB WAY phone number (valid Portuguese mobile number), required when payment_method is mbway and the order is not created as paid
- `bizum_phone` (string): Bizum phone number (valid Spanish mobile number), required when payment_method is bizum and the order is not created as paid
- `tags` (array of string): Array of tag name strings (max 25)
- `status` (integer (1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12)): Order status: 1 (pending), 2 (processing), 3 (sent), 5 (waiting_confirmation), 6 (waiting_payment), 7 (waiting_stock), 8 (delivered), 9 (returned), 10 (pickup_available), 11 (waiting_shipment), 12 (waiting_return). An order cannot be created as canceled: create it and change its status with PUT /order/{id}
- `paid` (boolean): Mark order as paid. Without client, required for a payment_method other than bank_transfer, cash, custom, external, on_delivery or pick_up. Needs a payment_method: an order with total 0 and no payment_method has no payment (400 with paid true)
- `created_at` (string): Date and time of the order, up to now (400 for a future moment), as returned in created_at: ISO 8601 (e.g. 2026-10-20T14:30:00+01:00; without an offset it is the store's time, Europe/Lisbon), or yyyy-mm-dd (00:00 of that day). Optional: without it the order is created at the current time. The waiting payment status starts counting at the moment of the request
- `paid_at` (string): Date and time of the payment, required with paid true and a payment_method when created_at is sent (without created_at the payment is at the current time), and only accepted with paid true (400 otherwise), in the same formats as created_at, up to now and not before created_at (or the current time when created_at is not sent), so a past payment is sent with its created_at
- `sent_at` (string): Date and time the order was sent, required with status 3 when created_at is sent (without created_at it is the current time), optional with status 8 and only accepted with status 3 or 8 (400 otherwise), in the same formats as created_at, up to now and not before created_at (or the current time when created_at is not sent)
- `delivered_at` (string): Date and time the order was delivered, required with status 8 when created_at is sent (without created_at it is the current time) and only accepted with status 8 (400 otherwise), in the same formats as created_at, up to now and not before created_at (or the current time when created_at is not sent), and not before sent_at when it is sent
- `coupon_code` (string): Coupon code to apply to the order
- `reward_points` (integer): Reward points to redeem on this order
- `observations` (string): Customer observations submitted with the order
- `note` (string): Internal order note (visible to staff only)
- `client_note` (string): Order note visible to the customer
- `notify_client` (boolean): Notify the client of the new order by email, SMS and WhatsApp (default: true). When false, none of them is sent; digital files are still emailed once the order is paid
- `invoice_url` (string): External invoice URL
- `tracking_url` (string): Shipment tracking page URL
- `tracking_code` (string): Shipment tracking code
- `tracking_carrier` (string): Shipping carrier slug (auto-detected from tracking_url if not provided)
- `expected_arrival_from` (string): Earliest expected delivery date (format: yyyy-mm-dd)
- `expected_arrival_until` (string): Latest expected delivery date (format: yyyy-mm-dd, must be >= expected_arrival_from)
- `sales_channel` (string): Sales channel to attribute the order to, up to 64 characters. Known feed values are google_shopping, facebook_store, and instagram_store; any other value is kept as a custom channel (e.g. POS)
- `sales_channel_order_id` (string): Order number on the sales channel (e.g. the marketplace order id); returned in attribution.sales_channel_order_id
- `sales_channel_order_url` (string): Order page on the sales channel (http or https URL); returned in attribution.sales_channel_order_url
- `custom_field` (array of object): Custom fields recorded on the order before the confirmation notices are sent, returned as custom_field in the order. List of up to 25 objects; HTML tags are stripped.
- `custom_field[].title` (string)
- `custom_field[].key` (string)
- `custom_field[].value` (string)

### OrderEvent

Order event with type, description, timestamp, and optional user

- `event` (string ("order_created", "order_updated", "order_paid", "order_unpaid", "order_change_status", "order_change_payment", "order_payment_failed", "order_canceled", "order_waiting_shipment", "order_waiting_return", "order_sent", "order_delivered", "order_returned", "order_pickup_available", "order_tracking", "order_return_tracking", "order_return_requested", "order_return_canceled", "order_expected_arrival", "order_client_notify", "order_archived", "order_unarchived", "shipping_updated")): Event type identifier
- `event_description` (string): Human-readable event description
- `time` (string): Event timestamp in ISO 8601 format
- `user` (object, nullable): User who triggered the event, or null if system-generated
- `user.email` (string)
- `user.name` (string)

### Address

Postal address with name, street, city, postal code, and country

- `name` (string)
- `company` (string)
- `address` (string)
- `address2` (string)
- `city` (string)
- `zip_code` (string)
- `country` (string)
- `country_code` (string)
- `phone` (string)

### ClientSimple

Simplified client reference with basic fields

- `id` (integer)
- `name` (string)
- `email` (string)

### Pagination

Pagination metadata for list endpoints

- `page` (integer): Current page number
- `per_page` (integer): Number of items per page
- `previous` (string, nullable): URL for the previous page
- `next` (string, nullable): URL for the next page

### Error

Error response with message describing the issue

- `message` (string)

### Client

Customer record with contact information, addresses, and order history

- `id` (integer)
- `hash` (string)
- `name` (string)
- `email` (string)
- `company` (string, nullable)
- `initials` (string)
- `fiscal_id` (string, nullable)
- `locale` (string, nullable)
- `gender` (string, nullable)
- `birthday` (string, nullable)
- `picture` (string, nullable)
- `accepts_marketing` (boolean)
- `wholesale` (one of boolean, string): Wholesale status: true, false, or "pending"
- `created_at` (string): Creation timestamp in ISO 8601 format
- `updated_at` (string): Last update timestamp in ISO 8601 format
- `last_seen_at` (integer, nullable): Last seen timestamp as Unix epoch
- `type` (string ("registered", "guest", "deleted"))
- `is_banned` (boolean)
- `is_registered` (boolean): Whether the client has an account (type registered); false for guests and deleted clients
- `is_deleted` (boolean)
- `internal_notes` (string, nullable)
- `tags` (array of string)
- `rewards` (integer): Current reward points balance
- `rewards_savings` (one of integer, string): Total discounted from the client's orders with reward points: the integer 0 when no order records a discount, otherwise the sum as a decimal string (e.g. "200.00", or "0.00" when the recorded discounts add up to zero)
- `delivery` (object)
- `delivery.name` (string, nullable)
- `delivery.phone` (string, nullable)
- `delivery.address` (string, nullable)
- `delivery.address_extra` (string, nullable)
- `delivery.country_code` (string, nullable)
- `delivery.country_code_alpha_2` (one of string, boolean): false when not set
- `delivery.zip_code` (string, nullable)
- `delivery.city` (string, nullable)
- `delivery.country` (string, nullable)
- `billing` (object)
- `billing.same_as_delivery` (boolean)
- `billing.name` (string, nullable)
- `billing.phone` (string, nullable)
- `billing.address` (string, nullable)
- `billing.address_extra` (string, nullable)
- `billing.country_code` (string, nullable)
- `billing.country_code_alpha_2` (one of string, boolean): false when not set
- `billing.zip_code` (string, nullable)
- `billing.city` (string, nullable)
- `billing.country` (string, nullable)
- `l10n` (object)
- `l10n.tax_id_abbr` (string)
- `l10n.tax_name` (string)
- `cart` (array of object)
- `cart[].row_id` (string)
- `cart[].id` (integer)
- `cart[].handle` (string)
- `cart[].title` (string)
- `cart[].option` (string, nullable)
- `cart[].reference` (string, nullable)
- `cart[].barcode` (string, nullable)
- `cart[].price` (number)
- `cart[].tax` (number)
- `cart[].quantity` (integer)
- `cart[].subtotal` (number)
- `cart[].weight` (integer)
- `cart[].origin_country` (string, nullable)
- `cart[].harmonized_code` (string, nullable)
- `cart[].image` (string)
- `wishlist` (array of object): Products in the client's wishlist; null when the wishlist is empty
- `wishlist[].id_product` (string): Product identifier as a numeric string
- `wishlist[].id_option` (string, nullable): Variant identifier as a numeric string; null when the product was added without a variant
- `wishlist[].title` (string): Product title, followed by " - " and the variant title when there is a variant
- `wishlist[].handle` (string, nullable)
- `wishlist[].created_at` (string): Date the product was added, in the format YYYY-MM-DD HH:MM:SS
- `wishlist[].url` (string)
- `wishlist[].add_cart_url` (string)
- `wishlist[].add_wishlist_url` (string)
- `wishlist[].remove_wishlist_url` (string)
- `wishlist[].image` (string): Square image of the product or variant
- `wishlist[].stock_qty` (string, nullable): Stock quantity of the product or variant as a numeric string
- `orders_summary` (object)
- `orders_summary.paid_count` (integer)
- `orders_summary.unpaid_count` (integer)
- `orders_summary.paid_value` (number)
- `orders_summary.unpaid_value` (number)
- `orders_summary.total_count` (integer)
- `orders_summary.total_value` (number)
- `orders_summary.points_count` (integer)
- `orders_summary.points_value` (number)

### Shipment

Shipment tracking information for an order

- `id` (string)
- `tracking_code` (string)
- `carrier` (string)
- `carrier_description` (string)
- `tracking_url` (string)
- `order_id` (string, nullable): Order the shipment belongs to; null when the shipment is not associated with an order
- `type` (string)
- `operation` (string)
- `created_at` (string)
- `updated_at` (string, nullable)
- `expected_arrival_from` (string, nullable)
- `expected_arrival_until` (string, nullable)
- `from` (object)
- `from.zip_code` (string, nullable)
- `from.country_code` (string, nullable)
- `from.country_code_alpha_2` (string, nullable)
- `from.country` (string, nullable)
- `to` (object)
- `to.zip_code` (string, nullable)
- `to.country_code` (string, nullable)
- `to.country_code_alpha_2` (string, nullable)
- `to.country` (string, nullable)
- `last_event` (string, nullable)
- `last_event_description` (string, nullable)
- `events` (one of array, boolean): Tracking events of the shipment; false when the carrier has no tracking service (mrw, rangel or other)
- `automatic_shipping` (object, nullable)
- `automatic_shipping.app_id` (string)
- `automatic_shipping.app_alias` (string)
- `automatic_shipping.app_title` (string)
- `automatic_shipping.service` (string)
- `automatic_shipping.service_description` (string)
- `automatic_shipping.paid_at` (string, nullable)
- `automatic_shipping.value` (number, nullable)
- `automatic_shipping.declared_value` (number, nullable)
- `automatic_shipping.on_delivery_value` (number, nullable)
- `automatic_shipping.weight` (integer, nullable)
- `automatic_shipping.declared_weight` (integer, nullable)
- `automatic_shipping.products_weight` (integer, nullable)
- `automatic_shipping.volumetric_weight` (number, nullable)
- `automatic_shipping.declared_volumetric_weight` (integer, nullable)
- `automatic_shipping.volumetric_factor` (integer, nullable)
- `automatic_shipping.width` (number, nullable)
- `automatic_shipping.height` (number, nullable)
- `automatic_shipping.length` (number, nullable)
- `automatic_shipping.own_contract` (boolean)
- `automatic_shipping.has_incidence` (boolean)
- `automatic_shipping.label_type` (string, nullable)
- `automatic_shipping.labels` (object, nullable): Shipping labels and documents; null while the shipment has none
- `automatic_shipping.labels.zip_file` (string, nullable): URL of a zip with every file
- `automatic_shipping.labels.files` (object): URL of each file, keyed by file name
- `automatic_shipping.at_code` (string, nullable)
- `automatic_shipping.observations` (string, nullable)
- `automatic_shipping.package` (object, nullable): Package the shipment was created with; dimensions in cm and weight in grams
- `automatic_shipping.package.id` (integer)
- `automatic_shipping.package.title` (string)
- `automatic_shipping.package.length` (integer)
- `automatic_shipping.package.width` (integer)
- `automatic_shipping.package.height` (integer)
- `automatic_shipping.package.weight` (integer)
- `automatic_shipping.pickup_point` (object, nullable): Shipping app pickup point configuration
- `automatic_shipping.options` (object, nullable): Shipping app options configuration
- `automatic_shipping.customs_data` (object, nullable): Shipping app customs data configuration
- `automatic_shipping.bulk_aggregate` (boolean, nullable)

### ShippingCarrier

Shipping carrier (courier) details

- `alias` (string): Carrier identifier/alias
- `title` (string): Localized carrier name

### Coupon

Discount coupon with rules, value, and usage limits

- `id` (integer): Coupon unique identifier
- `code` (string): Coupon code used at checkout
- `coupon` (string): Coupon code (duplicate of code field)
- `limit` (integer): Maximum number of times this coupon can be used; 0 means unlimited
- `used` (integer): Number of orders placed with this coupon, paid or not. It counts when the order is placed and is not decreased if the order is canceled or deleted, unlike orders_total and orders_discount, which only count paid orders
- `value` (number, nullable): Discount value (percentage or fixed amount depending on type); null for free shipping
- `type` (string ("percent", "money", "shipping")): Discount type
- `applies_to` (string ("all_orders", "category", "product", "brand", "tag")): Where the coupon discount applies
- `applies_to_clients` (string, nullable): Client restriction rule for coupon eligibility
- `orders_over` (number, nullable): Minimum order value required to use this coupon
- `orders_under` (number, nullable): Maximum order value for coupon eligibility
- `category` (array of any): Category IDs this coupon applies to (when applies_to is category)
- `product` (array of any): Product IDs this coupon applies to (when applies_to is product)
- `brand` (array of any): Brand IDs this coupon applies to (when applies_to is brand)
- `tag` (array of string): Tag names this coupon applies to (when applies_to is tag)
- `countries` (array of string): Country codes where this coupon is valid
- `date_from` (string, nullable): First day the coupon is valid, as midnight of that day in Lisbon time with the Lisbon UTC offset (+00:00 in winter, +01:00 in summer), e.g. 2026-10-01T00:00:00+01:00
- `date_to` (string, nullable): Last day the coupon is valid, as midnight of that day in Lisbon time with the Lisbon UTC offset (+00:00 in winter, +01:00 in summer), e.g. 2026-12-31T00:00:00+00:00; the coupon is still valid during that whole day
- `shareable_url` (string): Public URL that auto-applies this coupon at checkout
- `active` (boolean): The merchant's on/off switch for the coupon, not whether it can be used now: an expired coupon can have active true. The coupon only works while active is true, today is within date_from and date_to, and the limit (when above 0) is not reached by used
- `cumulative_with_tier` (boolean): Allow combining this coupon with quantity tier discounts on the same line item
- `created_at` (string): Creation timestamp in ISO 8601 format
- `updated_at` (string): Last update timestamp in ISO 8601 format
- `orders_total` (number): Total of the paid orders that used this coupon (unpaid orders are not counted)
- `orders_discount` (number): Discount given by this coupon itself in the paid orders that used it, without reward points or other discounts of those orders (unpaid orders are not counted)

### Webhook

Webhook subscription for receiving event notifications

- `id` (integer): Webhook unique identifier
- `event` (string ("order_canceled", "order_deleted", "order_created", "order_updated", "order_paid", "order_sent", "order_change_status", "product_created", "product_updated", "product_deleted", "order_invoice", "client_created", "client_updated", "client_deleted", "order_shipping", "order_delivered", "shipping_expedited", "order_change_payment", "order_payment_failed", "order_returned", "order_pickup_available", "newsletter_subscribed", "newsletter_unsubscribed", "product_updated_stock", "order_waiting_shipment", "shipping_pickup", "coupon_created", "coupon_deleted", "cart_abandoned_notify", "order_tag_added", "client_tag_added", "client_wholesale_accepted", "client_wholesale_revoked", "client_wholesale_requested", "order_invoiced", "order_unpaid", "coupon_updated", "order_waiting_return", "order_archived", "order_unarchived")): Event type that triggers this webhook
- `url` (string): Callback URL that receives webhook POST requests
- `protected` (boolean): Whether the webhook is protected by an app integration
- `active` (boolean): Whether the webhook is currently active
- `secret` (string): Signing secret of a webhook created with an OAuth app's access token, returned only on creation: its X-Webhook-Signature uses it instead of the store's client secret

### WebhookLog

Delivery of a webhook event to a receiving service. The single-delivery response adds response and response_truncated

- `id` (integer): Delivery identifier
- `event` (string): Event type that was delivered
- `url` (string): Scheme and host of the receiving service; the path and query string are left out because they may carry secrets
- `resource_id` (integer, nullable): Id of the record the event is about (the order number in order events, the client, coupon or product id in theirs), read from the payload; null when the payload has no id, or when no client of the store has the payload's hash (a deleted client, or one whose email changed since)
- `time` (string): When the delivery was queued, until it gets an answer or gives up; from then on when it finished. ISO 8601 format
- `code` (integer, nullable): HTTP status code the receiving service answered with; 0 when it did not answer; null while the delivery has no recorded answer
- `elapsed` (number, nullable): Seconds the receiving service took to answer; null while the delivery has no recorded answer
- `response` (string, nullable): Body the receiving service answered with, cut to 1000 characters; null for old deliveries whose stored body cannot be told apart from the response headers; only in the single-delivery response
- `response_truncated` (boolean, nullable): Whether response was cut to 1000 characters; null when response is null (hidden or unknown); only in the single-delivery response

### StoreAccount

The store's Shopkit account: plan, subscription, use against the limits, billing data and saved card

- `plan` (object): Current plan
- `plan.id` (integer): Plan identifier
- `plan.title` (string): Plan name
- `plan.slug` (string): Plan handle
- `plan.monthly_price` (number): Monthly price, excluding VAT
- `plan.annual_monthly_price` (number): Monthly price on the annual plan, excluding VAT
- `plan.features` (array of object): Features and limits of the plan with a numeric value (1 or 0 for included or not, the limit otherwise; 99999 products and 102400 MB of storage are unlimited)
- `plan.features[].id` (integer): Feature identifier
- `plan.features[].title` (string): Feature name
- `plan.features[].value` (number): Value or limit
- `subscription` (object): Subscription state
- `subscription.status` (string ("trial", "active", "expired", "none")): Subscription status
- `subscription.ends_at` (string, nullable): Last day of the paid period
- `subscription.days_left` (integer, nullable): Days until the next payment, negative once past
- `subscription.last_payment` (object, nullable): Last real payment of the subscription
- `subscription.last_payment.amount` (number): Amount paid, including VAT
- `subscription.last_payment.paid_at` (string): When it was paid
- `subscription.last_payment.method` (string): Payment method
- `subscription.last_payment.period_start` (string): Start of the period it paid
- `usage` (object): Use of the store against the limits of the plan; a limit null is unlimited
- `usage.products` (object)
- `usage.products.used` (integer): Products in any status
- `usage.products.limit` (integer, nullable): Plan limit
- `usage.storage` (object)
- `usage.storage.used_bytes` (integer): Media used
- `usage.storage.limit_bytes` (integer, nullable): Plan limit
- `usage.storage.available_bytes` (integer, nullable): What is left, negative once past
- `usage.locations` (object)
- `usage.locations.used` (integer): Shipping locations
- `usage.locations.limit` (integer): Plan limit
- `usage.users` (object)
- `usage.users.used` (integer): Users of the store
- `usage.users.limit` (integer): Plan limit
- `billing` (object): Billing data
- `billing.name` (string, nullable): Company name
- `billing.tax_id` (string, nullable): Tax number
- `billing.address` (string, nullable): Address
- `billing.postal_code` (string, nullable): Postal code
- `billing.city` (string, nullable): City
- `billing.country` (string, nullable): Country code (ISO 3166-1 alpha-3)
- `billing.email` (string, nullable): Billing e-mail
- `billing.phone` (string, nullable): Phone number
- `billing.iban` (string, nullable): IBAN where Shopkit sends the store's refunds by bank transfer, as set in the admin billing settings
- `credit_card` (object, nullable): Saved card; null when there is none
- `credit_card.brand` (string): Card brand
- `credit_card.last4` (string): Last 4 digits

### StoreAccountPayments

A page of the payments and payment requests of the store to Shopkit

- `total` (integer): Payments that match the filters
- `has_more` (boolean): Whether there is a next page
- `page` (integer): Page number
- `limit` (integer): Payments per page
- `items` (array of object): The payments of the page
- `items[].id` (string): Payment identifier (request-N or plan-N), the payment_id of store/account/invoices
- `items[].type` (string ("plan", "app", "template", "domain", "service", "account_balance", "credit", "other")): What was paid
- `items[].status` (string ("paid", "unpaid", "refunded")): Payment status
- `items[].requested_at` (string): When it was requested
- `items[].paid_at` (string, nullable): When it was paid; null while unpaid
- `items[].amount` (number): Amount including VAT; negative for a credit
- `items[].tax_rate` (number, nullable): VAT rate in percent
- `items[].description` (string, nullable): Description or note as the back office shows it
- `items[].method` (string): Payment method
- `items[].multibanco` (object, nullable): Multibanco entity and reference
- `items[].multibanco.entity` (string): Entity
- `items[].multibanco.reference` (string): Reference
- `items[].plan` (object, nullable): Plan paid, with the period it covers
- `items[].plan.id` (integer): Plan identifier
- `items[].plan.title` (string): Plan name
- `items[].plan.period_start` (string, nullable): Start of the period
- `items[].plan.period_end` (string, nullable): End of the period
- `items[].app_id` (integer, nullable): App bought
- `items[].template_id` (integer, nullable): Template bought
- `items[].domain` (string, nullable): Domain registered, renewed or transferred
- `items[].service` (string, nullable): Service bought
- `items[].refund` (object, nullable): Refund of the payment
- `items[].refund.status` (string ("pending", "completed", "failed", "reverted")): Refund status
- `items[].documents` (array of object): Fiscal documents of the payment, each with a link that opens it after signing in to the store admin as the owner
- `items[].documents[].type` (string ("invoice", "receipt", "credit_note", "debit_note", "proforma")): Document type
- `items[].documents[].url` (string): Link of the document

### StoreAccountInvoices

A page of the fiscal documents that Shopkit issued to the store

- `total` (integer, nullable): Documents of the store; null in a search
- `has_more` (boolean): Whether there is a next page
- `page` (integer): Page number
- `limit` (integer): Documents per page
- `items` (array of object): The documents of the page
- `items[].number` (string): Public number
- `items[].type` (string): Document type: invoice, invoice_receipt, simplified_invoice, receipt, credit_note, debit_note
- `items[].status` (string, nullable): Document status
- `items[].date` (string, nullable): Document date
- `items[].amount_excl_tax` (number, nullable): Amount excluding VAT
- `items[].tax` (number, nullable): VAT
- `items[].total` (number, nullable): Total
- `items[].description` (string, nullable): Description of the payment it belongs to
- `items[].payment_id` (string, nullable): The payment it belongs to, as in store/account/payments
- `items[].pdf_url` (string, nullable): Link of the document
- `items[].receipt_url` (string, nullable): Link of the receipt of an invoice
- `items[].credit_note_url` (string, nullable): Link of the credit note of an invoice

### StoreAccountBalance

The store's current account with Shopkit

- `balance` (number): Balance, negative when there is debt
- `auto_recharge` (object): Automatic top-up
- `auto_recharge.status` (string ("active", "on_without_card", "inactive")): active: on and with a saved card, so it tops up; on_without_card: on but without a card, so it does not
- `auto_recharge.active` (boolean): Whether it tops up
- `auto_recharge.has_credit_card` (boolean): Whether the store has a saved card
- `auto_recharge.min_balance` (number, nullable): Balance from which it tops up; null when not active
- `auto_recharge.charge_value` (number, nullable): Amount it tops up; null when not active
- `reserved` (object): Shipments created and not yet charged
- `reserved.amount` (number): Amount reserved
- `reserved.count` (integer): Number of charges reserved
- `total` (integer): Movements of the account
- `has_more` (boolean): Whether there is a next page of movements
- `page` (integer): Page number
- `limit` (integer): Movements per page
- `movements` (array of object): The movements of the page, most recent first
- `movements[].date` (string): When it was paid, or created while reserved
- `movements[].state` (string ("reserved", "debited", "completed")): reserved: a charge created and not yet debited; debited: a charge already taken from the balance; completed: a top-up or a credit
- `movements[].kind` (string ("top_up", "credit", "debit")): top_up and credit add to the balance, debit takes from it
- `movements[].amount` (number): Positive when it adds to the balance, negative when it takes from it
- `movements[].description` (string, nullable): Description
- `movements[].method` (string): How a top-up was paid; only in a top-up
- `movements[].origin` (object, nullable): What a debit paid; null in a top-up or a credit
- `movements[].origin.type` (string): shipping, pickup, return, weight_mismatch and the other charge types of a shipment; or plan, app, template, domain, service or other
- `movements[].origin.order_id` (integer, nullable): Order of the shipping charge
- `movements[].origin.tracking_code` (string, nullable): Tracking code of the shipping charge
- `movements[].origin.pickup_code` (string, nullable): Pickup code of the pickup charge
- `movements[].credits` (array of object): Credits that came back for the same charge
- `movements[].credits[].date` (string): When it was credited
- `movements[].credits[].amount` (number): Amount credited
- `movements[].credits[].description` (string, nullable): Description

### StoreAccountActivity

The activity log of the store or of one of its users

- `user` (integer, nullable): The user whose activity this is; null for the whole store
- `items` (array of object): The latest 50 events, most recent first
- `items[].timestamp` (string): When it happened
- `items[].event` (string): Event code
- `items[].event_description` (string): What happened, as the admin shows it
- `items[].resource_origin` (string, nullable): Where it was done from
- `items[].resource_origin_description` (string, nullable): Origin as the admin shows it

### ApiLog

Call made with the store's API key

- `id` (integer): Call identifier
- `uri` (string): Path of the request, without the query string
- `method` (string): HTTP method of the request, in lowercase
- `time` (string): When the call was received, in ISO 8601 format
- `rtime` (number, nullable): Seconds the API took to answer; null when the call did not finish
- `response_code` (integer, nullable): HTTP status code of the response; null when the call did not finish
- `message` (string): Message of the error response, cut to 300 characters; only when response_code is 400 or more

### Redirect

URL redirect for the store

- `id` (integer)
- `source_url` (string)
- `destination_url` (string)
- `redirect_type` (string ("301", "302"))
- `source_match_type` (string ("exact", "prefix", "regex"))
- `destination_match_type` (string ("exact", "prefix", "regex"))
- `active` (boolean)
- `created_at` (string)
- `updated_at` (string)

### RedirectInput

Input payload for creating a redirect; source_url and destination_url are required

- `source_url` (string): Source URL or path (max 1000 chars)
- `destination_url` (string): Destination URL or path (max 2000 chars)
- `redirect_type` (string ("301", "302"))
- `source_match_type` (string ("exact", "prefix", "regex"))
- `destination_match_type` (string ("exact", "prefix", "regex"))
- `active` (boolean)

### RedirectUpdateInput

Input payload for updating a redirect; at least one field is required

- `source_url` (string): Source URL or path (max 1000 chars)
- `destination_url` (string): Destination URL or path (max 2000 chars)
- `redirect_type` (string ("301", "302"))
- `source_match_type` (string ("exact", "prefix", "regex"))
- `destination_match_type` (string ("exact", "prefix", "regex"))
- `active` (boolean)

### Page

Store page (custom content page or static system page)

- `id` (integer)
- `title` (string)
- `content` (string): Page HTML content
- `static` (one of boolean, string): false for content pages; the static page key for static (system) pages
- `url` (string)
- `permalink` (string)
- `handle` (string): URL slug
- `page_title` (string, nullable): Page title for SEO
- `meta_description` (string, nullable)
- `meta_tags` (string, nullable)
- `status` (string ("draft", "published"))
- `created_at` (string)
- `updated_at` (string)

### PageCreateInput

Input payload for creating a page

- `title` (string): Page title (required)
- `content` (string): Page HTML content
- `handle` (string): URL slug; auto-generated from title if not provided
- `page_title` (string): Page title for SEO; defaults to title
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `add_nav` (boolean): Add the page to the secondary navigation menu
- `status` (string ("draft", "published")): Publication status (default: published)

### PageUpdateInput

Input payload for updating a page; only provided fields are updated

- `title` (string): Page title
- `content` (string): Page HTML content
- `handle` (string): URL slug; ignored for static pages
- `page_title` (string): Page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `status` (string ("draft", "published")): Publication status; static pages are always published

### WebhookInput

Input payload for creating a webhook

- `url` (string): Callback URL that will receive the webhook POST payload (required); only http and https, spaces around it are trimmed; localhost, loopback, private-network and link-local addresses are refused
- `event` (string ("order_canceled", "order_deleted", "order_created", "order_updated", "order_paid", "order_sent", "order_change_status", "product_created", "product_updated", "product_deleted", "order_invoice", "client_created", "client_updated", "client_deleted", "order_shipping", "order_delivered", "shipping_expedited", "order_change_payment", "order_payment_failed", "order_returned", "order_pickup_available", "newsletter_subscribed", "newsletter_unsubscribed", "product_updated_stock", "order_waiting_shipment", "shipping_pickup", "coupon_created", "coupon_deleted", "cart_abandoned_notify", "order_tag_added", "client_tag_added", "client_wholesale_accepted", "client_wholesale_revoked", "client_wholesale_requested", "order_invoiced", "order_unpaid", "coupon_updated", "order_waiting_return", "order_archived", "order_unarchived")): Event type to subscribe to (required)

### WebhookUpdateInput

Input payload for updating a webhook; only provided fields are updated, and at least one is required

- `url` (string): Callback URL that will receive the webhook POST payload; only http and https, spaces around it are trimmed; localhost, loopback, private-network and link-local addresses are refused
- `event` (string ("order_canceled", "order_deleted", "order_created", "order_updated", "order_paid", "order_sent", "order_change_status", "product_created", "product_updated", "product_deleted", "order_invoice", "client_created", "client_updated", "client_deleted", "order_shipping", "order_delivered", "shipping_expedited", "order_change_payment", "order_payment_failed", "order_returned", "order_pickup_available", "newsletter_subscribed", "newsletter_unsubscribed", "product_updated_stock", "order_waiting_shipment", "shipping_pickup", "coupon_created", "coupon_deleted", "cart_abandoned_notify", "order_tag_added", "client_tag_added", "client_wholesale_accepted", "client_wholesale_revoked", "client_wholesale_requested", "order_invoiced", "order_unpaid", "coupon_updated", "order_waiting_return")): Event type to subscribe to
- `active` (boolean): Activate (true) or deactivate (false) the webhook

### Media

Uploaded media file with URL and metadata

- `id` (integer)
- `checksum` (string)
- `file_name` (string)
- `file_type` (string)
- `file_ext` (string)
- `file_size` (number)
- `image_width` (integer)
- `image_height` (integer)
- `type` (string ("image", "file", "digital_file", "video"))
- `is_ai` (boolean)
- `url` (one of string, object): File URL (string for files/videos) or image object (for images)
- `alt` (string, nullable)
- `description` (string, nullable)
- `poster_image` (object, nullable): Poster image URLs for video files
- `created_at` (string)
- `updated_at` (string)

### MediaHash

Media import queued for processing

- `hash` (string): Hash of the media; filter the media list by it once the file is processed

### CouponCreateInput

Input payload for creating a new coupon

- `code` (string): Unique coupon code (required)
- `limit` (integer): Maximum number of times the coupon can be used; 0 or omitted means unlimited
- `value` (number): Discount value: amount greater than 0 for money, percentage greater than 0 and at most 100 for percent, ignored for shipping (required unless type is shipping)
- `type` (string ("percent", "money", "shipping")): Discount type: percent (percentage), money (fixed amount), shipping (free shipping, only with applies_to all_orders) (required)
- `applies_to` (string ("all_orders", "category", "product", "brand", "tag")): Applies to: all_orders, product, category, brand, tag (required)
- `orders_over` (number): Minimum order value to activate the coupon
- `orders_under` (number): Maximum order value to activate the coupon (must be greater than orders_over); 0 means no maximum
- `category` (array of any): Array of category ids or handles (required when applies_to is category)
- `product` (array of any): Array of product ids or handles (required when applies_to is product)
- `brand` (array of any): Array of brand ids or handles (required when applies_to is brand; must be an array)
- `tag` (array of string): Array of product tag names (required when applies_to is tag; must be an array)
- `date_from` (string): Coupon validity start date (format: yyyy-mm-dd)
- `date_to` (string): Coupon validity end date (format: yyyy-mm-dd, must be >= date_from; without date_from it is compared to today)
- `cumulative_with_tier` (integer (0, 1)): Allow combining this coupon with quantity tier discounts on the same line item (0 or 1)

### CouponUpdateInput

Input payload for updating an existing coupon

- `limit` (integer): Maximum number of times coupon can be used; cannot be lower than the number of times it was already used (409)
- `value` (number): Discount value: amount greater than 0 for money, percentage greater than 0 and at most 100 for percent, ignored for shipping
- `type` (string ("percent", "money", "shipping")): Discount type: percent (percentage), money (fixed amount), shipping (free shipping, only with applies_to all_orders; clears the value)
- `applies_to` (string ("all_orders", "category", "product", "brand", "tag")): Applies to: all_orders, product, category, brand, tag
- `orders_over` (number): Minimum order value to activate the coupon
- `orders_under` (number): Maximum order value (must be greater than orders_over); 0 means no maximum
- `category` (array of any): Array of category ids or handles (required when changing applies_to to category)
- `product` (array of any): Array of product ids or handles (required when changing applies_to to product)
- `brand` (array of any): Array of brand ids or handles (required when changing applies_to to brand)
- `tag` (array of string): Array of product tag names (required when changing applies_to to tag)
- `date_from` (string): Coupon validity start date (format: yyyy-mm-dd)
- `date_to` (string): Coupon validity end date (format: yyyy-mm-dd, must be >= date_from)
- `cumulative_with_tier` (integer (0, 1)): Allow combining this coupon with quantity tier discounts on the same line item (0 or 1)

### ClientCreateInput

Input payload for creating a new client

- `email` (string): Client email address (required)
- `password` (string): Account password; if omitted, a random one is generated and sent in the signup email (unless send_signup_email is false). The client is always created with an account (type registered)
- `name` (string): Client full name (required)
- `company` (string): Company name
- `fiscal_id` (string): Tax/fiscal ID (NIF/VAT). Validated and normalized for the billing country_code, or the delivery one when billing has none; without a country it is saved as sent
- `accepts_marketing` (boolean): Subscribe client to newsletter
- `wholesale` (boolean): Enable wholesale pricing for this client
- `internal_notes` (string): Internal notes (not visible to client)
- `tags` (array of string): Array of tag name strings
- `birthday` (string): Date of birth (format: yyyy-mm-dd, must be in the past)
- `gender` (string ("female", "male", "other")): Client gender
- `delivery` (object): Delivery address; when sent, address, zip_code, city and country_code are required. On create, if only one of delivery and billing is sent it is used for both; on update, a lone delivery also replaces billing only when the client uses the same address for both, and a lone billing keeps the delivery address
- `delivery.name` (string): Recipient full name
- `delivery.address` (string): Street address
- `delivery.address_extra` (string): Additional address line (apartment, floor, etc.)
- `delivery.zip_code` (string): Postal/ZIP code
- `delivery.city` (string): City name
- `delivery.country_code` (string): ISO 3166-1 alpha-3 country code (e.g. PRT, ESP, GBR); an alpha-2 code (PT) is stored as its alpha-3
- `delivery.phone` (string): Contact phone number
- `billing` (object): Billing address; when sent, name, address, zip_code, city and country_code are required. On create, if only one of delivery and billing is sent it is used for both; on update, a lone delivery also replaces billing only when the client uses the same address for both, and a lone billing keeps the delivery address
- `billing.name` (string): Billing contact full name
- `billing.address` (string): Street address
- `billing.address_extra` (string): Additional address line (apartment, floor, etc.)
- `billing.zip_code` (string): Postal/ZIP code
- `billing.city` (string): City name
- `billing.country_code` (string): ISO 3166-1 alpha-3 country code (e.g. PRT, ESP, GBR); an alpha-2 code (PT) is stored as its alpha-3
- `billing.phone` (string): Contact phone number
- `send_signup_email` (boolean): Send welcome email to client
- `reward_points` (integer): Initial reward points balance

### ClientUpdateInput

Input payload for updating an existing client

- `email` (string): Client email address (must be unique across store); when sent it cannot be empty, 400 otherwise
- `password` (string): New account password
- `name` (string): Client full name
- `company` (string): Company name
- `fiscal_id` (string): Tax/fiscal ID (NIF/VAT). Validated and normalized for the client's billing country after this request: the billing country_code sent, else the stored one, else the delivery country_code; a client using the same address for both follows its delivery country_code. Without a country it is saved as sent
- `accepts_marketing` (boolean): Subscribe or unsubscribe client from newsletter
- `wholesale` (boolean): Enable or disable wholesale pricing
- `internal_notes` (string): Internal notes (not visible to client)
- `tags` (array of string): Array of tag name strings (replaces existing tags)
- `birthday` (string): Date of birth (format: yyyy-mm-dd, must be in the past)
- `gender` (string ("female", "male", "other")): Client gender
- `delivery` (object): Delivery address; when sent, address, zip_code, city and country_code are required. On create, if only one of delivery and billing is sent it is used for both; on update, a lone delivery also replaces billing only when the client uses the same address for both, and a lone billing keeps the delivery address
- `delivery.name` (string): Recipient full name
- `delivery.address` (string): Street address
- `delivery.address_extra` (string): Additional address line (apartment, floor, etc.)
- `delivery.zip_code` (string): Postal/ZIP code
- `delivery.city` (string): City name
- `delivery.country_code` (string): ISO 3166-1 alpha-3 country code (e.g. PRT, ESP, GBR); an alpha-2 code (PT) is stored as its alpha-3
- `delivery.phone` (string): Contact phone number
- `billing` (object): Billing address; when sent, name, address, zip_code, city and country_code are required. On create, if only one of delivery and billing is sent it is used for both; on update, a lone delivery also replaces billing only when the client uses the same address for both, and a lone billing keeps the delivery address
- `billing.name` (string): Billing contact full name
- `billing.address` (string): Street address
- `billing.address_extra` (string): Additional address line (apartment, floor, etc.)
- `billing.zip_code` (string): Postal/ZIP code
- `billing.city` (string): City name
- `billing.country_code` (string): ISO 3166-1 alpha-3 country code (e.g. PRT, ESP, GBR); an alpha-2 code (PT) is stored as its alpha-3
- `billing.phone` (string): Contact phone number
- `reward_points` (integer): Set reward points balance to this value

### ProductImage

Product image object with multiple sizes and optional video metadata

- `thumb` (string)
- `square` (string)
- `full` (string)
- `alt` (string, nullable)
- `description` (string, nullable)
- `video_url` (string, nullable)

### ProductWishlist

Wishlist actions for a product or variant

- `add_url` (string)
- `remove_url` (string)

### ProductTag

Product or client visibility tag

- `id` (integer)
- `title` (string)
- `handle` (string)
- `id_module` (integer)
- `id_item` (integer)
- `id_item_int` (integer, nullable)
- `total_items` (integer)
- `page_title` (string)
- `meta_description` (string)
- `meta_tags` (string)
- `url` (string)
- `permalink` (string)
- `created_at` (string)

### ProductCategory

Category reference embedded in the product payload

- `id` (integer)
- `parent` (integer)
- `active` (boolean)
- `title` (string)
- `description` (string)
- `handle` (string)
- `filter` (string)
- `url` (string)
- `image` (one of ProductImage, array)

### ProductBrand

Brand reference embedded in the product payload

- `id` (integer)
- `active` (boolean)
- `title` (string)
- `description` (string)
- `manufacturer` (string, nullable)
- `responsible` (string, nullable)
- `importer` (string, nullable)
- `brand_url` (string, nullable)
- `handle` (string)
- `url` (string)
- `permalink` (string)
- `image` (ProductImage)

### ProductRelatedProductSummary

Minimal related product reference for manual related products

- `id` (one of integer, string)
- `title` (string)

### ProductRelatedProducts

Related products configuration attached to the product

- `type` (string ("category", "brand", "tags", "manual", "intelligent"))
- `title` (string)
- `products` (array of ProductRelatedProductSummary)

### ProductCampaign

Campaign metadata applied to the product

- `title` (string)
- `value` (number)
- `applies_to` (string)
- `filter` (string)
- `campaign_layout` (string)
- `start_date` (string)
- `end_date` (string)
- `start_date_formatted` (string)
- `end_date_formatted` (string)

### ProductStock

Stock metadata for the product

- `stock_enabled` (boolean)
- `stock_qty` (integer)
- `stock_backorder` (boolean)
- `stock_show` (boolean)
- `stock_sold_single` (boolean)
- `stock_notify` (integer, nullable)
- `stock_threshold` (integer, nullable)
- `min_quantity` (integer, nullable)
- `max_quantity` (integer, nullable)
- `min_quantity_wholesale` (integer, nullable)
- `max_quantity_wholesale` (integer, nullable)
- `min_quantity_enforce_extras` (boolean)

### ProductRating

Product rating summary

- `average_rating` (number)
- `total_reviews` (integer)
- `rating_score` (number)

### ProductOptionGroupOption

Option value inside a product option group

- `id` (integer)
- `title` (string)

### ProductCustomFieldValue

Single custom field value assigned to the product

- `id` (one of integer, string)
- `value` (string)
- `id_value` (string, nullable)

### ProductCustomField

Custom field definition and assigned values

- `id` (integer): Custom field identifier
- `alias` (string)
- `title` (string)
- `type` (string)
- `options` (any): Custom field configuration options (list of choices for select fields; varies by field type)
- `filter_enabled` (boolean)
- `values` (array of string): Values assigned to the product

### ProductExtraOptionColorFile

Color/pattern media for an extra option

- `images` (ProductImage)

### ProductExtraOptionColorOption

Structured option entry for color-type extra options

- `title` (string)
- `type` (string)
- `color` (string, nullable)
- `file` (ProductExtraOptionColorFile)

### ProductExtraOption

Extra option definition attached to a product

- `id` (integer): Assignment identifier
- `extra_option_id` (integer): Extra option identifier
- `alias` (string)
- `title` (string)
- `description` (string, nullable)
- `type` (string)
- `options` (array of any)
- `required` (boolean)
- `single_quantity` (boolean)
- `price` (number, nullable)
- `price_formatted` (string, nullable)
- `tax` (string ("tax_base", "tax_product", null), nullable): Tax alias applied to the extra option price
- `size` (string, nullable)

### ProductDigitalFile

Digital delivery item attached to the product

- `type` (string ("file", "link"))
- `title` (string)
- `url` (string)

### ProductTab

Product detail tab

- `index` (integer): Zero-based position of the tab in the product
- `type` (string ("text", "content", "page", "gpsr_content", "gpsr_page"))
- `id` (integer, nullable)
- `title` (string, nullable)
- `slug` (string, nullable)
- `content` (string, nullable)

### ProductTabInput

Input payload for creating or updating a product tab

- `type` (string ("text", "page")): Tab type
- `title` (string): Tab title (required for text type)
- `content` (string): Tab HTML content (required for text type)
- `id` (integer): Page identifier to reference (required for page type)

### ProductTabUpdateInput

Input payload for updating a product tab; no field is required

- `type` (string ("text", "page")): Tab type; optional, must match the type of the existing tab (it cannot be changed)
- `title` (string): Tab title (text tabs only, cannot be empty)
- `content` (string): Tab HTML content (text tabs only)
- `id` (integer): Page identifier (page tabs only)

### ProductQuantityTier

Quantity-based price tier for a product

- `id` (integer): Quantity tier unique identifier
- `id_produto` (integer): Identifier of the product this tier belongs to
- `qty_from` (integer): Minimum quantity (inclusive) at which this tier applies
- `qty_to` (integer, nullable): Maximum quantity (inclusive); null means the tier is open-ended (e.g. 10+)
- `discount_percent` (number): Discount percentage applied to the variant base price for this tier (e.g. 20 for 20% off)
- `wholesale` (integer (0, 1)): Tier context: 0 for normal price tiers, 1 for wholesale price tiers
- `position` (integer): Visual sort order within the same wholesale context

### ProductQuantityTierCreateInput

Input payload for creating a product quantity tier

- `qty_from` (integer): Minimum quantity (inclusive, required)
- `qty_to` (integer): Maximum quantity (inclusive); leave empty for an open-ended tier (e.g. 10+)
- `discount_percent` (number): Discount percentage applied to the variant base price, greater than 0 and lower than 100 (required, e.g. 20 for 20% off)
- `wholesale` (integer (0, 1)): Tier context: 0 for normal price tiers, 1 for wholesale price tiers (default 0)

### ProductQuantityTierUpdateInput

Input payload for updating a product quantity tier

- `qty_from` (integer): Minimum quantity (inclusive)
- `qty_to` (integer, nullable): Maximum quantity (inclusive); send null to clear and leave the tier open-ended
- `discount_percent` (number): Discount percentage applied to the variant base price, greater than 0 and lower than 100 (e.g. 20 for 20% off); a tier always has one, so it cannot be cleared
- `wholesale` (integer (0, 1)): Tier context: 0 for normal price tiers, 1 for wholesale price tiers

### ProductExtraOptionInput

Input payload for assigning an extra option to a product

- `extra_option_id` (integer): Identifier of the extra option to assign

### ProductCustomFieldCreateInput

Input payload for setting a custom field value on a product

- `custom_field_id` (integer): Identifier of the custom field to assign
- `value` (one of string, array): Field value — string for input/textarea types, array of option values for select type

### ProductCustomFieldUpdateInput

Input payload for updating a product custom field value

- `value` (one of string, array): New field value — string for input/textarea types, array of option values for select type

### ExtraOption

Product extra option definition (global catalog entry)

- `id` (integer)
- `title` (string)
- `description` (string, nullable)
- `alias` (string)
- `type` (string ("input", "textarea", "select", "checkbox", "date", "color"))
- `options` (array of any): Choice list for select type or color scheme IDs for color type
- `required` (boolean)
- `price` (number)
- `price_formatted` (string, nullable)
- `tax` (string ("tax_base", "tax_product", null), nullable)
- `size` (string, nullable)
- `active` (boolean)
- `position` (integer)
- `single_quantity` (boolean)

### ExtraOptionCreateInput

Input payload for creating an extra option

- `title` (string): Extra option title (max 48 chars, unique per store)
- `description` (string): Extra option description (max 128 chars)
- `type` (string ("input", "textarea", "select", "checkbox", "date", "color")): Field type (immutable after creation)
- `options` (array of any): Choice list for select type or color scheme IDs for color type; required when type is select or color
- `size` (integer): Input size limit (max 255 for input, 512 for others)
- `required` (boolean): Whether the field must be filled by the customer
- `price` (number): Additional price added when option is selected
- `tax` (string ("tax_base", "tax_product")): Tax handling when price is set
- `active` (boolean): Set extra option as active or hidden
- `single_quantity` (boolean): Whether the option's quantity is always 1, independent of the product quantity

### ExtraOptionUpdateInput

Input payload for updating an extra option (type is immutable)

- `title` (string): Extra option title (max 48 chars)
- `description` (string): Extra option description (max 128 chars)
- `options` (array of any): Choice list for select type or color scheme IDs for color type
- `size` (integer): Input size limit (max 255 for input, 512 for others)
- `required` (boolean): Whether the field must be filled by the customer
- `price` (number): Additional price added when option is selected
- `tax` (string ("tax_base", "tax_product")): Tax handling when price is set
- `active` (boolean): Set extra option as active or hidden
- `position` (integer): Sort position for manual ordering
- `single_quantity` (boolean): Whether the option's quantity is always 1, independent of the product quantity

### ExtraOptionScheme

Color or pattern scheme used by color-type extra options

- `id` (integer)
- `title` (string)
- `type` (string ("color", "pattern"))
- `color` (string, nullable): Hex color value (when type is color)
- `file` (string, nullable): Media identifier of the pattern image (when type is pattern)
- `active` (boolean)

### ExtraOptionSchemeInput

Input payload for creating or updating an extra option scheme

- `title` (string): Scheme title (required on create, max 48 chars)
- `color` (string): Hex color value (format: #RGB, #RGBA, #RRGGBB or #RRGGBBAA); mutually exclusive with file. On create, exactly one of color or file is required
- `file` (integer): Media identifier of the pattern image; mutually exclusive with color. On create, exactly one of color or file is required
- `active` (boolean): Set scheme as active or hidden

### ExtraOptionSchemeUpdateInput

Input payload for updating an extra option scheme; no field is required

- `title` (string): Scheme title (max 48 chars, cannot be empty)
- `color` (string): Hex color value (format: #RGB, #RGBA, #RRGGBB or #RRGGBBAA); mutually exclusive with file. Setting it clears file
- `file` (integer): Media identifier of the pattern image; mutually exclusive with color. Setting it clears color
- `active` (boolean): Set scheme as active or hidden

### CustomField

Product custom field definition

- `id` (integer)
- `title` (string)
- `alias` (string)
- `type` (string ("input", "textarea", "select"))
- `options` (array of string): Choice list for select type
- `filter_enabled` (boolean)
- `position` (integer)

### CustomFieldCreateInput

Input payload for creating a custom field

- `title` (string): Custom field title (max 32 chars, unique per store)
- `type` (string ("input", "textarea", "select")): Field type (immutable after creation)
- `options` (array of string): Choice list for select type: a list of different, non-empty texts (numbers are stored as texts, surrounding spaces are trimmed)
- `filter_enabled` (boolean): Enable filtering by this field on the storefront (select type only)

### CustomFieldUpdateInput

Input payload for updating a custom field (type is immutable)

- `title` (string): Custom field title (max 32 chars)
- `options` (array of string): Choice list for select type, a list of different, non-empty texts (numbers are stored as texts, surrounding spaces are trimmed); removed options cascade to product values
- `filter_enabled` (boolean): Enable filtering by this field on the storefront (select type only)
- `position` (integer): Sort position for manual ordering

### BlogPost

Store blog post

- `id` (integer)
- `title` (string)
- `text` (string): Post body (HTML)
- `excerpt` (string, nullable): Manual excerpt, or an automatic summary of the post body when empty
- `date` (string): Publication date; a future date means the post is scheduled
- `active` (boolean)
- `handle` (string)
- `url` (string)
- `permalink` (string)
- `page_title` (string, nullable)
- `meta_description` (string, nullable)
- `meta_tags` (string, nullable)
- `author` (object): Store user credited as the post author
- `author.id` (integer, nullable)
- `author.name` (string, nullable)
- `tags` (array of ProductTag)
- `image` (object, nullable): Cover image, or null when the post has none
- `image.thumb` (string)
- `image.square` (string)
- `image.full` (string)
- `image.alt` (string, nullable)
- `created_at` (string)
- `updated_at` (string)

### BlogPostCreateInput

Input payload for creating a blog post

- `title` (string): Post title
- `text` (string): Post body (HTML)
- `excerpt` (string): Manual excerpt shown in post listings (max 300 chars)
- `date` (string): Publication date; a future date schedules the post (default: today)
- `active` (boolean): Publish or unpublish the post
- `handle` (string): URL slug; generated from the title when omitted on create, and kept when omitted on update
- `image` (integer): Identifier of an existing media image (see Media endpoints)
- `tags` (string): Comma-separated list of tag titles
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `author_id` (integer): Identifier of the store user credited as the post author

### BlogPostUpdateInput

Input payload for updating a blog post (only provided fields are updated)

- `title` (string): Post title; when omitted or empty the current one is kept
- `text` (string): Post body (HTML); when omitted or empty the current one is kept
- `excerpt` (string): Manual excerpt shown in post listings (max 300 chars)
- `date` (string): Publication date; a future date schedules the post; when omitted or empty the current one is kept
- `active` (boolean): Publish or unpublish the post
- `handle` (string): URL slug
- `image` (integer): Identifier of an existing media image (see Media endpoints)
- `tags` (string): Comma-separated list of tag titles; when omitted the current tags are kept
- `page_title` (string): Custom page title for SEO
- `meta_description` (string): SEO meta description
- `meta_tags` (string): SEO meta tags / keywords
- `author_id` (integer): Identifier of the store user credited as the post author

### BlogTag

Store blog tag

- `id` (integer)
- `title` (string)
- `handle` (string)
- `total_items` (integer): Number of blog posts using this tag
- `page_title` (string)
- `meta_description` (string)
- `meta_tags` (string)
- `created_at` (string)

### BlogAuthor

Store user eligible to be credited as a blog post author

- `id` (integer)
- `name` (string, nullable)
- `email` (string)
- `status` (string ("active", "pending", "inactive"))

### Paging

Paging links returned by list endpoints that use Shopkit's runtime paging shape

- `previous` (string, nullable)
- `next` (string, nullable)

### ShippingMethod

Shipping method available for a destination

- `id` (string)
- `title` (string)
- `description` (string)
- `price` (number)
- `price_formatted` (string)

### StatisticsLive

Live store metrics (metric=live)

- `visits` (integer)
- `orders` (integer)
- `sales` (number)
- `real_time` (integer)

### StatisticsResume

Store performance summary for a date range (metric=resume)

- `date_start` (string)
- `date_end` (string)
- `date_start_raw` (string, nullable)
- `date_end_raw` (string, nullable)
- `sessions` (integer): Unique visitors in the period
- `orders_revenue` (number): Total value of orders paid in the period, by payment date, excluding cancelled orders
- `orders_count` (integer): Orders paid in the period, by payment date, excluding cancelled orders (same as paid_orders_count)
- `placed_orders_count` (integer): Orders created in the period, by order date, whether paid or not, excluding cancelled orders
- `paid_orders_count` (integer): Orders paid in the period, by payment date, excluding cancelled orders
- `devolucoes` (number): Total value of paid orders moved to the Returned status in the period
- `devolucoes_count` (integer): Number of paid orders moved to the Returned status in the period
- `conversion_rate` (number): Percentage (0-100) of visitors who reached the order confirmation page; 0 when visitors couldn't be measured
- `abandon_rate` (number): Visit bounce rate as a fraction (0-1, e.g. 0.30 = 30%), not cart abandonment (see abandoned_total_carts)
- `direct_traffic` (integer): Visitors of the direct channel in the period
- `referral_traffic` (integer): Visitors of the referral channel in the period
- `search_traffic` (integer): Visitors of the search channels (organic and paid) in the period
- `percentage_direct_traffic` (number): Share (0-100) of the direct channel in the visitors of all channels
- `percentage_referral_traffic` (number): Share (0-100) of the referral channel in the visitors of all channels
- `percentage_search_traffic` (number): Share (0-100) of the search channels in the visitors of all channels
- `websites_referral` (array of object): Top 5 referring websites by visitors in the period
- `websites_referral[].source` (string)
- `websites_referral[].sessions` (integer)
- `products_sold` (integer): Units sold in the orders paid in the period
- `order_avg_value` (number): Average value of the orders paid in the period (orders_revenue / paid_orders_count)
- `search_keywords` (array of object): Store search keywords, capped at 5
- `search_keywords[].keyword` (string)
- `search_keywords[].count` (integer)
- `search_keywords[].url` (string)
- `abandoned_total_carts` (integer): Carts abandoned in the period and not recovered
- `abandoned_total_items` (integer): Units in the abandoned carts of the period
- `abandoned_cart_total` (number): Total value of the abandoned carts of the period
- `popular_products` (array of object): Best selling products, capped at 5. Omitted entirely when there are none.
- `popular_products[].product` (string)
- `popular_products[].product_url` (string)
- `popular_products[].sales` (integer)
- `popular_products[].revenue` (number)
- `popular_products[].average` (number)

### StatisticsOrders

Order analytics for a date range (metric=orders)

- `source_medium` (array of object)
- `source_medium[].source_medium` (string)
- `source_medium[].sessions` (integer)
- `source_medium[].conversions` (integer)
- `source_medium[].conversion_rate` (number)
- `source_medium[].bounce_rate` (number)
- `conversions` (integer)
- `orders_direct_traffic` (integer)
- `orders_referral_traffic` (integer)
- `orders_search_traffic` (integer)
- `percentage_orders_direct_traffic` (number)
- `percentage_orders_referral_traffic` (number)
- `percentage_orders_search_traffic` (number)
- `orders_data` (array of object)
- `orders_data[].orders` (integer)
- `orders_data[].sales` (number)
- `orders_data[].timestamp` (integer)
- `conversion_rate` (array of object)
- `conversion_rate[].value` (number)
- `conversion_rate[].timestamp` (integer)
- `orders_social_traffic` (integer)
- `percentage_orders_social_traffic` (number)

### StatisticsVisitors

Visitor analytics for a date range (metric=visitors)

- `sessions` (integer)
- `pageviews` (integer)
- `bounce_rate` (number)
- `avg_session_duration` (number)
- `localization` (object)
- `localization.countries` (array of object)
- `localization.countries[].country_id` (string)
- `localization.countries[].country` (string)
- `localization.countries[].sessions` (integer)
- `localization.countries[].conversions` (integer)
- `localization.countries[].conversion_rate` (number)
- `localization.countries[].bounce_rate` (number)
- `localization.countries[].visitors` (integer)
- `localization.cities` (array of object)
- `localization.cities[].country` (string)
- `localization.cities[].sessions` (integer)
- `localization.cities[].conversions` (integer)
- `localization.cities[].conversion_rate` (number)
- `localization.cities[].bounce_rate` (number)
- `devices` (object)
- `devices.desktop` (object)
- `devices.desktop.device_category` (string)
- `devices.desktop.sessions` (integer)
- `devices.desktop.conversions` (integer)
- `devices.desktop.conversion_rate` (number)
- `devices.desktop.bounce_rate` (number)
- `devices.desktop.sessions_percentage` (number)
- `devices.mobile` (object)
- `devices.mobile.device_category` (string)
- `devices.mobile.sessions` (integer)
- `devices.mobile.conversions` (integer)
- `devices.mobile.conversion_rate` (number)
- `devices.mobile.bounce_rate` (number)
- `devices.mobile.sessions_percentage` (number)
- `devices.tablet` (object)
- `devices.tablet.device_category` (string)
- `devices.tablet.sessions` (integer)
- `devices.tablet.conversions` (integer)
- `devices.tablet.conversion_rate` (number)
- `devices.tablet.bounce_rate` (number)
- `devices.tablet.sessions_percentage` (number)
- `device-desktop` (integer)
- `device-mobile` (integer)
- `device-tablet` (integer)
- `percentage-device-desktop` (number)
- `percentage-device-mobile` (number)
- `percentage-device-tablet` (number)
- `source` (array of object)
- `source[].source` (string)
- `source[].sessions` (integer)
- `source[].conversions` (integer)
- `source[].conversion_rate` (number)
- `source[].bounce_rate` (number)
- `demographics` (array of any): Always empty — Google Analytics-only field kept for backward compatibility.
- `sessions_data` (array of object)
- `sessions_data[].sessions` (integer)
- `sessions_data[].timestamp` (integer)

### Statistics

Statistics response. The shape depends on the metric parameter — see the stats_get operation description for the full list of metrics.

One of: StatisticsResume, StatisticsVisitors, StatisticsOrders, StatisticsLive, StatisticsOverview, StatisticsChart, StatisticsSales, StatisticsSalesBreakdown, StatisticsReturnedProducts, StatisticsCustomers, StatisticsLoyalty, StatisticsCohort, StatisticsProfitability, StatisticsFunnel, StatisticsCarts, StatisticsPaymentMethods, StatisticsExpeditions, StatisticsChannels, StatisticsChannelsConversions, StatisticsUtm, StatisticsHeatmap, StatisticsSearch, StatisticsMap, StatisticsMapConversions, StatisticsVisits, StatisticsLiveFull, StatisticsProduct

### ProductEmbeddedCustomField

Custom field with its values, as embedded in a product

- `alias` (string)
- `title` (string)
- `type` (string)
- `options` (any): Custom field configuration options (list of choices for select fields; varies by field type)
- `custom_field_id` (one of integer, string)
- `filter` (boolean)
- `values` (array of ProductCustomFieldValue)

### ProductEmbeddedExtraOption

Extra option definition, as embedded in a product

- `id` (one of integer, string)
- `alias` (string)
- `title` (string)
- `description` (string, nullable)
- `type` (string)
- `options` (array of any)
- `extra_option_id` (one of integer, string)
- `required` (boolean)
- `single_quantity` (boolean)
- `price` (number, nullable)
- `price_formatted` (string, nullable)
- `tax` (number, nullable)
- `size` (string, nullable)

### StatisticsOverview

Store overview vs. the previous period of equal length (metric=overview)

- `current` (object)
- `current.date_start` (string): Localized short date (e.g. "5 de fev.")
- `current.date_end` (string)
- `current.date_start_raw` (string)
- `current.date_end_raw` (string)
- `current.visits` (integer): Unique visitors in the period
- `current.orders_count` (integer): Orders paid in the period, by payment date, from any origin (storefront, admin, API), excluding cancelled orders
- `current.orders_revenue` (number): Total of the orders paid in the period, before returns
- `current.conversion_rate` (number, nullable): Percentage (0-100) of visitors who reached the order confirmation page, so it is not orders_count / visits. null when visitors couldn't be measured.
- `previous` (object)
- `previous.date_start` (string): Localized short date (e.g. "5 de fev.")
- `previous.date_end` (string)
- `previous.date_start_raw` (string)
- `previous.date_end_raw` (string)
- `previous.visits` (integer): Unique visitors in the previous period
- `previous.orders_count` (integer): Orders paid in the previous period, by payment date, from any origin (storefront, admin, API), excluding cancelled orders
- `previous.orders_revenue` (number): Total of the orders paid in the previous period, before returns
- `previous.conversion_rate` (number, nullable): Percentage (0-100) of visitors who reached the order confirmation page, so it is not orders_count / visits. null when visitors couldn't be measured.
- `growth` (object): Variation of each metric against the previous period; null when the previous value is 0 or unknown, and every value is null when the previous period starts before the statistics start date
- `growth.visits` (number, nullable): Variation of the visitors in percent of the previous period
- `growth.orders_revenue` (number, nullable): Variation of the revenue in percent of the previous period
- `growth.orders_count` (number, nullable): Variation of the paid orders in percent of the previous period
- `growth.conversion_rate` (number, nullable): Difference between the two conversion rates, in percentage points
- `prev_date_start` (string, nullable): First day of the previous period; null when that period starts before the statistics start date
- `prev_date_end` (string, nullable): Last day of the previous period; null when that period starts before the statistics start date

### StatisticsChart

Daily combined chart series (metric=chart). One entry per day in the requested period.

- `visits` (array of integer)
- `orders` (array of integer)
- `revenue` (array of number)
- `conversion_rate` (array of number)
- `days` (array of string)
- `prev_visits` (array of integer): Present only with compare=1
- `prev_orders` (array of integer): Present only with compare=1
- `prev_revenue` (array of number): Present only with compare=1
- `prev_conversion_rate` (array of number): Present only with compare=1

### StatisticsSales

Daily sales chart series (metric=sales, advanced)

- `paid_orders` (array of integer)
- `revenue` (array of number)
- `returns` (array of integer)
- `returns_value` (array of number)
- `days` (array of string)

### StatisticsSalesBreakdown

Revenue decomposition for the period (metric=sales_breakdown, advanced)

- `subtotal` (number)
- `portes` (number)
- `impostos` (number)
- `payment_fee` (number)
- `descontos` (number)
- `rewards_desconto` (number)
- `portes_oferecidos` (number)
- `total_vendas` (number)
- `devolucoes` (number)
- `devolucoes_count` (integer)
- `paid_orders_count` (integer)
- `vendas_liquidas` (number)
- `products_sold` (integer)
- `popular_products` (array of object)
- `popular_products[].product` (string)
- `popular_products[].product_url` (string, nullable)
- `popular_products[].categories` (array of string)
- `popular_products[].sales` (integer)
- `popular_products[].revenue` (number)
- `popular_products[].average` (number)
- `growth` (object)
- `growth.devolucoes` (number, nullable)
- `growth.devolucoes_count` (number, nullable)
- `growth.paid_orders_count` (number, nullable)

### StatisticsReturnedProducts

Products with the most returned units in the period (metric=returned_products, advanced)

### StatisticsCustomers

Customer KPIs vs. the previous period, and the top spenders (metric=customers, advanced)

- `current` (object)
- `current.total_customers` (integer)
- `current.repeat_customers` (integer)
- `current.b2b_customers` (integer)
- `current.total_orders` (integer)
- `current.total_revenue` (number)
- `current.repeat_purchase_rate` (number)
- `current.purchase_frequency` (number)
- `current.customer_lifetime_value` (number)
- `current.avg_per_customer` (number)
- `current.new_customers` (integer)
- `current.average_order_value` (number)
- `previous` (object)
- `previous.total_customers` (integer)
- `previous.repeat_customers` (integer)
- `previous.b2b_customers` (integer)
- `previous.total_orders` (integer)
- `previous.total_revenue` (number)
- `previous.repeat_purchase_rate` (number)
- `previous.purchase_frequency` (number)
- `previous.customer_lifetime_value` (number)
- `previous.avg_per_customer` (number)
- `previous.new_customers` (integer)
- `previous.average_order_value` (number)
- `growth` (object)
- `growth.total_customers` (number, nullable)
- `growth.new_customers` (number, nullable)
- `growth.b2b_customers` (number, nullable)
- `growth.repeat_purchase_rate` (number, nullable)
- `growth.customer_lifetime_value` (number, nullable)
- `growth.purchase_frequency` (number, nullable)
- `growth.average_order_value` (number, nullable)
- `growth.total_revenue` (number, nullable)
- `growth.total_orders` (number, nullable)
- `top_customers` (array of object)
- `top_customers[].name` (string, nullable)
- `top_customers[].email` (string)
- `top_customers[].id_client` (integer)
- `top_customers[].wholesale` (boolean)
- `top_customers[].orders_count` (integer)
- `top_customers[].total_spent` (number)
- `top_customers[].avg_order` (number)
- `top_customers[].last_order_date` (string, nullable)
- `prev_date_start` (string)
- `prev_date_end` (string)

### StatisticsLoyalty

Rewards points and the sales they drove (metric=loyalty, advanced)

- `rewards_active` (boolean): false when the store doesn't use the rewards program; the fields below are then absent
- `current` (object)
- `current.points_earned` (integer)
- `current.points_redeemed` (integer)
- `current.sales_with_points` (number)
- `current.sales_with_points_redeemed` (number)
- `growth` (object)
- `growth.points_earned` (number, nullable)
- `growth.points_redeemed` (number, nullable)
- `growth.sales_with_points` (number, nullable)
- `growth.sales_with_points_redeemed` (number, nullable)

### StatisticsCohort

Monthly cohort retention matrix over the trailing 12 closed months (metric=cohort, advanced)

- `cohorts` (array of object)
- `cohorts[].month` (string): mm/yyyy
- `cohorts[].size` (integer): Customers who made their first purchase in this cohort month
- `cohorts[].retention` (array of number): Retention percentage per month offset since the cohort month (offset 0 = 2+ orders in the cohort month itself)

### StatisticsProfitability

Revenue, cost and margin for the period, with top/bottom products and categories (metric=profitability, advanced)

- `revenue_products` (number)
- `gross_profit` (number, nullable): null when no line in the period has a cost snapshot
- `gross_margin_pct` (number, nullable)
- `cogs` (number, nullable)
- `coverage_pct` (number): Share of order lines with a cost snapshot
- `lines_with_cost` (integer)
- `lines_total` (integer)
- `median_margin_pct` (number)
- `margin_series` (array of number)
- `revenue_series` (array of number)
- `cogs_series` (array of number)
- `profit_series` (array of number)
- `top_products` (array of object)
- `top_products[].id` (integer)
- `top_products[].product` (string)
- `top_products[].product_url` (string, nullable)
- `top_products[].categories` (array of object)
- `top_products[].categories[].id` (integer)
- `top_products[].categories[].name` (string)
- `top_products[].quantity` (integer)
- `top_products[].revenue` (number)
- `top_products[].cogs` (number)
- `top_products[].profit` (number)
- `top_products[].margin_pct` (number)
- `bottom_products` (array of object)
- `bottom_products[].id` (integer)
- `bottom_products[].product` (string)
- `bottom_products[].product_url` (string, nullable)
- `bottom_products[].categories` (array of object)
- `bottom_products[].categories[].id` (integer)
- `bottom_products[].categories[].name` (string)
- `bottom_products[].quantity` (integer)
- `bottom_products[].revenue` (number)
- `bottom_products[].cogs` (number)
- `bottom_products[].profit` (number)
- `bottom_products[].margin_pct` (number)
- `top_categories` (array of object)
- `top_categories[].id` (integer)
- `top_categories[].category` (string)
- `top_categories[].category_url` (string)
- `top_categories[].revenue` (number)
- `top_categories[].cogs` (number)
- `top_categories[].profit` (number)
- `top_categories[].margin_pct` (number)
- `growth` (object)
- `growth.revenue_products` (number, nullable)
- `growth.gross_profit` (number, nullable)
- `growth.gross_margin_pct` (number, nullable)
- `growth.cogs` (number, nullable)
- `days` (array of string)

### StatisticsFunnel

Visitors per checkout step (metric=funnel, advanced)

### StatisticsCarts

Abandoned cart totals and recovery rate, cohort by creation date (metric=carts, advanced)

- `total_carts` (integer)
- `recovered_count` (integer)
- `not_recovered_count` (integer)
- `cart_total` (number)
- `recovered_value` (number)
- `avg_value` (number)
- `recovery_rate` (number)
- `abandonment_rate` (number)
- `growth` (object)
- `growth.total_carts` (number, nullable)
- `growth.cart_total` (number, nullable)
- `growth.avg_value` (number, nullable)
- `growth.recovery_rate` (number, nullable)
- `growth.abandonment_rate` (number, nullable)

### StatisticsPaymentMethods

Paid/unpaid orders, success rate and time-to-pay by method (metric=payment_methods, advanced)

- `paid_count` (integer)
- `unpaid_count` (integer)
- `success_rate` (number, nullable): Automatic-method success rate; null with no automatic-method orders
- `time_to_pay_secs` (integer, nullable)
- `growth` (object)
- `growth.paid_count` (number, nullable)
- `growth.unpaid_count` (number, nullable)
- `growth.success_rate` (number, nullable)
- `growth.time_to_pay` (number, nullable)
- `chart` (array of object)
- `chart[].day` (string)
- `by_method` (array of object)
- `by_method[].method` (string)
- `by_method[].method_label` (string)
- `by_method[].total` (integer)
- `by_method[].paid` (integer)
- `by_method[].unpaid` (integer)
- `by_method[].failed` (integer)
- `by_method[].success_rate` (number, nullable)
- `by_method[].share` (number): Share of all paid orders, percentage
- `by_method[].revenue` (number)
- `by_method[].avg_ticket` (number)
- `by_method[].time_to_pay` (integer, nullable)

### StatisticsExpeditions

Shipment KPIs, carriers and top destinations (metric=expeditions, advanced)

- `total_shipments` (integer)
- `avg_weight` (number, nullable): kg
- `processing_hours` (number, nullable)
- `delivery_hours` (number, nullable)
- `growth` (object)
- `growth.total_shipments` (number, nullable)
- `growth.avg_weight` (number, nullable)
- `growth.processing_hours` (number, nullable)
- `growth.delivery_hours` (number, nullable)
- `chart` (array of object)
- `chart[].day` (string)
- `chart[].pending` (integer)
- `chart[].in_transit` (integer)
- `chart[].delivered` (integer)
- `chart[].returned` (integer)
- `carriers` (array of object)
- `carriers[].carrier` (string)
- `carriers[].contract` (string ("shopkit", "proprio"))
- `carriers[].count` (integer)
- `carriers[].avg_weight` (number, nullable)
- `carriers[].processing_h` (number, nullable)
- `carriers[].delivery_h` (number, nullable)
- `carriers[].avg_cost` (number, nullable)
- `top_destinations` (array of object)
- `top_destinations[].country` (string)
- `top_destinations[].count` (integer)
- `top_destinations[].avg_weight` (number, nullable)
- `top_destinations[].processing_h` (number, nullable)
- `top_destinations[].delivery_h` (number, nullable)
- `top_destinations[].avg_cost` (number, nullable)

### StatisticsChannels

Visitors by acquisition channel (metric=channels)

- `channels` (array of object)
- `channels[].channel` (string): Umami channel key (e.g. organicSearch, paidAds, direct, ai)
- `channels[].label` (string): Channel name as shown to the merchant (e.g. Pesquisa orgânica)
- `channels[].visits` (integer)
- `channels[].percentage` (number)

### StatisticsChannelsConversions

Map of channel name to conversion count (metric=channels_conversions)

### StatisticsUtm

Visitors by UTM campaign (metric=utm)

- `campaigns` (array of object)
- `campaigns[].name` (string)
- `campaigns[].visitors` (integer)

### StatisticsHeatmap

Visitors and orders by day of week and hour (metric=heatmap)

- `heatmap` (array of object)
- `heatmap[].day` (integer): 0 = Sunday .. 6 = Saturday
- `heatmap[].hour` (integer): 0-23
- `heatmap[].visits` (integer)
- `heatmap[].orders` (integer)

### StatisticsSearch

Top store search keywords, up to 100 (metric=search)

- `search_keywords` (array of object)
- `search_keywords[].keyword` (string)
- `search_keywords[].count` (integer)
- `search_keywords[].url` (string)

### StatisticsMap

Visitors by country (metric=map)

### StatisticsMapConversions

Map of ISO 3166-1 alpha-2 country code to conversion count (metric=map_conversions)

### StatisticsVisits

Visitors, pageviews, bounce rate and average visit duration for the period (metric=visits)

- `visits` (integer)
- `pageviews` (integer)
- `bounce_rate` (number)
- `avg_duration` (number)
- `comparison` (object): Present only when the previous period's data is available
- `comparison.visits` (integer)
- `comparison.pageviews` (integer)
- `comparison.bounce_rate` (number)
- `comparison.avg_duration` (number)

### StatisticsLiveFull

Real-time active visitors and today's commerce funnel; ignores date_from/date_to (metric=live_full, advanced)

- `success` (boolean)
- `active_users` (integer)
- `visits_today` (integer)
- `sales` (number)
- `orders` (integer)
- `products` (integer): Active visitors currently viewing a product
- `active_carts` (integer)
- `checkout` (integer)
- `purchased` (integer)
- `series` (array of object): Active visitors per minute, last 30 minutes
- `series[].x` (string)
- `series[].y` (integer)
- `timestamp` (integer): Unix timestamp in milliseconds
- `utc_offset` (integer): Store timezone offset from UTC, in minutes

### StatisticsProduct

Single product stats and profitability for the period, with the previous period for comparison (metric=product, advanced)

- `product` (object)
- `product.title` (string)
- `period` (object)
- `period.days` (integer)
- `period.date_begin` (string)
- `period.date_end` (string)
- `period.prev_begin` (string)
- `period.prev_end` (string)
- `kpis` (object)
- `kpis.visits` (object)
- `kpis.visits.value` (integer, nullable)
- `kpis.visits.prev` (integer, nullable)
- `kpis.visits.delta_pct` (number, nullable)
- `kpis.orders` (object)
- `kpis.orders.value` (integer)
- `kpis.orders.prev` (integer)
- `kpis.orders.delta_pct` (number, nullable)
- `kpis.vendas` (object)
- `kpis.vendas.value` (number)
- `kpis.vendas.prev` (number)
- `kpis.vendas.delta_pct` (number, nullable)
- `kpis.conversion` (object): Distinct customers who bought the product / visitors of the product page, as a percentage (a customer with several orders counts once)
- `kpis.conversion.value` (number, nullable)
- `kpis.conversion.prev` (number, nullable)
- `kpis.conversion.delta_pct` (number, nullable)
- `chart` (object)
- `chart.visits` (array of integer)
- `chart.orders` (array of integer)
- `chart.vendas` (array of number)
- `chart.conversion` (array of number)
- `chart.margin` (array of number)
- `chart.margin_is_period` (boolean)
- `chart.options_stack` (object)
- `chart.options_stack.options` (array of string)
- `chart.options_stack.series` (object): Map of option name to its daily units series
- `chart.days` (array of string)
- `breakdown` (object)
- `breakdown.revenue_no_tax` (number)
- `breakdown.descontos` (number)
- `breakdown.recompensas` (number)
- `breakdown.impostos` (number)
- `breakdown.total` (number)
- `breakdown.devolucoes_value` (number)
- `breakdown.devolucoes_units` (integer)
- `profitability` (object)
- `profitability.revenue` (number)
- `profitability.cogs` (number)
- `profitability.returns_units` (integer)
- `profitability.returns_value` (number)
- `profitability.profit` (number)
- `profitability.margin_pct` (number)
- `profitability.has_cost` (boolean)
- `profitability.lines_without_cost` (integer)
- `variants` (array of object)
- `variants[].opcao` (string)
- `variants[].units` (integer)
- `variants[].orders` (integer)
- `variants[].revenue` (number)
- `variants[].pct` (number)
- `customers` (object)
- `customers.kpis` (object)
- `customers.kpis.unique` (object)
- `customers.kpis.unique.value` (integer)
- `customers.kpis.unique.prev` (integer)
- `customers.kpis.unique.delta_pct` (number, nullable)
- `customers.kpis.repeat` (object)
- `customers.kpis.repeat.value` (integer)
- `customers.kpis.repeat.prev` (integer)
- `customers.kpis.repeat.delta_pct` (number, nullable)
- `customers.kpis.repeat.pct` (number)
- `customers.kpis.b2b` (object)
- `customers.kpis.b2b.value` (integer)
- `customers.kpis.b2b.prev` (integer)
- `customers.kpis.b2b.delta_pct` (number, nullable)
- `customers.kpis.avg_per_customer` (object)
- `customers.kpis.avg_per_customer.value` (number)
- `customers.kpis.avg_per_customer.prev` (number)
- `customers.kpis.avg_per_customer.delta_pct` (number, nullable)
- `customers.kpis.new` (object)
- `customers.kpis.new.value` (integer)
- `customers.kpis.new.prev` (integer)
- `customers.kpis.new.delta_pct` (number, nullable)
- `customers.kpis.orders_per_customer` (number)
- `customers.top` (array of object)
- `customers.top[].id_client` (integer, nullable)
- `customers.top[].name` (string, nullable)
- `customers.top[].email` (string)
- `customers.top[].orders` (integer)
- `customers.top[].units` (integer)
- `customers.top[].revenue` (number)

### Theme

Current values of the store's active theme in the Theme Editor

- `store` (object): Store the theme belongs to
- `store.id` (integer)
- `store.alias` (string)
- `store.template` (string): Active template: shopkit/{theme}, or store/{alias} for a custom template
- `store.theme` (string)
- `store.url` (string)
- `options` (object): Writable fields by name: colours, fonts, sizes, what to show
- `objects` (object): Objects by type (navigation, homepage, homepage_blocks, gallery, mobile_gallery, footer_images, template_images, popups), in the shape PUT /theme accepts
- `resolved` (object): Read-only values the options do not express
- `resolved.media` (object): Media fields: the media id and its URL
- `resolved.colors` (object): Colour fields that inherit from another field, with the colour they resolve to
- `resolved.fonts` (object): Font fields with their family, variants and category
- `resolved.titles` (object): Titles of the pages, categories, brands, tags and products the navigation and the homepage point to, by type and id

### ThemeFields

Theme Editor fields of the store's active theme: the summary of its panels without q nor panel, the fields that match with them

- `schema_version` (integer): Version of this field description
- `store` (object): Store the theme belongs to
- `store.id` (integer)
- `store.alias` (string)
- `store.template` (string): Active template: shopkit/{theme}, or store/{alias} for a custom template
- `store.theme` (string)
- `store.url` (string)
- `active_theme` (string)
- `themes_available` (array of string)
- `object_types` (array of string)
- `field_count` (integer): Fields of the theme in the summary; fields returned with q or panel
- `panels` (array of object): Without q nor panel: the panels, in the editor's order
- `panels[].panel` (string): Technical name, the value the panel filter takes
- `panels[].panel_title` (string, nullable)
- `panels[].tab_title` (string, nullable)
- `panels[].subpanels` (array of string)
- `panels[].fields` (integer): Number of fields
- `total` (integer): With q or panel: the fields that match
- `limit` (integer): With q or panel: the most fields returned
- `fields` (array of object): With q or panel: the first limit fields that match
- `fields[].name` (string)
- `fields[].label` (string, nullable)
- `fields[].type` (string): Editor control: colorpicker, select, slider, checkbox, text, media, fontfamily...
- `fields[].panel` (string): Technical name of the panel
- `fields[].panel_title` (string, nullable): Title the editor shows the panel under
- `fields[].tab_title` (string, nullable): Title of the editor tab the panel is in (null for the fields of the object windows, panel modals > ...)
- `fields[].subpanel` (string, nullable)
- `fields[].options` (any): Allowed values of a select: a list of values, or an object of value: label
- `fields[].range` (object, nullable): Minimum, maximum and step of a slider
- `fields[].validation` (string, nullable)
- `fields[].allow_html` (boolean): The value keeps safe HTML (formatting tags such as strong, span with style, br, p and links); scripts, on* attributes and javascript: links are removed. False: HTML tags are removed and only the text is kept
- `fields[].compile` (boolean, nullable)
- `fields[].css_vars` (boolean, nullable)
- `fields[].themes` (array of string): Themes that have the field (null: all)
- `fields[].available_for_active_theme` (boolean)
- `fields[].current` (any): Current value
- `fields[].default` (any): Default value of the theme

### ThemeUpdate

Result of a theme change

- `mode` (string ("dry_run", "publish"))
- `published` (boolean)
- `compiled` (boolean)
- `css_bytes` (integer): Size of the compiled stylesheet
- `changed` (object)
- `changed.options` (array of string)
- `changed.objects` (array of string)
- `store_url` (string)

### ThemeError

Theme change that was not made

- `message` (string)
- `validation_errors` (object): Error by field or object item
- `compile_errors` (string): LESS compilation error

### ThemeCode

The store's custom code (Appearance > Advanced); an empty string is no code

- `custom_css` (string): CSS added to every page, as stored (compiled from LESS, without line breaks)
- `custom_js` (string): JavaScript added to every page, as stored (as it was sent)
- `head_html` (string): HTML at the end of the <head>, rendered as Twig with the store's data
- `footer_html` (string): HTML at the end of the <body>, rendered as Twig with the store's data

### ThemeGuide

How to change the store's design, and what that needs

- `store` (object): Store the theme belongs to
- `store.id` (integer)
- `store.alias` (string)
- `store.template` (string): Active template: shopkit/{theme}, or store/{alias} for a custom template
- `store.theme` (string)
- `store.url` (string): The live storefront url
- `active_theme` (string)
- `guide` (string): The guide, in Markdown: where each design change goes and the rules of custom CSS, JS and HTML
- `css_vars` (object): CSS variables of the active theme, by name, with the current value of the Theme Editor option behind each one: use them in custom CSS instead of literal values
- `custom_code_bytes` (object): Size of each custom code field (0: no code); read the code with GET /theme/code before changing it
- `custom_code_bytes.custom_css` (integer)
- `custom_code_bytes.custom_js` (integer)
- `custom_code_bytes.head_html` (integer)
- `custom_code_bytes.footer_html` (integer)
- `page` (object): Only with path: the page as the store serves it
- `page.path` (string)
- `page.structure` (string): One element per line, indented by depth: tag, #id, .classes, the start of its own text in quotes, and ×N for N siblings alike. Scripts, styles and icons left out

### ThemeCodeUpdate

Result of a custom code change

- `mode` (string ("dry_run", "publish"))
- `published` (boolean)
- `changed` (array of string): Fields changed
- `code` (object): The changed fields as they are (dry_run) or were (publish) stored

### ThemeTemplates

The store's e-mail templates and system pages

- `templates` (array of object)
- `templates[].name` (string)
- `templates[].title` (string): Name in the admin
- `templates[].type` (string ("email", "page"))
- `templates[].customized` (boolean): The store changed it (false: it uses the original)
- `templates[].updated_at` (string, nullable): When the store last changed it

### ThemeTemplate

An e-mail template or system page with its code and subjects

- `name` (string)
- `title` (string)
- `type` (string ("email", "page"))
- `customized` (boolean): The store changed it (false: source is the original)
- `updated_at` (string, nullable)
- `source` (string): Twig code
- `subjects` (object): E-mail subjects (Twig) by setting; empty for a page

### ThemeTemplateUpdate

Result of a template change

- `mode` (string ("dry_run", "publish"))
- `published` (boolean)
- `changed` (array of string): source and subjects.<setting> changed
- `preview` (object): dry_run of an e-mail: the e-mail rendered with the store's data and a sample customer and order
- `preview.subject` (string)
- `preview.html` (string)

### ThemeVersions

Versions of the store's appearance, newest first

- `versions` (array of object)
- `versions[].id` (integer)
- `versions[].asset` (string): theme (Theme Editor options), css, javascript, html or a template name
- `versions[].title` (string): What the version was kept before, e.g. the app that made the change
- `versions[].created_at` (string)

### ThemeVersion

A version of the store's appearance with its content

- `id` (integer)
- `asset` (string): theme (Theme Editor options), css, javascript, html or a template name
- `title` (string)
- `created_at` (string)
- `content` (object): What the asset was: the Theme Editor options; the code fields of a custom code tab (custom_css, custom_js, head_html and footer_html); or a template's source (null: the original) and subjects

### ThemeVersionRestore

Result of restoring a version: as a change of its asset

- `asset` (string)
- `mode` (string ("dry_run", "publish"))
- `published` (boolean)
- `changed` (any): What changes: the code fields, source and subjects.<setting>, or for the theme options the changed options and objects
- `compiled` (boolean): Theme options: the stylesheet compiled
- `css_bytes` (integer): Theme options: size of the compiled stylesheet
- `store_url` (string): Theme options: the live store

### ThemeCatalog

The themes for the store and its custom template

- `themes` (array of object)
- `themes[].id` (integer)
- `themes[].theme` (string)
- `themes[].title` (string)
- `themes[].description` (string, nullable)
- `themes[].price` (number): Price before VAT; 0 is free
- `themes[].available` (boolean): The store can use it: free, bought or in its plan
- `themes[].active` (boolean)
- `themes[].version` (string, nullable)
- `themes[].demo_url` (string, nullable)
- `custom` (object): The store's custom template, a copy of a theme it can edit file by file
- `custom.exists` (boolean)
- `custom.active` (boolean)
- `custom.base_theme` (string, nullable): Theme the custom template is based on
- `compiled` (boolean): After an activation: the new theme's stylesheet compiled
- `admin_url` (string): Templates in the admin, where themes are bought
