items.update
Updates an item.
You call this method by submitting a HTTP PUT request to the following URL with the item updates on xml format in the request body:
Example data to be submitted with item data:
<item> <name>stuff</name> <description>new stuff description</description> <unit_price>3.5</unit_price> <unit>unit</unit> <tax> <name>IVA20</name> </tax> </item>
Parameters
Parameters are the data you will pass with the call.
Request Parameters:
api_key
Your secret identifier. You find your API Key under Account Overview in the Account section.
Rules: Required
item-id
Id of the item to update.
Rules: Required
Data Parameters:
name
Item name.
Rules: Optional. Must be unique.
description
Item description.
Rules: Optional
unit_price
Item unit price.
Rules: Optional. Needs to be greater than 0.0.
unit
Item unit of measure.
Rules: Optional.
tax
Item tax.
Rules: Optional. If not present no tax is applied to the item
tax / name
Item tax name.
Rules: Optional. If not found no tax is applied to the item
Return Values
This is the result that will be passed back to you when you have sent a call.
Success
Error
The API Key parameter is missing or incorrect.
No item matches the supplied :item-id.
Some parameters were incorrect.
Possible errors:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name has already been taken</error> <error>Unit price can't be blank</error> <error>Unit price is not a number</error> <error>Unit kg is not included in the list of accepted units</error> <error>Unit is not included in the list of accepted units</error> </errors>