LianaCommerce REST API

Company prices

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

Set and read company-specific prices of products and variations: a fixed price without VAT, a discount percentage, or both, optionally for a set period.


List a company's prices

GET
https://shop.example.com/api/v1
/company_product_price_list/{company-id}

Returns the company's product and variation prices, sorted by product ID. A product's own price comes before its variations' prices.

List a company's prices › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

List a company's prices › 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 a company's prices › Responses

The company's prices.

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

Set a company's prices in bulk

POST
https://shop.example.com/api/v1
/company_product_prices/{company-id}

Creates or updates the company's prices for the products and variations in the array. Each element names one product or one variation and sets at least one of fixed_price_no_vat and discount_percent. If several elements name the same product or variation, the last one wins.

Fields you omit keep their stored values; a new price gets 0 and no validity dates. An explicit null sets a price field to 0 and removes a date.

Elements whose product or variation is unknown or deleted are skipped and listed in not_found. If no element matches, the response is 404. A company price can't be deleted through the API; set both price fields to 0 to stop it from applying.

Set a company's prices in bulk › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

Set a company's prices in bulk › Request Body

Send exactly one of `product` and `variation`, and at least one of `fixed_price_no_vat` and `discount_percent`.
product
​integer · int64

The ID of the product whose company price you set.

Example: 1203
variation
​integer · int64

The ID of the variation whose company price you set.

Example: 5521
fixed_price_no_vat
​number | null

The company's fixed price without VAT. 0 or null means no fixed price.

Example: 12.9
discount_percent
​number | null · min: 0 · max: 99.99

The company's discount percentage. Must be at least 0 and below 100 after rounding to two decimals, otherwise 400. 0 or null means no discount.

Example: 0
discount_valid_from
​string | null

When the company price starts to apply, as an ISO 8601 date or date-time, read as the shop's local time (an offset is ignored). null removes the start date.

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

When the company price stops applying, in the same format as discount_valid_from. null removes the end date.

Example: 2027-01-31T23:59:59

Set a company's prices in bulk › Responses

The prices that were set.

href
​string

The URL of the request.

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

The elements that matched no product or variation, by the identifier you sent. Only present when there are such elements.

​object[]
​Meta

Get a company's product price

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

Returns the company's price for the product. If the company has no price for it, items is empty.

Get a company's product price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

product-id
​integer · int64 · required

The product's ID. A value that is not a number returns 400; an unknown or deleted product returns 404.

Get a company's product price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the product.

​Meta

Update a company's product price

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

Works like POST on the same path: creates the company's price for the product if it doesn't exist, and otherwise updates the fields you send. The body must contain at least one of the fields below.

Update a company's product price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

product-id
​integer · int64 · required

The product's ID. A value that is not a number returns 400; an unknown or deleted product returns 404.

Update a company's product price › Request Body

fixed_price_no_vat
​number | null

The company's fixed price without VAT. 0 or null means no fixed price.

Example: 12.9
discount_percent
​number | null · min: 0 · max: 99.99

The company's discount percentage. Must be at least 0 and below 100 after rounding to two decimals, otherwise 400. 0 or null means no discount.

Example: 0
discount_valid_from
​string | null

When the company price starts to apply, as an ISO 8601 date or date-time, read as the shop's local time (an offset is ignored). null removes the start date.

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

When the company price stops applying, in the same format as discount_valid_from. null removes the end date.

Example: 2027-01-31T23:59:59

Update a company's product price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the product.

​Meta

Set a company's product price

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

Creates the company's price for the product, or updates it if it exists. Fields you omit keep their stored values; a new price gets 0 and no validity dates. An explicit null sets a price field to 0 and removes a date. PUT on the same path does the same.

Set a company's product price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

product-id
​integer · int64 · required

The product's ID. A value that is not a number returns 400; an unknown or deleted product returns 404.

Set a company's product price › Request Body

fixed_price_no_vat
​number | null

The company's fixed price without VAT. 0 or null means no fixed price.

Example: 12.9
discount_percent
​number | null · min: 0 · max: 99.99

The company's discount percentage. Must be at least 0 and below 100 after rounding to two decimals, otherwise 400. 0 or null means no discount.

Example: 0
discount_valid_from
​string | null

When the company price starts to apply, as an ISO 8601 date or date-time, read as the shop's local time (an offset is ignored). null removes the start date.

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

When the company price stops applying, in the same format as discount_valid_from. null removes the end date.

Example: 2027-01-31T23:59:59

Set a company's product price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the product.

​Meta

Get a company's variation price

GET
https://shop.example.com/api/v1
/company_product_prices/{company-id}/variations/{variation-id}

Returns the company's price for the variation. If the company has no price for it, items is empty.

Get a company's variation price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

variation-id
​integer · int64 · required

The variation's ID. A value that is not a number returns 400; an unknown or deleted variation returns 404.

Get a company's variation price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the variation.

​Meta

Update a company's variation price

PUT
https://shop.example.com/api/v1
/company_product_prices/{company-id}/variations/{variation-id}

Works like POST on the same path: creates the company's price for the variation if it doesn't exist, and otherwise updates the fields you send. The body must contain at least one of the fields below.

Update a company's variation price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

variation-id
​integer · int64 · required

The variation's ID. A value that is not a number returns 400; an unknown or deleted variation returns 404.

Update a company's variation price › Request Body

fixed_price_no_vat
​number | null

The company's fixed price without VAT. 0 or null means no fixed price.

Example: 12.9
discount_percent
​number | null · min: 0 · max: 99.99

The company's discount percentage. Must be at least 0 and below 100 after rounding to two decimals, otherwise 400. 0 or null means no discount.

Example: 0
discount_valid_from
​string | null

When the company price starts to apply, as an ISO 8601 date or date-time, read as the shop's local time (an offset is ignored). null removes the start date.

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

When the company price stops applying, in the same format as discount_valid_from. null removes the end date.

Example: 2027-01-31T23:59:59

Update a company's variation price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the variation.

​Meta

Set a company's variation price

POST
https://shop.example.com/api/v1
/company_product_prices/{company-id}/variations/{variation-id}

Creates the company's price for the variation, or updates it if it exists. Fields you omit keep their stored values; a new price gets 0 and no validity dates. An explicit null sets a price field to 0 and removes a date. PUT on the same path does the same.

Set a company's variation price › path Parameters

company-id
​integer · int64 · required

The company's ID. A value that is not a number returns 400; an unknown or deleted company returns 404.

variation-id
​integer · int64 · required

The variation's ID. A value that is not a number returns 400; an unknown or deleted variation returns 404.

Set a company's variation price › Request Body

fixed_price_no_vat
​number | null

The company's fixed price without VAT. 0 or null means no fixed price.

Example: 12.9
discount_percent
​number | null · min: 0 · max: 99.99

The company's discount percentage. Must be at least 0 and below 100 after rounding to two decimals, otherwise 400. 0 or null means no discount.

Example: 0
discount_valid_from
​string | null

When the company price starts to apply, as an ISO 8601 date or date-time, read as the shop's local time (an offset is ignored). null removes the start date.

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

When the company price stops applying, in the same format as discount_valid_from. null removes the end date.

Example: 2027-01-31T23:59:59

Set a company's variation price › Responses

The company price.

href
​string

The URL of the request.

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

The company price. A GET returns no items if the company has no price for the variation.

​Meta