Estimate API Reference
This guide covers everything from creating estimates and managing their lifecycle to retrieving and updating estimate information. Learn how to leverage the power of our Estimate model to seamlessly handle estimates within your system. Explore the comprehensive API endpoints and data structures available, and start building robust estimate management functionality.
The Estimate model
Estimates are formal documents that outline the cost of goods or services a business proposes to deliver. They include itemized details, quantities, prices, and total amounts, providing clarity on expected expenses. Customers can review, approve, or reject estimates, fostering transparent communication before finalizing transactions.
Properties
- Name
id
- Type
- string
- Field Type
- Description
Unique identifier for the estimate.
- Name
estimate_date
- Type
- timestamp
- Field Type
- Description
Date of the estimate.
- Name
expiry_date
- Type
- timestamp
- Field Type
- Description
Expiry Date of estimate.
- Name
estimate_number
- Type
- string
- Field Type
- Description
Estimate Number.
- Name
sequence_number
- Type
- integer
- Field Type
- Description
Sequence Number.
- Name
status
- Type
- string
- Field Type
- Description
Status of the estimate.
- Name
notes
- Type
- string
- Field Type
- Description
Estimate Notes.
- Name
discount
- Type
- float
- Field Type
- Description
Discount value.
- Name
discount_type
- Type
- string
- Field Type
- Description
Type of discount: fixed or percentage.
- Name
discount_val
- Type
- integer
- Field Type
- Description
Discount value in cents.
- Name
tax
- Type
- integer
- Field Type
- Description
Tax value in cents.
- Name
sub_total
- Type
- integer
- Field Type
- Description
Subtotal value in cents.
- Name
total
- Type
- integer
- Field Type
- Description
Total value in cents.
- Name
template_name
- Type
- string
- Field Type
- Description
Name of the template to be used for the Estimate PDF.
- Name
customer_business_id
- Type
- string
- Field Type
- Description
Customer Business ID.
- Name
estimate_pdf_url
- Type
- string
- Field Type
- Description
URL of the Estimate PDF.
- Name
attachments
- Type
- array
- Field Type
- Description
Array of attachments.
- Name
reject_reason
- Type
- string
- Field Type
- Description
Reason for rejecting the estimate.
- Name
items
- Type
- object
- Field Type
- Description
Estimate items object
- Name
customer
- Type
- object
- Field Type
- Description
Customer object.
- Name
tax_per_item_enabled
- Type
- boolean
- Field Type
- Description
Indicates whether tax is applied per item.
- Name
discount_per_item_enabled
- Type
- boolean
- Field Type
- Description
Discount per item enabled.
- Name
creator_id
- Type
- string
- Field Type
- Description
ID of the user who created the estimate.
- Name
billing_address
- Type
- object
- Field Type
- Description
Billing address of the estimate.
- Name
shipping_address
- Type
- object
- Field Type
- Description
Shipping address of the estimate.
List all estimate templates
This endpoint returns a list of all available estimate templates.
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/estimates/templates" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"estimateTemplates": [
{
"name": "estimate1",
"path": "/templates/estimate1.png"
},
{
"name": "estimate2",
"path": "/templates/estimate2.png"
},
{
"name": "estimate3",
"path": "/templates/estimate3.png"
}
]
}
List all estimates
This endpoint allows you to retrieve a paginated list of all your estimates.
Query Parameters
- Name
limit
- Type
- integer
- Field Type
optional
- Description
Limit the number of estimates to be returned. (default is 10)
- Name
page
- Type
- integer
- Field Type
optional
- Description
Page number for pagination. (default is 1)
- Name
status
- Type
- string
- Field Type
optional
- Description
Filter records by status.
- Name
type
- Type
- string
- Field Type
optional
- Description
- incoming: Fetch estimates where the current business is the customer.
- outgoing: Fetch estimates where the current business is the vendor.
- All Estimates (if type is not provided): Fetch all estimates involving the current business as either a vendor or customer. If the business can act as both, include both types of estimates. If the business is only a customer, fetch customer estimates. If the business is only a vendor, fetch vendor estimates.
- Name
customer_business_id
- Type
- string
- Field Type
optional
- Description
Filter by customer_business_id (Only fetch estimates of a given customer of this business)
- Name
estimate_number
- Type
- string
- Field Type
optional
- Description
Filter records by estimate_number.
- Name
from_date
- Type
- timestamp
- Field Type
optional
- Description
Filter records by from_date.
- Name
to_date
- Type
- timestamp
- Field Type
optional
- Description
Filter records by to_date.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/estimates" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data":[
{
"id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"estimate_date": 1017705600,
"expiry_date": 1594944000,
"customer_business_id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"estimate_number": "EST-000001",
"template_name": "estimate1",
"sequence_number": 1,
"status": "DRAFT",
"notes": "<p>The total amount of the attached estimate EST-000001 is $190.00</p>",
"notes_raw": "<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>",
"discount": 5,
"discount_type": "percentage",
"discount_val": 1000,
"tax": 0,
"sub_total": 20000,
"total": 19000,
"sent_at": null,
"estimate_pdf_url": "https://payments.your-domain.com/estimates/pdf/99745a4e-7a6b-4be4-a87e-2826e457ae06",
"attachments": [],
"reject_reason": null,
"customer": {},
"tax_per_item_enabled": false,
"discount_per_item_enabled": false,
"vendor": {},
"created_at": 1667663245,
"billing_address": {},
"shipping_address": {},
"allowed_estimate_states": [
"OPEN", "VOID", "CONVERTED"
],
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
}, {...}
]
}
Create a estimate
This endpoint allows you to create an estimate.
- An Estimate must have at least one line item.
- An Estimate must have a reference to a customer.
- If shipping address and billing address are not provided, the address from the referenced Customer is used.
Body Parameters
- Name
estimate_date
- Type
- timestamp
- Field Type
required
- Description
Date of the estimate.
- Name
expiry_date
- Type
- timestamp
- Field Type
required
- Description
Due Date.
- Name
customer_business_id
- Type
- string
- Field Type
required
- Description
Customer Business ID.
- Name
estimate_number
- Type
- string
- Field Type
required
- Description
Estimate Number.
- Name
template_name
- Type
- string
- Field Type
required
- Description
Name of the template to be used for the Estimate PDF.
- Name
discount
- Type
- float
- Field Type
optional
- Description
Discount value. Pass percentage of the discount or the amount if the discount is fixed in cents. Example: 10 (percentage) or 1000(fixed).
- Name
discount_type
- Type
- string
- Field Type
optional
- Description
Type of discount: fixed or percentage.
- Name
tax_type_ids
- Type
- array
- Field Type
optional
- Description
Array of Tax type IDs.
- Name
notes
- Type
- string
- Field Type
optional
- Description
Estimate Notes.
- Name
items[].name
- Type
- string
- Field Type
required
- Description
Name of Item.
- Name
items[].quantity
- Type
- string
- Field Type
required
- Description
Item Quantity.
- Name
items[].price
- Type
- string
- Field Type
required
- Description
Item Price in cents.
- Name
items[].description
- Type
- string
- Field Type
optional
- Description
Item Description.
- Name
items[].item_id
- Type
- string
- Field Type
optional
- Description
Item ID.
- Name
items[].unit_name
- Type
- string
- Field Type
optional
- Description
Item Unit Name.
- Name
items[].discount
- Type
- float
- Field Type
optional
- Description
Actual discount value that appears on the PDF. Pass percentage of the discount or the amount if the discount is fixed.
- Name
items[].discount_type
- Type
- string
- Field Type
optional
- Description
Type of discount: fixed or percentage.
- Name
items[].tax_type_ids
- Type
- array
- Field Type
optional
- Description
Array of Tax type IDs.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"estimate_date\": \"357177600\",
\"expiry_date\": \"1651795200\",
\"customer_business_id\": \"98ed68ce-6964-4c2a-9430-8a849e373c52\",
\"estimate_number\": \"EST-000001\",
\"discount_type\": \"percentage\",
\"discount\": \"5\",
\"notes\": \"<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>\",
\"template_name\": \"estimate1\",
\"items\": [
{
\"name\": \"Laptop\",
\"quantity\": \"2\",
\"price\": \"10000\",
\"description\": \"New Laptop with latest features\",
\"item_id\": \"9911d6af-02ee-40dd-b8da-95df7301bd18\",
\"unit_name\": \"box\",
\"discount\": \"0\",
\"discount_type\": \"fixed\"
}
]
}"
Response
{
"data": {
"id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"estimate_date": 1017705600,
"expiry_date": 1594944000,
"customer_business_id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"estimate_number": "EST-000001",
"template_name": "estimate1",
"items" : [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "Laptop",
"description": "New Laptop with latest features",
"discount_type": "fixed",
"quantity": 2,
"unit_name": "box",
"discount": 0,
"discount_val": 0,
"price": 10000,
"tax": 0,
"total": 20000,
"item_id": "9911d6af-02ee-40dd-b8da-95df7301bd18",
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
],
"sequence_number": 1,
"status": "DRAFT",
"notes": "<p>The total amount of the attached estimate EST-000001 is $190.00</p>",
"notes_raw": "<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>",
"discount": 5,
"discount_type": "percentage",
"discount_val": 1000,
"tax": 0,
"sub_total": 20000,
"total": 19000,
"sent_at": null,
"estimate_pdf_url": "https://payments.your-domain.com/estimates/pdf/99745a4e-7a6b-4be4-a87e-2826e457ae06",
"attachments": [],
"reject_reason": null,
"customer": {},
"tax_per_item_enabled": false,
"discount_per_item_enabled": false,
"created_at": 1667663245,
"billing_address": {},
"shipping_address": {},
"allowed_estimate_states": [
"OPEN", "VOID", "CONVERTED"
],
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
}
}
Retrieve an estimate
This endpoint allows you to retrieve an estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"estimate_date": 1017705600,
"expiry_date": 1594944000,
"customer_business_id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"estimate_number": "EST-000001",
"template_name": "estimate1",
"items" : [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "Laptop",
"description": "New Laptop with latest features",
"discount_type": "fixed",
"quantity": 2,
"unit_name": "box",
"discount": 0,
"discount_val": 0,
"price": 10000,
"tax": 0,
"total": 20000,
"item_id": "9911d6af-02ee-40dd-b8da-95df7301bd18",
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
],
"sequence_number": 1,
"status": "DRAFT",
"notes": "<p>The total amount of the attached estimate EST-000001 is $190.00</p>",
"notes_raw": "<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>",
"discount": 5,
"discount_type": "percentage",
"discount_val": 1000,
"tax": 0,
"sub_total": 20000,
"total": 19000,
"sent_at": null,
"estimate_pdf_url": "https://payments.your-domain.com/estimates/pdf/99745a4e-7a6b-4be4-a87e-2826e457ae06",
"attachments": [],
"reject_reason": null,
"customer": {},
"tax_per_item_enabled": false,
"discount_per_item_enabled": false,
"vendor": {},
"created_at": 1667663245,
"billing_address": {},
"shipping_address": {},
"allowed_estimate_states": [
"OPEN", "VOID", "CONVERTED"
],
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
}
}
Update an estimate
This endpoint allows you to perform an update on estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Body Parameters
- Name
estimate_date
- Type
- timestamp
- Field Type
optional
- Description
Date of the estimate.
- Name
expiry_date
- Type
- timestamp
- Field Type
optional
- Description
Due Date.
- Name
estimate_number
- Type
- string
- Field Type
optional
- Description
Estimate Number.
- Name
template_name
- Type
- string
- Field Type
optional
- Description
Name of the template to be used for the Estimate PDF.
- Name
discount_type
- Type
- string
- Field Type
optional
- Description
Type of discount: fixed or percentage.
- Name
discount
- Type
- float
- Field Type
optional
- Description
Discount value. Pass percentage of the discount or the amount if the discount is fixed in cents. Example: 10 (percentage) or 1000(fixed).
- Name
tax_type_ids
- Type
- array
- Field Type
optional
- Description
Array of Tax type IDs.
- Name
notes
- Type
- string
- Field Type
optional
- Description
Estimate Notes.
- Name
items[].name
- Type
- string
- Field Type
optional
- Description
Name of Item.
- Name
items[].quantity
- Type
- string
- Field Type
optional
- Description
Item Quantity.
- Name
items[].price
- Type
- string
- Field Type
optional
- Description
Item Price in cents.
- Name
items[].description
- Type
- string
- Field Type
optional
- Description
Item Description.
- Name
items[].item_id
- Type
- string
- Field Type
optional
- Description
Item ID.
- Name
items[].unit_name
- Type
- string
- Field Type
optional
- Description
Item Unit Name.
- Name
items[].discount
- Type
- float
- Field Type
optional
- Description
Actual discount value that appears on the PDF. Pass percentage of the discount or the amount if the discount is fixed.
- Name
items[].discount_type
- Type
- string
- Field Type
optional
- Description
Type of discount: fixed or percentage.
- Name
items[].tax_type_ids
- Type
- array
- Field Type
optional
- Description
Array of Tax type IDs.
Request
curl --request PUT \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"estimate_date\": \"357177600\",
\"expiry_date\": \"1651795200\",
\"estimate_number\": \"EST-000001\",
\"discount_type\": \"percentage\",
\"discount\": \"5\",
\"notes\": \"<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>\",
\"template_name\": \"estimate1\",
\"items\": [
{
\"name\": \"Apple Macbook\",
\"quantity\": \"2\",
\"price\": \"10000\",
\"description\": \"Light and powerful laptop\",
\"item_id\": \"9911d6af-02ee-40dd-b8da-95df7301bd18\",
\"unit_name\": \"box\",
\"discount\": \"0\",
\"discount_type\": \"fixed\"
}
]
}"
Response
{
"data": {
"id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"estimate_date": 1017705600,
"expiry_date": 1594944000,
"customer_business_id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"estimate_number": "EST-000001",
"template_name": "estimate1",
"items" : [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "Apple Macbook",
"description": "Light and powerful laptop",
"discount_type": "fixed",
"quantity": 2,
"unit_name": "box",
"discount": 0,
"discount_val": 0,
"price": 10000,
"tax": 0,
"total": 20000,
"item_id": "9911d6af-02ee-40dd-b8da-95df7301bd18",
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
],
"sequence_number": 1,
"status": "DRAFT",
"notes": "<p>The total amount of the attached estimate EST-000001 is $190.00</p>",
"notes_raw": "<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>",
"discount": 5,
"discount_type": "percentage",
"discount_val": 1000,
"tax": 0,
"sub_total": 20000,
"total": 19000,
"sent_at": null,
"estimate_pdf_url": "https://payments.your-domain.com/estimates/pdf/99745a4e-7a6b-4be4-a87e-2826e457ae06",
"attachments": [],
"reject_reason": null,
"customer": {},
"tax_per_item_enabled": false,
"discount_per_item_enabled": false,
"created_at": 1667663245,
"billing_address": {},
"shipping_address": {},
"allowed_estimate_states": [
"OPEN", "VOID", "CONVERTED"
],
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
}
}
Delete estimate
This endpoint allows you to delete a specific Estimate
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"object": "Estimate",
"deleted": true
}
Send an estimate
This endpoint allows you to send the estimate link to the corresponding customer's email address.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Body Parameters
- Name
subject
- Type
- string
- Field Type
required
- Description
Subject of the email.
- Name
body
- Type
- string
- Field Type
required
- Description
Body of the email.
- Name
reply_to
- Type
- string
- Field Type
required
- Description
Reply to email address.
- Name
to
- Type
- string
- Field Type
required
- Description
Email address of the recipient.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/send-email" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"subject\": \"You have received a new estimate from {VENDOR_BUSINESS_NAME}\",
\"body\": \"<p>You have received a new estimate from {BUSINESS_NAME}.</p><p>Please view the estimate and approve it within 7 days of receiving this email.</p>\",
\"reply_to\": \"business_email@example.com\",
\"to\": \"customer_email@example.com\"
}"
Approve an incoming estimate
This endpoint allows you mark an estimate as APPROVED.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/9972ba71-7508-4fb0-955a-4f83be3461fc/approve" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Finalize an estimate
This endpoint allows you mark an estimate as OPEN.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/9972ba71-7508-4fb0-955a-4f83be3461fc/finalize" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Void an estimate
This endpoint allows you mark an estimate as VOID.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/9972ba71-7508-4fb0-955a-4f83be3461fc/void" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Reject an incoming estimate.
This endpoint allows you to mark the given estimate as REJECTED.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Body Parameters
- Name
reason
- Type
- string
- Field Type
required
- Description
Reason for rejection.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/reject" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"reason\": \"Price too high\"
}"
Convert into invoice
This endpoint allows you to convert the given estimate into an invoice.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/convert-to-invoice" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"invoice_number": "INV-000001",
"invoice_date": 1017705600,
"due_date": 1594944000,
"customer_business_id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"template_name": "invoice1",
"items" : [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "Apple Macbook",
"description": "Light and powerful laptop",
"discount_type": "fixed",
"quantity": 2,
"unit_name": "box",
"discount": 0,
"discount_val": 0,
"price": 10000,
"tax": 0,
"total": 20000,
"item_id": "9911d6af-02ee-40dd-b8da-95df7301bd18",
"invoice_id": "9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
],
"sequence_number": 1,
"status": "DRAFT",
"notes": "<p>The total amount of the attached estimate EST-000001 is $190.00</p>",
"notes_raw": "<p>The total amount of the attached estimate {ESTIMATE_NUMBER} is {TOTAL_AMOUNT}</p>",
"discount": 5,
"discount_type": "percentage",
"discount_val": 1000,
"tax": 0,
"sub_total": 20000,
"sent_at": null,
"viewed_at": null,
"approved_at": null,
"overdue_at": null,
"invoice_pdf_url": "https://payments.your-domain.com/invoices/pdf/9aae0110-a4d6-4552-99de-4b4d3e3432f8",
"attachments": [],
"customer": {},
"tax_per_item_enabled": false,
"discount_per_item_enabled": false,
"created_at": 1667663245,
"billing_address": {},
"shipping_address": {},
"paid_status": "UNPAID",
"total": 19000,
"due_amount": 19000,
"sent_to_oatfi": null,
"vendor_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"scheduled_date": null,
"payee_loan_status": "DRAFT",
"payor_loan_status": "DRAFT",
"allowed_paid_invoice_states": [
"PARTIALLY_PAID",
"PAID"
],
"integrations": [],
"recurring_auto_pay_authorized": false
}
}
Next Sequence Number
This endpoint allows you to get the next Sequence Number for an Estimate.
Query Parameters
- Name
model
- Type
- string
- Field Type
required
- Description
Must be estimate
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/next-number?model=estimate" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"next_number": "EST-000001",
"next_sequence_number": 1
}
List all attachment of an estimate
This endpoint is used to get all attachments of an estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/attachments" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": 17,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"name": "logo-dark",
"path": null,
"url": null,
"size": 151922,
"mime_type": "image/png"
}, {...}
]
}
Add attachment to an estimate
This endpoint is used to upload attachments to an estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Body Parameters
- Name
attachments
- Type
- array
- Field Type
required
- Description
Array of attachments to be uploaded.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/attachments" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--header "Content-Type: multipart/form-data" \
--form 'attachments[]=@"/path_to_attachment/crater_attachment.png"'
Response
{
"data": [
{
"id": 17,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"name": "crater_attachment.png",
"path": null,
"url": null,
"size": 151922,
"mime_type": "image/png"
}
]
}
Retrieve attachment of an estimate
This endpoint is used to get all attachments of an estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
- Name
attachment_id
- Type
- integer
- Field Type
required
- Description
The ID of the attachment.
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/attachments/17" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": 17,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"name": "logo-dark",
"path": null,
"url": null,
"size": 151922,
"mime_type": "image/png"
}
]
}
Remove attachment from an estimate
This endpoint is used to remove attachment from an estimate.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
- Name
attachment_id
- Type
- integer
- Field Type
required
- Description
The ID of the attachment.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/attachments/17" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"id": 17,
"object": "Attachment",
"deleted": true,
}
The EstimateLink model
Estimate Links provide a convenient way to facilitate the approval or rejection of estimates. Generated using the estimate ID, these links enable efficient collaboration between businesses and customers. By sharing the Estimate Link, customers can easily review and take action on the estimate, streamlining the approval process and enhancing communication in the estimation workflow.
Properties
- Name
id
- Type
- string
- Field Type
- Description
Unique identifier for the estimate link.
- Name
url
- Type
- string
- Field Type
- Description
The url of the estimate link.
- Name
expiry_date
- Type
- timestamp
- Field Type
- Description
The expiry date of the estimate link.
List all estimate links
This endpoint allows you to retrieve a paginated list of all your estimate links.
URL Parameters
- Name
estimate_id
- Type
- string
- Field Type
required
- Description
The ID of the estimate.
Query Parameters
- Name
limit
- Type
- integer
- Field Type
optional
- Description
A limit on the number of estimate links to be returned. (default is 5)
- Name
page
- Type
- integer
- Field Type
optional
- Description
Page number for pagination. (default is 1)
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/links" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": "9994644f-ea38-4fa9-9da0-635839446f40",
"url": "https://payments.your-domain.com/public/estimates/view/9994644f-ea38-4fa9-9da0-635839446f40?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": 1689565444,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
},
{
"id": "9990ee27-2ce2-46a4-87b8-545aea88cc55",
"url": "https://payments.your-domain.com/public/estimates/view/9990ee27-2ce2-46a4-87b8-545aea88cc55?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": 1689565444,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}, {...}
]
}
Create an estimate link
This endpoint allows you to create a new estimate link.
URL Parameters
- Name
estimate_id
- Type
- string
- Field Type
required
- Description
The id of the estimate.
Body Parameters
- Name
expiry_date
- Type
- timestamp
- Field Type
optional
- Description
The expiry date of the estimate link.
Must not exceed 7 days from the current date. (default expiry is 1 hour from the current date if not specified)
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/links" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data '{"expiry_date": "1689565444"}'
Response
{
"data": {
"id": "9994644f-ea38-4fa9-9da0-635839446f40",
"url": "https://payments.your-domain.com/public/estimates/view/9994644f-ea38-4fa9-9da0-635839446f40?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": 1689565444,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Retrieve an estimate link
This endpoint allows you to retrieve an estimate link.
URL Parameters
- Name
estimate_id
- Type
- string
- Field Type
required
- Description
The id of the estimate.
- Name
estimate_link_id
- Type
- string
- Field Type
required
- Description
The id of the estimate link.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/links/9994644f-ea38-4fa9-9da0-635839446f40" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "9994644f-ea38-4fa9-9da0-635839446f40",
"url": "https://payments.your-domain.com/public/estimates/view/9994644f-ea38-4fa9-9da0-635839446f40?
signature=e33c035bd56b9951f5191f6803fb5e03d46c1a014134b3a394dd80ca94665e43",
"expiry_date": 1689565444,
"estimate_id": "99745a4e-7a6b-4be4-a87e-2826e457ae06",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Delete an estimate link
This endpoint allows you to delete a specific estimate link
URL Parameters
- Name
estimate_id
- Type
- string
- Field Type
required
- Description
The id of the estimate.
- Name
estimate_link_id
- Type
- string
- Field Type
required
- Description
The id of the estimate link.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v1/estimates/99745a4e-7a6b-4be4-a87e-2826e457ae06/links/9994644f-ea38-4fa9-9da0-635839446f40" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"id": "9994644f-ea38-4fa9-9da0-635839446f40",
"object": "EstimateLink",
"deleted": true
}