LianaCommerce REST API

Tags

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

Tags and brands that group products. Assign them to products with the product's tag endpoints.


List tags

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

Returns the shop's tags, newest first, without deleted ones. List items have no id field: the id is the last part of each item's href. Get a tag returns all fields.

List tags › 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 tags › Responses

A page of tags.

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 tag

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

Creates a tag. names needs at least one element with a non-empty name. Fields you leave out get their defaults.

Create a tag › Request Body

​TagName[] · minItems: 1 · required

The tag's name per language. Each element needs a non-empty name.

​TagDescription[]

The tag's description per language.

code
​string

Your own code for the tag.

Example: ORGANIC
Default:
hidden
​boolean
Example: false
Default: false
brand
​boolean
Example: false
Default: false
type
​string

A free-text type that groups tags.

Example: certificate
Default:
image
​string

The file name of an image in the shop. The API stores the value as given; it doesn't upload or check the image.

Example:
Default:
content_image
​string

The file name of an image in the shop. The API stores the value as given; it doesn't upload or check the image.

Example:
Default:
show_in_menu
​boolean
Example: true
Default: true
position
​integer
Example: 50
Default: 50
hide_products
​boolean
Example: false
Default: false

Create a tag › Responses

The created tag.

href
​string

The URL of the request.

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

The tag, as the only element.

​Meta

Get a tag

GET
https://shop.example.com/api/v1
/tags/{tag-id}

Returns one tag. A deleted tag returns 404.

Get a tag › path Parameters

tag-id
​integer · required

The tag's id.

Get a tag › Responses

The tag.

href
​string

The URL of the request.

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

The tag, as the only element.

​Meta

Update a tag

PUT
https://shop.example.com/api/v1
/tags/{tag-id}

Updates the fields you send and keeps the others. In names and descriptions, languages you leave out keep their stored values.

Update a tag › path Parameters

tag-id
​integer · required

The tag's id.

Update a tag › Request Body

​TagName[]

Names to add or change, one element per language. Languages you leave out keep their stored values. A language the tag has no name for yet needs a non-empty name.

​TagDescription[]

Descriptions to add or change, one element per language.

code
​string

Your own code for the tag.

Example: ORGANIC
hidden
​boolean
brand
​boolean
type
​string

A free-text type that groups tags.

Example: certificate
image
​string

The file name of an image in the shop. The API stores the value as given; it doesn't upload or check the image.

Example:
content_image
​string

The file name of an image in the shop. The API stores the value as given; it doesn't upload or check the image.

Example:
show_in_menu
​boolean
position
​integer
hide_products
​boolean

Update a tag › Responses

The updated tag.

href
​string

The URL of the request.

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

The tag, as the only element.

​Meta