curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tax_rate": "0.00",
"title": "some string"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId}"
payload = {
"tax_rate": "0.00",
"title": "some string"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tax_rate: '0.00', title: 'some string'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL or object not found"
}{
"message": "Internal Server Error"
}Update estimate by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tax_rate": "0.00",
"title": "some string"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId}"
payload = {
"tax_rate": "0.00",
"title": "some string"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tax_rate: '0.00', title: 'some string'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/estimates/{estimateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL or object not found"
}{
"message": "Internal Server Error"
}{
"customer_id"// optional | nullable | integer | required if job_id is not set and is_template is not set or false | existing customer id
"job_id"// optional | nullable | integer | required if is_template is not set or false | existing job id
"status_id"// optional | integer | existing estimate type custom status id
"status_workflow_id"// optional | integer | existing estimate type status workflow id
"notes"// optional | string | max:4000
"invoiced_date"// optional | nullable | timestamp
"due_date"// optional | nullable | timestamp
"tax_rate"// required | string | numeric | example: "0.00"
"is_template"// optional | boolean | Description: if true, the estimate will be template
"title"// optional | string | max:255
"author_id"// optional | nullable | integer | existing user id
"location_id"// optional | nullable | integer | existing location id
"contract_id"// optional | nullable | integer | existing contract id
"commission_type"// optional | integer | between:0,3
"commission_percent"// optional | integer | between:0,100
"invoice_use_logo"// optional | nullable | boolean
"invoice_show_line_item_unit_price"// optional | nullable | boolean
"invoice_show_line_item_qty"// optional | nullable | boolean
"invoice_show_line_item_taxed"// optional | nullable | boolean
"invoice_show_line_item_total"// optional | nullable | boolean
"invoice_show_line_item_desc"// optional | nullable | boolean
"invoice_show_line_item_sku"// optional | nullable | boolean
"invoice_show_total_tax"// optional | nullable | boolean
"invoice_show_job_title"// optional | nullable | boolean
"invoice_show_job_location"// optional | nullable | boolean
"invoice_show_assigned_members"// optional | nullable | boolean
"invoice_show_author"// optional | nullable | boolean
"invoice_show_service_address"// optional | nullable | boolean
"invoice_contract_signature_lines"// optional | integer | between:0,2
"invoice_amount_due_display_type"// optional | string | acceptable_values: remaining_balance,set_amount,percentage_of_total,none
"invoice_amount_due_display_value"// optional | string
"invoice_pdf_title"// optional | string | max:100
"estimate_status"// optional | integer
"theme_id"// optional | nullable | integer | existing theme id
"internal_notes"// optional | nullable | string
"reference"// optional | nullable | string
"hvi"// optional | numeric
"company_profile_id"// optional | nullable | integer | existing alternate company profile id
"maintenance_agreement_id"// optional | nullable | integer | existing maintenance agreement id
"maintenance_occurrence_id"// optional | nullable | integer | existing maintenance occurrence id
"occurrence_date"// optional | nullable | required when maintenance agreement id is set and maintenance occurrence id is empty
"qbd_class_id" // optional | nullable | integer | existing Quickbook Class id
"qbd_discount_id" // optional | nullable | integer | existing Quickbook Discount Item id
"qbo_sales_tax_code_id" // optional | nullable | integer | existing Quickbook Tax Code id
"display_settings": {// optional | nullable | object
"show_payment_button"// required | boolean
"show_signature_button"// required | boolean
"show_company_title"// optional | boolean
"is_customer_phone_visible"// optional | boolean
"is_modified_customer"// optional | boolean
"modified_customer_display_name"// optional | string
"modified_customer_display_address"// optional | string
}
"estimate_display_settings": {// optional | nullable | object
"show_payment_button"// required | boolean
"show_company_title"// optional | boolean
"is_customer_phone_visible"// optional | boolean
}
"expenses": [// optional | nullable | array of objects
{
"amount"// required | string | numeric
"description"// optional | string | max:1000
"title"// required | string | min:3 | max:60
"type"// required | string | acceptable_values: service,product
}
]
"options": [// optional | nullable | array of objects
{
"is_selected"// required | boolean
"is_default"// required | boolean
"group_number"// required | integer
"title"// optional | nullable | string
"description"// optional | nullable | string
"photo_id"// optional | nullable | integer | existing file id
"qbd_discount_id"// optional | nullable | integer | existing Quickbook Discount Item id
"tab_title"// optional | nullable | string
"line_discount": { // optional | nullable | object
"title"// required | string
"description"// optional | nullable | string
"type"// required | string
"amount"// required | string | numeric | example: "0.00"
}
}
]
"add_on_options": [// optional | nullable | array of objects
{
"is_selected"// required | boolean
"is_default"// required | boolean
"group_number"// required | integer
"title"// optional | nullable | string
"description"// optional | nullable | string
"photo_id"// optional | nullable | integer | existing file id
"tab_title"// optional | nullable | string
}
]
"line_items": [ // optional | nullable | array of objects | required if company xero is enabled and not_optional_line_items is not set
{
"line_number"// required | nullable | integer
"line_type"// optional | nullable | string | accepatable_values: item, group
"line_title"// required | nullable | string
"line_description"// optional | nullable | string
"line_price_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_quantity"// nullable | numeric
"is_selected"// nullable | boolean
"is_optional"// nullable | boolean
"qbo_group_item_ref"// optional | nullable | string
"source"// optional | nullable | integer
"group_number"// nullable | integer
"commission_amount"// nullable | string | numeric | example: "0.00"
"hvi_amount"// string | numeric | example: "0.00"
"pricebook_id" // nullable | integer | existing Pricebook id
"flat_rate_job_id" // nullable | integer | existing pricebook flat rate job id
"line_components": [
{
"id"// required | integer | existing item id
"title"// optional | string |
"description"// optional | string | required if title is not set
"xero_sales_account"// optional | nullable | string | max:1000
"xero_tax_account"// optional | nullable | string | max:1000
"tax_rate"// optional | string | max:1000 | example: "0.00"
"file_ids"// optional | array | description: array of existing file ids
"price_update_method"// nullable | string | accepatable_values: set_price_manually,automatic_markup,use_cmp_pricing
"automatic_markup_percentage"// nullable | string | required, if price_update_method is automatic_markup
"line_discount"// nullable | array
"line_surcharge"// nullable | array
"serialized_inventory_id"// nullable | integer
"qbo_line_item_id"// nullable | integer
"qbo_sales_tax_code_id"// optional | nullable | integer | existing Quickbook Tax Code id
"unit_price"// required | numeric
"quantity"// required | numeric
"taxable": // required | boolean
}
]
}
]
"optional_line_items": [
{
"line_number"// required | nullable | integer
"line_type"// optional | nullable | string | accepatable_values: item, group
"line_title"// required | nullable | string
"line_description"// optional | nullable | string
"line_price_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_quantity"// nullable | numeric
"is_selected"// nullable | boolean
"is_optional"// nullable | boolean
"qbo_group_item_ref"// optional | nullable | string
"source"// optional | nullable | integer
"group_number"// nullable | integer
"commission_amount"// nullable | string | numeric | example: "0.00"
"hvi_amount"// string | numeric | example: "0.00"
"pricebook_id" // nullable | integer | existing Pricebook id
"flat_rate_job_id" // nullable | integer | existing pricebook flat rate job id
"line_components": [
{
"id"// required | integer | existing item id
"title"// optional | string |
"description"// optional | string | required if title is not set
"xero_sales_account"// optional | nullable | string | max:1000
"xero_tax_account"// optional | nullable | string | max:1000
"tax_rate"// optional | string | max:1000 | example: "0.00"
"file_ids"// optional | array | description: array of existing file ids
"price_update_method"// nullable | string | accepatable_values: set_price_manually,automatic_markup,use_cmp_pricing
"automatic_markup_percentage"// nullable | string | required, if price_update_method is automatic_markup
"line_discount"// nullable | array
"line_surcharge"// nullable | array
"serialized_inventory_id"// nullable | integer
"qbo_line_item_id"// nullable | integer
"qbo_sales_tax_code_id"// optional | nullable | integer | existing Quickbook Tax Code id
"unit_price"// required | numeric
"quantity"// required | numeric
"taxable" // required | boolean
}
]
}
]
"not_optional_line_items": [
{
"line_number"// required | nullable | integer
"line_type"// optional | nullable | string | accepatable_values: item, group
"line_title"// required | nullable | string
"line_description"// optional | nullable | string
"line_price_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_visibility"// required | nullable | string | accepatable_values: all, component, group
"line_quantity"// nullable | numeric
"is_selected"// nullable | boolean
"is_optional"// nullable | boolean
"qbo_group_item_ref"// optional | nullable | string
"source"// optional | nullable | integer
"group_number"// nullable | integer
"commission_amount"// nullable | string | numeric | example: "0.00"
"hvi_amount"// string | numeric | example: "0.00"
"pricebook_id" // nullable | integer | existing Pricebook id
"flat_rate_job_id" // nullable | integer | existing pricebook flat rate job id
"line_components": [
{
"id"// required | integer | existing item id
"title"// optional | string |
"description"// optional | string | required if title is not set
"xero_sales_account"// optional | nullable | string | max:1000
"xero_tax_account"// optional | nullable | string | max:1000
"tax_rate"// optional | string | max:1000 | example: "0.00"
"file_ids"// optional | array | description: array of existing file ids
"price_update_method"// nullable | string | accepatable_values: set_price_manually,automatic_markup,use_cmp_pricing
"automatic_markup_percentage"// nullable | string | required, if price_update_method is automatic_markup
"line_discount"// nullable | array
"line_surcharge"// nullable | array
"serialized_inventory_id"// nullable | integer
"qbo_line_item_id"// nullable | integer
"qbo_sales_tax_code_id"// optional | nullable | integer | existing Quickbook Tax Code id
"unit_price"// required | numeric
"quantity"// required | numeric
"taxable" // required | boolean
}
]
}
],
"customfields": [ // optional | array | description: array of custom fleds
{
"id" // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id" // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
},
{
"id" // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id" // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
}
],
// THis is for sending invoice via email
"emaildata": {// optional | nullable | object
"from_name"// required | string | max:255
"from_email"// required| email | max:255
"to_email"// required| email | max:255
"cc_address"// optional | comma separated emails
"bcc_address"// optional | comma separated emails
"subject"// required | string | max:500
"body"// required | string
"payment_request_amount"// optional | nullable | numeric | min:0
"payment_request_amount_type"// optional | nullable | string | accepatable_values: amount, percent
"attachment_ids"// optional | nullable | array | existing file ids
"visible_file_ids"// optional | nullable | array | existing file ids
"visible_folder_ids"// optional | nullable | array | existing folder ids
"attach_dynamic_url_to_email"// optional | nullable | boolean
"show_signature_request"// optional | nullable | boolean
"show_payment_request"// optional | nullable | boolean
"is_credit_card_payment_enabled"// optional | nullable | boolean
"is_ach_payment_enabled"// optional | nullable | boolean
"is_pdf_send_mode"// optional | nullable | boolean
"is_dynamic_send_mode"// optional | nullable | boolean
"include_invoice_pdf"// optional | nullable | boolean
"is_card_fee_recovery_enabled"// optional | nullable | boolean
}
}
Authorizations
Path Parameters
Body
A number, sent as a string.
Required if job_id is not set and is_template is not set or false. Existing customer id.
Required if is_template is not set or false. Existing job id.
Existing estimate type custom status id.
Existing estimate type status workflow id.
4000Unix timestamp.
Unix timestamp.
If true, the estimate will be template.
255Existing user id.
Existing location id.
Existing contract id.
0 <= x <= 30 <= x <= 1000 <= x <= 2remaining_balance, set_amount, percentage_of_total, none 100Existing theme id.
Existing alternate company profile id.
Existing maintenance agreement id.
Existing maintenance occurrence id.
Required when maintenance agreement id is set and maintenance occurrence id is empty.
Existing Quickbook Class id.
Existing Quickbook Discount Item id.
Existing Quickbook Tax Code id.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Existing file id.
Existing Quickbook Discount Item id.
Hide child attributes
Hide child attributes
Required if company xero is enabled and not_optional_line_items is not set.
Hide child attributes
Hide child attributes
all, component, group all, component, group item, group A number, sent as a string.
A number, sent as a string.
Existing Pricebook id.
Existing pricebook flat rate job id.
Hide child attributes
Hide child attributes
Existing item id.
Required if title is not set.
100010001000Array of existing file ids.
set_price_manually, automatic_markup, use_cmp_pricing Required if price_update_method is automatic_markup.
Existing Quickbook Tax Code id.
Hide child attributes
Hide child attributes
all, component, group all, component, group item, group A number, sent as a string.
A number, sent as a string.
Existing Pricebook id.
Existing pricebook flat rate job id.
Hide child attributes
Hide child attributes
Existing item id.
Required if title is not set.
100010001000Array of existing file ids.
set_price_manually, automatic_markup, use_cmp_pricing Required if price_update_method is automatic_markup.
Existing Quickbook Tax Code id.
Hide child attributes
Hide child attributes
all, component, group all, component, group item, group A number, sent as a string.
A number, sent as a string.
Existing Pricebook id.
Existing pricebook flat rate job id.
Hide child attributes
Hide child attributes
Existing item id.
Required if title is not set.
100010001000Array of existing file ids.
set_price_manually, automatic_markup, use_cmp_pricing Required if price_update_method is automatic_markup.
Existing Quickbook Tax Code id.
Hide child attributes
Hide child attributes
255255255500Comma separated emails.
Comma separated emails.
x >= 0amount, percent Existing file ids.
Existing file ids.
Existing folder ids.
Was this page helpful?