Adore API (0.1.0)

Download OpenAPI specification:Download

REST API of the Adore e-shop for the shopfront and integrations.

← Back to the documentation

Reference of the Adore backend JSON API (Laravel, simploSHOP core + Adore theme).

This specification describes endpoints, parameters and response shapes. Cross-cutting conventions (how embed, only, filters and pagination work, headers, errors) and multi-step flows (e.g. how to show stock availability) are described in the guides:

Scope today: products, product variations and the Adore restock endpoints. Write operations (POST, PATCH, DELETE) on products and variations exist for the admin and are not documented here yet.

Products

Products as shown in listings and on the product detail page.

List products

Paginated list of products the caller may access. Guests and customers see only active, non-hidden products accessible to their customer group; admin users with products:read see all.

Listings on the shopfront (category, search) use POST /api/v0/products/filter instead, which understands shopfront filter URLs.

query Parameters
embed
string
Examples:
  • embed=urls,default_image_url,computed_taxed_prices,product_availability -
  • embed=expected_restocks,additional_data -

Comma-separated embeds returned under _embedded. Braces select the embed's props and nest embeds via _embed: product_variations{id,code,_embed{expected_restocks}}. See API conventions. Unknown embeds → 400.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

except
string

Comma-separated props to leave out. Cannot be combined with only.

filters
string
Example: filters=W3siZiI6InByb2R1Y3RfaWQiLCJvIjoiZXEiLCJ2Ijo3MX1d

Base64-encoded JSON array of conditions {"f": field | [fields], "o": operator, "v": value}. Conditions are AND-ed, several fields in one condition are OR-ed. Operators: eq, neq, gt, gte, lt, lte, in, nin, contains, starts_with, ends_with. See API conventions.

sort
string

Comma-separated sort fields, - prefix for descending, e.g. -stock_state,id.

search
string <= 100 characters

Full-text search (max 100 characters). Enables the sort field relevance.

paginate
integer
Enum: 0 1

0 returns all items without _meta, 1 paginates. Lists paginate by default.

page
integer >= 1
Default: 1
per_page
integer >= 1
Default: 100

Items per page. No upper limit is enforced; keep it reasonable.

header Parameters
Language-Preference
string
Example: cs-CZ

Locale(s) of multilingual props in the response: cs-CZ, sk-SK, en-US (comma-separated for several; an unknown locale returns 400). With one locale multilingual props are plain strings, without the header they are objects keyed by language ID.

Currency-Preference
string
Example: CZK

Currency ID(s) of money props in the response. With one currency a money prop is {value, formatted}, without the header an object keyed by currency ID.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "_meta": {
    }
}

Get a product

Product detail. filters, sort and search are not allowed here. The embeds product_review_parameters and product_review_parameter_ratings are available only on this endpoint (not in lists).

path Parameters
productId
required
integer
query Parameters
embed
string
Examples:
  • embed=urls,default_image_url,computed_taxed_prices,product_availability -
  • embed=expected_restocks,additional_data -

Comma-separated embeds returned under _embedded. Braces select the embed's props and nest embeds via _embed: product_variations{id,code,_embed{expected_restocks}}. See API conventions. Unknown embeds → 400.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

except
string

Comma-separated props to leave out. Cannot be combined with only.

header Parameters
Language-Preference
string
Example: cs-CZ

Locale(s) of multilingual props in the response: cs-CZ, sk-SK, en-US (comma-separated for several; an unknown locale returns 400). With one locale multilingual props are plain strings, without the header they are objects keyed by language ID.

Currency-Preference
string
Example: CZK

Currency ID(s) of money props in the response. With one currency a money prop is {value, formatted}, without the header an object keyed by currency ID.

Responses

Response samples

Content type
application/json
{
  • "id": 71,
  • "code": "1101310",
  • "stock_state": 50,
  • "expected_count": 0,
  • "expected_date_min": null,
  • "has_variations": true,
  • "_embedded": {
    }
}

Filter products by a shopfront URL

Returns the products of a shopfront listing (category, brand, search, filter page) for the given shopfront URL, together with the available filters, sort options and pagination. Filters, sorting and pagination are read from request_uri; the query parameters filters, sort and search are not allowed. embed and only apply to the items.

query Parameters
embed
string
Examples:
  • embed=urls,default_image_url,computed_taxed_prices,product_availability -
  • embed=expected_restocks,additional_data -

Comma-separated embeds returned under _embedded. Braces select the embed's props and nest embeds via _embed: product_variations{id,code,_embed{expected_restocks}}. See API conventions. Unknown embeds → 400.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

header Parameters
Language-Preference
string
Example: cs-CZ

Locale(s) of multilingual props in the response: cs-CZ, sk-SK, en-US (comma-separated for several; an unknown locale returns 400). With one locale multilingual props are plain strings, without the header they are objects keyed by language ID.

Currency-Preference
string
Example: CZK

Currency ID(s) of money props in the response. With one currency a money prop is {value, formatted}, without the header an object keyed by currency ID.

Request Body schema: application/json
required
request_uri
required
string

Shopfront path including the query string, e.g. a category URL with filter segments.

source
string

Optional identifier of the caller.

Responses

Request samples

Content type
application/json
{
  • "request_uri": "/obleceni/tricka?page=2",
  • "source": "string"
}

Response samples

Content type
application/json
{
  • "request_uri": "string",
  • "filters": [
    ],
  • "sort_options": [
    ],
  • "pagination_data": { },
  • "products_in_package": [
    ],
  • "additional_data": { },
  • "items": [
    ]
}

Product variations

Purchasable variants of a product (size, colour, …). Only variations can be bought.

List product variations

Paginated list of variations. Callers without products:read see only active variations. Typical use: all variations of one product, filters=[{"f":"product_id","o":"eq","v":71}] (base64) with paginate=0. There is no search on this endpoint.

query Parameters
embed
string
Examples:
  • embed=urls,default_image_url,computed_taxed_prices,product_availability -
  • embed=expected_restocks,additional_data -

Comma-separated embeds returned under _embedded. Braces select the embed's props and nest embeds via _embed: product_variations{id,code,_embed{expected_restocks}}. See API conventions. Unknown embeds → 400.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

except
string

Comma-separated props to leave out. Cannot be combined with only.

filters
string
Example: filters=W3siZiI6InByb2R1Y3RfaWQiLCJvIjoiZXEiLCJ2Ijo3MX1d

Base64-encoded JSON array of conditions {"f": field | [fields], "o": operator, "v": value}. Conditions are AND-ed, several fields in one condition are OR-ed. Operators: eq, neq, gt, gte, lt, lte, in, nin, contains, starts_with, ends_with. See API conventions.

sort
string

Comma-separated sort fields, - prefix for descending, e.g. -stock_state,id.

paginate
integer
Enum: 0 1

0 returns all items without _meta, 1 paginates. Lists paginate by default.

page
integer >= 1
Default: 1
per_page
integer >= 1
Default: 100

Items per page. No upper limit is enforced; keep it reasonable.

header Parameters
Language-Preference
string
Example: cs-CZ

Locale(s) of multilingual props in the response: cs-CZ, sk-SK, en-US (comma-separated for several; an unknown locale returns 400). With one locale multilingual props are plain strings, without the header they are objects keyed by language ID.

Currency-Preference
string
Example: CZK

Currency ID(s) of money props in the response. With one currency a money prop is {value, formatted}, without the header an object keyed by currency ID.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "_meta": {
    }
}

Get a product variation

path Parameters
productVariationId
required
integer
query Parameters
embed
string
Examples:
  • embed=urls,default_image_url,computed_taxed_prices,product_availability -
  • embed=expected_restocks,additional_data -

Comma-separated embeds returned under _embedded. Braces select the embed's props and nest embeds via _embed: product_variations{id,code,_embed{expected_restocks}}. See API conventions. Unknown embeds → 400.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

except
string

Comma-separated props to leave out. Cannot be combined with only.

header Parameters
Language-Preference
string
Example: cs-CZ

Locale(s) of multilingual props in the response: cs-CZ, sk-SK, en-US (comma-separated for several; an unknown locale returns 400). With one locale multilingual props are plain strings, without the header they are objects keyed by language ID.

Currency-Preference
string
Example: CZK

Currency ID(s) of money props in the response. With one currency a money prop is {value, formatted}, without the header an object keyed by currency ID.

Responses

Response samples

Content type
application/json
{
  • "id": 299,
  • "product_id": 71,
  • "code": "1101310-01",
  • "is_active": true,
  • "stock_state": 50,
  • "expected_count": 0,
  • "expected_date_min": null,
  • "_embedded": {
    }
}

Expected restocks

Adore theme endpoints with the planned restocks (ordered goods) synchronized from Vario. For new code prefer the expected_restocks embed on products and variations.

Expected restocks of one variation

Restock rows of one variation, as synchronized from Vario (quantityIncoming). Not paginated. Prefer the expected_restocks embed on the variation, which returns the same data without an extra request.

path Parameters
productVariationId
required
integer
query Parameters
filters
string
Example: filters=W3siZiI6InByb2R1Y3RfaWQiLCJvIjoiZXEiLCJ2Ijo3MX1d

Base64-encoded JSON array of conditions {"f": field | [fields], "o": operator, "v": value}. Conditions are AND-ed, several fields in one condition are OR-ed. Operators: eq, neq, gt, gte, lt, lte, in, nin, contains, starts_with, ends_with. See API conventions.

sort
string

Comma-separated sort fields, - prefix for descending, e.g. -stock_state,id.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Expected restocks of many variations

All restock rows, paginated by default (per_page 100). Filter by variations with filters=[{"f":"product_variation_id","o":"in","v":[299,300]}] (base64) and use paginate=0 to get all rows at once. Rows of inactive variations are included.

Prefer the expected_restocks embed on product variations (or products, which return the sums over active variations).

query Parameters
filters
string
Example: filters=W3siZiI6InByb2R1Y3RfaWQiLCJvIjoiZXEiLCJ2Ijo3MX1d

Base64-encoded JSON array of conditions {"f": field | [fields], "o": operator, "v": value}. Conditions are AND-ed, several fields in one condition are OR-ed. Operators: eq, neq, gt, gte, lt, lte, in, nin, contains, starts_with, ends_with. See API conventions.

sort
string

Comma-separated sort fields, - prefix for descending, e.g. -stock_state,id.

only
string
Example: only=id,code,stock_state

Comma-separated props to return (a.b for nested, a[b,c] for groups). Cannot be combined with except.

paginate
integer
Enum: 0 1

0 returns all items without _meta, 1 paginates. Lists paginate by default.

page
integer >= 1
Default: 1
per_page
integer >= 1
Default: 100

Items per page. No upper limit is enforced; keep it reasonable.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "_meta": {
    }
}