api.products¶
- /api/products/
- /api/products/(d+)/
- /api/products/(d+)/add_product_photo/
- /api/products/(d+)/costs/
- /api/products/(d+)/costs/(d+)/
- /api/products/(d+)/product_photos/
- /api/products/(d+)/product_photos/(d+)/
- /api/products/(d+)/product_photos/(d+)/image/
- /api/products/(d+)/serial_numbers/
- /api/products/(d+)/serial_numbers/(d+)/
- /api/products/(d+)/serial_numbers/search/
- /api/products/search/
/api/products/¶
GET /api/products/¶
Description:
List products partially rendered
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<products>
<product uri="/products/X/" id="X" full_render="false">
<code>[str]</code>
<flags>
<inventoried>[bool]</inventoried>
<editable_sell>[bool]</editable_sell>
<master_model>[bool]</master_model>
</flags>
<sell_price>[decimal]</sell_price>
<description>[str]</description>
<inventory>
<available>[decimal]</available>
<reserved>[decimal]</reserved>
<coming_for_stock>[decimal]</coming_for_stock>
<coming_for_customer>[decimal]</coming_for_customer>
<warehouses>[decimal]</warehouses>
<in_transit>[decimal]</in_transit>
<total>[decimal]</total>
</inventory>
<product_photos>
<product_photo uri="/products/X/product_photos/Y/" id="Y"/>
[...]
</product_photos>
</product>
[...]
</products>
POST /api/products/¶
Description:
Create a new product
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<product>
<code>[str: max(1023)]</code><!-- Optional -->
<sell_price>[decimal]</sell_price><!-- Optional. Sets the sell and sell_tax_inclusive according to the current tax inclusive/exclusive settings. For tax exclusive, the sell_price becomes the sell (i.e. sell=19.99) and sell_tax_inclusive becomes None. For tax inclusive (assuming 7% tax), the sell price becomes the sell_tax_inclusive and the sell is calculated using the default tax code (i.e. sell=18.68 and sell_tax_inclusive=19.99). Set child product to master product's sell_price if not present. -->
<class id="[int]"/><!-- Optional -->
<currency id="[int]"/><!-- Optional -->
<supplier id="[int]"/><!-- Optional. Note: This value is normally set by updating the supplier_costs. -->
<supplier_code>[str]</supplier_code> <!-- Optional. The supplier product code. Note: This value is normally set by updating the supplier_costs. -->
<flags>
<current>[bool]</current><!-- Optional -->
<editable>[bool]</editable><!-- Optional -->
<inventoried>[bool]</inventoried><!-- Optional -->
<editable_sell>[bool]</editable_sell><!-- Optional -->
<gift_card>[bool]</gift_card><!-- Optional -->
<no_profit>[bool]</no_profit><!-- Optional -->
<serialized>[bool]</serialized><!-- Optional -->
<web>[bool]</web><!-- Optional -->
</flags>
<description>[str: max(4096)]</description><!-- Optional -->
<short_description>[str: max(4096)]</short_description><!-- Optional -->
<family>[str]</family><!-- Optional -->
<sells>
<sell>[decimal]</sell><!-- Optional -->
<sell_tax_inclusive>[decimal]</sell_tax_inclusive><!-- Optional -->
<sell_web>[decimal]</sell_web> <!-- Optional -->
</sells>
<tax_exemption id="[int]"/>
<master_product>
<product id="[int]"/> <!-- Optional -->
</master_product>
<code_suffix>[enum: COLOR_SIZE | SIZE_COLOR]</code_suffix> <!-- COLOR_SIZE="-color-size", SIZE_COLOR="-size-color". Default to COLOR_SIZE if not present. Use this to determine the child product's code if code is not present. -->
<description_suffix>[enum: COLOR_SIZE | SIZE_COLOR | BCOLOR_SIZEB | BSIZE_COLORB]</description_suffix> <!-- COLOR_SIZE=", color, size", SIZE_COLOR=", size, color", BCOLOR_SIZEB=", (color, size)", BSIZE_COLORB=", (size, color)". Default to COLOR_SIZE if not present. Use this to determine the child product's description if description is not present. -->
<product_color id="[int]"/> <!-- Mandatory if master_product id is present. -->
<product_size id="[int]"/> <!-- Mandatory if master_product id is present. -->
<manufacturer_part_number>[str]</manufacturer_part_number> <!-- Optional -->
<manufacturer_pricing_option_code>[str]</manufacturer_pricing_option_code> <!-- Optional -->
</product>
Response:
<product uri="/products/X/" id="X">
<!-- See GET /products/X/ response for details. -->
</product>
/api/products/(d+)/¶
GET /api/products/(d+)/¶
Description:
Detailed product info
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
True | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<product uri="/products/A/" id="A">
<class uri="/setup/classes/B/" id="B"/>
<currency uri="/setup/currencies/C/" id="C"/>
<code>[str]</code>
<costs> <!-- Default costs being used by the product. -->
<cost>[decimal]</cost> <!-- The actual cost of the product in the current currecy. -->
<average>[decimal]</average> <!-- Cost average for this product -->
<raw>[decimal]</raw> <!-- This is the default raw cost for the product. Reflects the default raw cost from the supplier costs. -->
</costs>
<supplier_costs> <!-- The supplier costs attached to this product. -->
<cost uri="/products/A/costs/N/" id="N">
<!-- See GET /products/X/costs/Y/ for details. -->
</cost>
[...]
</supplier_costs>
<flags>
<current>[bool]</current>
<editable>[bool]</editable>
<gift_card>[bool]</gift_card>
<inventoried>[bool]</inventoried>
<new_cost>[bool]</new_cost>
<new_import>[bool]</new_import>
<new_update>[bool]</new_update>
<no_live_rules>[bool]</no_live_rules>
<no_profit>[bool]</no_profit>
<serialized>[bool]</serialized>
<web>[bool]</web>
<editable_sell>[bool]</editable_sell>
<master_model>[bool]</master_model>
</flags>
<sell_price>[decimal]</sell_price>
<created>[datetime]</created>
<modified>[datetime]</modified>
<description>[str]</description>
<long_web_description>[str]</long_web_description>
<family>[str]</family>
<gl_product>
<asset>[str]</asset>
<cogs_expense>[str]</cogs_expense>
<income>[str]</income>
</gl_product>
<product_id>[str]</product_id>
<inventory>
<available>[decimal]</available>
<reserved>[decimal]</reserved>
<coming_for_stock>[decimal]</coming_for_stock>
<coming_for_customer>[decimal]</coming_for_customer>
<warehouses>[decimal]</warehouses>
<in_transit>[decimal]</in_transit>
<total>[decimal]</total>
</inventory>
<margin>[decimal]</margin>
<minimum_margin>[decimal]</minimum_margin>
<product_info>
<color>[str]</color>
<height>[decimal]</height>
<length>[decimal]</length>
<size>[str]</size>
<weight>[decimal]</weight>
<width>[decimal]</width>
</product_info>
<reorder>
<amount>[decimal]</amount>
<calc>[decimal]</calc>
<point>[decimal]</point>
<type>[int]</type>
</reorder>
<sells>
<sell>[decimal]</sell>
<sell_tax_inclusive>[decimal]</sell_tax_inclusive>
<sell_web>[decimal]</sell_web>
</sells>
<supplier uri="/suppliers/G/" id="G"/> <!-- The current supplier attached to this product. Note: This value is normally pulled from the default supplier cost. However, it can be overridden. -->
<supplier_code>[str]</supplier_code> <!-- The current supplier product code. Note: This value is normally pulled from the default supplier code. However, this can be overridden. -->
<upc>[str]</upc>
<web>
<inventory>[str]</inventory>
</web>
<keywords>
<keyword>[str]<keyword>
[...] <!-- 3 keywords total -->
</keywords>
<multi_store_label>[str]</multi_store_label>
<multi_store_master_label>[str]</multi_store_master_label>
<categories>
<pos>
<category uri="/setup/pos_categories/H/" id="H">
<!-- See GET /setup/pos_categories/X/ for details -->
</category>
</pos>
<web>
<category uri="/setup/web_categories/I/" id="I">
<!-- See GET /setup/web_categories/X/ for details -->
</category>
</web>
</categories>
<related_products>
<related_product>
<product uri="/products/J/" id="J"/>
<quantity>[decimal]</quantity>
<auto-add>[bool]</auto-add>
</related_product>
[...]
</related_products>
<serial_numbers>
<serial_number uri="/products/A/serial_numbers/K/" id="K">
<!-- See GET /products/X/serial_numbers/Y/ for details -->
</serial_number>
[...]
</serial_numbers>
<product_photos>
<product_photo uri="/products/A/images/L/" id="L"/>
[...]
</product_photos>
<tax_exemption uri="/setup/tax_exemptions/M/" id="M">
<!-- See GET /setup/tax_exemptions/X/ for details. -->
</tax_exemption>
<master_product>
<product uri="/products/N/" id="N">
</master_product>
<manufacturer_part_number>[str]</manufacturer_part_number>
<manufacturer_pricing_option_code>[str]</manufacturer_pricing_option_code>
</product>
PUT /api/products/(d+)/¶
Description:
Update an existing product
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
True | True | False | False |
Request:
<product>
<!-- See POST /products/ request for details. -->
</product>
Response:
<product uri="/products/X/" id="X">
<!-- See GET /products/X/ response for details. -->
</product>
/api/products/(d+)/add_product_photo/¶
POST /api/products/(d+)/add_product_photo/¶
Description:
Add a photo for the current product
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Header Name | Description |
---|---|
Content-Location | [str] |
Request:
[raw image binary data]
Response:
<product_photo uri="/products/X/product_photos/Y/" id="Y">
<!-- See GET /products/X/product_photos/Y/ response for details. -->
</product_photo>
- Expected Errors:
/api/products/(d+)/costs/¶
GET /api/products/(d+)/costs/¶
Description:
Return the list of supplier costs for a specific product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No xml request -->
Response:
<costs>
<cost uri="/products/X/costs/Y/" id="Y">
<!-- See GET /products/X/costs/Y/ for details. -->
</cost>
[...]
</costs>
POST /api/products/(d+)/costs/¶
Description:
Create a new cost for a specific product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Request:
<cost>
<raw>[decimal]</raw> <!-- Default 0 -->
<supplier id="[int]"/> <!-- Mandatory -->
<supplier_product_code>[str]</supplier_product_code> <!-- Mandatory -->
<default>[bool]</default> <!-- Default False -->
</cost>
Response:
<cost uri="/products/X/costs/Y/" id="Y">
<!-- See GET /products/X/costs/Y/ for details. -->
</cost>
/api/products/(d+)/costs/(d+)/¶
GET /api/products/(d+)/costs/(d+)/¶
Description:
Return a specific supplier cost for a specific product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No xml request -->
Response:
<cost uri="/products/A/costs/B/" id="B">
<raw>[decimal]</raw>
<currency uri="/setup/currencies/C/" id="C">
<!-- See GET /setup/currencies/X/ for details -->
</currency>
<cost>[decimal]</cost>
<supplier id="[int]"/>
<supplier_product_code>[str]</supplier_product_code>
<default>[bool]</default>
</cost>
PUT /api/products/(d+)/costs/(d+)/¶
Description:
Update a specific supplier cost for a specific product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Request:
<cost>
<raw>[decimal]</raw> <!-- Optional -->
<supplier id="[int]"/> <!-- Optional -->
<supplier_product_code>[str]</supplier_product_code> <!-- Optional -->
<default>[bool]</default> <!-- Optional -->
</cost>
Response:
<cost uri="/products/X/costs/Y/" id="Y">
<!-- See GET /products/X/costs/Y/ for details. -->
</cost>
DELETE /api/products/(d+)/costs/(d+)/¶
Description:
Delete a specific supplier cost for a specific product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Request:
<!-- No xml request -->
Response:
<cost uri="/products/A/costs/B/" id="B" deleted="true"/>
/api/products/(d+)/product_photos/¶
GET /api/products/(d+)/product_photos/¶
Description:
Return the list of photo details of the product.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<product_photos>
<product_photo uri="/products/X/product_photos/Y/" id="Y">
<!-- See GET /products/X/product_photos/Y/ response for details. -->
</product_photo>
[...]
</product_photos>
/api/products/(d+)/product_photos/(d+)/¶
GET /api/products/(d+)/product_photos/(d+)/¶
Description:
Return the details of a product photo
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<product_photo uri="/products/X/product_photos/Y/" id="Y">
<sort_order>[int]</sort_order>
<scales>
<scale>
<filename>[str]</filename>
<size>[str]</size>
<format>[str]</format>
</scale>
[...] <!-- 3 totals for 3 different size formats: 512, 256, original. -->
</scales>
</product_photo>
PUT /api/products/(d+)/product_photos/(d+)/¶
Description:
Update a product photo detail
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Request:
<product_photo>
<sort_order>[int]</sort_order>
</product_photo>
Response:
<product_photo uri="/products/X/product_photos/Y/" id="Y">
<!-- See GET /products/X/product_photos/Y/ response for details. -->
</product_photo>
DELETE /api/products/(d+)/product_photos/(d+)/¶
Description:
Delete a product photo
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | True | False | False |
Request:
<!-- No XML Request -->
Response:
<!-- No XML Response -->
/api/products/(d+)/product_photos/(d+)/image/¶
GET /api/products/(d+)/product_photos/(d+)/image/¶
Description:
Return the product photo in binary data
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Header Name | Description |
---|---|
Accept | image/*;size=[str] |
Request:
<!-- No XML Request. -->
Response:
<!-- Image data at the requested size. If no such size, then the original is returned -->
- Expected Errors:
/api/products/(d+)/serial_numbers/¶
represents a list of serial numbers attached to a specific product.
GET /api/products/(d+)/serial_numbers/¶
Description:
Return the list of serial numbers for this product
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<serial_numbers>
<serial_number uri="/products/X/serial_numbers/Y/" id="Y">
<!-- See GET /products/X/serial_numbers/Y/ response for details. -->
</serial_number>
[...]
</serial_numbers>
/api/products/(d+)/serial_numbers/(d+)/¶
GET /api/products/(d+)/serial_numbers/(d+)/¶
Description:
Detailed info of a product serial number
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<serial_number uri="/products/X/serial_numbers/Y/" id="Y">
<status>[int]</status>
<note>[str]</note>
<cost>[decimal]</cost>
<serial>[str]</serial>
<warehouse uri="/warehouses/Z/" id="Z"/>
</serial_number>
/api/products/(d+)/serial_numbers/search/¶
Data¶
Columns
name | type | required | default | sort_default | can_summarize |
---|---|---|---|---|---|
lsserver.search.column.serial_number | STRING | False | True | False | False |
lsserver.search.column.available | BOOLEAN | False | True | False | False |
lsserver.search.column.warehouse | STRING | False | True | False | False |
Filters
name | type | required | enum_values |
---|---|---|---|
lsserver.search.filters.serial_number | STRING | False | None |
lsserver.search.filters.available | BOOLEAN | False | None |
lsserver.search.filters.warehouse | STRING | False | None |
GET /api/products/(d+)/serial_numbers/search/¶
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<search_criteria>
<columns>
<column id="[str]">
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name> <!-- The localizable name of this column -->
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
<required>[bool]</required><!-- Indicates that this item must be part of the query -->
<default>[bool]</default><!-- Indicates which columns should be selected by default -->
<sort_default>[bool]</sort_default><!-- Indicates that this column should be selected as the sort column by default -->
<sort_default_order_by>[enum: ASC | DESC]</sort_default_order_by><!-- Indicates what the default order by should be for this column -->
<can_summarize>[bool]</can_summarize><!-- Indicates that this column can be used to generate a summarized total -->
</column>
[...]
</columns>
<filters>
<filter id="[str]">
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name> <!-- The localizable name of this filter -->
<type>[enum: ENUM | STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN ]</type><!-- Defines the type of data this filter represents -->
<enum_values><!-- Present if and only if type is ENUM -->
<enum_value>
<name>
<localizable_message/> <!-- Mutually exclusive with <raw> -->
<raw>[str]</raw> <!-- Mutually exclusive with <localizable_message> -->
</name> <!-- The name to be displayed -->
<value>[str]</value> <!-- The value to be passed to the server in <filters> of a POST -->
</enum_value>
[...]
</enum_values>
</filter>
[...]
</filters>
</search_criteria>
POST /api/products/(d+)/serial_numbers/search/¶
Description:
Executes a search based on the content of the post. Responses are streamed to
the client.
Note: Read only clients may POST searches.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<search>
<include_total>[bool]</include_total> <!-- True by default -->
<page> <!-- optional if getting the whole dataset -->
<offset>[int]</offset> <!-- optional -->
<count>[int]</count> <!-- optional -->
</page>
<summarized_column><!-- Optional. When specified, a summarized total is added to the data -->
<column id="[str]"/>
</summarized_column>
<search_query>
<columns><!-- optional. If no columns are specified, the default columns are selected.-->
<column id="[str]"/>
[...]
</columns>
<sort_by_column><!-- optional. If not specified, the default columns is used for sorting. -->
<column id="[str]"/>
<order_by>[enum: ASC | DESC]</order_by><!-- Optional. If not specified the default order by is used.-->
</sort_by_column>
<filters><!-- optional or content optional-->
<!--
Predicate search based on the filter list from the GET
Predicate searches take the form of:
lsserver.search.column.fictional_column > 10 AND (lsserver.search.column.fictional_column2 == 0 OR lsserver.search.column.fictional_column3 != 0)
-->
</filters>
</search_query>
</search>
Response:
<data>
<info>
<total_count>[int]</total_count>
<summarized_column>
<column>
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name>
<type>[enum: INTEGER | DECIMAL | MONEY ]</type>
</column>
</summarized_column>
<summarized_total>[int|decimal]</summarized_total>
</info>
<columns>
<column>
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name>
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
</column>
[...]
</columns>
<rows>
<row>
<links> <!-- Links to relevant documents -->
<link>
<product uri="" id="" />
</link>
[...]
</links>
<cell>
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
<value>[str | int | decimal | date | datetime | bool]</value>
</cell>
[...] <!-- The count will always match the column count -->
</row>
</rows>
</data>
/api/products/search/¶
Data¶
Columns
name | type | required | default | sort_default | can_summarize |
---|---|---|---|---|---|
lsserver.search.column.code | STRING | True | True | True | False |
lsserver.search.column.description | STRING | False | True | False | False |
lsserver.search.column.sell | MONEY | False | True | False | False |
lsserver.search.column.inventory | DECIMAL | False | True | False | False |
lsserver.search.column.matrix_master | BOOLEAN | False | True | False | False |
lsserver.search.column.inventoried | BOOLEAN | False | True | False | False |
lsserver.search.column.quantity_total | DECIMAL | False | True | False | False |
lsserver.search.column.quantity_reserved | DECIMAL | False | True | False | False |
lsserver.search.column.quantity_in_warehouses | DECIMAL | False | True | False | False |
lsserver.search.column.quantity_ordered_for_customers | DECIMAL | False | True | False | False |
lsserver.search.column.quantity_ordered_for_stock | DECIMAL | False | True | False | False |
lsserver.search.column.id | STRING | False | False | False | False |
lsserver.search.column.size | STRING | False | False | False | False |
lsserver.search.column.color | STRING | False | False | False | False |
lsserver.search.column.family | STRING | False | False | False | False |
lsserver.search.column.class | STRING | False | False | False | False |
lsserver.search.column.web | BOOLEAN | False | False | False | False |
lsserver.search.column.upc | STRING | False | False | False | False |
lsserver.search.column.on_sale | BOOLEAN | False | False | False | False |
lsserver.search.column.inventory_version | INTEGER | False | False | False | False |
lsserver.search.column.manufacturer_part_number | STRING | False | False | False | False |
lsserver.search.column.manufacturer_pricing_option_code | STRING | False | False | False | False |
lsserver.search.columns.product_custom_field_0 | STRING/DATE/BOOLEAN | False | False | False | False |
Filters
name | type | required | enum_values |
---|---|---|---|
lsserver.search.filters.product | STRING | False | None |
lsserver.search.filters.code | STRING | False | None |
lsserver.search.filters.supplier_code | STRING | False | None |
lsserver.search.filters.description | STRING | False | None |
lsserver.search.filters.upc | STRING | False | None |
lsserver.search.filters.selling_price | MONEY | False | None |
lsserver.search.filters.quantity | DECIMAL | False | None |
lsserver.search.filters.matrix_master_product | BOOLEAN | False | None |
lsserver.search.filters.inventoried | BOOLEAN | False | None |
lsserver.search.filters.size | STRING | False | None |
lsserver.search.filters.color | STRING | False | None |
lsserver.search.filters.family | STRING | False | None |
lsserver.search.filters.class | STRING | False | None |
lsserver.search.filters.notes | STRING | False | None |
lsserver.search.filters.supplier | STRING | False | None |
lsserver.search.filters.default_raw_cost | MONEY | False | None |
lsserver.search.filters.default_currency | STRING | False | None |
lsserver.search.filters.default_cost | MONEY | False | None |
lsserver.search.filters.tax_status | STRING | False | None |
lsserver.search.filters.margin | DECIMAL | False | None |
lsserver.search.filters.reorder_amount | DECIMAL | False | None |
lsserver.search.filters.reorder_point | DECIMAL | False | None |
lsserver.search.filters.editable_description | BOOLEAN | False | None |
lsserver.search.filters.editable_sell | BOOLEAN | False | None |
lsserver.search.filters.serialized | BOOLEAN | False | None |
lsserver.search.filters.sell_price_level_a | MONEY | False | None |
lsserver.search.filters.sell_price_level_b | MONEY | False | None |
lsserver.search.filters.sell_price_level_c | MONEY | False | None |
lsserver.search.filters.sell_price_level_d | MONEY | False | None |
lsserver.search.filters.sell_price_level_e | MONEY | False | None |
lsserver.search.filters.sell_price_level_f | MONEY | False | None |
lsserver.search.filters.sell_price_level_g | MONEY | False | None |
lsserver.search.filters.sell_price_level_h | MONEY | False | None |
lsserver.search.filters.sell_price_level_i | MONEY | False | None |
lsserver.search.filters.sell_price_level_j | MONEY | False | None |
lsserver.search.filters.cost_price_level_a | MONEY | False | None |
lsserver.search.filters.cost_price_level_b | MONEY | False | None |
lsserver.search.filters.cost_price_level_c | MONEY | False | None |
lsserver.search.filters.cost_price_level_d | MONEY | False | None |
lsserver.search.filters.cost_price_level_e | MONEY | False | None |
lsserver.search.filters.cost_price_level_f | MONEY | False | None |
lsserver.search.filters.cost_price_level_g | MONEY | False | None |
lsserver.search.filters.cost_price_level_h | MONEY | False | None |
lsserver.search.filters.cost_price_level_i | MONEY | False | None |
lsserver.search.filters.cost_price_level_j | MONEY | False | None |
lsserver.search.filters.gl_asset_account | STRING | False | None |
lsserver.search.filters.gl_cogs_expense_account | STRING | False | None |
lsserver.search.filters.gl_income_account | STRING | False | None |
lsserver.search.filters.gl_payable_expense_account | STRING | False | None |
lsserver.search.filters.web | BOOLEAN | False | None |
lsserver.search.filters.web_description | STRING | False | None |
lsserver.search.filters.web_keyword | STRING | False | None |
lsserver.search.filters.web_price | MONEY | False | None |
lsserver.search.filters.product_id | STRING | False | None |
lsserver.search.filters.multi_store_label | STRING | False | None |
lsserver.search.filters.current | BOOLEAN | False | None |
lsserver.search.filters.matrix_child_product | BOOLEAN | False | None |
lsserver.search.filters.new_import | BOOLEAN | False | None |
lsserver.search.filters.new_updates | BOOLEAN | False | None |
lsserver.search.filters.new_costs | BOOLEAN | False | None |
lsserver.search.filters.created_date | DATE | False | None |
lsserver.search.filters.modified_date | DATE | False | None |
lsserver.search.filters.photo | BOOLEAN | False | None |
lsserver.search.filters.on_sale | BOOLEAN | False | None |
lsserver.search.filters.sale_name | STRING | False | None |
lsserver.search.filters.inventory_version | INTEGER | False | None |
lsserver.search.filters.manufacturer_part_number | STRING | False | None |
lsserver.search.filters.manufacturer_pricing_option_code | STRING | False | None |
lsserver.search.filters.product_custom_field_0 | STRING/DATE/BOOLEAN | False | None |
GET /api/products/search/¶
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<!-- No XML Request. -->
Response:
<search_criteria>
<columns>
<column id="[str]">
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name> <!-- The localizable name of this column -->
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
<required>[bool]</required><!-- Indicates that this item must be part of the query -->
<default>[bool]</default><!-- Indicates which columns should be selected by default -->
<sort_default>[bool]</sort_default><!-- Indicates that this column should be selected as the sort column by default -->
<sort_default_order_by>[enum: ASC | DESC]</sort_default_order_by><!-- Indicates what the default order by should be for this column -->
<can_summarize>[bool]</can_summarize><!-- Indicates that this column can be used to generate a summarized total -->
</column>
[...]
</columns>
<filters>
<filter id="[str]">
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name> <!-- The localizable name of this filter -->
<type>[enum: ENUM | STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN ]</type><!-- Defines the type of data this filter represents -->
<enum_values><!-- Present if and only if type is ENUM -->
<enum_value>
<name>
<localizable_message/> <!-- Mutually exclusive with <raw> -->
<raw>[str]</raw> <!-- Mutually exclusive with <localizable_message> -->
</name> <!-- The name to be displayed -->
<value>[str]</value> <!-- The value to be passed to the server in <filters> of a POST -->
</enum_value>
[...]
</enum_values>
</filter>
[...]
</filters>
</search_criteria>
POST /api/products/search/¶
Description:
Executes a search based on the content of the post. Responses are streamed to
the client.
Note: Read only clients may POST searches.
can_lock | requires_lock | has_etag | requires_etag |
---|---|---|---|
False | False | False | False |
Request:
<search>
<include_total>[bool]</include_total> <!-- True by default -->
<page> <!-- optional if getting the whole dataset -->
<offset>[int]</offset> <!-- optional -->
<count>[int]</count> <!-- optional -->
</page>
<summarized_column><!-- Optional. When specified, a summarized total is added to the data -->
<column id="[str]"/>
</summarized_column>
<search_query>
<columns><!-- optional. If no columns are specified, the default columns are selected.-->
<column id="[str]"/>
[...]
</columns>
<sort_by_column><!-- optional. If not specified, the default columns is used for sorting. -->
<column id="[str]"/>
<order_by>[enum: ASC | DESC]</order_by><!-- Optional. If not specified the default order by is used.-->
</sort_by_column>
<filters><!-- optional or content optional-->
<!--
Predicate search based on the filter list from the GET
Predicate searches take the form of:
lsserver.search.column.fictional_column > 10 AND (lsserver.search.column.fictional_column2 == 0 OR lsserver.search.column.fictional_column3 != 0)
-->
</filters>
</search_query>
</search>
Response:
<data>
<info>
<total_count>[int]</total_count>
<summarized_column>
<column>
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name>
<type>[enum: INTEGER | DECIMAL | MONEY ]</type>
</column>
</summarized_column>
<summarized_total>[int|decimal]</summarized_total>
</info>
<columns>
<column>
<name>
<localizable_message/> <!-- mutually exclusive with <raw> -->
<raw>[str]</raw><!-- mutually exclusive with <localizable_message> -->
</name>
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
</column>
[...]
</columns>
<rows>
<row>
<links> <!-- Links to relevant documents -->
<link>
<product uri="" id="" />
</link>
[...]
</links>
<cell>
<type>[enum: STRING | INTEGER | DECIMAL | MONEY | DATE | DATETIME | BOOLEAN]</type>
<value>[str | int | decimal | date | datetime | bool]</value>
</cell>
[...] <!-- The count will always match the column count -->
</row>
</rows>
</data>