1.0.2
API Overview
The Price Books API provides functionality to search for price books within an organization.
Price books in Salesforce Commerce Cloud contain the pricing information for products. They can be organized in hierarchies where one price book can inherit from another (parent) price book. Each price book is associated with a specific currency and can be assigned to one or more sites.
Authentication & Authorization
For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request.
You must include sfcc.price-books (read-only access) or sfcc.price-books.rw (read-write access) in the client ID used to generate the token. For a full list of required permissions, see the Authorization Scopes Catalog.
For detailed setup instructions, see the Authorization for Admin APIs guide.
Use Cases
Find Active Price Books
Search for price books that are currently active (online) and valid:
{
"query": {
"boolQuery": {
"must": [
{
"termQuery": {
"fields": ["online"],
"operator": "is",
"values": [true]
}
}
]
}
}
}
Search by Currency
Find all price books for a specific currency:
{
"query": {
"termQuery": {
"fields": ["currencyCode"],
"operator": "is",
"values": ["USD"]
}
},
"sorts": [
{
"field": "displayName",
"sortOrder": "asc"
}
]
}
Text Search
Search for price books by name or description:
{
"query": {
"textQuery": {
"fields": ["id", "displayName", "description"],
"searchPhrase": "sale"
}
}
}
Related Resources
Let us know so we can improve!