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 storeGroupId
s. 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
Field | Type | Description |
---|---|---|
basePriceAmount | integer | The regular selling price in minor units, following the currency used in the store market. |
productVariantId | string | The ID of the product variant. |
storeGroupId | string | The ID of the store group. |
countryCode | string | Country code where this price will be used. |
created | datetime | When the price was created. |
salePriceAmount | integer | The discounted price in minor units, following the currency used in the store market. |
discountAmount | integer | The discount amount is the difference between base and sale price, in minor units. |
storeName | string | The name of the store. |
currencyCode | string | The currency code for the currency used in this store market. |
updated | datetime | When the price was last updated. |
referencePriceAmount | integer | The 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