Gets all Prices by Price Book ID
GET/pcm/pricebooks/:pricebookID/prices
Retrieves all the product prices in the specified price book.
Filtering
This endpoint supports filtering. For general syntax, see Filtering.
Operator | Attribute | Description | Example |
---|---|---|---|
eq | external_ref , sku | Checks if the values you provide matches a price. | filter=eq(sku,some-sku) |
in | sku | Checks if the values you provide are included in a product SKU. | `filter=in(sku,some-sku)' |
Request
Path Parameters
The unique identifier of a price book.
Query Parameters
This endpoint supports filtering. See Filtering.
Possible values: >= 1
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the page length store setting is used.
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page offset is set, the page length store setting is used.
Responses
- 200
- default
The product price list.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- the schedules must not be exactly the same.
- schedules can partially overlap. If the schedule does contain overlapping sales prices, the sale price of the smallest sale period is chosen.
- if you have just one sale price, without a schedule, this is effectively a permanent price. If you want to add more sale prices to the price book, you must configure a schedule for the sale price.
- ]
meta object
Contains the results for the entire collection.
results object
Total number of results for the entire collection.
page object
The maximum number of records for all pages.
The current offset by number of pages.
The current number of pages.
The total number of records for the entire collection.
data object[]required
Possible values: [product-price
]
Default value: product-price
The unique attribute associated with the price book. This can be an external reference from a separate company system, for example. The maximum length is 2048 characters.
attributes objectrequired
currencies object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
tiers object
The price tier that an item is eligible for based on the quantity purchased. You cannot have conflicting tiers within the same currencies block.
property name* tier-price
The name of the tier, for example, Pencils
.
The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.
The price for each quantity.
Possible values: non-empty
The product SKU that the price belongs to.
sales object
The sales price that an item is eligible for based on the price book.
property name* sale
The name of the sale, such as Summer Sale
.
A list of product IDs in a bundle that you want to specify a sale price for.
schedule objectnullable
The schedule of the sale. Contains an optional valid_from
and valid_to
parameter for the start and end date of a sale.
For sale prices in the same price book:
Sale prices in different price books can have overlapping schedules.
The start date of the sale.
The end date of the sale.
currencies object
A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.
property name* amount
The three-letter ISO code for the currency associated with this price.
The price in the lowest denomination for the specified currency. This is a product's list price.
Whether this price includes tax.
tiers object
The price tier that an item is eligible for based on the quantity purchased. You cannot have conflicting tiers within the same currencies block.
property name* tier-price
The name of the tier, for example, Pencils
.
The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.
The price for each quantity.
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
The date and time when the price was created.
The date and time when the price was last updated.
admin_attributes object
You can add custom attributes to a product price. For example, you may want to add custom attributes that can automate price updates based on predefined rules, saving time and reducing human error or you might want to integrate price attributes with your other company systems, (ERP, CRM) ensuring consistency and accuracy across platforms.
admin_attributes
are not displayed in catalogs. This means admin_attributes
can only be viewed by administrators. If you want a custom attribute to be displayed in a catalog, you must add a shopper_attribute
.
admin_attributes
are structured as key-value pairs. Both the keys and values are strings
. You can have up to 100 keys.
shopper_attributes object
You can add custom attributes to a product price. For example, you can set prices based on customer segments. For instance, you can offer different prices for wholesale and retail customers or provide discounts to loyal customers. Following on from this, you might want to offer personalized offers and prices, enhancing the shopping experience.
shopper_attributes
are displayed in catalogs. This means shopper_attributes
can be viewed by both shoppers and administrators. If you do not want a custom attribute to be displayed in a catalog, you must add an admin_attribute
.
shopper_attributes
are structured as key-value pairs. Both the keys and values are strings
. You can have up to 100 keys.
The unique identifier for the product price.
meta object
Information that provides context to other data sets.
The resource owner, either organization
or store
.
The unique identifier of the price book.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
Always the first page.
This is null
if there is only one page.
This is null
if there is only one page.
This is null
if there is only one page.
{
"meta": {
"results": {
"total": 1
},
"page": {
"limit": 10,
"offset": 0,
"current": 0,
"total": 1
}
},
"data": [
{
"type": "product-price",
"pricebook_external_ref": "a-pricebook-external-ref",
"attributes": {
"currencies": {
"USD": {
"amount": 100,
"includes_tax": false,
"tiers": {
"min_5": {
"minimum_quantity": 5,
"amount": 50
}
}
},
"CAD": {
"amount": 127,
"includes_tax": false,
"tiers": {
"min_10": {
"minimum_quantity": 10,
"amount": 100
}
}
},
"GBP": {
"amount": 73,
"includes_tax": true,
"tiers": {
"min_20": {
"minimum_quantity": 20,
"amount": 60
}
}
}
},
"sku": "product-sku-a",
"sales": {
"summer": {
"schedule": {
"valid_form": "2023-12-24T09:00:00",
"valid_to": "2023-12-25T09:00:00"
},
"currencies": {
"USD": {
"amount": 90,
"includes_tax": false,
"tiers": {
"min_5": {
"minimum_quantity": 5,
"amount": 40
}
}
},
"CAD": {
"amount": 117,
"includes_tax": false,
"tiers": {
"min_10": {
"minimum_quantity": 10,
"amount": 80
}
}
},
"GBP": {
"amount": 65,
"includes_tax": true,
"tiers": {
"min_20": {
"minimum_quantity": 20,
"amount": 50
}
}
}
}
}
},
"external_ref": "external-ref",
"created_at": "2020-09-22T09:00:00Z",
"updated_at": "2020-09-22T09:00:00Z",
"admin_attributes": {
"cost_of_goods": "42.0",
"charge_type": "credit card"
},
"shopper_attributes": {
"cost_of_goods": "42.0",
"charge_type": "credit card"
}
},
"id": "a915553d-935d-4d56-870b-817b47a44a99",
"meta": {
"owner": "store",
"pricebook_id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
}
}
],
"links": {
"self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7/prices?filter=like(sku,*product*)",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Unexpected error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"detail": "The price already exists",
"status": "409",
"title": "conflict"
}
]
}