Skip to content

Item Pricing & Availability

Covers GetItemPrice, GetPriceBreaks, GetItemLocations, and GetRelatedItems — the four ItemServices messages. GetItemPrice is the one that matters for bulk pricing: its request accepts a repeating list of items, so a single call prices an entire cart or catalog page rather than requiring one round trip per item.

See eCommerce API overview for the shared envelope fields (B2BSellerVersion, CustomerCode, StoreName, WebReferenceNumber) and result codes, which aren't repeated here.


GetItemPrice

Returns pricing (and optionally availability, price breaks, and location-by-location quantities) for one or more items in a single call. This is the bulk pricing endpoint.

Request Fields (header level)

Field Required Notes
LocationID Yes Source location to price/check availability from.
GetCostType No Set to Supplier to have P21 return supplier cost (UnitCost) on each item instead of leaving it blank.
GetCompanyAvailability No TRUE returns free quantity summed across all locations tied to the company in StoreName.
GetRemainingFreeQuantity No TRUE returns RemainingFreeQuantity = (company-wide free qty) − (free qty at LocationID).
GetExtendedDescription No TRUE populates ExtendedDescription on each item.
GetWebDescription No Not applicable to P21 — always FALSE.
GetAvailabilityOnly No TRUE skips pricing entirely and only returns availability — useful for a stock-check UI that doesn't need prices.
ContractUID No Price against a specific contract (job_price_hdr.job_price_hdr_uid). Must be an active contract.
ShipToID No Populate for ship-to–specific pricing.
GetProductionOrderInfo No TRUE returns ProductionOrderQtyToMake for assembly items.
UseSystemSettingForPricingUnit No TRUE to let P21's system setting decide the pricing UOM instead of what you pass per-line.
SourceLocations/IncludeExclude + ListOfLocations/Location/LocID No Restrict/exclude specific locations from the availability calculation (separate from LocationID, which is the pricing location).
AllCompaniesWideAvailability No TRUE pools availability across every company in the P21 install, ignoring StoreName.
GetListOfItemLocationQuantities No TRUE returns a ListOfItemLocationQuantities breakdown per item — free quantity at every location, not just LocationID.
SalesRepID, GetRelatedItems, GetRelatedItemPrices, ReturnRevisions, RevisionLevel No Present in the current schema but not documented in the 2013 manual — appear to control returning related-item cross-sell data and revision-controlled item info inline. Verify behavior against a live response before depending on them.

Request Fields (per item, ListOfItems/Item) — repeat this block for bulk pricing

Field Required Notes
ItemID Yes inv_mast.item_id.
Quantity No Order quantity — drives which price break applies.
UnitName / UnitSize No Order UOM. Blank = default sales UOM.
CustomerPartNumber No Customer's part number for this item, if cross-referencing.
InvMastUID No inv_mast.inv_mast_uid, if already known — saves a lookup.
DefaultPricingUOM / DefaultPricingUnitSize No Set if pricing UOM differs from order UOM.
AuxiliaryData/PricePageUID No Force pricing against a specific price page.
Combinable Yes Hardcode Y.
NetPrice No Leave blank for P21 to calculate. If populated, P21 just echoes it back (used for pre-negotiated/manual prices).
GetPriceBreaks No Set 1 to have this item's response include ListOfBreaks (next-quantity-break pricing).

Reply Fields (per item)

Field Notes
FreeQuantity, UnitName, UnitSize Availability at LocationID (or pooled, per the request flags above).
LeadTimeDays Populated when the item is out of stock.
NetPrice The calculated (or echoed) unit price. Blank if GetAvailabilityOnly was TRUE.
BreakID A pointer, not the break data itself. If set, the item is priced using quantity breaks — feed this into GetPriceBreaks to retrieve the full break table.
ListOfBreaks/Break/Minimum,Maximum,NetPrice Populated inline only when GetPriceBreaks was 1 on the request line.
PricedByContract TRUE if ContractUID pricing applied.
UnitCost Only populated if GetCostType=Supplier was set.
RemainingFreeQuantity Only populated if GetRemainingFreeQuantity=TRUE.
ListOfItemLocationQuantities/ItemLocationQuantity/LocationID,FreeQuantity,LeadTimeDays Only populated if GetListOfItemLocationQuantities=TRUE.
ListPrice, Discontinued, LastOrderedDate Present in the current schema, undocumented in the manual — appear self-explanatory but unverified.
ListOfMandatoryNotes/MandatoryNote Notes P21 flags as required reading/display for this item (e.g. hazmat, warranty).
ListOfRelatedItems/RelatedItem, Relation Cross-sell/substitute items, if GetRelatedItems was requested — an inline alternative to calling GetRelatedItems separately.
RowCount Total items returned (header level, not per-item).

Example — Pricing Multiple Items in One Call

<GetItemPrice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="C:\XBG\Schemas\XBGGetItemPrice.xsd">
  <Request>
    <B2BSellerVersion><MajorVersion>5</MajorVersion><MinorVersion>11</MinorVersion><BuildNumber>100</BuildNumber></B2BSellerVersion>
    <CustomerCode>100000</CustomerCode>
    <StoreName>COS</StoreName>
    <WebReferenceNumber>1</WebReferenceNumber>
    <LocationID>1006840</LocationID>
    <GetAvailabilityOnly>False</GetAvailabilityOnly>
    <UseSystemSettingForPricingUnit>TRUE</UseSystemSettingForPricingUnit>
    <GetListOfItemLocationQuantities>TRUE</GetListOfItemLocationQuantities>
    <ListOfItems>
      <Item>
        <ItemID>B2BITEM3</ItemID>
        <Quantity>1</Quantity>
        <UnitName>EA</UnitName>
        <UnitSize>1.0000</UnitSize>
        <Combinable>Y</Combinable>
        <GetPriceBreaks>1</GetPriceBreaks>
      </Item>
      <Item>
        <ItemID>B2BITEM5</ItemID>
        <Quantity>10</Quantity>
        <UnitName>EA</UnitName>
        <UnitSize>1.0000</UnitSize>
        <Combinable>Y</Combinable>
        <GetPriceBreaks>1</GetPriceBreaks>
      </Item>
    </ListOfItems>
  </Request>
  <Reply />
  <ReplyStatus><Result>0</Result><Message /></ReplyStatus>
</GetItemPrice>

Each Item block in ListOfItems gets its own Item in the reply's ListOfItems, so a page of 50 catalog items can be priced with one request/response pair instead of 50.

Use GetAvailabilityOnly for stock-only widgets

If a page only needs to show "In Stock" / "X available," set GetAvailabilityOnly=TRUE. It skips price calculation, which is the more expensive part of the call on the P21 side.

BreakID is a pointer, not a price table

GetItemPrice only inlines the full break table when you set GetPriceBreaks=1 on that line item. If you didn't set it but still see a BreakID, you'll need a follow-up GetPriceBreaks call to get Minimum/Maximum/NetPrice for each tier.


GetPriceBreaks

Returns the full quantity-break price table for a single item, given the BreakID returned by GetItemPrice.

Request Fields

Field Required Notes
BreakID Yes From a prior GetItemPrice response. Acts as a pointer to the break list.
ItemID Yes inv_mast.item_id.
CustomerPartNumber No
UnitName / UnitSize No Blank = default sales UOM/size.
LocationID Yes Source location.
ContractUID No Present in the current schema (not in the 2013 manual) — presumably scopes breaks to a contract, mirroring GetItemPrice.

Reply Fields

ListOfBreaks/Break — repeating, one per tier:

Field Notes
Minimum Minimum quantity for this tier.
Maximum Maximum quantity for this tier.
NetPrice Price per unit at this tier.

Example

<GetPriceBreaks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XBGSchemas\XBGGetPriceBreaks.xsd">
  <Request>
    <StoreName>COS</StoreName>
    <CustomerCode>100000</CustomerCode>
    <WebReferenceNumber>1</WebReferenceNumber>
    <B2BSellerVersion><MajorVersion>5</MajorVersion><MinorVersion>11</MinorVersion><BuildNumber>100</BuildNumber></B2BSellerVersion>
    <BreakID>1484</BreakID>
    <ItemID>B2BREGRESSIONACC1</ItemID>
    <UnitName>EA</UnitName>
    <UnitSize>1.000000000</UnitSize>
    <LocationID>1006840</LocationID>
  </Request>
  <Reply>
    <ListOfBreaks>
      <Break><Minimum>0</Minimum><Maximum>4.9999</Maximum><NetPrice>55.5500</NetPrice></Break>
      <Break><Minimum>5.0000</Minimum><Maximum>9.9999</Maximum><NetPrice>49.9950</NetPrice></Break>
    </ListOfBreaks>
  </Reply>
</GetPriceBreaks>

GetItemLocations

Returns availability (not pricing) for a single item across one or more locations. Use this when you need a "ship from" location picker rather than a price.

Request Fields

Field Required Notes
ItemID Yes
SourceLocations/IncludeExclude + ListOfLocations/Location/LocID No Restrict/exclude specific locations from the result.
AllCompaniesWideAvailability No TRUE to pool across all companies.
GetCompanyAvailability No TRUE to return every location tied to the company in StoreName.
GetProductionOrderInfo No TRUE for assembly-item "quantity available to make."
Pagination (PageSize, StartRowID, GetTableOfContents) + ListOfSortColumns No See pagination pattern. Valid sort columns: LocationId, LocationName, FreeQuantity.

Reply Fields (per location, ListOfLocations/Location)

Field Notes
LocationID, LocationName
FreeQuantity, UnitName, UnitSize
LeadTimeDays Lead time if out of stock at this location.
ProductionOrderQtyToMake Assembly items only.
DoNotAutoAllocateDesc Undocumented in the manual — appears to flag locations excluded from auto-allocation, with a description.

RowCount + ListOfRowIDs at the reply root follow the standard pagination pattern.


GetRelatedItems

Returns substitute or accessory ("go-together") items for a given item — the data source for "customers who bought this also bought" or "you'll also need" widgets.

Request Fields

Field Required Notes
ItemID Yes inv_mast.item_id.
Relation Yes SUBSTITUTE or GOTOGETHER.
CustomerPartNumber No

Reply Fields

ListOfItemIDs/ItemID — a flat list of related item IDs (substitutes or accessories, per the Relation you requested). No pricing or description is returned; call GetItemPrice with the returned IDs to get pricing.

Example

<GetRelatedItems xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XBGSchemas\XBGGetRelatedItems.xsd">
  <Request>
    <StoreName>COS</StoreName>
    <WebReferenceNumber>1</WebReferenceNumber>
    <ItemID>B2BITEM3</ItemID>
    <Relation>SUBSTITUTE</Relation>
    <CustomerCode>100000</CustomerCode>
    <B2BSellerVersion><MajorVersion>5</MajorVersion><MinorVersion>11</MinorVersion><BuildNumber>100</BuildNumber></B2BSellerVersion>
  </Request>
  <Reply>
    <ListOfItemIDs>
      <ItemID>B2BITEM5</ItemID>
    </ListOfItemIDs>
  </Reply>
  <ReplyStatus><Result>0</Result><Message /></ReplyStatus>
</GetRelatedItems>