This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Estimates in FreshBooks
Overview
The following operations allow you to work with estimates. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with estimates, see Sample configuration.
Operation | Description |
|---|---|
Creates an estimate. | |
Deletes an estimate. | |
Retrieves an estimate. | |
Lists estimates. | |
Sends an estimate by email. | |
Updates an email. |
Operation details
This section provides details on the operations.
The createEstimate operation creates a new estimate.
createEstimate
<freshbooks.createEstimate>
<clientId>{$ctx:clientId}</clientId>
<contacts>{$ctx:contacts}</contacts>
<status>{$ctx:status}</status>
<date>{$ctx:date}</date>
<poNumber>{$ctx:poNumber}</poNumber>
<discount>{$ctx:discount}</discount>
<currencyCode>{$ctx:currencyCode}</currencyCode>
<language>{$ctx:language}</language>
<notes>{$ctx:notes}</notes>
<terms>{$ctx:terms}</terms>
<firstName>{$ctx:firstName}</firstName>
<lastName>{$ctx:lastName}</lastName>
<organization>{$ctx:organization}</organization>
<pStreet1>{$ctx:pStreet1}</pStreet1>
<pStreet2>{$ctx:pStreet2}</pStreet2>
<pCity>{$ctx:pCity}</pCity>
<pState>{$ctx:pState}</pState>
<pCountry>{$ctx:pCountry}</pCountry>
<pCode>{$ctx:pCode}</pCode>
<vatName>{$ctx:vatName}</vatName>
<vatNumber>{$ctx:vatNumber}</vatNumber>
<lines>{$ctx:lines}</lines>
</freshbooks.createEstimate>Properties
clientId:Required - The ID of the client who is being invoiced.contacts:One or more contact IDs for the specified client.status:The status of the new estimate.date:The date of the new estimate. Defaults to the current date.poNumber:The purchase order number of the new estimate.discount:The percentage of discount of the new estimate.currencyCode:The currency code to be used with this estimate.language:The language to be used in the estimate. See language list for appropriate codes.notes:Internal notes for new estimates.terms:Terms related to the estimate.firstName:The first name for the new estimate.lastName:The last name for the estimate.organization:The name of the organization for the new estimate.pStreet1:The primary street 1 name for the new estimate.pStreet2:The primary street 2 name for the new estimate.pCity:The primary city name for the new estimate.pState:The primary state name for the new estimate.pCountry:The primary country name for the new estimate.pCode:The primary postal code for the new estimate.vatName:The VAT name for the estimate.vatNumber:The VAT number for the new estimate.lines:Specifies one or more task lines for the new estimate.
Following is a sample REST/XML request that can be handled by the createEstimate operation.
Sample Request for createEstimate
<createEstimate>
<arbitraryPassword></arbitraryPassword>
<apiUrl>https://sansu.freshbooks.com</apiUrl>
<authenticationToken>c361a63c745651941sdf2fa8051ea605a6d</authenticationToken>
<clientId>106477</clientId>
<contacts>
<contact>
<contact_id>6754</contact_id>
</contact>
</contacts>
<status>draft</status>
<date>2012-06-23</date>
<poNumber>2314</poNumber>
<discount>10</discount>
<currencyCode>CAD</currencyCode>
<language>en</language>
<notes>Due upon receipt.</notes>
<terms>Payment due in 30 days.</terms>
<firstName>John</firstName>
<lastName>Smith</lastName>
<organization>ABC Corp</organization>
<pStreet1>123 Center St.</pStreet1>
<pStreet2>Apt. 555</pStreet2>
<pCity>Chicago</pCity>
<pState>IL</pState>
<pCountry>USA</pCountry>
<pCode>60606</pCode>
<vatName>Vat Name</vatName>
<vatNumber>11111</vatNumber>
<lines>
<line>
<name>Yard Work</name>
<description>Moved the lawn.</description>
<unit_cost>10</unit_cost>
<quantity>4</quantity>
<tax1_name>GST</tax1_name>
<tax2_name>PST</tax2_name>
<tax1_percent>8</tax1_percent>
<tax2_percent>6</tax2_percent>
<compound_tax>1</compound_tax>
<type>Item</type>
</line>
</lines>
</createEstimate>For further reference on the parameters within "lines", go to the FreshBooks documentation link below.
Related FreshBooks documentation
http://developers.freshbooks.com/docs/estimates/#estimate.create
The deleteEstimate operation deletes an existing estimate.
deleteEstimate
<freshbooks.deleteEstimate>
<estimateId>{$ctx:estimateId}</estimateId>
</freshbooks.deleteEstimate>Properties
estimateId:Required - The ID of the estimate to be deleted.
Sample request
Following is a sample REST/XML request that can be handled by the deleteEstimate operation.
Sample Request for deleteEstimate
<deleteEstimate>
<arbitraryPassword></arbitraryPassword>
<apiUrl>https://sansu.freshbooks.com</apiUrl>
<authenticationToken>c361asdf63c7456519412fa8051ea605a6d</authenticationToken>
<estimateId>5065</estimateId>
</deleteEstimate>Related Freshbooks documentation
http://developers.freshbooks.com/docs/estimates/#estimate.delete
The getEstimate operation retrieves an existing estimate.