Service Price Management

Overview

Brink Commerce offers a robust and flexible API for managing service prices. This documentation covers the ProductVariantPrice model and its associated endpoints. Prices in Brink are always sourced, meaning they are put into Brink by an integrator such as an ERP or a PIM. Brink never acts as the master of a price.

Entity Relationship Diagram

+---------------------+       +--------------+
| ProductVariantPrice |<------|    Store     |
+---------------------+       +--------------+

Model Description

ProductVariantPrice

The ProductVariantPrice model is designed to be highly flexible and can be used in a variety of ways. For example, you can specify which storeGroupId and market the productVariantPrice is assigned to. This allows for different prices for the same market if you are using different storeGroupIds. If you want to allow logged-in customers a different tiering in prices, you can set up a designated storeName (e.g., gold members) for this use case.

Fields

FieldTypeDescription
basePriceAmountintegerThe regular selling price in minor units, following the currency used in the store market.
productVariantIdstringThe ID of the product variant.
storeGroupIdstringThe ID of the store group.
countryCodestringCountry code where this price will be used.
createddatetimeWhen the price was created.
salePriceAmountintegerThe discounted price in minor units, following the currency used in the store market.
discountAmountintegerThe discount amount is the difference between base and sale price, in minor units.
storeNamestringThe name of the store.
currencyCodestringThe currency code for the currency used in this store market.
updateddatetimeWhen the price was last updated.
referencePriceAmountintegerThe historic reference price. This is just an input field available for the front end.

API Endpoints

Create a New ProductVariantPrice

POST /api/productVariantPrices

Request Example

{
  "basePriceAmount": 1000,
  "productVariantId": "variant123",
  "storeGroupId": "group123",
  "countryCode": "US",
  "salePriceAmount": 900,
  "storeName": "Gold Members",
  "currencyCode": "USD"
}

Update a ProductVariantPrice

PUT /api/productVariantPrices/{id}

Request Example

{
  "salePriceAmount": 800
}

Delete a ProductVariantPrice

DELETE /api/productVariantPrices/{id}

Get a ProductVariantPrice

GET /api/productVariantPrices/{id}

List All ProductVariantPrices

GET /api/productVariantPrices