estimate.create Creating Estimates
Create a new estimate with line items. If successful, returns the estimate_id of the newly created estimate.
<?xml version="1.0" encoding="UTF-8"?> <request method="estimate.create"> <estimate> <estimate_date>2007-09-28</estimate_date> //mandatory <estimate_expiration>2007-09-28</estimate_expiration> //mandatory <client_id>1</client_id> //mandatory <currency>USD</currency> //mandatory <tax>8.75%</tax> //percent <freight>3.45</freight> <tags>tag1 tag2 tag3</tags> <lines> <line> //estimate must have at least 1 line <quantity>2</quantity> <kind>Hours</kind> //mandatory possible values: Hours, Days, Product, Expense <description>description1</description> <tax>1</tax> //possible values: 1 (have tax) or 0 <price>1.00</price> //must be numeric value </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> </estimate> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <estimate_id>1</estimate_id> </response>
estimate.update
Update an existing estimate with the given estimate_id. Any estimate fields left out of the request will remain unchanged. If you do not specify a <lines> element, the existing lines will remain unchanged.
<?xml version="1.0" encoding="UTF-8"?> <request method="estimate.update"> <estimate> <estimate_id>1</estimate_id> # Estimate to update # Remaining arguments same as estimate.create </estimate> </request> <code> ===== Response ===== <code xml> <?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
estimate.get Return the complete estimate details associated with the given estimate_id.
<?xml version="1.0" encoding="UTF-8"?> <request method="estimate.get"> <estimate_id>1</estimate_id> </request>
<?xml version="1.0"?> <response status="ok"> <estimate_date>2007-09-28</estimate_date> <estimate_expiration>2007-09-28</estimate_expiration> <client_id>1</client_id> <currency>USD</currency> <tax>8.75%</tax> <freight>3.45</freight> <tags>tag1 tag2 tag3</tags> <lines> <line> <quantity>2</quantity> <kind>Hours</kind> <description>description1</description> <tax>1</tax> <price>1.00</price> </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> </estimate> </response>
estimate.delete
Delete an existing estimate.
<?xml version="1.0" encoding="UTF-8"?> <request method="estimate.delete"> <estimate_id>1</estimate_id> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
estimate.list Returns a list of estimate summaries.
<?xml version="1.0" encoding="UTF-8"?> <request method="estimate.list"> <client_id>1</client_id> # Filter by client (Optional) <date_from>2007-01-01</date_from> # Return estimates dated after this arg (Optional) <date_to>2007-09-28</date_to> # Return estimates dated before this arg (Optional) <page>1</page> # Page number to return, default is 1 (Optional) <per_page>10</per_page> # Number of results per page, default is 25 (Optional) </request>
<?xml version="1.0"?> <response status="ok"> <estimate_date>2007-09-28</estimate_date> <estimate_expiration>2007-09-28</estimate_expiration> <client_id>1</client_id> <currency>USD</currency> <tax>8.75%</tax> <freight>3.45</freight> <tags>tag1 tag2 tag3</tags> <lines> <line> <quantity>2</quantity> <kind>Hours</kind> <description>description1</description> <tax>1</tax> <price>1.00</price> </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> </estimate> </response>