Appearance
Quotes API
Create quotes with pricing directly from your website or partner systems.
What Is the Quotes API?
While work requests capture customer enquiries, the Quotes API goes further by creating actual quotes with line items and pricing. This is useful for:
- Instant quote calculators - "Get a quote in 30 seconds"
- Partner integrations - Referral partners sending pre-priced leads
- Automated pricing - Calculating quotes based on property size or service type
How It's Different from Work Requests
| Feature | Work Requests | Quotes API |
|---|---|---|
| Purpose | Capture customer enquiries | Create priced quotes |
| Pricing | None - manual follow-up | Automatic - includes pricing |
| Line Items | No | Yes - multiple items |
| Result | Request for manual quoting | Ready-to-send quote |
| Use Case | Contact forms | Quote calculators, partners |
Before You Start
You'll need:
- An API key from YardPilot
- A developer to implement the integration
- Clear pricing for your services
What's Required
Customer Information
| Field | Required | Description |
|---|---|---|
| Name | Yes | Customer's full name |
| Yes | Customer's email address | |
| Phone | No | Customer's phone number |
Address (Required)
| Field | Required | Description |
|---|---|---|
| Street Line 1 | Yes | Street address |
| Street Line 2 | No | Unit number, etc. |
| City | Yes | Suburb/city |
| State | Yes | 3-letter code (QLD, NSW, etc.) |
| Postcode | Yes | 4-digit Australian postcode |
Line Items (At Least One)
Each item needs:
| Field | Required | Description | Example |
|---|---|---|---|
| Name | Yes | Service name | "Lawn Mowing" |
| Description | No | What's included | "Fortnightly mowing service" |
| Quantity | Yes | How many units | 4 |
| Unit Price | Yes | Price per unit in cents | 5000 ($50.00) |
| Unit | No | Unit of measure | "visit", "hour", "sqm" |
| Tax Rate | No | GST percentage (default 10%) | 10.00 |
Price Format
Prices must be in cents, not dollars. For $50.00, send 5000.
How Pricing Works
YardPilot automatically calculates:
- Line Item Subtotal = Quantity × Unit Price
- Line Item Tax = Subtotal × Tax Rate (default 10% GST)
- Line Item Total = Subtotal + Tax
- Quote Total = Sum of all line item totals
Example Calculation
Lawn Mowing: 4 visits × $50.00 = $200.00
+ GST (10%): $20.00
= $220.00
Edge Trimming: 4 visits × $15.00 = $60.00
+ GST (10%): $6.00
= $66.00
Quote Total: $286.00 (including $26.00 GST)What Happens When a Quote Is Created
- Contact Created - If the email is new, a contact is added to your CRM as a "Lead"
- Property Created - The address becomes a property record
- Quote Created - A draft quote is created with all line items
- Ready to Send - Review and send the quote to the customer
Draft Status
Quotes created via API start in "Draft" status. This lets you review them before sending to customers.
Use Case: Instant Quote Calculator
Build a simple quote calculator on your website:
1. Customer Selects Services
[ ] Lawn Mowing - $50/visit
[x] Edge Trimming - $15/visit
[x] Garden Bed Weeding - $30/visit
How often? [Fortnightly ▼]
Property Size: [Medium (up to 500sqm) ▼]2. Customer Enters Details
Name: _____________
Email: ____________
Address: __________3. Your Website Creates the Quote
Your website sends the selections to YardPilot with appropriate pricing. The customer sees their quote total, and a draft quote appears in your dashboard.
4. You Review and Send
Check the quote looks correct, then click Send to email it to the customer.
Technical Details
Endpoint
POST https://app.yardpilot.io/api/v1/integration/quotesHeaders
Content-Type: application/json
X-Company-Key: your_api_key_hereExample Request
json
{
"customer_name": "Sarah Johnson",
"customer_email": "sarah@example.com",
"customer_phone": "0412 345 678",
"street_line_1": "42 Oxford Street",
"city": "Bulimba",
"state": "QLD",
"postcode": "4171",
"line_items": [
{
"name": "Lawn Mowing",
"description": "Fortnightly mowing service",
"quantity": 4,
"unit_price": 5000,
"unit": "visit",
"tax_rate": 10.0
},
{
"name": "Edge Trimming",
"description": "Included with mowing visits",
"quantity": 4,
"unit_price": 1500,
"unit": "visit",
"tax_rate": 10.0
}
]
}Success Response
json
{
"message": "Quote created successfully",
"quote_id": "01JCQR8X9PQZW3Y5K7N4M6B2T8",
"quote": {
"number": "Q-001",
"status": "draft",
"subtotal": 26000,
"tax_total": 2600,
"total": 28600
}
}Developer Documentation
For complete technical details including error handling and code examples in JavaScript, PHP, and Python, see our Integration API Developer Guide.
Common Units
Use consistent units across your quotes:
| Unit | Best For |
|---|---|
each | One-off items or products |
visit | Per-visit services |
hour | Time-based work |
sqm | Area-based pricing |
month | Monthly recurring services |
week | Weekly recurring services |
Tips for Success
1. Keep Pricing Simple
Customers prefer clear, simple pricing. Instead of:
- Mowing: $0.08/sqm × 500sqm = $40
Use:
- Lawn Mowing (Medium Property): $50/visit
2. Include Descriptions
Help customers understand what they're paying for:
json
{
"name": "Garden Maintenance",
"description": "Weeding, pruning, and mulching for garden beds up to 20sqm"
}3. Consider Tax-Exempt Items
For items without GST:
json
{
"name": "Consultation",
"quantity": 1,
"unit_price": 0,
"tax_rate": 0.0
}4. Test Thoroughly
Use test keys to verify your integration before going live.
How test keys work for quotes:
When you submit quotes using a test key (ypk_test_...):
- Quotes are validated exactly like live quotes
- Quotes, contacts, and properties are created with a TEST badge
- Test data is hidden by default from all lists
- No notifications are sent to your team
- All test records are automatically deleted after 24 hours
Testing workflow:
- Generate a test API key in Settings → API Keys
- Configure your quote calculator to use the test key
- Try various service combinations
- Check Quotes (with "Show test data" enabled) to verify data
- Verify totals calculate correctly
- Switch to your live API key when ready
Don't Forget to Switch Keys
If you accidentally leave a test key in production, quotes will be marked as test data and automatically deleted after 24 hours. Always verify you're using a live key (ypk_live_...) before launching.
Troubleshooting
Quote Not Creating
- Check required fields - All address fields are required
- Check line items - At least one line item is required
- Check price format - Prices must be in cents (integers)
Wrong Totals
- Price in cents - $50 should be
5000, not50 - Tax rate format - Use
10.00for 10%, not0.10
Duplicate Quotes
If the same customer + line items are submitted within 5 minutes, YardPilot returns the existing quote instead of creating a duplicate.
Next Steps
- Sending to Clients - How to send quotes
- Converting to Jobs - Turn approved quotes into work
- Work Requests - For simple contact forms
