LogoLogo
CommunitySupport PortalYouTubeStart a free trial
  • Welcome
  • Commerce Engine
  • Orchestration Engine
  • API Documentation
  • Release Notes
  • Changelog
  • Emporix API
  • OpenAPI Generator
  • Standard Practices
    • General Info
    • Mixins
    • Query Parameter
    • Translations
    • Custom ID
    • Upsert
    • B2B Token
  • API Guides and References
    • Authorization
      • OAuth Service
        • API Reference
          • Customer Token
          • Anonymous Token
          • Service Access Token
          • Models
        • Download API Specification
    • Artificial Intelligence
      • AI Service
        • AI Tutorials
        • API Reference
          • Text Generation
          • AI Completions
          • Models
        • Download API Specification
    • Configuration
      • Configuration Service
        • Language Tutorials
        • API Reference
          • Tenant configurations
          • Client configurations
          • Global configurations
          • Models
        • Download API Specification
      • Country Service
        • Country Tutorial
        • API Reference
          • Countries
          • Regions
          • Models
        • Download API Specification
      • Currency Service
        • Currency Tutorial
        • API Reference
          • Currencies
          • Currency exchange
          • Models
        • Download API Specification
      • Unit Handling Service
        • Unit Handling Tutorial
        • API Reference
          • Unit management
          • Unit conversion
          • Type management
          • Models
        • Download API Specification
      • Site Settings Service
        • Site Settings Tutorial
        • API Reference
          • Mixins
          • Site settings
          • Models
        • Download API Specification
      • Indexing Service
        • Indexing Tutorial
        • API Reference
          • Configuration
          • Public Configuration
          • Reindex
          • Models
        • Download API Specification
    • Catalogs and Categories
      • Catalog Service
        • Catalog Tutorials
        • API Reference
          • List catalogs
          • Catalog management
          • Models
        • Download API Specification
      • Category Service
        • Category Tutorials
        • API Reference
          • Category Resources
          • Category Assignment Resources
          • Assignment Resources
          • Category Tree Resources
          • Models
        • Download API Specification
    • Products, Labels and Brands
      • Product Service
        • Product Tutorial
        • API Reference
          • Products
          • Product Templates
          • Models
        • Download API Specification
      • Label Service
        • Label Tutorial
        • API Reference
          • Label
          • Media
          • Models
        • Download API Specification
      • Brand Service
        • Brand Tutorial
        • API Reference
          • Brands
          • Media
          • Models
        • Download API Specification
    • Prices and Taxes
      • Price Service
        • Price Tutorials
        • API Reference
          • Price lists
          • Price matching
          • Price models
          • Prices
          • Prices assigned to price lists
          • Models
        • Download API Specification
      • Tax Service
        • Tax Tutorials
        • API Reference
          • Taxes
          • Tax calculation
          • Models
        • Download API Specification
    • Users and Permissions
      • IAM Service
        • IAM Tutorial
        • API Reference
          • Access Controls
          • Group Assignments
          • Groups
          • Permissions
          • Resources
          • Roles
          • Access Control Templates
          • Users
          • Management Dashboard Users
          • Models
        • Download API Specification
      • Session-context Service
        • Session-context Tutorial
        • API Reference
          • Session management
          • Session context modification
          • Own session management
          • Own session context modification
          • Models
        • Download API Specification
    • Companies and Customers
      • Customer Management
        • Customer Management Tutorial
        • API Reference
          • Locations
          • Contact Assignments
          • Legal Entities
          • Models
        • Download API Specification
      • Customer Service (Customer Managed)
        • API Reference
          • Addresses
          • Account and profile
          • Authentication and authorization
          • Double opt In
          • Credentials
          • Models
        • Download API Specification
      • Customer Service (Tenant Managed)
        • API Reference
          • Account and profile
          • Addresses
          • Models
        • Download API Specification
      • Customer Segments
        • Segments Tutorial
        • API Reference
          • Segments
          • Items Assignments
          • Customers Assignments
          • Models
        • Download API Specification
      • Approval Service
        • Approval Tutorials
        • API Reference
          • Approvals
          • Approval
          • Search
          • Models
        • Download API Specification
    • Delivery and Shipping
      • Shipping Service
        • Shipping Tutorial
        • API Reference
          • Customer Group Relations
          • Delivery Windows
          • Shipping Cost
          • Shipping Zones
          • Shipping Methods
          • Shipping Groups
          • Sites
          • Delivery Times Management
          • Delivery Times Slots Management
          • Delivery Cycles
          • Models
        • Download API Specification
      • Delivery Providers Service
        • API Reference
          • Delivery Orders
          • Delivery Plan
          • Models
        • Download API Specification
    • Rewards and Promotions
      • Coupon Service
        • Coupon Tutorial
        • API Reference
          • Coupon Management
          • Coupon Validation
          • Coupon Redemption
          • Referral Coupon Management
          • Models
        • Download API Specification
      • Reward-points Service
        • Reward-points Tutorial
        • API Reference
          • Redeem Options Management
          • Reward Points Management
          • Signed In Customer Reward Points
          • Models
        • Download API Specification
    • Quotes
      • Quote Service
        • Quote Tutorial
        • API Reference
          • Quote management
          • Quote history
          • Quote pdf
          • Quote reason
          • Models
        • Download API Specification
    • Checkout
      • Cart Service
        • Cart Tutorial
        • API Reference
          • Carts
          • Cart items
          • Discounts
          • Models
        • Download API Specification
      • Payment-gateway Service
        • Payment-gateway Tutorial
        • API Reference
          • Payment
          • Payment mode
          • Payment frontend
          • Payment mode frontend
          • Transaction
          • Models
        • Download API Specification
      • Checkout Service
        • Checkout Tutorial
        • API Reference
          • Checkouts
          • Models
        • Download API Specification
      • Fee Service
        • Fee Tutorial
        • API Reference
          • Fee management
          • Item Fee management
          • Product Fees management
          • Item Fee search
          • Models
        • Download API Specification
      • Shopping List
        • API Reference
          • Shopping Lists
          • Models
        • Download API Specification
    • Orders
      • Availability Service
        • Availability Tutorial
        • API Reference
          • Locations
          • Availabilities
          • Models
        • Download API Specification
      • Order Service
        • Order Tutorial
        • API Reference
          • Orders (tenant Managed)
          • Orders (customer Managed)
          • Models
        • Download API Specification
      • Pick-pack Service
        • API Reference
          • Orders
          • Order cycles
          • Assignees
          • Recalculations
          • Events
          • Models
        • Download API Specification
      • Invoice Service
        • Invoice Tutorial
        • API Reference
          • Invoice Jobs
          • Models
        • Download API Specification
      • Returns Service
        • Returns Tutorial
        • API Reference
          • Returns
          • Models
        • Download API Specification
      • SEPA Export Service
        • API Reference
          • Files
          • Jobs
          • Models
        • Download API Specification
    • Utilities
      • Schema Service
        • Schema Tutorial
        • API Reference
          • Schema
          • Type
          • Reference
          • Custom Schema Type
          • Custom Instance
          • Models
        • Download API Specification
      • Sequential-id Service
        • Sequential-id Tutorial
        • API Reference
          • Sequential IDs management
          • Models
        • Download API Specification
    • Media
      • Media Service
        • Media Tutorial
        • API Reference
          • Assets
          • Models
        • Download API Specification
    • Webhooks
      • Webhook Service
        • Webhooks Tutorial
        • API Reference
          • Config
          • Events
          • Svix Emporix Shared Account
          • Models
        • Download API Specification
      • Events-Availability
      • Events-Cart
      • Events-Catalog
      • Events-Category
      • Events-Client Management
      • Events-Customer
      • Events-Index
      • Events-Order
      • Events-Price
      • Events-Product
      • Events-Quote
      • Events-Product
    • Integrations
      • Emporix and Make
      • Identity Providers
      • Workflow Automation
Powered by GitBook
LogoLogo

Resources

  • Emporix.com
  • Developer Policy
  • Terms of Use

Find us

  • LinkedIn

© 2025 Emporix. All Rights Reserved.

On this page
  • How to set up your first price
  • Specify accepted currencies
  • Create a price model
  • Retrieve a tier ID
  • Define the price
  • How to implement different pricing strategies
  • Before you start
  • Basic pricing
  • Tiered and volume pricing
  • How to personalize prices
  • How to configure a price list
  • Before you start
  • Create a price list
  • Create a price in the list
  • How to use the price matching functionality
  • Influence of price lists on price matching
  • Before you start
  • Create a product
  • Define multiple prices
  • Find the best price
  • How to calculate gross prices between countries
  • Before you start
  • Define sales tax rates for the desired country
  • Update the product's tax classes
  • Calculate the price for the desired country
  • How to retrieve a price in another currency
  • Before you start
  • Add a new currency
  • Define a currency exchange rate
  • Retrieve a price in the desired currency
  • How to configure a site to express all prices as net values
  • Update your site's includesTax field

Was this helpful?

Export as PDF
  1. API Guides and References
  2. Prices and Taxes
  3. Price Service

Price Tutorials

PreviousPrice ServiceNextAPI Reference

Last updated 2 days ago

Was this helpful?

How to set up your first price

Take a look at the relationships between prices and other resources in the Emporix Commerce Engine.

This tutorial will walk you through the following steps:

The tutorial skips the step of creating a new measurement unit as your Emporix tenant is configured with the most commonly used measurement units out-of-the-box.

Specify accepted currencies

curl -i -X POST \
  'https://api.emporix.io/currency/{tenant}/currencies' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: de' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "EUR",
  "name": {
    "en": "Euro",
    "pl": "Euro"
  }
}'

Create a price model

A price model defines a repeatable way to sell products. You can create separate price models depending on measurement units for which prices are expressed or depending on products' pricing strategies.

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/priceModels' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
      "includesTax": true,
      "includesMarkup": false,
      "name": {
        "en": "Price model - per piece",
        "de": "Preismodell - pro Stück"
      },
      "description": {
        "en": "Price model for goods sold by the piece.",
        "de": "Preismodell für stückweise verkaufte Ware."
      },
      "tierDefinition": {
        "tierType": "BASIC",
        "tiers": [
          {
            "minQuantity": {
              "quantity": 0,
              "unitCode": "pc"
            }
          }
        ]
      },
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "pc"
      }
    }'

Retrieve a tier ID

When specifying a price for a product, you need to reference two values from a corresponding price model:

  • ID of the price model

  • ID of the model's relevant pricing tier

curl -i -X GET \
  'https://api.emporix.io/price/{tenant}/priceModels/{priceModelId}' \
  -H 'Accept-Language: string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

The ID can be found in the tierDefinition.tiers.id field.

Define the price

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "6245aa0a78a8576e338fa9c4",
    "itemId": {
      "itemType": "PRODUCT",
      "id": " "
    },
    "currency": "EUR",
    "location": {
      "countryCode": "DE"
    },
    "priceModelId": " ",
    "restrictions": {
      "siteCodes": [
        "main"
      ]
    },
    "tierValues": [
      {
        "priceValue": 15.99
      }
    ]
  }'

How to implement different pricing strategies

To learn more about pricing strategies available in the Emporix Commerce Engine, check out the [Pricing guide]((https://app.gitbook.com/o/z8MNPigQv25NZe33g3AV/s/bTY7EwZtYYQYC6GOcdTj/core-commerce/pricing/pricing-v2#price-models).

Implementing any pricing strategy is a process made up of three steps:

Before you start

Basic pricing

To define basic pricing in a PriceModel object, you need to perform the following actions:

  • Set the tierDefinition.tierType field to "BASIC".

  • Add a single tier to the tiers array and set its quantity field to 0.

Here's an example of a request body for a basic price model:

{
  "name": "Basic pricing - per piece.",
  "description": "Basic price model for goods sold by the piece.",
  "includesTax": true,
  "includesMarkup": false,
  "measurementUnit": {
    "quantity": 1,
    "unitCode": "pc"
  },
  "tierDefinition": {
    "tierType": "BASIC",
    "tiers": [
      {
        "minQuantity": {
          "quantity": 0,
          "unitCode": "pc"
        }
      }
    ]
  }
}

To create a Price object for basic pricing, you need to perform the following actions:

  • Set the priceModelId field to the basic price model's ID.

  • Retrieve the price model's tierDefinition.tiers.id value.

  • Add a single object to the tierValues array.

Here's an example of a request body for a basic price:

{
  "itemId": {
    "itemType": "PRODUCT",
    "id": "624c3a5c3c4f072b9460bb7a"
  },
  "currency": "EUR",
  "location": {
    "countryCode": "DE"
  },
  "priceModelId": "624c28503406122baacc7e92",
  "restrictions": {
    "validity": {
      "from": "2022-04-01T00:00:00Z"
    },
    "siteCodes": [
      "main"
    ]
  },
  "tierValues": [
    {
      "id": "425e4055-1720-4933-a789-6076a455f255",
      "priceValue": "629.00"
    }
  ]
}

Tiered and volume pricing

To create a price model for tiered or volume pricing, you need to perform the following actions:

  • Set the tierDefinition.tierType field to "TIERED" or "VOLUME", respectively.

  • Define quantities for pricing tiers in the tiers array.

When defining pricing tiers, be aware of the following restrictions to the PriceModel object:

  • Each minQuantity.quantity field must contain a unique value.

  • The tiers must be defined in an ascending order based on their quantity value.

  • The quantity field in the first tier must be set to 0.

  • All unitCode fields must contain the same value.

Here are examples of request bodies for tiered and volume price model:

{
  "name": "Tiered pricing - per kilogram",
  "description": "Tiered price model for goods sold by the kilogram.",
  "includesTax": true,
  "includesMarkup": false,
  "measurementUnit": {
    "quantity": 1,
    "unitCode": "kg"
  },
  "tierDefinition": {
    "tierType": "TIERED",
    "tiers": [
      {
        "minQuantity": {
          "quantity": 0,
          "unitCode": "kg"
        }
      },
      {
        "minQuantity": {
          "quantity": 5,
          "unitCode": "kg"
        }
      },
      {
        "minQuantity": {
          "quantity": 10,
          "unitCode": "kg"
        }
      }
    ]
  }
}
{
  "name": "Volume pricing - per 100 gram",
  "description": "Volume price model for goods sold by 100 gram.",
  "includesTax": true,
  "includesMarkup": false,
  "measurementUnit": {
    "quantity": 100,
    "unitCode": "g"
  },
  "tierDefinition": {
    "tierType": "VOLUME",
    "tiers": [
      {
        "minQuantity": {
          "quantity": 0,
          "unitCode": "g"
        }
      },
      {
        "minQuantity": {
          "quantity": 500,
          "unitCode": "g"
        }
      },
      {
        "minQuantity": {
          "quantity": 1000,
          "unitCode": "g"
        }
      }
    ]
  }
}

To create a Price object for tiered or volume pricing, you need to perform the following actions:

  • Set the priceModelId field to the corresponding price model's ID.

  • Retrieve the price model's tierDefinition.tiers.id values.

  • Add an object for each tier to the tierValues array.

Here's an example of a request body for a tiered and volume-based price:

{
  "itemId": {
    "itemType": "PRODUCT",
    "id": "624c3a5c3c4f072b9460bb7a"
  },
  "currency": "EUR",
  "location": {
    "countryCode": "DE"
  },
  "restrictions": {
    "validity": {
      "from": "2022-04-01T00:00:00.000Z"
    },
    "siteCodes": [
      "main"
    ]
  },
  "priceModelId": "624ec1b03406122baacc7e94",
  "tierValues": [
    {
      "id": "bad42e2f-37d1-49df-8ad9-1045e4c09e9b",
      "priceValue": "3.00"
    },
    {
      "id": "474fb617-02f7-47d2-91a6-a4a602b73518",
      "priceValue": "2.00"
    },
    {
      "id": "7b819c35-2dc6-4a27-ae1d-2a4d7dc1d5b1",
      "priceValue": "1.00"
    }
  ]
}

How to personalize prices

Take a look at the relationship between prices and customers in the Emporix Commerce Engine:

To make a price valid only for specific customers, you need to add their IDs to the principals array inside an applicable Price object.

Here's an example of a customer-restricted price:

{
    "itemId": {
        "itemType": "PRODUCT",
        "id": "5f5a1fe55bac380024b936ad"
    },
    "currency": "EUR",
    "location" : {
        "countryCode": "DE"
    },
    "priceModelId": "624db246d2730b6011dbfd74",
    "restrictions": {
        "principals": [
            {
                "type": "CUSTOMER",
                "id": "71842741" // customer's ID generated by the Customer Service
            }
        ],
        "siteCodes": [
            "main"
        ]
    },
    "tierValues": [
        {
            "id": "7b819c35-2dc6-4a27-ae1d-2a4d7dc1d5b1",
            "priceValue": "2.34"
        }
    ]
}

How to configure a price list

Price lists allow you to create personalized sets of prices for selected products. You can manage price lists and their prices through the Emporix API Price Service.

Take a look at the relationships between price lists and other resources in the Emporix Commerce Engine.

Countries and regions are predefined in the Emporix API Country Service. You can check which countries and regions are available by sending requests to the following endpoints:

Before you start

Create a price list

Price lists are site-specific. You can restrict a price list to particular groups of customers with the countries, regions, and customerGroups fields, and make the list time-limited with the validity field.

Prices in a list can be expressed in a different currency than originally defined for the list's products.

Make sure to set a value for the currency field in the request body. Otherwise, the endpoint will respond with a 400 error.

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/price-lists' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": {
      "en": "Germany price list"
    },
    "currency": "EUR",
    "countries": [
      "DE"
    ],
    "customerGroups": [
      " "
    ],
    "siteCode": "main",
    "validity": {
      "from": "2022-05-01T00:00:00.000Z",
      "to": "2025-05-01T00:00:00.000Z"
    }
  }'

Create a price in the list

Prices in lists are structured differently from catalog prices. Catalog prices are the ones defined for products in Price objects, as opposed to PriceListPrice objects. While each catalog price can be personalized on its own, the validity of all prices in a list is determined by the list's restrictions. A price in a price list needs to reference a relevant product, price model, and pricing tiers.

A single price list can be associated with multiple regions or countries. For this reason, all prices within a list are treated as net values, regardless of the includesTax value in their indicated price models.

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/price-lists/{priceListId}/prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
  "itemId": {
    "itemType": "PRODUCT",
    "id": " "
  },
  "priceModelId": " ",
  "tierValues": [
    {
      "priceValue": "16.99",
      "id": " "
    },
    {
      "priceValue": "15.99",
      "id": " "
    },
    {
      "priceValue": "14.99",
      "id": " "
    }
  ]
}'

Bulk price creation


How to use the price matching functionality

The price matching functionality compares all prices defined for specified products and retrieves the best ones based on a set of criteria. The criteria include:

  • targetCurrency — Currency in which the prices should be returned.

  • siteCode — Site for which the prices will be matched. The price matching functionality will only compare prices assigned to this site.

  • targetLocation — Country for which the prices should be returned.

  • items — List of products (and their quantities) for which the prices should be compared.

  • principal — Customer to whom the prices should apply. When specified, the price matching functionality will compare both non-personalized prices as well as the ones offered exclusively to the specified customer.

  • useFallback — If no price that matches the criteria is found for the specified site, the price matching functionality will try to find the best price for the main site. To enable this option, this field needs to be set to true.

Prices are stored in the system as defined in the price model, with no initial net or gross calculations. Calculations occur during the PriceMatch and PriceSearch algorithms. However, PriceSearch is related to catalog prices only.

The includesTax setting, defined at the site or price model level, determines if the algorithm returns net or gross prices. The tax service then manages specific cases:

  • Gross to Net: Returns a net price from a gross price for a specific country.

  • Net to Gross: Converts a net price to a gross price using a country's specific tax class.

  • Gross to Gross: Adjusts a gross price between countries by first converting to net, then applying the destination country's tax class.

To find out how the price matching functionality works in detail, check out the flowchart.

The process shown in the flowchart is repeated for each product indicated in the request.

To find out how the price matching functionality works in detail, check out the flowchart.

Influence of price lists on price matching

Price lists take precedence over catalog prices. Catalog prices are the ones defined for products in Price objects, as opposed to PriceListPrice objects. If there are price lists that match the request criteria, the price matching algorithm checks whether these lists contain prices for requested products before searching through catalog prices.

To find out how the price matching functionality handles price lists, check out the flowchart.

Before you start

Create a product

curl -i -X POST \
  'https://api.emporix.io/product/{tenant}/products?skipVariantGeneration=false&doIndex=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": {
      "en": "Bananas"
    },
    "code": "BANANAS_KG",
    "description": {
      "en": "Fresh bananas. Yum!"
    },
    "published": true,
    "taxClasses": {
      "EN": "STANDARD",
      "DE": "STANDARD"
    },
    "productType": "BASIC",
    "template": {
      "id": "634cea2740033d7c2e7b03a8",
      "version": 1
    },
    "relatedItems": [
      {
        "refId": "634cea2740033d7c2e7b03a9",
        "type": "CONSUMABLE"
      }
    ],
    "mixins": {
      "salePricesData": [
        {
          "salePriceStart": "2021-07-20T22:00:00.000+0000",
          "salePriceAmount": 6.7,
          "salePriceEnd": "2021-07-25T21:59:59.000+0000",
          "enabled": false
        }
      ],
      "productCustomAttributes": {
        "pricingMeasurePrice": 13,
        "unitPricingMeasure": {
          "value": 133,
          "unitCode": "GRM"
        },
        "unitPricingBaseMeasure": {
          "value": 100,
          "unitCode": "GRM"
        },
        "pricingMeasure": {
          "value": 100,
          "unitCode": "GRM"
        },
        "orderUnit": "H87",
        "minOrderQuantity": 2,
        "maxOrderQuantity": 10,
        "defaultOrderQuantity": 5
      }
    },
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/productCustomAttributesMixIn.v29.json",
        "salePricesData": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/salePriceData.json"
      }
    }
  }'

Define multiple prices

Now, define a couple of prices that the price matching functionality will be able to compare.

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/priceModels' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "includesTax": true,
    "includesMarkup": false,
    "name": {
      "en": "Bananas - basic pricing",
      "de": " "
    },
    "description": {
      "en": "Basic price model for bananas.",
      "de": " "
    },
    "tierDefinition": {
      "tierType": "BASIC",
      "tiers": [
        {
          "minQuantity": {
            "quantity": 0,
            "unitCode": "kg"
          }
        }
      ]
    },
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "kg"
    }
  }'
curl -i -X GET \
  'https://api.emporix.io/price/{tenant}/priceModels/{priceModelId}' \
  -H 'Accept-Language: string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "6245aa0a78a8576e338fa9c4",
    "itemId": {
      "itemType": "PRODUCT",
      "id": " "
    },
    "currency": "EUR",
    "location": {
      "countryCode": "DE"
    },
    "priceModelId": " ",
    "restrictions": {
      "siteCodes": [
        "main"
      ]
    },
    "tierValues": [
      {
        "priceValue": "1.50",
        "id": " "
      }
    ]
  }'

Then, define a price model where the price per kilogram changes based on the ordered quantity:

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/priceModels' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": {
      "en": "Bananas - volume pricing"
    },
    "description": {
      "en": "Volume price model for bananas."
    },
    "includesTax": true,
    "includesMarkup": false,
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "kg"
    },
    "tierDefinition": {
      "tierType": "VOLUME",
      "tiers": [
        {
          "minQuantity": {
            "quantity": 0,
            "unitCode": "kg"
          }
        },
        {
          "minQuantity": {
            "quantity": 5,
            "unitCode": "kg"
          }
        },
        {
          "minQuantity": {
            "quantity": 10,
            "unitCode": "kg"
          }
        }
      ]
    }
  }'
curl -i -X GET \
  'https://api.emporix.io/price/{tenant}/priceModels/{priceModelId}' \
  -H 'Accept-Language: string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "6245aa0a78a8576e338fa9c4",
    "itemId": {
      "itemType": "PRODUCT",
      "id": " "
    },
    "currency": "EUR",
    "location": {
      "countryCode": "DE"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "restrictions": {
      "siteCodes": [
        "main"
      ]
    },
    "tierValues": [
      {
        "priceValue": "1.50",
        "id": " "
      },
      {
        "priceValue": "1.25",
        "id": " "
      },
      {
        "priceValue": "1.00",
        "id": " "
      }
    ]
  }'

Find the best price

Check the best price for both one kilogram and ten kilograms of bananas:

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/match-prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "targetCurrency": "EUR",
    "siteCode": "main",
    "targetLocation": {
      "countryCode": "DE"
    },
    "items": [
      {
        "itemId": {
          "itemType": "PRODUCT",
          "id": " "
        },
        "quantity": {
          "quantity": 1,
          "unitCode": "kg"
        }
      },
      {
        "itemId": {
          "itemType": "PRODUCT",
          "id": " "
        },
        "quantity": {
          "quantity": 10,
          "unitCode": "kg"
        }
      }
    ]
  }'

The lowest prices are returned in the priceId fields. The total price for defined quantities is returned in the totalValue fields.


How to calculate gross prices between countries

This tutorial presents how to calculate gross prices between countries based on Price objects.

Before you start

Define sales tax rates for the desired country

Gross prices between countries are calculated based on these countries' sales tax rates.

curl -i -X POST \
  'https://api.emporix.io/tax/{tenant}/taxes' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "location": {
    "countryCode": "AT"
  },
  "taxClasses": [
    {
      "code": "STANDARD",
      "name": {
        "en": "Standard"
      },
      "order": 0,
      "rate": 20,
      "isDefault": true
    },
    {
      "code": "REDUCED_13",
      "name": {
        "en": "Reduced - 13%"
      },
      "order": 0,
      "rate": 13
    },
    {
      "code": "REDUCED_10",
      "name": {
        "en": "Reduced - 10%"
      },
      "order": 0,
      "rate": 10
    },
    {
      "code": "ZERO",
      "name": {
        "en": "Zero"
      },
      "order": 0,
      "rate": 0
    }
  ]
}'

Update the product's tax classes

When calculating a gross price for another country, the price matching functionality checks tax classes assigned to the product that the original price is defined for.

curl -i -X PATCH \
  'https://api.emporix.io/product/{tenant}/products/{productId}?skipVariantGeneration=false&doIndex=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: string' \
  -H 'Content-Type: application/json' \
  -d '{
   "published": true,
   "taxClasses": {
    "DE": "STANDARD",
    "AT": "STANDARD"
  },
  "metadata": {}
}'

Calculate the price for the desired country

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/match-prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "targetCurrency": "EUR",
    "siteCode": "main",
    "targetLocation": {
      "countryCode": "AT"
    },
    "items": [
      {
        "itemId": {
          "itemType": "PRICE",
          "id": " "
        },
        "quantity": {
          "quantity": 1,
          "unitCode": "pc"
        }
      }
    ]
}'

The gross price calculated for the specified country is returned in the totalValue field.


How to retrieve a price in another currency

Before you start

Add a new currency

curl -i -X POST \
  'https://api.emporix.io/currency/{tenant}/currencies' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Language: de' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "USD",
  "name": {
    "en": "United States Dollar",
    "pl": "Dolar amerykański",
    "de": "US-Dollar"
  }
}'

Define a currency exchange rate

When calculating a price in another currency, the price matching functionality checks the defined exchange rate between the desired currency and the one in which price is originally expressed.

Important

Currently, the exchange rates are defined statically and are not influenced by actual currency exchange rates. If you want the statically defined exchange rates to reflect the actual rates more closely, you will need to manually update these on a regular basis.

curl -i -X POST \
  'https://api.emporix.io/currency/{tenant}/exchanges' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sourceCurrency": "EUR",
    "targetCurrency": "USD",
    "rate": "1.00"
  }'

Retrieve a price in the desired currency

curl -i -X POST \
  'https://api.emporix.io/price/{tenant}/match-prices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "targetCurrency": "USD",
    "siteCode": "main",
    "targetLocation": {
      "countryCode": "DE"
    },
    "items": [
      {
        "itemId": {
          "itemType": "PRICE",
          "id": " "
        },
        "quantity": {
          "quantity": 1,
          "unitCode": "pc"
        }
      }
    ]
  }'

The price calculated in the specified currency is returned in the totalValue field.


How to configure a site to express all prices as net values

To always retrieve prices for a particular site as net values, you need to set that site's includesTax field to false.

If you don't specify a site's includesTax value, the price matching functionality will return a price as gross or net based on the includesTax value specified in the price's model.

Update your site's includesTax field

curl -i -X PATCH \
  'https://api.emporix.io/site/{tenant}/sites/{siteCode}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
  "defaultLanguage": "en",
  "includesTax": true
}'

.

.

.

.

To learn more about measurement units in the Emporix Commerce Engine, check out the .

Each currency accepted by your business is stored as a separate object that can be managed through the Emporix API .

To add a new entry to your configuration of currencies, you need to send a request to the endpoint.

To learn more about price models in the Emporix Commerce Engine, check out the .

To create a new price model, you need to send a request to the endpoint.

Price models that use the basic pricing strategy have one tier. To retrieve its ID, you need to send a request to the endpoint.

To define a new price for a product, you need to send a request to the endpoint.

Creating a PriceModel object through the endpoint.

Retrieving IDs of the model's pricing tiers through the endpoint.

Creating a Price object through the endpoint.

Make sure you have already finished the tutorial.

Customer objects are managed through the Emporix API .

Make sure you have already finished the tutorial.

To create a new price list, you need to send a request to the endpoint.

To create a new list-specific price, you need to send a request to the endpoint.

You can add multiple prices to a list at once by sending a request to the endpoint.

If you want the price matching functionality to compare prices expressed in multiple currencies, you need to define exchange rates between these currencies and the targetCurrency through the endpoint.

To check out the flowchart for the Look for the best price in price lists subprocess, check out the section.

Make sure you have already finished the tutorial.

Create a sample product through the endpoint. For this tutorial, we've chosen bananas as an example:

Start with defining a price model with endpoint where the bananas' price per kilogram is constant regardless of the ordered quantity:

Now, retrieve the automatically-generated ID of the pricing tier, use the endpoint

Once you know the tier ID, define a price for the bananas, use the endpoint:

Now, retrieve the automatically-generated IDs of the pricing tiers, use the endpoint

Once you know the tier IDs, define another price for the bananas, use the endpoint.

Now that you have defined multiple prices for the bananas, you can send a request to the endpoint to find which price is the lowest.

You can calculate gross prices between countries through the endpoint.

To learn how to calculate gross prices between countries based on specific values, check out tutorial in the Tax classes — Developer Guide.

Make sure you have already finished the tutorial.

Define sales tax rates for the desired country by sending a request to the endpoint.

To update a product with applicable tax classes, send a request to the endpoint.

To calculate a gross price between countries, send a request to the endpoint.

You can calculate a price's value in another currency through the endpoint.

Make sure you have already finished the tutorial.

Add the currency in which the price will be retrieved to your configuration of currencies by sending a request to the endpoint.

To define a new exchange rate, send a request to the endpoint:

To retrieve a price in the desired currency, send a request to the endpoint.

When you retrieve prices through the endpoint, their values will be gross or net based on the includesTax value specified in these prices' models.

To retrieve prices as gross or net based on their sites' settings, you need to retrieve them with the .

You can manage your sites through the Emporix API .

To add or update the includesTax field in your site's settings, you need to send a request to the endpoint.

Currency Service
Creating a new currency
API Reference
Pricing guide
Creating a new price model
API Reference
Retrieving a price model
API Reference
Creating a new price
API Reference
Creating a price model
Retrieving a price model
Creating a price
Customer Service
Retrieving all countries
Retrieving all regions
Creating a new price list
https://github.com/emporix/api-references/blob/main/prices-and-taxes/price=service/api-reference/README.md
Adding a new price to a price list
API Reference
Creating multiple prices for a price list
Creating a new exchange rate
Creating a new product
API Reference
Creating a price model
API Reference
Retrieve a price model
API Reference
Creating a new price
API Reference
API Reference
Retrieve a price model
API Reference
Creating a new price
API Reference
Matching prices for specific attributes
API Reference
Matching prices for specific attributes
How to calculate gross values between countries
Creating a new tax configuration
API Reference
Partially updating a product
API Reference
Matching prices for specific attributes
API Reference
Matching prices for specific attributes
Creating a new currency
API Reference
Creating a new exchange rate
API Reference
Matching prices for specific attributes
API Reference
Retrieving all prices
Site Settings Service
Partially updating a site
API Reference
Specifying accepted currencies
Creating a price model
Retrieving a tier ID
Defining a price
How to set up your first price
How to set up your first price
Influence of price lists on price matching
How to set up your first price
How to set up your first price
How to set up your first price
price matching functionality

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

To test the endpoint, open the API reference below or check the example of a curl request.

Measurement units guide