Items
Staff access
Staff do not have access to the API calls listed below.
item.create
Create a new item and return the corresponding item_id.
Note: At the moment you cannot specify pre-defined taxes for items through the API.
Request
<?xml version="1.0" encoding="utf-8"?> <request method="item.create"> <item> <name>Fuzzy Slippers</name> <description>Extra soft</description> # (Optional) <unit_cost>59.99</unit_cost> # (Optional) <quantity>1</quantity> # (Optional) <inventory>10</inventory> # By default, inventory is not tracked (Optional) </item> </request>
Response
<?xml version="1.0" encoding="utf-8"?> <response status="ok"> <item_id>18</item_id> </response>
item.update
Update an existing item. All fields aside from the item_id are optional; by omitting a field, the existing value will remain unchanged.
Request
<?xml version="1.0" encoding="utf-8"?> <request method="item.update"> <item> <item_id>18</item_id> <name>Cheap Slippers</name> # (Optional) <description>Super tight!</description> # (Optional) <unit_cost>34.99</unit_cost> # (Optional) <quantity>1</quantity> # (Optional) <inventory></inventory> # Blank value disables inventory (Optional) </item> </request>
Response
<?xml version="1.0" encoding="utf-8"?> <response status="ok"/>
item.get
Get an existing item with the given item_id.
Request
<?xml version="1.0" encoding="utf-8"?> <request method="item.get"> <item_id>18</item_id> </request>
Response
<?xml version="1.0" encoding="utf-8"?> <response status="ok"> <item> <item_id>18</item_id> <name>Cheap Slippers</name> <description>Super tight!</description> <unit_cost>34.99</unit_cost> <quantity>1</quantity> <inventory></inventory> </item> </response>
item.delete
Delete an existing item.
Request
<?xml version="1.0" encoding="utf-8"?> <request method="item.delete"> <item_id>1</item_id> </request>
Response
<?xml version="1.0" encoding="utf-8"?> <response status="ok"/>
item.list
Returns a list of items, ordered by descending item_id.
Request
<?xml version="1.0" encoding="utf-8"?> <request method="item.list"> <page>1</page> # The page number to show (Optional) <per_page>5</per_page> # The number of results per page, default 25 (Optional) </request>
Response
<?xml version="1.0"encoding="utf-8"?> <response status="ok"> <items> <item> <item_id>18</item_id> <name>Cheap Slippers</name> <description>Super tight!</description> <unit_cost>34.99</unit_cost> <quantity>10</quantity> <inventory></inventory> </item> <item> <item_id>17</item_id> <name>Yard Work</name> <description>Gardening, trimming, etc.</description> <unit_cost>17.50</unit_cost> <quantity>4</quantity> <inventory></inventory> </item> ... </items> </response>






