LianaCommerce REST API

Products

Serverhttps://shop.example.com/api/v1

Create, read, update and delete products. The sub-resources of a product manage its extra descriptions, images, attachments, tags, compatible products, properties and variations, and show its stock and stock history.


List products

GET
https://shop.example.com/api/v1
/products

Returns the shop's products, newest first (highest id first). Deleted products are not listed. Filters are combined: a product must match all of them. order_by_field and order_by_direction have no effect here.

List products › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0
codes[]
​string[] · style: form · explode: true

Returns products whose product_code is one of these codes. The match is exact but ignores case. Repeat the parameter for each code (codes[]=AB-100&codes[]=AB-200); codes=AB-100 also works for a single code.

eans[]
​string[] · style: form · explode: true

Returns products whose ean_code is one of these codes. The match is exact but ignores case. Repeat the parameter for each code; eans=6415712345678 also works for a single code.

erp_id
​string

Returns products whose erp_id is exactly this value. An empty value is ignored.

category
​integer

Returns products whose primary category is this category id. Products that are in the category only as a secondary category are not returned.

modified_after
​string

Returns products modified at or after this time. Use an ISO 8601 date or date-time, such as 2026-11-01 or 2026-11-01T08:00:00+02:00; a time without an offset is read in the shop's time zone.

has_stock_alert
​boolean

true returns products whose stock_alert is greater than 0, false those whose stock_alert is 0 or less. Products with the stock alert turned off (stock_alert is null) match neither. 1/0, yes/no and on/off also work; an empty or any other value returns 400.

List products › Responses

A page of products.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta

Create a product

POST
https://shop.example.com/api/v1
/products

Creates a product and returns it with the same fields as Get a product. category and names are required. Fields you omit get the shop's defaults for new products. Without vat_percent the product uses the shop's default VAT; use_default_vat_percent: false without vat_percent returns 400. A min_order_qty below 1 is raised to 1, and a max_order_qty below min_order_qty is raised to it.

After saving, the shop updates the product's search-engine names, and the urls in the response show the updated addresses. Add variations with Add a product variation.

Create a product › Request Body

Fields that POST and PUT `/products` take, besides `category` and `names`.
category
​integer · required

The id of the primary category. An unknown category returns 400.

Example: 4
​LocalizedName[] · minItems: 1 · required

The product's names. Each entry needs a non-empty name.

tags
​integer[]

Ids of existing tags to add to the product. An unknown id returns 400.

Example: [12]
product_code
​string
ean_code
​string
erp_id
​string
supplier_code
​string
manufacturer_name
​string
manufacturer_id
​string

The manufacturer's code for the product.

Example: KR-500-DARK
base_price
​number
inventory_price
​number
msrp
​number

The suggested retail price. Same as suggested_retail_price; send only one of them.

Example: 14.9
suggested_retail_price
​number

The suggested retail price. Same as msrp.

Example: 14.9
vat_percent
​number

A product-specific VAT percent. A negative value means the shop's default VAT. If you send both vat_percent and use_default_vat_percent, vat_percent decides.

Example: 14
use_default_vat_percent
​boolean

true uses the shop's default VAT percent. false without vat_percent returns 400 when you create a product; when you update one, it keeps the product's own VAT percent, or returns 400 if the product uses the default VAT.

Example: true
stock
​integer
stock_alert
​integer | null

The stock level at which the shop alerts about low stock. null turns the alert off.

Example: 10
hidden
​boolean
visible_out_of_stock
​boolean
buyable_out_of_stock
​boolean
is_new
​boolean
is_popular
​boolean
is_best_offer
​boolean
is_pre_sale
​boolean

Whether the product is shown, for pre-sale, before availability_begins.

Example: false
is_promotion_allowed
​boolean
is_product_of_week
​boolean
store_only
​boolean

Whether the product is only displayed and can't be bought.

Example: false
price_hidden
​boolean
delivery_cost_unit
​number
delivery_time_in_days
​integer
min_order_qty
​integer
max_order_qty
​integer
availability_begins
​string | null

An ISO 8601 date-time, read as the shop's local time (an offset is ignored), or null for no start.

Example: 2026-12-01T00:00:00
availability_ends
​string | null

An ISO 8601 date-time, read as the shop's local time (an offset is ignored), or null for no end.

Example: null
extra_input_group
​integer | null

The id of an existing extra input group, or null for none. An unknown id returns 400.

Example: null
​SecondaryCategoryInput[]

The product's secondary categories. Every id must be an existing category other than the primary category, otherwise the request returns 400. In PUT, a non-empty array replaces all secondary categories.

​LocalizedDescription[]
​LocalizedTeaser[]
​LocalizedAbbreviation[]
​LocalizedHtmlContent[]

Create a product › Responses

The created product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Get a product

GET
https://shop.example.com/api/v1
/products/{product-id}

Returns one product with all its fields, including its descriptions, secondary categories, compatible products, extra descriptions, variations, tags, properties and bundle products. The item has no href.

Get a product › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Get a product › Responses

The product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Update a product

PUT
https://shop.example.com/api/v1
/products/{product-id}

Updates the fields you send and keeps the others. Localized fields (names, descriptions and so on) add or change the languages you send. A non-empty secondary_categories replaces all secondary categories. Tags can't be changed here: use Add product tags. use_default_vat_percent: true switches the product to the shop's default VAT. use_default_vat_percent: false without vat_percent keeps the product's own VAT percent, or returns 400 if the product uses the default VAT. If min_order_qty and max_order_qty conflict, the API adjusts them so that the minimum isn't above the maximum.

After saving, the shop updates the product's search-engine names. The response shows the product as Get a product does, with the updated urls.

Update a product › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Update a product › Request Body

Fields that POST and PUT `/products` take, besides `category` and `names`.
category
​integer

The id of a new primary category. An unknown category returns 400; 0 is ignored. If the category is one of the product's secondary categories, it's removed from them.

Example: 4
​LocalizedName[]

Names to add or change, per language. A language the product has no name for yet needs a non-empty name.

product_code
​string
ean_code
​string
erp_id
​string
supplier_code
​string
manufacturer_name
​string
manufacturer_id
​string

The manufacturer's code for the product.

Example: KR-500-DARK
base_price
​number
inventory_price
​number
msrp
​number

The suggested retail price. Same as suggested_retail_price; send only one of them.

Example: 14.9
suggested_retail_price
​number

The suggested retail price. Same as msrp.

Example: 14.9
vat_percent
​number

A product-specific VAT percent. A negative value means the shop's default VAT. If you send both vat_percent and use_default_vat_percent, vat_percent decides.

Example: 14
use_default_vat_percent
​boolean

true uses the shop's default VAT percent. false without vat_percent returns 400 when you create a product; when you update one, it keeps the product's own VAT percent, or returns 400 if the product uses the default VAT.

Example: true
stock
​integer
stock_alert
​integer | null

The stock level at which the shop alerts about low stock. null turns the alert off.

Example: 10
hidden
​boolean
visible_out_of_stock
​boolean
buyable_out_of_stock
​boolean
is_new
​boolean
is_popular
​boolean
is_best_offer
​boolean
is_pre_sale
​boolean

Whether the product is shown, for pre-sale, before availability_begins.

Example: false
is_promotion_allowed
​boolean
is_product_of_week
​boolean
store_only
​boolean

Whether the product is only displayed and can't be bought.

Example: false
price_hidden
​boolean
delivery_cost_unit
​number
delivery_time_in_days
​integer
min_order_qty
​integer
max_order_qty
​integer
availability_begins
​string | null

An ISO 8601 date-time, read as the shop's local time (an offset is ignored), or null for no start.

Example: 2026-12-01T00:00:00
availability_ends
​string | null

An ISO 8601 date-time, read as the shop's local time (an offset is ignored), or null for no end.

Example: null
extra_input_group
​integer | null

The id of an existing extra input group, or null for none. An unknown id returns 400.

Example: null
​SecondaryCategoryInput[]

The product's secondary categories. Every id must be an existing category other than the primary category, otherwise the request returns 400. In PUT, a non-empty array replaces all secondary categories.

​LocalizedDescription[]
​LocalizedTeaser[]
​LocalizedAbbreviation[]
​LocalizedHtmlContent[]

Update a product › Responses

The updated product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Delete a product

DELETE
https://shop.example.com/api/v1
/products/{product-id}

Marks the product as deleted and returns it as it was. A deleted product is no longer found: requesting it again returns 404.

Delete a product › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Delete a product › Responses

The deleted product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product attachments

GET
https://shop.example.com/api/v1
/products/{product-id}/attachments

Returns the product's attachments (files such as manuals), newest first. Deleted attachments are not listed. Add attachments with Upload a product attachment.

List product attachments › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product attachments › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0

List product attachments › Responses

A page of attachments.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta

Get a product attachment

GET
https://shop.example.com/api/v1
/products/{product-id}/attachments/{attachment-id}

Returns one attachment of the product.

Get a product attachment › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

attachment-id
​integer · required

The attachment's id. An attachment of another product returns 404.

Get a product attachment › Responses

The attachment.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Update a product attachment

PUT
https://shop.example.com/api/v1
/products/{product-id}/attachments/{attachment-id}

Updates the attachment's position, titles and descriptions. Fields you don't send keep their values. To replace the file, upload a new attachment and delete the old one.

Update a product attachment › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

attachment-id
​integer · required

The attachment's id. An attachment of another product returns 404.

Update a product attachment › Request Body

position
​integer
​LocalizedTitle[]

Titles to add or change. A language the attachment has no title for yet needs a non-empty title.

​LocalizedDescription[]

Update a product attachment › Responses

The updated attachment.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Delete a product attachment

DELETE
https://shop.example.com/api/v1
/products/{product-id}/attachments/{attachment-id}

Marks the attachment as deleted and returns it as it was. Requesting it again returns 404.

Delete a product attachment › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

attachment-id
​integer · required

The attachment's id. An attachment of another product returns 404.

Delete a product attachment › Responses

The deleted attachment.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Upload a product attachment

POST
https://shop.example.com/api/v1
/products/{product-id}/attachments/upload

Adds a file to the product as an attachment. Send either file_url_path, an http(s):// URL that the shop downloads the file from, or base64, the file's content. The body is JSON in both cases. A URL whose host is in a private network, or a download that fails, returns 400 Parameter 'file_url_path' has invalid value.

If the product already has an attachment with the same file, the API returns that attachment and adds no copy; the other fields of the request are not applied to it.

Upload a product attachment › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Upload a product attachment › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: file_url_path
type = object · requires: base64
Properties for Variant 1:
file_url_path
​string · required

The file's http(s):// URL on a public host.

Example: https://files.example.com/manuals/grinder-manual.pdf
position
​integer

The attachment's position. 0 or omitted puts it after the product's other attachments.

Example: 1
​LocalizedTitle[]

The attachment's titles. If omitted, the title is the stored file name, in the shop's default language.

​LocalizedDescription[]

Upload a product attachment › Responses

The new attachment, or the product's existing attachment with the same file.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product variations

GET
https://shop.example.com/api/v1
/products/{product-id}/variations

Returns all the product's variations, newest first. The list is not paged: limit and offset don't apply, and the response has no first, prev or next links. To change a variation, use the Variations endpoints.

List product variations › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product variations › Responses

The product's variations.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Add a product variation

POST
https://shop.example.com/api/v1
/products/{product-id}/variations

Creates a variation of the product. group_id, stock and names are required. Fields you omit get the shop's defaults for new variations.

Add a product variation › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Add a product variation › Request Body

group_id
​integer · required

The id of an existing variation group. An unknown id returns 400.

Example: 2
stock
​integer · required
​LocalizedName[] · minItems: 1 · required

The variation's names. Each entry needs a non-empty name.

​LocalizedDescription[]
additional_price
​number
variation_code
​string
ean_code
​string
erp_id
​string
color
​string
size
​string
image
​string

The variation's image as an http(s):// URL on a public host. A URL whose host is in a private network returns 400.

Example: https://images.example.com/coffee/dark-roast-1kg.jpg
position
​integer

The variation's position. 0 or omitted puts it last.

Example: 1
hidden
​boolean
visible_out_of_stock
​boolean
buyable_out_of_stock
​boolean

Add a product variation › Responses

The created variation.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product descriptions

GET
https://shop.example.com/api/v1
/products/{product-id}/descriptions

Returns the product's extra descriptions, newest first. The list leaves out the visible_in_* fields: get a single description to see them.

List product descriptions › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product descriptions › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0

List product descriptions › Responses

A page of extra descriptions.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta

Add a product description

POST
https://shop.example.com/api/v1
/products/{product-id}/descriptions

Adds an extra description to the product, in one language. language and name are required; omitted fields default to an empty string or false.

Add a product description › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Add a product description › Request Body

language
​string · required

A language the shop uses, such as EN. Any other value returns 400. Required when you add a description; in an update, omit it to keep the current language.

Example: EN
name
​string · required

Required when you add a description. Can't be null.

Example: Brewing tips
label
​string
description
​string
visible_in_list
​boolean
visible_in_product
​boolean
visible_in_email
​boolean

Add a product description › Responses

The created description.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Get a product description

GET
https://shop.example.com/api/v1
/products/{product-id}/descriptions/{description-id}

Returns one extra description of the product.

Get a product description › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

description-id
​integer · required

The extra description's id. A description of another product returns 404.

Get a product description › Responses

The description.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Update a product description

PUT
https://shop.example.com/api/v1
/products/{product-id}/descriptions/{description-id}

Updates the fields you send and keeps the others.

Update a product description › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

description-id
​integer · required

The extra description's id. A description of another product returns 404.

Update a product description › Request Body

language
​string

A language the shop uses, such as EN. Any other value returns 400. Required when you add a description; in an update, omit it to keep the current language.

Example: EN
name
​string

Required when you add a description. Can't be null.

Example: Brewing tips
label
​string
description
​string
visible_in_list
​boolean
visible_in_product
​boolean
visible_in_email
​boolean

Update a product description › Responses

The updated description.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Add compatible products

POST
https://shop.example.com/api/v1
/products/{product-id}/compatibles

Marks other products as compatible with this product. The body is an array; each element names a product by exactly one of product_id, product_code, ean_code or erp_id (an exact match; a code can match several products). An element with no identifier or with more than one returns 400.

Elements that match no product, and the product itself, are skipped. If nothing matches, the response is 404. The response lists every matched product, including ones that were already compatible. To see the compatible products, get the product.

Add compatible products › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Add compatible products › Request Body

​CompatibleProductInput[] · minItems: 1
Identifies a product by exactly one of these fields.
product_id
​integer
product_code
​string
ean_code
​string
erp_id
​string

Add compatible products › Responses

The matched products.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Remove a compatible product

DELETE
https://shop.example.com/api/v1
/products/{product-id}/compatibles/{compatible-id}

Removes a product from this product's compatible products and returns the removed product. A product that isn't compatible with this product returns 404.

Remove a compatible product › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

compatible-id
​integer · required

The id of the compatible product.

Remove a compatible product › Responses

The removed compatible product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product images

GET
https://shop.example.com/api/v1
/products/{product-id}/images

Returns the product's images, newest first. Add images with Upload a product image.

List product images › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product images › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0

List product images › Responses

A page of images.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta

Get a product image

GET
https://shop.example.com/api/v1
/products/{product-id}/images/{image-id}

Returns one image of the product.

Get a product image › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

image-id
​integer · required

The image's id. An unknown or deleted image, or an image of another product, returns 404.

Get a product image › Responses

The image.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Update a product image

PUT
https://shop.example.com/api/v1
/products/{product-id}/images/{image-id}

Updates the image's position, titles and descriptions, and whether it's the product's default or teaser image. Fields you don't send keep their values. To replace the file, upload a new image and delete the old one.

Update a product image › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

image-id
​integer · required

The image's id. An unknown or deleted image, or an image of another product, returns 404.

Update a product image › Request Body

is_default
​boolean

true makes this the product's default image. false removes it as the default image if it is one.

Example: true
is_teaser
​boolean

true makes this the product's teaser image. false removes it as the teaser image if it is one.

Example: false
position
​integer
​LocalizedTitle[]

Titles to add or change. A language the image has no title for yet needs a non-empty title.

​LocalizedDescription[]

Update a product image › Responses

The updated image.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Delete a product image

DELETE
https://shop.example.com/api/v1
/products/{product-id}/images/{image-id}

Removes the image from the product and returns it as it was. If it was the product's default or teaser image, the product no longer has one. Requesting the image again returns 404.

Delete a product image › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

image-id
​integer · required

The image's id. An unknown or deleted image, or an image of another product, returns 404.

Delete a product image › Responses

The deleted image.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Upload a product image

POST
https://shop.example.com/api/v1
/products/{product-id}/images/upload

Adds an image to the product. Send either file_url_path (an http(s):// URL that the shop downloads the image from, or img:<id> to reuse the file of an image already in the shop) or base64, the image data. The body is JSON in both cases. A URL whose host is in a private network, a failed download, a file that isn't an image or an unknown img:<id> returns 400 Parameter 'file_url_path' has invalid value.

If the product already has an image with the same file, the API returns that image and adds no copy; only is_default: true and is_teaser: true are applied to it. The response's is_default and is_teaser show whether the image is the product's default and teaser image after the request.

Upload a product image › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Upload a product image › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: file_url_path
type = object · requires: base64
Properties for Variant 1:
file_url_path
​string · required

Where to get the image: an http(s):// URL on a public host, or img:<id> to reuse the file of an existing image in the shop. JPEG, PNG, GIF, TIFF and BMP images are accepted.

Example: https://images.example.com/coffee/dark-roast-500g.jpg
is_default
​boolean

true makes the image the product's default image.

Example: true
is_teaser
​boolean

true makes the image the product's teaser image.

Example: false
position
​integer

The image's position. 0 or omitted puts it after the product's other images.

Example: 1
​LocalizedTitle[]

The image's titles. If omitted, the title is the stored file name, in the shop's default language.

​LocalizedDescription[]

Upload a product image › Responses

The new image, or the product's existing image with the same file.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Add product tags

POST
https://shop.example.com/api/v1
/products/{product-id}/tags

Adds tags to the product. The body is an array of {"tag_id": <id>} elements. Unknown or deleted tags are skipped; if no tag is found, the response is 404. The response lists every found tag, including ones the product already had.

Add product tags › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Add product tags › Request Body

​ProductTagInput[] · minItems: 1
tag_id
​integer · required

Add product tags › Responses

The product's tags from the request.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Remove a product tag

DELETE
https://shop.example.com/api/v1
/products/{product-id}/tags/{tag-id}

Removes the tag from the product and returns it. A tag the product doesn't have returns 404. The tag itself is not deleted.

Remove a product tag › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

tag-id
​integer · required

The tag's id.

Remove a product tag › Responses

The removed tag.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product properties

GET
https://shop.example.com/api/v1
/products/{product-id}/properties

Returns the properties set on the product, with their selected options, newest first.

List product properties › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product properties › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0

List product properties › Responses

A page of the product's properties.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta

Add a product property

POST
https://shop.example.com/api/v1
/products/{product-id}/properties

Sets a property on the product and selects its options. The property must have options, be available to the product's categories and apply to products; the product must not have it yet. Otherwise the request returns 400.

Add a product property › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Add a product property › Request Body

property_id
​integer · required

The id of a property that has options and is available to the product's primary or secondary categories for products. A property the product already has returns 400.

Example: 15
option_ids
​integer[] · minItems: 1 · required

Ids of the property's options to select, at least one; an empty array returns 400. A property that doesn't allow several values takes one id.

Example: [41]

Add a product property › Responses

The property on the product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Get a product property

GET
https://shop.example.com/api/v1
/products/{product-id}/properties/{product-property-id}

Returns one property of the product with its selected options. Like the list, the response has first, prev and next links.

Get a product property › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

product-property-id
​integer · required

The id of the property on this product: the id of an item in List product properties, not its property_id. A property of another product returns 404.

Get a product property › Responses

The property on the product.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
​PageLink
​PageLink
​PageLink
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Update a product property

PUT
https://shop.example.com/api/v1
/products/{product-id}/properties/{product-property-id}

Replaces the property's selected options with option_ids.

Update a product property › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

product-property-id
​integer · required

The id of the property on this product: the id of an item in List product properties, not its property_id. A property of another product returns 404.

Update a product property › Request Body

option_ids
​integer[] · required

The options to select. They replace the current selection; an empty array removes them all. A property that doesn't allow several values takes one id.

Example: [41,42]

Update a product property › Responses

The updated property on the product.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Remove a product property

DELETE
https://shop.example.com/api/v1
/products/{product-id}/properties/{product-property-id}

Removes the property and its selected options from the product, and returns them as they were.

Remove a product property › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

product-property-id
​integer · required

The id of the property on this product: the id of an item in List product properties, not its property_id. A property of another product returns 404.

Remove a product property › Responses

The removed property.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

Get product stock

GET
https://shop.example.com/api/v1
/products/{product-id}/stock

Returns the product's stock counters. To change the stock, use Stocks or Update a product.

Get product stock › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

Get product stock › Responses

The product's stock.

href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​object[]
​Meta

List product stock history

GET
https://shop.example.com/api/v1
/products/{product-id}/stock/history

Returns the product's stock changes, newest first.

List product stock history › path Parameters

product-id
​integer · required

The product's id. A value that isn't a number returns 400; an unknown or deleted product returns 404.

List product stock history › query Parameters

limit
​integer · min: 1 · max: 2147483647

The number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.

Default: 20
offset
​integer · min: 0 · max: 2147483647

The number of items to skip. Must be a decimal integer; any other value returns 400.

Default: 0

List product stock history › Responses

A page of stock changes.

Links to the first, previous and next page. Each link carries the request's `limit`, `offset` and filters. At either end of the list the object is still there, with `href` set to `null`.
href
​string

The URL of the request.

Example: https://shop.example.com/api/v1/products
​PageLink
​PageLink
​PageLink
​object[]
​Meta