Pricesheets
Price sheets are a common and quite familiar concept in the e-commerce world. A price sheet can include the prices for products or groups of products i.e. categories. A single price sheet can be assigned to multiple users. Check the Users endpoints to learn how to assign a pricesheet to a user.
Price Sheet Lookup keys
Key | Type | Description |
---|---|---|
id | integer | Propeller pricesheet id, auto-generated |
code | string | Price sheet code |
Price sheet fields
Name | Description | Type |
---|---|---|
code | Price sheet code | string integer |
shopId | Identifies the shop the pricesheet will be valid for | integer |
name | Price sheet name | string |
description | Price sheet description | string |
Pricing
Pricing for products and categories can be defined for different resources: pricesheet which can be assigned for a user or usergroup, or directly define pricing for user or usergroup.
Name | Description | Type |
---|---|---|
categories | List of categories and corresponding prices | array[PricingItem] |
products | List of products and corresponding prices | array[PricingItem] |
shopId | Identifies the shop the prices will be valid for. For pricesheet prices, shopId is inferred from pricesheet's shopId . For user type discounts, if not provided, a default one will be set (first shop found). | integer |
Pricing Item
A pricing item identifies the resource for which the prices are defined. This resource can be a product or a category. The resource can be defined by either id
or sourceId
in combination with source
. The pricing item also includes the price itself.
Name | Description | Type |
---|---|---|
id | Resource Id | integer |
sourceId | Source Id | string |
source | Source | string |
pricing | Price | PricingElement |
Pricing Element
This field represents the actual price definition.
Name | Description | Type |
---|---|---|
type | Price type Cost price plus (CP) = The cost price of a product + amount percent Sales price minus (SP) = The sales price of a product - amount percent Net = Net price | enum CP SP net |
amount | Percent. Should be used in combination with type SP or CP. | decimal |
price | Net price. Should be used when type is net. | decimal |
quantity | The minimum quantity for which this price is valid | integer |
validFrom | The price is valid after this date | date |
validTo | The price is valid before this date | date |
Pricesheet/ Pricing Errors
This section describes error codes specific for the Pricesheet
and Pricing
resources.
Code | Error Type | Status Code | Message | Reason |
---|---|---|---|---|
12001 | PricesheetExists | 400 | Pricesheet already exists | Pricesheet with such lookup key already exists |
12002 | PricesheetNotFound | 404 | Pricesheet not found | Pricesheet with such lookup key not found |
12003 | PricesheetPricingExists | 400 | Pricesheet already contains pricing | Pricesheet/ User/ Usergroup pricing already exists |
12004 | PricesheetPricingError | 400 | Error listing pricing | Error retrieveing pricing |
12005 | ParentPricesheetsNotFound | 404 | Parent resource pricesheet not found | Parent pricesheet with such lookup key not found. This error is typical when working with pricesheet pricing |
📄️ Get Pricesheets
Use this endpoint to retrieve a list of all price sheets.
📄️ Create Pricesheet
Use this endpoint to create a price sheet. If a price sheet is successfully created, the response will include the price sheet `id`.
📄️ Create Pricesheet Pricing
Use this endpoint to define [pricing](/rest/pricesheets) for an existing price sheet. The price sheet can be identified by it's lookup key. It is required to provide either `categories` or `products` or both.
📄️ Delete Pricesheet Pricing
Use this endpoint to delete pricing for a given price sheet without actually deleting the price sheet. The price sheet is identified by lookup key.
📄️ Get Pricesheet by lookup key
Use this endpoint to retrieve price sheet details by lookup key. The `expands` parameter can be used to retrieve the pricing for the price sheet.
📄️ Delete Pricesheet by lookup id
This endpoint deletes a price sheet and it's pricing. The price sheet can be identified by lookup key.