Create an invoice
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_id": "",
"job_id": "",
"status": "",
"status_id": "",
"status_workflow_id": "",
"notes": "",
"invoiced_date": "",
"due_date": "",
"tax_rate": "",
"is_template": "",
"title": "",
"author_id": "",
"location_id": "",
"contract_id": "",
"commission_type": "",
"commission_percent": "",
"invoice_use_logo": "",
"invoice_show_line_item_unit_price": "",
"invoice_show_line_item_qty": "",
"invoice_show_line_item_taxed": "",
"invoice_show_line_item_total": "",
"invoice_show_line_item_desc": "",
"invoice_show_line_item_sku": "",
"invoice_show_total_tax": "",
"invoice_show_job_title": "",
"invoice_show_job_location": "",
"invoice_show_assigned_members": "",
"invoice_show_author": "",
"invoice_show_service_address": "",
"invoice_contract_signature_lines": "",
"invoice_amount_due_display_type": "",
"invoice_amount_due_display_value": "",
"invoice_pdf_title": "",
"estimate_status": "",
"theme_id": "",
"internal_notes": "",
"reference": "",
"hvi": "",
"company_profile_id": "",
"maintenance_agreement_id": "",
"maintenance_occurrence_id": "",
"occurrence_date": "",
"qbd_class_id": "",
"qbd_discount_id": "",
"qbo_sales_tax_code_id": "",
"display_settings": {
"show_payment_button": "",
"show_signature_button": "",
"show_company_title": "",
"is_customer_phone_visible": "",
"is_modified_customer": "",
"modified_customer_display_name": "",
"modified_customer_display_address": ""
},
"estimate_display_settings": {
"show_payment_button": "",
"show_company_title": "",
"is_customer_phone_visible": ""
},
"expenses": [
{
"amount": "",
"description": "",
"title": "",
"type": ""
}
],
"options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"qbd_discount_id": "",
"tab_title": "",
"line_discount": {
"title": "",
"description": "",
"type": "",
"amount": ""
}
}
],
"add_on_options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"tab_title": ""
}
],
"line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"not_optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"payments": [
{
"invoice_id": "",
"payment_date": "",
"amount": "",
"method": "",
"payment_method_id": "",
"qbd_discount_account_id": "",
"qbd_discount_amount": "",
"notes": "",
"square_transaction_id": "",
"can_sync_with_integrations": ""
}
],
"customfields": [
{
"id": "",
"field_instance_id": "",
"value": ""
},
{
"id": "",
"field_instance_id": "",
"value": ""
}
],
"emaildata": {
"from_name": "",
"from_email": "",
"to_email": "",
"cc_address": "",
"bcc_address": "",
"subject": "",
"body": "",
"payment_request_amount": "",
"payment_request_amount_type": "",
"attachment_ids": "",
"visible_file_ids": "",
"attach_dynamic_url_to_email": "",
"show_signature_request": "",
"show_payment_request": "",
"is_credit_card_payment_enabled": "",
"is_ach_payment_enabled": "",
"is_pdf_send_mode": "",
"is_dynamic_send_mode": "",
"include_invoice_pdf": "",
"is_card_fee_recovery_enabled": ""
}
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices"
payload = {
"customer_id": "",
"job_id": "",
"status": "",
"status_id": "",
"status_workflow_id": "",
"notes": "",
"invoiced_date": "",
"due_date": "",
"tax_rate": "",
"is_template": "",
"title": "",
"author_id": "",
"location_id": "",
"contract_id": "",
"commission_type": "",
"commission_percent": "",
"invoice_use_logo": "",
"invoice_show_line_item_unit_price": "",
"invoice_show_line_item_qty": "",
"invoice_show_line_item_taxed": "",
"invoice_show_line_item_total": "",
"invoice_show_line_item_desc": "",
"invoice_show_line_item_sku": "",
"invoice_show_total_tax": "",
"invoice_show_job_title": "",
"invoice_show_job_location": "",
"invoice_show_assigned_members": "",
"invoice_show_author": "",
"invoice_show_service_address": "",
"invoice_contract_signature_lines": "",
"invoice_amount_due_display_type": "",
"invoice_amount_due_display_value": "",
"invoice_pdf_title": "",
"estimate_status": "",
"theme_id": "",
"internal_notes": "",
"reference": "",
"hvi": "",
"company_profile_id": "",
"maintenance_agreement_id": "",
"maintenance_occurrence_id": "",
"occurrence_date": "",
"qbd_class_id": "",
"qbd_discount_id": "",
"qbo_sales_tax_code_id": "",
"display_settings": {
"show_payment_button": "",
"show_signature_button": "",
"show_company_title": "",
"is_customer_phone_visible": "",
"is_modified_customer": "",
"modified_customer_display_name": "",
"modified_customer_display_address": ""
},
"estimate_display_settings": {
"show_payment_button": "",
"show_company_title": "",
"is_customer_phone_visible": ""
},
"expenses": [
{
"amount": "",
"description": "",
"title": "",
"type": ""
}
],
"options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"qbd_discount_id": "",
"tab_title": "",
"line_discount": {
"title": "",
"description": "",
"type": "",
"amount": ""
}
}
],
"add_on_options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"tab_title": ""
}
],
"line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"not_optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"payments": [
{
"invoice_id": "",
"payment_date": "",
"amount": "",
"method": "",
"payment_method_id": "",
"qbd_discount_account_id": "",
"qbd_discount_amount": "",
"notes": "",
"square_transaction_id": "",
"can_sync_with_integrations": ""
}
],
"customfields": [
{
"id": "",
"field_instance_id": "",
"value": ""
},
{
"id": "",
"field_instance_id": "",
"value": ""
}
],
"emaildata": {
"from_name": "",
"from_email": "",
"to_email": "",
"cc_address": "",
"bcc_address": "",
"subject": "",
"body": "",
"payment_request_amount": "",
"payment_request_amount_type": "",
"attachment_ids": "",
"visible_file_ids": "",
"attach_dynamic_url_to_email": "",
"show_signature_request": "",
"show_payment_request": "",
"is_credit_card_payment_enabled": "",
"is_ach_payment_enabled": "",
"is_pdf_send_mode": "",
"is_dynamic_send_mode": "",
"include_invoice_pdf": "",
"is_card_fee_recovery_enabled": ""
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '',
job_id: '',
status: '',
status_id: '',
status_workflow_id: '',
notes: '',
invoiced_date: '',
due_date: '',
tax_rate: '',
is_template: '',
title: '',
author_id: '',
location_id: '',
contract_id: '',
commission_type: '',
commission_percent: '',
invoice_use_logo: '',
invoice_show_line_item_unit_price: '',
invoice_show_line_item_qty: '',
invoice_show_line_item_taxed: '',
invoice_show_line_item_total: '',
invoice_show_line_item_desc: '',
invoice_show_line_item_sku: '',
invoice_show_total_tax: '',
invoice_show_job_title: '',
invoice_show_job_location: '',
invoice_show_assigned_members: '',
invoice_show_author: '',
invoice_show_service_address: '',
invoice_contract_signature_lines: '',
invoice_amount_due_display_type: '',
invoice_amount_due_display_value: '',
invoice_pdf_title: '',
estimate_status: '',
theme_id: '',
internal_notes: '',
reference: '',
hvi: '',
company_profile_id: '',
maintenance_agreement_id: '',
maintenance_occurrence_id: '',
occurrence_date: '',
qbd_class_id: '',
qbd_discount_id: '',
qbo_sales_tax_code_id: '',
display_settings: {
show_payment_button: '',
show_signature_button: '',
show_company_title: '',
is_customer_phone_visible: '',
is_modified_customer: '',
modified_customer_display_name: '',
modified_customer_display_address: ''
},
estimate_display_settings: {show_payment_button: '', show_company_title: '', is_customer_phone_visible: ''},
expenses: [{amount: '', description: '', title: '', type: ''}],
options: [
{
is_selected: '',
is_default: '',
group_number: '',
title: '',
description: '',
photo_id: '',
qbd_discount_id: '',
tab_title: '',
line_discount: {title: '', description: '', type: '', amount: ''}
}
],
add_on_options: [
{
is_selected: '',
is_default: '',
group_number: '',
title: '',
description: '',
photo_id: '',
tab_title: ''
}
],
line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
optional_line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
not_optional_line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
payments: [
{
invoice_id: '',
payment_date: '',
amount: '',
method: '',
payment_method_id: '',
qbd_discount_account_id: '',
qbd_discount_amount: '',
notes: '',
square_transaction_id: '',
can_sync_with_integrations: ''
}
],
customfields: [
{id: '', field_instance_id: '', value: ''},
{id: '', field_instance_id: '', value: ''}
],
emaildata: {
from_name: '',
from_email: '',
to_email: '',
cc_address: '',
bcc_address: '',
subject: '',
body: JSON.stringify(''),
payment_request_amount: '',
payment_request_amount_type: '',
attachment_ids: '',
visible_file_ids: '',
attach_dynamic_url_to_email: '',
show_signature_request: '',
show_payment_request: '',
is_credit_card_payment_enabled: '',
is_ach_payment_enabled: '',
is_pdf_send_mode: '',
is_dynamic_send_mode: '',
include_invoice_pdf: '',
is_card_fee_recovery_enabled: ''
}
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Invoices
Create an invoice
Create an invoice
POST
/
invoices
Create an invoice
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_id": "",
"job_id": "",
"status": "",
"status_id": "",
"status_workflow_id": "",
"notes": "",
"invoiced_date": "",
"due_date": "",
"tax_rate": "",
"is_template": "",
"title": "",
"author_id": "",
"location_id": "",
"contract_id": "",
"commission_type": "",
"commission_percent": "",
"invoice_use_logo": "",
"invoice_show_line_item_unit_price": "",
"invoice_show_line_item_qty": "",
"invoice_show_line_item_taxed": "",
"invoice_show_line_item_total": "",
"invoice_show_line_item_desc": "",
"invoice_show_line_item_sku": "",
"invoice_show_total_tax": "",
"invoice_show_job_title": "",
"invoice_show_job_location": "",
"invoice_show_assigned_members": "",
"invoice_show_author": "",
"invoice_show_service_address": "",
"invoice_contract_signature_lines": "",
"invoice_amount_due_display_type": "",
"invoice_amount_due_display_value": "",
"invoice_pdf_title": "",
"estimate_status": "",
"theme_id": "",
"internal_notes": "",
"reference": "",
"hvi": "",
"company_profile_id": "",
"maintenance_agreement_id": "",
"maintenance_occurrence_id": "",
"occurrence_date": "",
"qbd_class_id": "",
"qbd_discount_id": "",
"qbo_sales_tax_code_id": "",
"display_settings": {
"show_payment_button": "",
"show_signature_button": "",
"show_company_title": "",
"is_customer_phone_visible": "",
"is_modified_customer": "",
"modified_customer_display_name": "",
"modified_customer_display_address": ""
},
"estimate_display_settings": {
"show_payment_button": "",
"show_company_title": "",
"is_customer_phone_visible": ""
},
"expenses": [
{
"amount": "",
"description": "",
"title": "",
"type": ""
}
],
"options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"qbd_discount_id": "",
"tab_title": "",
"line_discount": {
"title": "",
"description": "",
"type": "",
"amount": ""
}
}
],
"add_on_options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"tab_title": ""
}
],
"line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"not_optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"payments": [
{
"invoice_id": "",
"payment_date": "",
"amount": "",
"method": "",
"payment_method_id": "",
"qbd_discount_account_id": "",
"qbd_discount_amount": "",
"notes": "",
"square_transaction_id": "",
"can_sync_with_integrations": ""
}
],
"customfields": [
{
"id": "",
"field_instance_id": "",
"value": ""
},
{
"id": "",
"field_instance_id": "",
"value": ""
}
],
"emaildata": {
"from_name": "",
"from_email": "",
"to_email": "",
"cc_address": "",
"bcc_address": "",
"subject": "",
"body": "",
"payment_request_amount": "",
"payment_request_amount_type": "",
"attachment_ids": "",
"visible_file_ids": "",
"attach_dynamic_url_to_email": "",
"show_signature_request": "",
"show_payment_request": "",
"is_credit_card_payment_enabled": "",
"is_ach_payment_enabled": "",
"is_pdf_send_mode": "",
"is_dynamic_send_mode": "",
"include_invoice_pdf": "",
"is_card_fee_recovery_enabled": ""
}
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices"
payload = {
"customer_id": "",
"job_id": "",
"status": "",
"status_id": "",
"status_workflow_id": "",
"notes": "",
"invoiced_date": "",
"due_date": "",
"tax_rate": "",
"is_template": "",
"title": "",
"author_id": "",
"location_id": "",
"contract_id": "",
"commission_type": "",
"commission_percent": "",
"invoice_use_logo": "",
"invoice_show_line_item_unit_price": "",
"invoice_show_line_item_qty": "",
"invoice_show_line_item_taxed": "",
"invoice_show_line_item_total": "",
"invoice_show_line_item_desc": "",
"invoice_show_line_item_sku": "",
"invoice_show_total_tax": "",
"invoice_show_job_title": "",
"invoice_show_job_location": "",
"invoice_show_assigned_members": "",
"invoice_show_author": "",
"invoice_show_service_address": "",
"invoice_contract_signature_lines": "",
"invoice_amount_due_display_type": "",
"invoice_amount_due_display_value": "",
"invoice_pdf_title": "",
"estimate_status": "",
"theme_id": "",
"internal_notes": "",
"reference": "",
"hvi": "",
"company_profile_id": "",
"maintenance_agreement_id": "",
"maintenance_occurrence_id": "",
"occurrence_date": "",
"qbd_class_id": "",
"qbd_discount_id": "",
"qbo_sales_tax_code_id": "",
"display_settings": {
"show_payment_button": "",
"show_signature_button": "",
"show_company_title": "",
"is_customer_phone_visible": "",
"is_modified_customer": "",
"modified_customer_display_name": "",
"modified_customer_display_address": ""
},
"estimate_display_settings": {
"show_payment_button": "",
"show_company_title": "",
"is_customer_phone_visible": ""
},
"expenses": [
{
"amount": "",
"description": "",
"title": "",
"type": ""
}
],
"options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"qbd_discount_id": "",
"tab_title": "",
"line_discount": {
"title": "",
"description": "",
"type": "",
"amount": ""
}
}
],
"add_on_options": [
{
"is_selected": "",
"is_default": "",
"group_number": "",
"title": "",
"description": "",
"photo_id": "",
"tab_title": ""
}
],
"line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"not_optional_line_items": [
{
"line_number": "",
"line_type": "",
"line_title": "",
"line_description": "",
"line_price_visibility": "",
"line_visibility": "",
"line_quantity": "",
"is_selected": "",
"is_optional": "",
"qbo_group_item_ref": "",
"source": "",
"group_number": "",
"commission_amount": "",
"hvi_amount": "",
"pricebook_id": "",
"flat_rate_job_id": "",
"line_components": [
{
"id": "",
"title": "",
"description": "",
"xero_sales_account": "",
"xero_tax_account": "",
"tax_rate": "",
"file_ids": "",
"price_update_method": "",
"automatic_markup_percentage": "",
"line_discount": "",
"line_surcharge": "",
"serialized_inventory_id": "",
"qbo_line_item_id": "",
"qbo_sales_tax_code_id": "",
"unit_price": "",
"quantity": "",
"taxable": ""
}
]
}
],
"payments": [
{
"invoice_id": "",
"payment_date": "",
"amount": "",
"method": "",
"payment_method_id": "",
"qbd_discount_account_id": "",
"qbd_discount_amount": "",
"notes": "",
"square_transaction_id": "",
"can_sync_with_integrations": ""
}
],
"customfields": [
{
"id": "",
"field_instance_id": "",
"value": ""
},
{
"id": "",
"field_instance_id": "",
"value": ""
}
],
"emaildata": {
"from_name": "",
"from_email": "",
"to_email": "",
"cc_address": "",
"bcc_address": "",
"subject": "",
"body": "",
"payment_request_amount": "",
"payment_request_amount_type": "",
"attachment_ids": "",
"visible_file_ids": "",
"attach_dynamic_url_to_email": "",
"show_signature_request": "",
"show_payment_request": "",
"is_credit_card_payment_enabled": "",
"is_ach_payment_enabled": "",
"is_pdf_send_mode": "",
"is_dynamic_send_mode": "",
"include_invoice_pdf": "",
"is_card_fee_recovery_enabled": ""
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '',
job_id: '',
status: '',
status_id: '',
status_workflow_id: '',
notes: '',
invoiced_date: '',
due_date: '',
tax_rate: '',
is_template: '',
title: '',
author_id: '',
location_id: '',
contract_id: '',
commission_type: '',
commission_percent: '',
invoice_use_logo: '',
invoice_show_line_item_unit_price: '',
invoice_show_line_item_qty: '',
invoice_show_line_item_taxed: '',
invoice_show_line_item_total: '',
invoice_show_line_item_desc: '',
invoice_show_line_item_sku: '',
invoice_show_total_tax: '',
invoice_show_job_title: '',
invoice_show_job_location: '',
invoice_show_assigned_members: '',
invoice_show_author: '',
invoice_show_service_address: '',
invoice_contract_signature_lines: '',
invoice_amount_due_display_type: '',
invoice_amount_due_display_value: '',
invoice_pdf_title: '',
estimate_status: '',
theme_id: '',
internal_notes: '',
reference: '',
hvi: '',
company_profile_id: '',
maintenance_agreement_id: '',
maintenance_occurrence_id: '',
occurrence_date: '',
qbd_class_id: '',
qbd_discount_id: '',
qbo_sales_tax_code_id: '',
display_settings: {
show_payment_button: '',
show_signature_button: '',
show_company_title: '',
is_customer_phone_visible: '',
is_modified_customer: '',
modified_customer_display_name: '',
modified_customer_display_address: ''
},
estimate_display_settings: {show_payment_button: '', show_company_title: '', is_customer_phone_visible: ''},
expenses: [{amount: '', description: '', title: '', type: ''}],
options: [
{
is_selected: '',
is_default: '',
group_number: '',
title: '',
description: '',
photo_id: '',
qbd_discount_id: '',
tab_title: '',
line_discount: {title: '', description: '', type: '', amount: ''}
}
],
add_on_options: [
{
is_selected: '',
is_default: '',
group_number: '',
title: '',
description: '',
photo_id: '',
tab_title: ''
}
],
line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
optional_line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
not_optional_line_items: [
{
line_number: '',
line_type: '',
line_title: '',
line_description: '',
line_price_visibility: '',
line_visibility: '',
line_quantity: '',
is_selected: '',
is_optional: '',
qbo_group_item_ref: '',
source: '',
group_number: '',
commission_amount: '',
hvi_amount: '',
pricebook_id: '',
flat_rate_job_id: '',
line_components: [
{
id: '',
title: '',
description: '',
xero_sales_account: '',
xero_tax_account: '',
tax_rate: '',
file_ids: '',
price_update_method: '',
automatic_markup_percentage: '',
line_discount: '',
line_surcharge: '',
serialized_inventory_id: '',
qbo_line_item_id: '',
qbo_sales_tax_code_id: '',
unit_price: '',
quantity: '',
taxable: ''
}
]
}
],
payments: [
{
invoice_id: '',
payment_date: '',
amount: '',
method: '',
payment_method_id: '',
qbd_discount_account_id: '',
qbd_discount_amount: '',
notes: '',
square_transaction_id: '',
can_sync_with_integrations: ''
}
],
customfields: [
{id: '', field_instance_id: '', value: ''},
{id: '', field_instance_id: '', value: ''}
],
emaildata: {
from_name: '',
from_email: '',
to_email: '',
cc_address: '',
bcc_address: '',
subject: '',
body: JSON.stringify(''),
payment_request_amount: '',
payment_request_amount_type: '',
attachment_ids: '',
visible_file_ids: '',
attach_dynamic_url_to_email: '',
show_signature_request: '',
show_payment_request: '',
is_credit_card_payment_enabled: '',
is_ach_payment_enabled: '',
is_pdf_send_mode: '',
is_dynamic_send_mode: '',
include_invoice_pdf: '',
is_card_fee_recovery_enabled: ''
}
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Authorizations
Body
application/json
The body is of type object.
Response
Successful response
Was this page helpful?