The Item Price Lookup page is available in the B1WebAPI web service. Go to the Item Prices tab of your B1WebAPI installation, or go to (B1WebAPI-address)/ItemPriceLookup.aspx
Optionally, select a company profile (1). For Single item price lookup, fill in the Card Code (2) and Item Number (3). Optionally fill in the Quantity (4) and/or Date (5) Fields. For Multiple item price lookup, create multi-lookup XML (6) or use the Load Multi-price Sample link as a starting point.
Optionally, select a company profile (1). For Single item price lookup, fill in the Card Code (2) and Item Number (3). Optionally fill in the Quantity (4) and/or Date (5) Fields. For Multiple item price lookup, create multi-lookup XML (6) or use the Load Multi-price Sample link as a starting point.

Single Item Price Lookup

To look up a single item price, fill in the Card Code and Item Number fields on the Item Price Lookup page (markers 2 and 3 above). Quantity (marker 4 above) and Date (marker 5 above) are optional fields that may be included for a single item price lookup.

Alternatively, the following URL syntax may be used against the B1WebAPI directly:

Syntax: [/<profile-name>]/itempriceservice/<CardCode>/<ItemCode>.aspx[?<optional-parameters>]

Example (Default profile): /itempriceservice/C20000/A00001.aspx

Example (sample “myProfile” profile, with parameters): /myProfile/itempriceservice/C20000/A00001.aspx?quantity=6

Supported parameters for Item Price Lookup

Parameters for Item Price Lookup
Parameter Description

Currency

Optional. Currency Code of the desired currency. The lookup will provide the item price in the selected currency, as supported by the SAP Business One DI-API.

Sample Usage: /myProfile/itempriceservice/C20000/A00001.aspx?currency=USD

Date

Optional. ISO-formatted date (YYYY-MM-DD) for the price lookup. Can be used to define a date in the case of period pricing.

Sample Usage: /myProfile/itempriceservice/C20000/A00001.aspx?date=2016-08-17

Quantity

Optional. Can be used to specify the quantity. For example, pricing on items with volume discounts.

Sample Usage: /myProfile/itempriceservice/C20000/A00001.aspx?quantity=6

UoMEntry

Optional. Specifies the DocEntry of a Unit of Measure which should be applied to this price lookup.

Sample Usage: /myProfile/itempriceservice/C20000/A00001.aspx?UoMEntry=23

UoMQuantity

Optional. Specifies the Quantity of the selected Unit of Measure. If no UoMEntry is provided, this UoMQuantity is ignored.

Sample Usage: /myProfile/itempriceservice/C20000/A00001.aspx?UoMEntry=23&UoMQuantity=6

Multiple Item Price Lookup

If multiple price lookups are needed, this may be done by submitting XML using a format similar to the following sample.

  • ItemCode - Required. Defines the item for this lookup record.
  • CardCode - Required. Defines the customer for this lookup record.
  • Quantity - Optional. If included, indicates the quantity for this lookup record. If excluded, the quantity will be “1”.
  • Date - Optional. If included, and not empty, defines the date for the price lookup. If excluded or blank, the date will be today’s date.

This can be submitted using the Lookup Multiple Prices block (marker 6 in the screenshot above), or it can be submitted directly to the B1WebAPI: [/<profile-name>]/itempriceservice/batch.aspx

<MultiItemPriceLookup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <QueryList>
    <ItemPriceQuery>
      <ItemCode>A00003</ItemCode>
      <CardCode>C20000</CardCode>
    </ItemPriceQuery>
    <ItemPriceQuery>
      <ItemCode>A00001</ItemCode>
      <CardCode>C20000</CardCode>
      <Quantity>30</Quantity>
      <Date>2015-09-25</Date>
    </ItemPriceQuery>
    <ItemPriceQuery>
      <ItemCode>A00002</ItemCode>
      <CardCode>C20000</CardCode>
      <Quantity xsi:nil="true" />
      <Date xsi:nil="true" />
    </ItemPriceQuery>
    <ItemPriceQuery>
      <ItemCode>A00002</ItemCode>
      <CardCode>C20000</CardCode>
      <Quantity>30</Quantity>
    </ItemPriceQuery>
  </QueryList>
</MultiItemPriceLookup>