Price Book
Review configured sale prices, create or schedule new versions, correct saved entries, and remove mistakes with complete review before applying changes.
Price Book routes keep the entered price, currency, package or base-unit basis, effective dates, customer context, and source details together. Reads return every matching configured price with clear overlap and comparison guidance.
Endpoints
| Endpoint | Use it for |
|---|---|
GET /price-book-entries/{id} | Read one exact Price Entry and its current update time. |
PATCH or DELETE /price-book-entries/{id} | Review and correct or remove one selected entry. |
POST /price-book-entries/batch | Review and apply coordinated creates, new versions, corrections, or deletions. |
GET /price-book-entries | Review active, scheduled, expired, all, or historical Price Book entries. |
POST /price-book-entries?dryRun=true | Preview one price update, including every entry it would affect. |
POST /price-book-entries | Apply the reviewed update and return the complete saved entry. |
Reads require price-book-entries:read. Updates require price-book-entries:write. The acting user's current ShelfCycle Pricing Engine access and customer visibility are checked on every request. GET /me reports effectiveCapabilities.priceBookEntries.read, write, and writeCurrencyMode.
Review current prices
GET /price-book-entries accepts salesPersonId to select customers whose active locations use that default salesperson. This is a salesperson record UUID, rather than an assigned user's UUID. Do not combine it with listPrice or laneEntryId. Existing Price Book access and customer visibility still apply; read the endpoint's correction details for an unknown or inaccessible salesperson. See People and tag filters for role distinctions.
GET /price-book-entries defaults to prices active on the organization's current business date. Narrow the result by product, customer, list price, currency, ship-to address, warehouse, terms, or source reference.
curl "$SHELFCYCLE_API_BASE_URL/price-book-entries?productId=product-id&customerId=customer-id&asOf=2026-08-04&limit=25" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "X-ShelfCycle-Client: Customer pricing review"
Use listPrice=true to select prices without a customer. When meta.hasMore is true, continue with meta.nextCursor.
Each entry includes:
- product, customer, ship-to, warehouse, terms, and transaction currency;
- active, scheduled, expired, or invalid effective state;
- the exact entered price and whether it is per package or per base unit;
- a normalized base-unit value when the entry has enough information;
- source, effective dates, timestamps, and ready links for the entry and its history; and
- overlap, value, comparison, and warning fields that help a workflow choose compatible prices.
{
"resourceType": "price_book_entry",
"id": "price-book-entry-id",
"product": {
"id": "product-id",
"code": "SOLVENT-55",
"packagingType": "FIXED",
"packagingName": "Drum",
"productQuantity": "55",
"baseUom": "GALLON"
},
"customer": { "id": "customer-id", "name": "Northstar Chemical" },
"effectiveState": "active",
"overlapState": "single",
"enteredPrice": {
"decimalCents": "125.5",
"currencyCode": "USD",
"basis": "per_package",
"basisEvidence": "stored_snapshot",
"roundedReportingPriceCents": "126",
"reportingRounding": "half_up"
},
"normalization": {
"decimalCentsPerBaseUom": "2.2818181818181818",
"baseUom": "GALLON",
"method": "divide_by_product_quantity",
"productQuantity": "55"
},
"comparisonEligibility": { "eligible": true, "issueCodes": [] },
"warningCodes": [],
"links": {
"self": "/api/v1/price-book-entries?view=all&laneEntryId=price-book-entry-id",
"history": "/api/v1/price-book-entries?view=history&laneEntryId=price-book-entry-id"
}
}
Use enteredPrice.decimalCents as the exact configured value. Use normalization.decimalCentsPerBaseUom for comparisons only when comparisonEligibility.eligible is true and the product, currency, base unit, and business date match.
Review schedules and history
Choose the view that matches the question:
| View | Use it for |
|---|---|
active | Prices in effect on the selected business date. |
scheduled | Approved prices that begin after the selected business date. |
expired | Prices whose effective period has ended. |
all | The broad configured-price record, including entries that need review. |
history | Every version in the exact pricing lane selected by one visible entry. |
Follow an entry's links.history value instead of rebuilding its product, customer, location, terms, quantity, and currency combination.
curl "$SHELFCYCLE_API_BASE_URL/price-book-entries?view=history&laneEntryId=price-book-entry-id" \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY"
When more than one active entry applies to the same pricing lane, the API returns every matching entry with overlapState: "multiple" and activeClaimCount. This keeps the full pricing context visible for the workflow's review policy.
Choose the price basis
For a fixed-package product, submit an exact price either per package or per product base unit. A base-unit submission is converted to the package price using the product quantity, and the response preserves the submitted value, stored value, and conversion.
For a variable-package product, submit the price per base unit and include an active reference package with its quantity. Resolve active package ids through GET /reference/product-packaging.
The existing POST /price-book-entries flow below uses the organization's base currency reported by GET /me as org.baseCurrencyCode. Exact-entry management and the batch route follow the same currency eligibility as Price Book in ShelfCycle, without converting currencies. NEW_VERSION retains the source entry's commercial coordinates and currency. GET /me reports managementCurrencyMode: "ui_parity" and managementForeignCurrencyEligible alongside the separate writeCurrencyMode: "org_base_only" for the existing POST flow. Each request still checks the exact entry and intended currency.
Preview one price update
Use one stable Idempotency-Key for the preview and the later execution. The preview returns the exact affected entry ids, a signed plan token, the predicted entry, and any warnings without writing.
curl "$SHELFCYCLE_API_BASE_URL/price-book-entries?dryRun=true" \
-X POST \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: quote-2026-0819-line-2" \
-d '{
"productId": "product-id",
"customerId": "customer-id",
"shipToAddressId": null,
"warehouseId": null,
"terms": "Delivered",
"effectiveFrom": "2026-08-20",
"effectiveTo": null,
"price": {
"decimalCents": "2.5",
"currencyCode": "USD",
"basis": "per_base_uom",
"baseUom": "GALLON"
},
"referencePackaging": null,
"note": "Customer quote",
"sourceRef": "quote-2026-0819-line-2"
}'
{
"data": {
"object": "price_book_write_readiness",
"status": "ready",
"expectedAffectedEntryIds": ["existing-price-book-entry-id"],
"expectedPlanToken": "signed-plan-token",
"predictedEntry": {
"enteredPrice": {
"decimalCents": "137.5",
"currencyCode": "USD",
"basis": "per_package"
},
"writeValue": {
"submittedPrice": {
"decimalCents": "2.5",
"basis": "per_base_uom",
"baseUom": "GALLON",
"currencyCode": "USD"
},
"storedPrice": {
"decimalCents": "137.5",
"basis": "per_package",
"currencyCode": "USD"
},
"conversion": {
"operation": "multiply_by_product_quantity",
"productQuantity": "55"
}
}
},
"warningCodes": []
}
}
Review expectedAffectedEntryIds, the predicted value and basis, effective dates, and warningCodes before execution.
Apply and verify the update
Send the same intended update without dryRun=true, adding the preview's expectedAffectedEntryIds and expectedPlanToken. Keep the same Idempotency-Key.
{
"productId": "product-id",
"customerId": "customer-id",
"shipToAddressId": null,
"warehouseId": null,
"terms": "Delivered",
"effectiveFrom": "2026-08-20",
"effectiveTo": null,
"price": {
"decimalCents": "2.5",
"currencyCode": "USD",
"basis": "per_base_uom",
"baseUom": "GALLON"
},
"referencePackaging": null,
"note": "Customer quote",
"sourceRef": "quote-2026-0819-line-2",
"expectedAffectedEntryIds": ["existing-price-book-entry-id"],
"expectedPlanToken": "signed-plan-token"
}
A successful update returns the complete saved Price Book entry with resultAction and idempotencyStatus. Preserve that response as the write receipt, then follow links.self or links.history when the key also has read access.
If the request outcome is unknown, replay the identical execute request with the same key and body. The replay returns the original saved result. If the plan is no longer current, repeat the preview and review the new affected set before deciding whether to apply it.
Manage one exact Price Entry
Read GET /price-book-entries/{id} with price-book-entries:read. Its data.updatedAt is the exact timestamp to retain for If-Match; its stored price, currency, commercial coordinates, and effective dates describe the selected entry.
PATCH /price-book-entries/{id} corrects that entry in place. Send a changes object containing only the intended fields; omitted values remain as stored. Explicit Terms set or clear replaces the prior Incoterm-backed Terms value. Use DELETE with an empty JSON object to preview removing a mistaken entry.
Both preview and execution require price-book-entries:write, a stable Idempotency-Key, and the current If-Match. Use the same acting user and connection throughout. Replace the following variables with the selected entry ID and its returned timestamp.
PRICE_REVIEW_JSON=$(curl "$SHELFCYCLE_API_BASE_URL/price-book-entries/$PRICE_ENTRY_ID?dryRun=true" \
-X PATCH \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: customer-price-review-001" \
-H "If-Match: $PRICE_ENTRY_UPDATED_AT" \
-d '{ "changes": { "note": "Reviewed customer price" } }')
Review data.status, counts, every item's before, after, effects, and checks. Only apply a ready review with a deliberate nonempty selection. Its review values are reviewedTargets, selectedClientItemIds, and expectedPlanToken, with an expiresAt time. The review is valid for 15 minutes and belongs to the exact intent and connection.
After approval, send the identical changes with those three values nested under review, retaining the original key and timestamp:
curl "$SHELFCYCLE_API_BASE_URL/price-book-entries/$PRICE_ENTRY_ID" \
-X PATCH \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: customer-price-review-001" \
-H "If-Match: $PRICE_ENTRY_UPDATED_AT" \
-d "$(jq '{changes: {note: "Reviewed customer price"}, review: (.data | {reviewedTargets, selectedClientItemIds, expectedPlanToken})}' <<< "$PRICE_REVIEW_JSON")"
For DELETE, preview with {} and execute with { "review": ... } on the same DELETE route. An unavailable or outdated timestamp blocks preview or returns 409 stale_record; read the entry again and prepare a fresh review. Successful responses are price_entry_management_receipt values with before-and-after results, complete effects, and verification guidance. A deletion result preserves the receipt and identifies verification as unavailable because the entry was deleted, rather than linking to an entry that no longer exists.
Review and apply a coordinated batch
POST /price-book-entries/batch accepts one uppercase operation per request:
CREATE:itemswith stableclientItemIdandinputfor each new entry.NEW_VERSION:itemswithclientItemId, the sourceid, andchangesincludingeffectiveFrom.CORRECT:itemswithclientItemId,id, and sparsechanges.DELETE:itemswithclientItemIdandid.
curl "$SHELFCYCLE_API_BASE_URL/price-book-entries/batch?dryRun=true" \
-X POST \
-H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: november-price-review-001" \
-d '{
"operation": "NEW_VERSION",
"items": [{
"clientItemId": "price-001",
"id": "55555555-5555-4555-8555-555555555555",
"changes": {
"effectiveFrom": "2026-11-01",
"price": { "decimalCents": "81.625003", "basis": "per_base_uom", "baseUom": "POUND" }
}
}]
}'
Replace the example UUID, unit, and values with the selected source and approved price. Management prices are exact nonnegative decimal-cent strings, including "0". Send final values, not percentage or arithmetic instructions. The same package/base-unit rules and currency eligibility as the ShelfCycle workflow apply.
For NEW_VERSION, CORRECT, or DELETE, use either explicit items or one selection, never both. Selection can be exact entries, a narrowed filtered population, or deliberate all_book selection. Filtered selection includes sourceAsOf, product and customer choices, and effective states, with optional warehouse, ship-to, Terms, currency, and exclusions. Whole-book intent must explicitly use all_book. Terms remain exact, including case, whitespace, empty strings, and null. See the API reference for the complete selector shapes.
The preview freezes the complete reviewed population and effects. To leave some entries out, send the original intent back to dryRun=true with its review values and the revised nonempty selectedClientItemIds. Review that new response before execution. A blocked population review is not approval; selected held entries must be resolved or deliberately excluded through a fresh preview. Later matching entries do not silently join the reviewed set.
Execute the same intent with the approved review object and a stable Idempotency-Key. Batch preview may omit the key; batch execution requires it. Unlike formula and Repack imports, Price Entry batches apply all selected changes together or none. Changed or missing reviewed entries require a fresh review. Unchanged requests create no change history.
Retain the result and recover safely
Keep the receipt, including results, counts, committedAt, and each result's verification guidance. On an uncertain response, repeat the identical method, route, body, key, and scalar If-Match. A committed replay returns the saved receipt even after deletion or review expiry, subject to current access; do not replace an exact replay's old review or timestamp with newly read values.
Reviews cover up to 250 targets and 1,250 complete history rows. Scalar request bodies support 128 KiB, batch bodies 2 MiB, and public outcomes 4 MiB. Narrow the selected population if the response asks for it, then review the complete smaller request before saving.
Choose the right commercial book
Use Price Book for configured customer-facing sale prices, schedules, and history. Use Cost Book for supplier-facing product costs and their direct or constructed cost details. Use product cost context when comparing a Cost Book entry with completed or pending purchase evidence.
Compare prices only when the response marks them eligible and their product, currency, base unit, and business date match. Keep the same stable idempotency key from preview through execution and any retry.