Jump to content

Possible to create/update/read Stockable Kits via the (XML/Live) API?


Recommended Posts

I am trying to create Inventory Items via the XML API, specifically the PHP SDK. 

I see in the REST API documentation that it's possible to define a Stockable Kit with its Kit Components via that API. When I look at my Lookup queries and the API reference, I see no reference to KIT_COMPONENTS or any other similar element I can use to define the components in a create/update request. Similarly, when I try guessing a column in order to query for those fields, I cannot get them. ReadByQueries similarly do not contain any component-related fields.

Has anyone had any luck defining stockable kits through the API?

Link to comment
Share on other sites

You can create items of type kit using create_item API

Here is the DTD for create item


<!ELEMENT create_item (itemid, name, status?, itemtype,enable_bins?,extended_description?, productlineid?, substituteid?,
ship_weight?, datelastsold?, datelastrecvd?, taxable?, cost_method?, standard_cost?, average_cost?, base_price?,
standard_unit?, purchase_unit?, purchase_unit_factor?, sales_unit?, sales_unit_factor?, default_warehouse?,
glgroup?, note?, inventory_precision?, purchasing_precision?, sales_precision?, upc?, hasstartenddates?, term_period?, defaultnoofperiods?, computepriceforshortterm?,
itaxgroup?, revenue_posting?, vendlineitems?, whslineitems?, complineitems?, taxcode?, vsoecategory?, vsoedlvrstatus?, vsoerevdefstatus?, 
incomeaccount?, invaccount?, expenseaccount?, cogsaccount?, offsetoeglaccount?, offsetpoglaccount?, defrevaccount?, uomgrp?, dropship?,
cnbillingtemplate?, cnrevenuetemplate?,  cnrevenue2template?, cnexpensetemplate?, cnexpense2template?, customfields?, mrr?)>
<!ATTLIST create_item
    ignoreduplicates (true | false) "false"

<!ELEMENT complineitems (complineitem+)>
<!ELEMENT complineitem (componentkey,quantity?,revpercent?,delete_component?,kcdlvrstatus?,kcrevdefstatus?)>

If you want to turn this item into a stockable/built kit you can then run this and reference this item:



To read the item and get all the components associated you can use "read" 56 is the record number of the item you're looking for.

This will return the ITEM information as well as the itemcomponent related list.

 <function controlid="testControlId">

Link to comment
Share on other sites


  • Create New...