Skip to main content

Price Lists API

· 5 min read
Albert Tiñena
Chief Technology Officer (CTO)
David Sancho
Principal Engineer & Technical Architect

This release adds API support for price lists, making it possible to manage customer-specific pricing rules from external systems.

Price lists as an API resource

OpenTiendas now exposes price lists through the API.

A price list defines customer-specific prices, discounts and purchase conditions for products. Price lists are commonly used in B2B scenarios where different customers, distributors or commercial groups need different pricing conditions.

Price lists can include:

  • global percentage discounts,
  • brand-specific discounts,
  • category-specific discounts,
  • minimum order requirements,
  • and fixed prices for product variants.

In this first API iteration, integrations can create, retrieve, update and delete price list configurations programmatically. This includes the general configuration of the price list, global discounts, brand discounts, category discounts and minimum order requirements.

Fixed prices for product variants are not managed by these endpoints yet. They remain part of the price list model and will be covered by future API improvements.

This is useful for ERPs, CRMs, PIMs and custom synchronization processes that need to keep commercial pricing rules aligned with OpenTiendas without relying only on the shop backoffice.


Available endpoints

The following endpoints are now available:

GET /api/v1/price-lists/
POST /api/v1/price-lists/
GET /api/v1/price-lists/{id}/
PATCH /api/v1/price-lists/{id}/
DELETE /api/v1/price-lists/{id}/

The list endpoint returns paginated price lists and supports filtering by:

  • price list IDs,
  • internal IDs,
  • and active status.

The detail endpoint returns a single price list configuration. It does not return fixed prices by variant.

Create and update operations allow integrations to manage the price list configuration, including activation status, minimum order amount, global discount, category discounts and brand discounts.

Deleting a price list removes the price list and its associated data, including fixed prices by product.

Detailed request and response schemas, filters and examples are available in the API documentation.


Price list identifiers

Each price list includes an internal_id field.

This is a merchant-defined identifier designed to help external systems manage price lists consistently across imports, exports and API integrations.

For example, an ERP can use an internal commercial code such as distributor-ESP to identify and synchronize a specific customer pricing group.

The API also exposes counters such as customers_count and variant_prices_count, allowing integrations to understand how many customers and fixed product or variant prices are currently associated with a price list.


Discount rules

Price lists can define several types of discount rules.

A global discount applies to the price list when no more specific rule is available. Brand discounts apply to products from selected brands. Category discounts apply to products in selected categories.

When several rules can apply to the same customer and product, OpenTiendas resolves the final pricing automatically using the most specific applicable rule. When multiple rules with the same specificity apply, the best price for the customer is used.

The pricing priority is:

  1. fixed prices, where the lowest price wins,
  2. brand discounts, where the highest discount wins,
  3. category discounts, using the most specific category and then the highest discount,
  4. global discounts, where the highest discount wins.

If a product belongs to multiple categories, the main product category is used for category discount calculation.

Products without applicable price list rules continue using their default storefront pricing.


Purchase conditions and storefront behavior

Price lists can include a minimum_order_amount, expressed as a money object with amount and currency.

Customers assigned to a price list see the adjusted pricing across the storefront and checkout.

There are also important storefront behavior considerations for customers using custom price lists.

Customers with a custom price list assigned are not eligible for standard promotions, automatic discounts, promotional codes, flash offers or regular quantity discounts. They also cannot add additional services to the cart.

This keeps custom pricing conditions predictable and avoids combining negotiated pricing rules with standard promotional logic.


Field selection and response shape

The price list resource follows the same field selection and response shape rules as the rest of the OpenTiendas API.

The fixed field is:

  • id

The default fields are:

  • internal_id,
  • is_active,
  • minimum_order_amount,
  • customers_count,
  • variant_prices_count,
  • global_discount.

Related discount information can be included using the standard response shape mechanisms described in the API documentation.

👉 Field selection and response shape


Summary

This release expands the OpenTiendas API with price list management by:

  • exposing price lists as an API resource,
  • adding endpoints to list, create, retrieve, update and delete price lists,
  • supporting global, category and brand discount configuration,
  • exposing minimum order requirements,
  • exposing customer and variant price counters,
  • and documenting pricing priority and storefront behavior for customers using custom price lists.

These changes provide a stronger foundation for B2B integrations and external systems that need to manage customer-specific pricing in OpenTiendas.


What's next

Upcoming improvements will focus on:

  • adding API support for fixed prices by reference,
  • expanding price list coverage for more advanced custom pricing use cases,
  • improving synchronization options for ERPs, PIMs, CRMs and custom integrations,
  • and continuing to evolve the API as a robust integration layer for external systems.

👉 API Overview