diff --git a/independent-publisher-connectors/Zoho Invoice Basic/apiDefinition.swagger.json b/independent-publisher-connectors/Zoho Invoice Basic/apiDefinition.swagger.json new file mode 100644 index 0000000000..fdade188d8 --- /dev/null +++ b/independent-publisher-connectors/Zoho Invoice Basic/apiDefinition.swagger.json @@ -0,0 +1,6486 @@ +{ + "swagger": "2.0", + "info": { + "title": "Zoho Invoice Basic", + "description": "Customize and create professional invoices, and get paid for your hard work. Zoho Invoice is online invoice management software for small businesses that is easy-to-use and completely free, forever.", + "version": "1.0", + "contact": { + "name": "Troy Taylor", + "url": "https://www.troystaylor.com", + "email": "troy@troystaylor.com" + } + }, + "host": "www.zohoapis.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/invoice/v3/contacts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "contact": { + "type": "array", + "items": { + "type": "object", + "properties": { + "contact_id": { + "type": "string", + "description": "The contact identifier.", + "title": "Contact ID" + }, + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "contact_type": { + "type": "string", + "description": "The contact type.", + "title": "Contact Type" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "outstanding_receivable_amount": { + "type": "number", + "format": "double", + "description": "The outstanding receivable amount.", + "title": "Outstanding Receivable Amount" + }, + "unused_credits_receivable_amount": { + "type": "number", + "format": "double", + "description": "The unused credits receivable amount.", + "title": "Unused Credits Receivable Amount" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + } + }, + "title": "Contact" + } + } + } + } + } + }, + "summary": "Get contacts", + "description": "Retrieve a list of all contacts with pagination.", + "operationId": "ContactsGet", + "parameters": [ + { + "name": "contact_name", + "in": "query", + "x-ms-summary": "Contact Name", + "description": "The contact name.", + "required": false, + "type": "string" + }, + { + "name": "company_name", + "in": "query", + "x-ms-summary": "Company ID", + "description": "The company identifier.", + "required": false, + "type": "string" + }, + { + "name": "first_name", + "in": "query", + "x-ms-summary": "First Name", + "description": "The first name.", + "required": false, + "type": "string" + }, + { + "name": "last_name", + "in": "query", + "x-ms-summary": "Last Nam", + "description": "The last name.", + "required": false, + "type": "string" + }, + { + "name": "address", + "in": "query", + "x-ms-summary": "Address", + "description": "The address.", + "required": false, + "type": "string" + }, + { + "name": "email", + "in": "query", + "x-ms-summary": "Email", + "description": "The email address.", + "required": false, + "type": "string" + }, + { + "name": "phone", + "in": "query", + "x-ms-summary": "Phone", + "description": "The phone address.", + "required": false, + "type": "string" + }, + { + "name": "filter_by", + "in": "query", + "x-ms-summary": "Filter By", + "description": "The filter by.", + "required": false, + "type": "string", + "enum": [ + "Status.All", + "Status.Active", + "Status.Inactive", + "Status.Duplicate", + "Status.Crm" + ] + }, + { + "name": "search_text", + "in": "query", + "x-ms-summary": "Search Text", + "description": "The search text.", + "required": false, + "type": "string" + }, + { + "name": "sort_column", + "in": "query", + "x-ms-summary": "Sort Column", + "description": "The sort column.", + "required": false, + "type": "string", + "enum": [ + "contact_name", + "first_name", + "last_name", + "email", + "outstanding_receivable_amount", + "created_time", + "last_modified_time" + ] + }, + { + "name": "zcrm_contact_id", + "in": "query", + "x-ms-summary": "Zoho CRM Contact ID", + "description": "The Zoho CRM contact identifier.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "zcrm_account_id", + "in": "query", + "x-ms-summary": "Zoho CRM Account ID", + "description": "The Zoho CRM account identifier.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "page", + "in": "query", + "x-ms-summary": "Page", + "description": "The page number.", + "required": false, + "type": "integer" + }, + { + "name": "per_page", + "in": "query", + "x-ms-summary": "Per Page", + "description": "The per page number.", + "required": false, + "type": "integer" + } + ] + }, + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "contact": { + "type": "object", + "properties": { + "contact_id": { + "type": "string", + "description": "The contact identifier.", + "title": "Contact ID" + }, + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "has_transaction": { + "type": "boolean", + "description": "Whether has transaction.", + "title": "Has Transaction" + }, + "contact_type": { + "type": "string", + "description": "The contact type.", + "title": "Contact Type" + }, + "is_taxable": { + "type": "boolean", + "description": "Whether is taxable.", + "title": "Is Taxable" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Tax Name" + }, + "tax_percentage": { + "type": "integer", + "format": "int32", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "tax_authority_name": { + "type": "string", + "description": "The tax authority name.", + "title": "Tax Authority Name" + }, + "tax_exemption_code": { + "type": "string", + "description": "The tax exemption code.", + "title": "Tax Exemption Code" + }, + "place_of_contact": { + "type": "string", + "description": "The place of contact.", + "title": "Place Of Contact" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "tax_regime": { + "type": "string", + "description": "The tax regime.", + "title": "Tax Regime" + }, + "legal_name": { + "type": "string", + "description": "The legal name.", + "title": "Legal Name" + }, + "is_tds_registered": { + "type": "boolean", + "description": "Whether the TSD is registered.", + "title": "Is TDS Registered" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "is_linked_with_zohocrm": { + "type": "boolean", + "description": "Whether is linked with Zoho CRM.", + "title": "Is Linked With Zoho CRM" + }, + "website": { + "type": "string", + "description": "The website.", + "title": "Website" + }, + "primary_contact_id": { + "type": "string", + "description": "The primary contact identifier.", + "title": "Primary Contact ID" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "currency_symbol": { + "type": "string", + "description": "The currency symbol.", + "title": "Currency Symbol" + }, + "language_code": { + "type": "string", + "description": "The language code.", + "title": "Language Code" + }, + "outstanding_receivable_amount": { + "type": "number", + "format": "double", + "description": "The outstanding receivable amount.", + "title": "Outstanding Receivable Amount" + }, + "outstanding_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY outstanding receivable amount.", + "title": "Outstanding Receivable Amount BCY" + }, + "unused_credits_receivable_amount": { + "type": "number", + "format": "double", + "description": "The unused credits receivable amount.", + "title": "Unused Credits Receivable Amount" + }, + "unused_credits_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY unused credits receivable amount.", + "title": "Unused Credits Receivable Amount BCY" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The custom field value.", + "title": "Value" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + } + } + }, + "title": "Custom Field" + }, + "billing_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Shipping" + }, + "facebook": { + "type": "string", + "description": "The Facebook account.", + "title": "Facebook" + }, + "twitter": { + "type": "string", + "description": "The Twitter handle.", + "title": "Twitter" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation.", + "title": "Salutation" + }, + "first_name": { + "type": "string", + "description": "The first name.", + "title": "First Name" + }, + "last_name": { + "type": "string", + "description": "The last name.", + "title": "Last Name" + }, + "email": { + "type": "string", + "description": "The email address.", + "title": "Email" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + }, + "mobile": { + "type": "string", + "description": "The mobile number.", + "title": "Mobile" + }, + "is_primary_contact": { + "type": "boolean", + "description": "Whether is primary contact.", + "title": "Is Primary Contact" + } + } + }, + "title": "Contact Persons" + }, + "default_templates": { + "type": "object", + "properties": { + "invoice_template_id": { + "type": "string", + "description": "The invoice template identifier.", + "title": "Invoice Template ID" + }, + "invoice_template_name": { + "type": "string", + "description": "The invoice template name.", + "title": "Invoice Template Name" + }, + "estimate_template_id": { + "type": "string", + "description": "The estimate template identifier.", + "title": "Estimate Template ID" + }, + "estimate_template_name": { + "type": "string", + "description": "The estimate template name.", + "title": "Estimate Template Name" + }, + "creditnote_template_id": { + "type": "string", + "description": "The credit note template identifier.", + "title": "Credit Note Template ID" + }, + "creditnote_template_name": { + "type": "string", + "description": "The credit note template name.", + "title": "Credit Note Template Name" + }, + "invoice_email_template_id": { + "type": "string", + "description": "The invoice email template identifier.", + "title": "Invoice Email Template ID" + }, + "invoice_email_template_name": { + "type": "string", + "description": "The invoice email template name.", + "title": "Invoice Email Template Name" + }, + "estimate_email_template_id": { + "type": "string", + "description": "The estimate email template identifier.", + "title": "Estimate Email Template ID" + }, + "estimate_email_template_name": { + "type": "string", + "description": "The estimate email template name.", + "title": "Estimate Email Template Name" + }, + "creditnote_email_template_id": { + "type": "string", + "description": "The credit note email template identifier.", + "title": "Credit Note Email Template ID" + }, + "creditnote_email_template_name": { + "type": "string", + "description": "The credit note email template name.", + "title": "Credit Note Email Template Name" + } + }, + "title": "Default Templates" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + } + }, + "title": "Contact" + } + } + } + } + }, + "summary": "Create a contact", + "description": "Creates a new contact.", + "operationId": "ContactPost", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "website": { + "type": "string", + "description": "The website.", + "title": "Website" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The custom field value.", + "title": "Value" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + } + } + }, + "title": "Custom Field" + }, + "billing_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The address 2.", + "title": "Address 2" + }, + "state_code": { + "type": "string", + "description": "The state abbreviation.", + "title": "State" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Billing Address" + }, + "shipping_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The address 2.", + "title": "Address 2" + }, + "state_code": { + "type": "string", + "description": "The state abbreviation.", + "title": "State" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Shipping Address" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation.", + "title": "Salutation" + }, + "first_name": { + "type": "string", + "description": "The first name.", + "title": "First Name" + }, + "last_name": { + "type": "string", + "description": "The last name.", + "title": "Last Name" + }, + "email": { + "type": "string", + "description": "The email address.", + "title": "Email" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + }, + "mobile": { + "type": "string", + "description": "The mobile number.", + "title": "Mobile" + }, + "is_primary_contact": { + "type": "boolean", + "description": "Whether is primary contact.", + "title": "Is Primary Contact" + } + } + }, + "title": "Contact Person" + }, + "default_templates": { + "type": "object", + "properties": { + "invoice_template_id": { + "type": "string", + "description": "The invoice template identifier.", + "title": "Invoice Template ID" + }, + "invoice_template_name": { + "type": "string", + "description": "The invoice template name.", + "title": "Invoice Template Name" + }, + "estimate_template_id": { + "type": "string", + "description": "The estimate template identifier.", + "title": "Estimate Template ID" + }, + "estimate_template_name": { + "type": "string", + "description": "The estimate template name.", + "title": "Estimate Template Name" + }, + "creditnote_template_id": { + "type": "string", + "description": "The credit note template identifier.", + "title": "Credit Note Template ID" + }, + "creditnote_template_name": { + "type": "string", + "description": "The credit note template name.", + "title": "Credit Note Template Name" + }, + "invoice_email_template_id": { + "type": "string", + "description": "The invoice email template identifier.", + "title": "Invoice Email Template ID" + }, + "invoice_email_template_name": { + "type": "string", + "description": "The invoice email template name.", + "title": "Invoice Email Template Name" + }, + "estimate_email_template_id": { + "type": "string", + "description": "The estimate email template identifier.", + "title": "Estimate Email Template ID" + }, + "estimate_email_template_name": { + "type": "string", + "description": "The estimate email template name.", + "title": "Estimate Email Template Name" + }, + "creditnote_email_template_id": { + "type": "string", + "description": "The credit note email template identifier.", + "title": "Credit Note Email Template ID" + }, + "creditnote_email_template_name": { + "type": "string", + "description": "The credit note email template name.", + "title": "Credit Note Email Template Name" + } + }, + "title": "Default Templates" + }, + "language_code": { + "type": "string", + "description": "The language code.", + "title": "Language Code", + "enum": [ + "de", + "en", + "es", + "fr", + "it", + "ja", + "nl", + "pt", + "sv", + "zh" + ] + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "tax_reg_no": { + "type": "string", + "description": "The tax registration number.", + "title": "Tax Registration" + }, + "country_code": { + "type": "string", + "description": "The country code.", + "title": "Country Code" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment type.", + "title": "VAT Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment type.", + "title": "Tax Treatment" + }, + "tax_regime": { + "type": "string", + "description": "The tax regime.", + "title": "Tax Regime", + "enum": [ + "general_legal_person", + "legal_entities_non_profit", + "resident_abroad", + "production_cooperative_societies", + "agricultural_livestock", + "optional_group_of_companies", + "coordinated", + "wages_salaries_income", + "lease", + "property_disposal_acquisition", + "other_income", + "divident_income", + "individual_business_professional", + "interest_income", + "income_obtaining_price", + "no_tax_obligation", + "tax_incorporation", + "income_through_technology_platform", + "simplified_trust" + ] + }, + "legal_name": { + "type": "string", + "description": "The legal name.", + "title": "Legal Name" + }, + "is_tds_registered": { + "type": "boolean", + "description": "Whether is TDS registered.", + "title": "Is TDS Registered" + }, + "place_of_contact": { + "type": "string", + "description": "The place of contact.", + "title": "Place Of Contact" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment type.", + "title": "GST Treatment", + "enum": [ + "business_gst", + "business_none", + "overseas", + "consumer" + ] + }, + "tax_authority_name": { + "type": "string", + "description": "The tax authority name.", + "title": "Tax Authority Name" + }, + "tax_exemption_code": { + "type": "string", + "description": "The tax exemption code.", + "title": "Tax Exemption Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "is_taxable": { + "type": "boolean", + "description": "Whether is taxable.", + "title": "Is Taxable" + }, + "facebook": { + "type": "string", + "description": "The Facebook username.", + "title": "Facebook" + }, + "twitter": { + "type": "string", + "description": "The Twitter handle.", + "title": "Twitter" + } + }, + "required": [ + "contact_name" + ] + } + } + ] + } + }, + "/invoice/v3/contacts/{contact_id}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "contact": { + "type": "object", + "properties": { + "contact_id": { + "type": "string", + "description": "The contact identifier.", + "title": "Contact ID" + }, + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "has_transaction": { + "type": "boolean", + "description": "Whether has transaction.", + "title": "Has Transaction" + }, + "contact_type": { + "type": "string", + "description": "The contact type.", + "title": "Contact Type" + }, + "is_taxable": { + "type": "boolean", + "description": "Whether is taxable.", + "title": "Is Taxable" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Tax Name" + }, + "tax_percentage": { + "type": "integer", + "format": "int32", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "tax_authority_name": { + "type": "string", + "description": "The tax authority name.", + "title": "Tax Authority Name" + }, + "tax_exemption_code": { + "type": "string", + "description": "The tax exemption code.", + "title": "Tax Exemption Code" + }, + "place_of_contact": { + "type": "string", + "description": "The place of contact.", + "title": "Place Of Contact" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "is_linked_with_zohocrm": { + "type": "boolean", + "description": "Whether is linked with Zoho CRM.", + "title": "Is Linked With Zoho CRM" + }, + "website": { + "type": "string", + "description": "The website.", + "title": "Website" + }, + "primary_contact_id": { + "type": "string", + "description": "The primary contact identifier.", + "title": "Primary Contact ID" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "currency_symbol": { + "type": "string", + "description": "The currency symbol.", + "title": "Currency Symbol" + }, + "outstanding_receivable_amount": { + "type": "number", + "format": "double", + "description": "The outstanding receivable amount.", + "title": "Outstanding Receivable Amount" + }, + "outstanding_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY outstanding receivable amount.", + "title": "Outstanding Receivable Amount BCY" + }, + "unused_credits_receivable_amount": { + "type": "number", + "format": "double", + "description": "The unused credits receivable amount.", + "title": "Unused Credits Receivable Amount" + }, + "unused_credits_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY unused credits receivable amount.", + "title": "Unused Credits Receivable Amount BCY" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "facebook": { + "type": "string", + "description": "The Facebook account.", + "title": "Facebook" + }, + "twitter": { + "type": "string", + "description": "The Twitter handle.", + "title": "Twitter" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The custom field value.", + "title": "Value" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + } + } + }, + "title": "Custom Field" + }, + "billing_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Shipping" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation.", + "title": "Salutation" + }, + "first_name": { + "type": "string", + "description": "The first name.", + "title": "First Name" + }, + "last_name": { + "type": "string", + "description": "The last name.", + "title": "Last Name" + }, + "email": { + "type": "string", + "description": "The email address.", + "title": "Email" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + }, + "mobile": { + "type": "string", + "description": "The mobile number.", + "title": "Mobile" + }, + "is_primary_contact": { + "type": "boolean", + "description": "Whether is primary contact.", + "title": "Is Primary Contact" + } + } + }, + "title": "Contact Persons" + }, + "default_templates": { + "type": "object", + "properties": { + "invoice_template_id": { + "type": "string", + "description": "The invoice template identifier.", + "title": "Invoice Template ID" + }, + "invoice_template_name": { + "type": "string", + "description": "The invoice template name.", + "title": "Invoice Template Name" + }, + "estimate_template_id": { + "type": "string", + "description": "The estimate template identifier.", + "title": "Estimate Template ID" + }, + "estimate_template_name": { + "type": "string", + "description": "The estimate template name.", + "title": "Estimate Template Name" + }, + "creditnote_template_id": { + "type": "string", + "description": "The credit note template identifier.", + "title": "Credit Note Template ID" + }, + "creditnote_template_name": { + "type": "string", + "description": "The credit note template name.", + "title": "Credit Note Template Name" + }, + "invoice_email_template_id": { + "type": "string", + "description": "The invoice email template identifier.", + "title": "Invoice Email Template ID" + }, + "invoice_email_template_name": { + "type": "string", + "description": "The invoice email template name.", + "title": "Invoice Email Template Name" + }, + "estimate_email_template_id": { + "type": "string", + "description": "The estimate email template identifier.", + "title": "Estimate Email Template ID" + }, + "estimate_email_template_name": { + "type": "string", + "description": "The estimate email template name.", + "title": "Estimate Email Template Name" + }, + "creditnote_email_template_id": { + "type": "string", + "description": "The credit note email template identifier.", + "title": "Credit Note Email Template ID" + }, + "creditnote_email_template_name": { + "type": "string", + "description": "The credit note email template name.", + "title": "Credit Note Email Template Name" + } + }, + "title": "Default Templates" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + } + }, + "title": "Contact" + } + } + } + } + }, + "summary": "Get a contact", + "description": "Retrieve the details of an existing contact.", + "operationId": "ContactGet", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "x-ms-summary": "Contact ID", + "x-ms-url-encoding": "single", + "description": "The contact identifier.", + "required": true, + "type": "string" + } + ] + }, + "delete": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + } + } + } + } + }, + "summary": "Delete a contact", + "description": "Deletes an existing contact.", + "operationId": "ContactDelete", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "x-ms-summary": "Contact ID", + "x-ms-url-encoding": "single", + "description": "The contact identifier.", + "required": true, + "type": "string" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "contact": { + "type": "object", + "properties": { + "contact_id": { + "type": "string", + "description": "The contact identifier.", + "title": "Contact ID" + }, + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "has_transaction": { + "type": "boolean", + "description": "Whether has transaction.", + "title": "Has Transaction" + }, + "contact_type": { + "type": "string", + "description": "The contact type.", + "title": "Contact Type" + }, + "is_taxable": { + "type": "boolean", + "description": "Whether is taxable.", + "title": "Is Taxable" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Tax Name" + }, + "tax_percentage": { + "type": "integer", + "format": "int32", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "tax_authority_name": { + "type": "string", + "description": "The tax authority name.", + "title": "Tax Authority Name" + }, + "tax_exemption_code": { + "type": "string", + "description": "The tax exemption code.", + "title": "Tax Exemption Code" + }, + "place_of_contact": { + "type": "string", + "description": "The place of contact.", + "title": "Place Of Contact" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "tax_regime": { + "type": "string", + "description": "The tax regime.", + "title": "Tax Regime" + }, + "legal_name": { + "type": "string", + "description": "The legal name.", + "title": "Legal Name" + }, + "is_tds_registered": { + "type": "boolean", + "description": "Whether the TSD is registered.", + "title": "Is TDS Registered" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "is_linked_with_zohocrm": { + "type": "boolean", + "description": "Whether is linked with Zoho CRM.", + "title": "Is Linked With Zoho CRM" + }, + "website": { + "type": "string", + "description": "The website.", + "title": "Website" + }, + "primary_contact_id": { + "type": "string", + "description": "The primary contact identifier.", + "title": "Primary Contact ID" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "currency_symbol": { + "type": "string", + "description": "The currency symbol.", + "title": "Currency Symbol" + }, + "language_code": { + "type": "string", + "description": "The language code.", + "title": "Language Code" + }, + "outstanding_receivable_amount": { + "type": "number", + "format": "double", + "description": "The outstanding receivable amount.", + "title": "Outstanding Receivable Amount" + }, + "outstanding_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY outstanding receivable amount.", + "title": "Outstanding Receivable Amount BCY" + }, + "unused_credits_receivable_amount": { + "type": "number", + "format": "double", + "description": "The unused credits receivable amount.", + "title": "Unused Credits Receivable Amount" + }, + "unused_credits_receivable_amount_bcy": { + "type": "number", + "format": "double", + "description": "The BCY unused credits receivable amount.", + "title": "Unused Credits Receivable Amount BCY" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The custom field value.", + "title": "Value" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + } + } + }, + "title": "Custom Field" + }, + "billing_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The street address.", + "title": "Street" + }, + "state_code": { + "type": "string", + "description": "The state code.", + "title": "State Code" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Shipping" + }, + "facebook": { + "type": "string", + "description": "The Facebook account.", + "title": "Facebook" + }, + "twitter": { + "type": "string", + "description": "The Twitter handle.", + "title": "Twitter" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation.", + "title": "Salutation" + }, + "first_name": { + "type": "string", + "description": "The first name.", + "title": "First Name" + }, + "last_name": { + "type": "string", + "description": "The last name.", + "title": "Last Name" + }, + "email": { + "type": "string", + "description": "The email address.", + "title": "Email" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + }, + "mobile": { + "type": "string", + "description": "The mobile number.", + "title": "Mobile" + }, + "is_primary_contact": { + "type": "boolean", + "description": "Whether is primary contact.", + "title": "Is Primary Contact" + } + } + }, + "title": "Contact Persons" + }, + "default_templates": { + "type": "object", + "properties": { + "invoice_template_id": { + "type": "string", + "description": "The invoice template identifier.", + "title": "Invoice Template ID" + }, + "invoice_template_name": { + "type": "string", + "description": "The invoice template name.", + "title": "Invoice Template Name" + }, + "estimate_template_id": { + "type": "string", + "description": "The estimate template identifier.", + "title": "Estimate Template ID" + }, + "estimate_template_name": { + "type": "string", + "description": "The estimate template name.", + "title": "Estimate Template Name" + }, + "creditnote_template_id": { + "type": "string", + "description": "The credit note template identifier.", + "title": "Credit Note Template ID" + }, + "creditnote_template_name": { + "type": "string", + "description": "The credit note template name.", + "title": "Credit Note Template Name" + }, + "invoice_email_template_id": { + "type": "string", + "description": "The invoice email template identifier.", + "title": "Invoice Email Template ID" + }, + "invoice_email_template_name": { + "type": "string", + "description": "The invoice email template name.", + "title": "Invoice Email Template Name" + }, + "estimate_email_template_id": { + "type": "string", + "description": "The estimate email template identifier.", + "title": "Estimate Email Template ID" + }, + "estimate_email_template_name": { + "type": "string", + "description": "The estimate email template name.", + "title": "Estimate Email Template Name" + }, + "creditnote_email_template_id": { + "type": "string", + "description": "The credit note email template identifier.", + "title": "Credit Note Email Template ID" + }, + "creditnote_email_template_name": { + "type": "string", + "description": "The credit note email template name.", + "title": "Credit Note Email Template Name" + } + }, + "title": "Default Templates" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + } + }, + "title": "Contact" + } + } + } + } + }, + "summary": "Update a contact", + "description": "Updates an existing contact.", + "operationId": "ContactPut", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "x-ms-summary": "Contact ID", + "x-ms-url-encoding": "single", + "description": "The contact identifier.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "contact_name": { + "type": "string", + "description": "The contact name.", + "title": "Contact Name" + }, + "company_name": { + "type": "string", + "description": "The company name.", + "title": "Company Name" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "website": { + "type": "string", + "description": "The website.", + "title": "Website" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The custom field value.", + "title": "Value" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + } + } + }, + "title": "Custom Field" + }, + "billing_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The address 2.", + "title": "Address 2" + }, + "state_code": { + "type": "string", + "description": "The state abbreviation.", + "title": "State" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Billing Address" + }, + "shipping_address": { + "type": "object", + "properties": { + "attention": { + "type": "string", + "description": "The attention name.", + "title": "Attention" + }, + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "street2": { + "type": "string", + "description": "The address 2.", + "title": "Address 2" + }, + "state_code": { + "type": "string", + "description": "The state abbreviation.", + "title": "State" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + } + }, + "title": "Shipping Address" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "salutation": { + "type": "string", + "description": "The salutation.", + "title": "Salutation" + }, + "first_name": { + "type": "string", + "description": "The first name.", + "title": "First Name" + }, + "last_name": { + "type": "string", + "description": "The last name.", + "title": "Last Name" + }, + "email": { + "type": "string", + "description": "The email address.", + "title": "Email" + }, + "phone": { + "type": "string", + "description": "The phone number.", + "title": "Phone" + }, + "mobile": { + "type": "string", + "description": "The mobile number.", + "title": "Mobile" + }, + "is_primary_contact": { + "type": "boolean", + "description": "Whether is primary contact.", + "title": "Is Primary Contact" + } + } + }, + "title": "Contact Person" + }, + "default_templates": { + "type": "object", + "properties": { + "invoice_template_id": { + "type": "string", + "description": "The invoice template identifier.", + "title": "Invoice Template ID" + }, + "invoice_template_name": { + "type": "string", + "description": "The invoice template name.", + "title": "Invoice Template Name" + }, + "estimate_template_id": { + "type": "string", + "description": "The estimate template identifier.", + "title": "Estimate Template ID" + }, + "estimate_template_name": { + "type": "string", + "description": "The estimate template name.", + "title": "Estimate Template Name" + }, + "creditnote_template_id": { + "type": "string", + "description": "The credit note template identifier.", + "title": "Credit Note Template ID" + }, + "creditnote_template_name": { + "type": "string", + "description": "The credit note template name.", + "title": "Credit Note Template Name" + }, + "invoice_email_template_id": { + "type": "string", + "description": "The invoice email template identifier.", + "title": "Invoice Email Template ID" + }, + "invoice_email_template_name": { + "type": "string", + "description": "The invoice email template name.", + "title": "Invoice Email Template Name" + }, + "estimate_email_template_id": { + "type": "string", + "description": "The estimate email template identifier.", + "title": "Estimate Email Template ID" + }, + "estimate_email_template_name": { + "type": "string", + "description": "The estimate email template name.", + "title": "Estimate Email Template Name" + }, + "creditnote_email_template_id": { + "type": "string", + "description": "The credit note email template identifier.", + "title": "Credit Note Email Template ID" + }, + "creditnote_email_template_name": { + "type": "string", + "description": "The credit note email template name.", + "title": "Credit Note Email Template Name" + } + }, + "title": "Default Templates" + }, + "language_code": { + "type": "string", + "description": "The language code.", + "title": "Language Code", + "enum": [ + "de", + "en", + "es", + "fr", + "it", + "ja", + "nl", + "pt", + "sv", + "zh" + ] + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "tax_reg_no": { + "type": "string", + "description": "The tax registration number.", + "title": "Tax Registration" + }, + "country_code": { + "type": "string", + "description": "The country code.", + "title": "Country Code" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment type.", + "title": "VAT Treatment", + "enum": [ + "uk", + "eu_vat_registered", + "overseas", + "home_country_mexico", + "border_region_mexico", + "non_mexico" + ] + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment type.", + "title": "Tax Treatment" + }, + "tax_regime": { + "type": "string", + "description": "The tax regime.", + "title": "Tax Regime", + "enum": [ + "general_legal_person", + "legal_entities_non_profit", + "resident_abroad", + "production_cooperative_societies", + "agricultural_livestock", + "optional_group_of_companies", + "coordinated", + "simplified_trust", + "wages_salaries_income", + "lease", + "property_disposal_acquisition", + "other_income", + "divident_income", + "individual_business_professional", + "interest_income", + "income_obtaining_price", + "no_tax_obligation", + "tax_incorporation", + "income_through_technology_platform" + ] + }, + "legal_name": { + "type": "string", + "description": "The legal name.", + "title": "Legal Name" + }, + "is_tds_registered": { + "type": "boolean", + "description": "Whether is TDS registered.", + "title": "Is TDS Registered" + }, + "place_of_contact": { + "type": "string", + "description": "The place of contact.", + "title": "Place Of Contact" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment type.", + "title": "GST Treatment", + "enum": [ + "business_gst", + "business_none", + "overseas", + "consumer" + ] + }, + "tax_authority_name": { + "type": "string", + "description": "The tax authority name.", + "title": "Tax Authority Name" + }, + "tax_exemption_code": { + "type": "string", + "description": "The tax exemption code.", + "title": "Tax Exemption Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "is_taxable": { + "type": "boolean", + "description": "Whether is taxable.", + "title": "Is Taxable" + }, + "facebook": { + "type": "string", + "description": "The Facebook username.", + "title": "Facebook" + }, + "twitter": { + "type": "string", + "description": "The Twitter handle.", + "title": "Twitter" + } + }, + "required": [ + "contact_name" + ] + } + } + ] + } + }, + "/invoice/v3/invoices": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "invoices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "invoice_id": { + "type": "string", + "description": "The invoice identifier.", + "title": "ID" + }, + "ach_payment_initiated": { + "type": "boolean", + "description": "Whether ACH payment has been initiated.", + "title": "ACH Payment Initiated" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Number" + }, + "is_pre_gst": { + "type": "boolean", + "description": "Whether is pre-GST.", + "title": "Is Pre-GST" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "payment_expected_date": { + "type": "string", + "description": "The payment expected date.", + "title": "Payment Expected Date" + }, + "last_payment_date": { + "type": "string", + "description": "The last payment date.", + "title": "Last Payment Date" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "customer_name": { + "type": "string", + "description": "The customer name.", + "title": "Customer Name" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The contact persons.", + "title": "Contact Persons" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "exchange_rate": { + "type": "number", + "format": "double", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Tax Inclusive" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "is_viewed_by_client": { + "type": "boolean", + "description": "Whether is viewed by client.", + "title": "Is Viewed By Client" + }, + "has_attachment": { + "type": "boolean", + "description": "Whether has attachment.", + "title": "Has Attachment" + }, + "client_viewed_time": { + "type": "string", + "description": "The client viewed time.", + "title": "Client Viewed Time" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "line_item_id": { + "type": "string", + "description": "The line item identifier.", + "title": "ID" + }, + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "project_name": { + "type": "string", + "description": "The project name.", + "title": "Project Name" + }, + "item_type": { + "type": "string", + "description": "The item type.", + "title": "Item Type" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "time_entry_ids" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "expense_receipt_name": { + "type": "string", + "description": "The expense receipt name.", + "title": "Expense Receipt Name" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Item Order" + }, + "bcy_rate": { + "type": "number", + "format": "double", + "description": "The BCY rate.", + "title": "BCY Rate" + }, + "rate": { + "type": "number", + "format": "double", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount_amount": { + "type": "number", + "format": "double", + "description": "The discount amount.", + "title": "Discount Amount" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "double", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "double", + "description": "The item total.", + "title": "Item Total" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + } + } + }, + "title": "Line Item" + }, + "shipping_charge": { + "type": "number", + "format": "double", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "double", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "sub_total": { + "type": "number", + "format": "double", + "description": "The subtotal.", + "title": "Subtotal" + }, + "tax_total": { + "type": "number", + "format": "double", + "description": "The tax total.", + "title": "Tax Total" + }, + "total": { + "type": "number", + "format": "double", + "description": "The total.", + "title": "Total" + }, + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_amount": { + "type": "number", + "format": "double", + "description": "The tax amount.", + "title": "Amount" + } + } + }, + "title": "Tax" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "payment_made": { + "type": "number", + "format": "double", + "description": "The payment made.", + "title": "Payment Made" + }, + "credits_applied": { + "type": "number", + "format": "double", + "description": "The credits applied.", + "title": "Credits Applied" + }, + "tax_amount_withheld": { + "type": "number", + "format": "double", + "description": "The tax amount withheld.", + "title": "Tax Amount Withheld" + }, + "balance": { + "type": "number", + "format": "double", + "description": "The balance.", + "title": "Balance" + }, + "write_off_amount": { + "type": "number", + "format": "double", + "description": "The write off amount.", + "title": "Write Off Amount" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "price_precision": { + "type": "integer", + "format": "int32", + "description": "The price precision.", + "title": "Price Precision" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The gateway name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment Option" + }, + "is_emailed": { + "type": "boolean", + "description": "Whether has been emailed.", + "title": "Is Emailed" + }, + "reminders_sent": { + "type": "integer", + "format": "int32", + "description": "The number of reminders sent.", + "title": "Reminders Sent" + }, + "last_reminder_sent_date": { + "type": "string", + "description": "The last reminder sent date.", + "title": "Last Reminder Sent Date" + }, + "billing_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Shipping" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customfield_id": { + "type": "string", + "description": "The custom field identifier.", + "title": "ID" + }, + "data_type": { + "type": "string", + "description": "The data type.", + "title": "Data Type" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "show_on_pdf": { + "type": "boolean", + "description": "Whether to show on PDF.", + "title": "Show On PDF" + }, + "show_in_all_pdf": { + "type": "boolean", + "description": "Whether to show in all PDFs.", + "title": "Show In All PDFs" + }, + "value": { + "type": "number", + "format": "double", + "description": "The custom field value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "template_name": { + "type": "string", + "description": "The template name.", + "title": "Template Name" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + }, + "attachment_name": { + "type": "string", + "description": "The attachment name.", + "title": "Attachment Name" + }, + "can_send_in_mail": { + "type": "boolean", + "description": "Whether can send in mail.", + "title": "Can Send In Mail" + }, + "salesperson_id": { + "type": "string", + "description": "The salesperson identifier.", + "title": "Salesperson ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson's name.", + "title": "Salesperson Name" + }, + "invoice_url": { + "type": "string", + "description": "The invoice URL address.", + "title": "URL" + } + }, + "title": "Invoice" + } + } + } + } + } + }, + "summary": "Get invoices", + "description": "Retrieve a list of invoices with pagination.", + "operationId": "InvoicesGet", + "parameters": [ + { + "name": "invoice_number", + "in": "query", + "x-ms-summary": "Invoice Number", + "description": "The invoice number.", + "required": false, + "type": "string" + }, + { + "name": "item_name", + "in": "query", + "x-ms-summary": "Item Name", + "description": "The item name.", + "required": false, + "type": "string" + }, + { + "name": "item_id", + "in": "query", + "x-ms-summary": "Item ID", + "description": "The item identifier.", + "required": false, + "type": "string" + }, + { + "name": "item_description", + "in": "query", + "x-ms-summary": "Item Description", + "description": "The item description.", + "required": false, + "type": "string" + }, + { + "name": "reference_number", + "in": "query", + "x-ms-summary": "Reference Number", + "description": "The reference number.", + "required": false, + "type": "string" + }, + { + "name": "customer_name", + "in": "query", + "x-ms-summary": "Customer Name", + "description": "The customer name.", + "required": false, + "type": "string" + }, + { + "name": "recurring_invoice_id", + "in": "query", + "x-ms-summary": "Recurring Invoice ID", + "description": "The recurring invoice identifier.", + "required": false, + "type": "string" + }, + { + "name": "email", + "in": "query", + "x-ms-summary": "Email", + "description": "The email address.", + "required": false, + "type": "string" + }, + { + "name": "total", + "in": "query", + "x-ms-summary": "Total", + "description": "The total.", + "required": false, + "type": "string" + }, + { + "name": "balance", + "in": "query", + "x-ms-summary": "Balance", + "description": "The balance.", + "required": false, + "type": "string" + }, + { + "name": "custom_field", + "in": "query", + "x-ms-summary": "Custom Field", + "description": "The custom field.", + "required": false, + "type": "string" + }, + { + "name": "date", + "in": "query", + "x-ms-summary": "Date", + "description": "The date.", + "required": false, + "type": "string" + }, + { + "name": "due_date", + "in": "query", + "x-ms-summary": "Due Date", + "description": "The due date.", + "required": false, + "type": "string" + }, + { + "name": "status", + "in": "query", + "x-ms-summary": "Status", + "description": "The status.", + "required": false, + "type": "string", + "enum": [ + "sent", + "draft", + "overdue", + "paid", + "void", + "unpaid", + "partially_paid", + "viewed" + ] + }, + { + "name": "customer_id", + "in": "query", + "x-ms-summary": "Custom ID", + "description": "The custom identifier.", + "required": false, + "type": "string" + }, + { + "name": "filter_by", + "in": "query", + "x-ms-summary": "Filter By", + "description": "The filter by.", + "required": false, + "type": "string", + "enum": [ + "Status.All", + "Status.Sent", + "Status.Draft", + "Status.OverDue", + "Status.Paid", + "Status.Void", + "Status.Unpaid", + "Status.PartiallyPaid", + "Status.Viewed", + "Date.PaymentExpectedDate" + ] + }, + { + "name": "search_text", + "in": "query", + "x-ms-summary": "Search Text", + "description": "The search text.", + "required": false, + "type": "string" + }, + { + "name": "sort_column", + "in": "query", + "x-ms-summary": "Sort Column", + "description": "The sort column.", + "required": false, + "type": "string", + "enum": [ + "customer_name", + "invoice_number", + "date", + "due_date", + "total", + "balance", + "created_time" + ] + }, + { + "name": "zcrm_potential_id", + "in": "query", + "x-ms-summary": "Zoho CRM Potential ID", + "description": "The Zoho CRM potential identifier.", + "required": false, + "type": "string" + }, + { + "name": "page", + "in": "query", + "x-ms-summary": "Page", + "description": "The page number.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "per_page", + "in": "query", + "x-ms-summary": "Per Page", + "description": "The per page number.", + "required": false, + "type": "integer", + "format": "int32" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "invoice": { + "type": "object", + "properties": { + "invoice_id": { + "type": "string", + "description": "The invoice identifier.", + "title": "ID" + }, + "ach_payment_initiated": { + "type": "boolean", + "description": "Whether ACH payment has been initiated.", + "title": "ACH Payment Initiated" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Number" + }, + "is_pre_gst": { + "type": "boolean", + "description": "Whether is pre-GST.", + "title": "Is Pre-GST" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "payment_expected_date": { + "type": "string", + "description": "The payment expected date.", + "title": "Payment Expected Date" + }, + "last_payment_date": { + "type": "string", + "description": "The last payment date.", + "title": "Last Payment Date" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "customer_name": { + "type": "string", + "description": "The customer name.", + "title": "Customer Name" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The contact persons.", + "title": "Contact Persons" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "exchange_rate": { + "type": "number", + "format": "double", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Tax Inclusive" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "is_viewed_by_client": { + "type": "boolean", + "description": "Whether is viewed by client.", + "title": "Is Viewed By Client" + }, + "has_attachment": { + "type": "boolean", + "description": "Whether has attachment.", + "title": "Has Attachment" + }, + "client_viewed_time": { + "type": "string", + "description": "The client viewed time.", + "title": "Client Viewed Time" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "line_item_id": { + "type": "string", + "description": "The line item identifier.", + "title": "ID" + }, + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "project_name": { + "type": "string", + "description": "The project name.", + "title": "Project Name" + }, + "item_type": { + "type": "string", + "description": "The item type.", + "title": "Item Type" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "time_entry_ids" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "expense_receipt_name": { + "type": "string", + "description": "The expense receipt name.", + "title": "Expense Receipt Name" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Item Order" + }, + "bcy_rate": { + "type": "number", + "format": "double", + "description": "The BCY rate.", + "title": "BCY Rate" + }, + "rate": { + "type": "number", + "format": "double", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount_amount": { + "type": "number", + "format": "double", + "description": "The discount amount.", + "title": "Discount Amount" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "double", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "double", + "description": "The item total.", + "title": "Item Total" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + } + } + }, + "title": "Line Item" + }, + "shipping_charge": { + "type": "number", + "format": "double", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "double", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "sub_total": { + "type": "number", + "format": "double", + "description": "The subtotal.", + "title": "Subtotal" + }, + "tax_total": { + "type": "number", + "format": "double", + "description": "The tax total.", + "title": "Tax Total" + }, + "total": { + "type": "number", + "format": "double", + "description": "The total.", + "title": "Total" + }, + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_amount": { + "type": "number", + "format": "double", + "description": "The tax amount.", + "title": "Amount" + } + } + }, + "title": "Tax" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "payment_made": { + "type": "number", + "format": "double", + "description": "The payment made.", + "title": "Payment Made" + }, + "credits_applied": { + "type": "number", + "format": "double", + "description": "The credits applied.", + "title": "Credits Applied" + }, + "tax_amount_withheld": { + "type": "number", + "format": "double", + "description": "The tax amount withheld.", + "title": "Tax Amount Withheld" + }, + "balance": { + "type": "number", + "format": "double", + "description": "The balance.", + "title": "Balance" + }, + "write_off_amount": { + "type": "number", + "format": "double", + "description": "The write off amount.", + "title": "Write Off Amount" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "price_precision": { + "type": "integer", + "format": "int32", + "description": "The price precision.", + "title": "Price Precision" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The gateway name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment Option" + }, + "is_emailed": { + "type": "boolean", + "description": "Whether has been emailed.", + "title": "Is Emailed" + }, + "reminders_sent": { + "type": "integer", + "format": "int32", + "description": "The number of reminders sent.", + "title": "Reminders Sent" + }, + "last_reminder_sent_date": { + "type": "string", + "description": "The last reminder sent date.", + "title": "Last Reminder Sent Date" + }, + "billing_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Shipping" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customfield_id": { + "type": "string", + "description": "The custom field identifier.", + "title": "ID" + }, + "data_type": { + "type": "string", + "description": "The data type.", + "title": "Data Type" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "show_on_pdf": { + "type": "boolean", + "description": "Whether to show on PDF.", + "title": "Show On PDF" + }, + "show_in_all_pdf": { + "type": "boolean", + "description": "Whether to show in all PDFs.", + "title": "Show In All PDFs" + }, + "value": { + "type": "number", + "format": "double", + "description": "The custom field value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "template_name": { + "type": "string", + "description": "The template name.", + "title": "Template Name" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + }, + "attachment_name": { + "type": "string", + "description": "The attachment name.", + "title": "Attachment Name" + }, + "can_send_in_mail": { + "type": "boolean", + "description": "Whether can send in mail.", + "title": "Can Send In Mail" + }, + "salesperson_id": { + "type": "string", + "description": "The salesperson identifier.", + "title": "Salesperson ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson's name.", + "title": "Salesperson Name" + }, + "invoice_url": { + "type": "string", + "description": "The invoice URL address.", + "title": "URL" + } + }, + "title": "Invoice" + } + } + } + } + }, + "summary": "Create an invoice", + "x-ms-visibility": "important", + "description": "Creates an invoice for a customer.", + "operationId": "InvoicePost", + "parameters": [ + { + "name": "send", + "in": "query", + "x-ms-summary": "Send", + "description": "Whether to send the invoice.", + "required": false, + "type": "boolean" + }, + { + "name": "ignore_auto_number_generation", + "in": "query", + "x-ms-summary": "Ignore Auto Number Generation", + "description": "Whether to ignore auto number generation.", + "required": false, + "type": "boolean" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The contact person.", + "title": "Contact Person" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Invoice Number" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "Vat Treatment" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "discount": { + "type": "number", + "format": "float", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Inclusive Tax" + }, + "exchange_rate": { + "type": "number", + "format": "float", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "invoiced_estimate_id": { + "type": "string", + "description": "The invoiced estimate identifier.", + "title": "Invoiced Estimate ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson name.", + "title": "Salesperson Name" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "value": { + "type": "number", + "format": "float", + "description": "The value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The time entry identifiers.", + "title": "Time Entry IDs" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "hsn_or_sac": { + "type": "integer", + "format": "int32", + "description": "The HSN or SAC number.", + "title": "HSN Or SAC" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Order" + }, + "rate": { + "type": "number", + "format": "float", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount": { + "type": "number", + "format": "float", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt No" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Tax Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "float", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "float", + "description": "The item total.", + "title": "Total" + } + } + }, + "title": "Line Items" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "custom_body": { + "type": "string", + "description": "The custom body.", + "title": "Custom Body" + }, + "custom_subject": { + "type": "string", + "description": "The custom subject.", + "title": "Custom Subject" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "shipping_charge": { + "type": "number", + "format": "float", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "float", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "reason": { + "type": "string", + "description": "The reason.", + "title": "Reason" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "avatax_tax_code": { + "type": "string", + "description": "The AvaTax tax code.", + "title": "AvaTax Tax Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt Number" + } + } + } + } + ] + } + }, + "/invoice/v3/invoices/{invoice_id}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "invoice": { + "type": "object", + "properties": { + "invoice_id": { + "type": "string", + "description": "The invoice identifier.", + "title": "ID" + }, + "ach_payment_initiated": { + "type": "boolean", + "description": "Whether ACH payment has been initiated.", + "title": "ACH Payment Initiated" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Number" + }, + "is_pre_gst": { + "type": "boolean", + "description": "Whether is pre-GST.", + "title": "Is Pre-GST" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "payment_expected_date": { + "type": "string", + "description": "The payment expected date.", + "title": "Payment Expected Date" + }, + "last_payment_date": { + "type": "string", + "description": "The last payment date.", + "title": "Last Payment Date" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "customer_name": { + "type": "string", + "description": "The customer name.", + "title": "Customer Name" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The contact persons.", + "title": "Contact Persons" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "exchange_rate": { + "type": "number", + "format": "double", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Tax Inclusive" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "is_viewed_by_client": { + "type": "boolean", + "description": "Whether is viewed by client.", + "title": "Is Viewed By Client" + }, + "has_attachment": { + "type": "boolean", + "description": "Whether has attachment.", + "title": "Has Attachment" + }, + "client_viewed_time": { + "type": "string", + "description": "The client viewed time.", + "title": "Client Viewed Time" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "line_item_id": { + "type": "string", + "description": "The line item identifier.", + "title": "ID" + }, + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "project_name": { + "type": "string", + "description": "The project name.", + "title": "Project Name" + }, + "item_type": { + "type": "string", + "description": "The item type.", + "title": "Item Type" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "time_entry_ids" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "expense_receipt_name": { + "type": "string", + "description": "The expense receipt name.", + "title": "Expense Receipt Name" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Item Order" + }, + "bcy_rate": { + "type": "number", + "format": "double", + "description": "The BCY rate.", + "title": "BCY Rate" + }, + "rate": { + "type": "number", + "format": "double", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount_amount": { + "type": "number", + "format": "double", + "description": "The discount amount.", + "title": "Discount Amount" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "double", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "double", + "description": "The item total.", + "title": "Item Total" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + } + } + }, + "title": "Line Item" + }, + "shipping_charge": { + "type": "number", + "format": "double", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "double", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "sub_total": { + "type": "number", + "format": "double", + "description": "The subtotal.", + "title": "Subtotal" + }, + "tax_total": { + "type": "number", + "format": "double", + "description": "The tax total.", + "title": "Tax Total" + }, + "total": { + "type": "number", + "format": "double", + "description": "The total.", + "title": "Total" + }, + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_amount": { + "type": "number", + "format": "double", + "description": "The tax amount.", + "title": "Amount" + } + } + }, + "title": "Tax" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "payment_made": { + "type": "number", + "format": "double", + "description": "The payment made.", + "title": "Payment Made" + }, + "credits_applied": { + "type": "number", + "format": "double", + "description": "The credits applied.", + "title": "Credits Applied" + }, + "tax_amount_withheld": { + "type": "number", + "format": "double", + "description": "The tax amount withheld.", + "title": "Tax Amount Withheld" + }, + "balance": { + "type": "number", + "format": "double", + "description": "The balance.", + "title": "Balance" + }, + "write_off_amount": { + "type": "number", + "format": "double", + "description": "The write off amount.", + "title": "Write Off Amount" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "price_precision": { + "type": "integer", + "format": "int32", + "description": "The price precision.", + "title": "Price Precision" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The gateway name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment Option" + }, + "is_emailed": { + "type": "boolean", + "description": "Whether has been emailed.", + "title": "Is Emailed" + }, + "reminders_sent": { + "type": "integer", + "format": "int32", + "description": "The number of reminders sent.", + "title": "Reminders Sent" + }, + "last_reminder_sent_date": { + "type": "string", + "description": "The last reminder sent date.", + "title": "Last Reminder Sent Date" + }, + "billing_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Shipping" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customfield_id": { + "type": "string", + "description": "The custom field identifier.", + "title": "ID" + }, + "data_type": { + "type": "string", + "description": "The data type.", + "title": "Data Type" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "show_on_pdf": { + "type": "boolean", + "description": "Whether to show on PDF.", + "title": "Show On PDF" + }, + "show_in_all_pdf": { + "type": "boolean", + "description": "Whether to show in all PDFs.", + "title": "Show In All PDFs" + }, + "value": { + "type": "number", + "format": "double", + "description": "The custom field value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "template_name": { + "type": "string", + "description": "The template name.", + "title": "Template Name" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + }, + "attachment_name": { + "type": "string", + "description": "The attachment name.", + "title": "Attachment Name" + }, + "can_send_in_mail": { + "type": "boolean", + "description": "Whether can send in mail.", + "title": "Can Send In Mail" + }, + "salesperson_id": { + "type": "string", + "description": "The salesperson identifier.", + "title": "Salesperson ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson's name.", + "title": "Salesperson Name" + }, + "invoice_url": { + "type": "string", + "description": "The invoice URL address.", + "title": "URL" + } + }, + "title": "Invoice" + } + } + } + } + }, + "summary": "Get an invoice", + "description": "Retrieve the details of an invoice", + "operationId": "InvoiceGet", + "parameters": [ + { + "name": "invoice_id", + "in": "path", + "x-ms-summary": "Invoice Identifier", + "x-ms-url-encoding": "single", + "description": "The invoice identifier.", + "required": true, + "type": "string" + } + ] + }, + "delete": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + } + } + } + } + }, + "summary": "Delete an invoice", + "description": "Deletes an existing invoice. Invoices which have payment or credits note applied cannot be deleted.", + "operationId": "InvoiceDelete", + "parameters": [ + { + "name": "invoice_id", + "in": "path", + "x-ms-summary": "Invoice Identifier", + "x-ms-url-encoding": "single", + "description": "The invoice identifier.", + "required": true, + "type": "string" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code.", + "title": "Status Code" + }, + "message": { + "type": "string", + "description": "The status message.", + "title": "Status Message" + }, + "invoice": { + "type": "object", + "properties": { + "invoice_id": { + "type": "string", + "description": "The invoice identifier.", + "title": "ID" + }, + "ach_payment_initiated": { + "type": "boolean", + "description": "Whether ACH payment has been initiated.", + "title": "ACH Payment Initiated" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Number" + }, + "is_pre_gst": { + "type": "boolean", + "description": "Whether is pre-GST.", + "title": "Is Pre-GST" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "VAT Treatment" + }, + "vat_reg_no": { + "type": "string", + "description": "The VAT registration number.", + "title": "VAT Registration" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "status": { + "type": "string", + "description": "The status.", + "title": "Status" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "payment_expected_date": { + "type": "string", + "description": "The payment expected date.", + "title": "Payment Expected Date" + }, + "last_payment_date": { + "type": "string", + "description": "The last payment date.", + "title": "Last Payment Date" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "customer_name": { + "type": "string", + "description": "The customer name.", + "title": "Customer Name" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The contact persons.", + "title": "Contact Persons" + }, + "currency_id": { + "type": "string", + "description": "The currency identifier.", + "title": "Currency ID" + }, + "currency_code": { + "type": "string", + "description": "The currency code.", + "title": "Currency Code" + }, + "exchange_rate": { + "type": "number", + "format": "double", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Tax Inclusive" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "is_viewed_by_client": { + "type": "boolean", + "description": "Whether is viewed by client.", + "title": "Is Viewed By Client" + }, + "has_attachment": { + "type": "boolean", + "description": "Whether has attachment.", + "title": "Has Attachment" + }, + "client_viewed_time": { + "type": "string", + "description": "The client viewed time.", + "title": "Client Viewed Time" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "line_item_id": { + "type": "string", + "description": "The line item identifier.", + "title": "ID" + }, + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "project_name": { + "type": "string", + "description": "The project name.", + "title": "Project Name" + }, + "item_type": { + "type": "string", + "description": "The item type.", + "title": "Item Type" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "time_entry_ids" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "expense_receipt_name": { + "type": "string", + "description": "The expense receipt name.", + "title": "Expense Receipt Name" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Item Order" + }, + "bcy_rate": { + "type": "number", + "format": "double", + "description": "The BCY rate.", + "title": "BCY Rate" + }, + "rate": { + "type": "number", + "format": "double", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount_amount": { + "type": "number", + "format": "double", + "description": "The discount amount.", + "title": "Discount Amount" + }, + "discount": { + "type": "number", + "format": "double", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "double", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "double", + "description": "The item total.", + "title": "Item Total" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + } + } + }, + "title": "Line Item" + }, + "shipping_charge": { + "type": "number", + "format": "double", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "double", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "sub_total": { + "type": "number", + "format": "double", + "description": "The subtotal.", + "title": "Subtotal" + }, + "tax_total": { + "type": "number", + "format": "double", + "description": "The tax total.", + "title": "Tax Total" + }, + "total": { + "type": "number", + "format": "double", + "description": "The total.", + "title": "Total" + }, + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Name" + }, + "tax_amount": { + "type": "number", + "format": "double", + "description": "The tax amount.", + "title": "Amount" + } + } + }, + "title": "Tax" + }, + "payment_reminder_enabled": { + "type": "boolean", + "description": "Whether payment reminder is enabled.", + "title": "Payment Reminder Enabled" + }, + "payment_made": { + "type": "number", + "format": "double", + "description": "The payment made.", + "title": "Payment Made" + }, + "credits_applied": { + "type": "number", + "format": "double", + "description": "The credits applied.", + "title": "Credits Applied" + }, + "tax_amount_withheld": { + "type": "number", + "format": "double", + "description": "The tax amount withheld.", + "title": "Tax Amount Withheld" + }, + "balance": { + "type": "number", + "format": "double", + "description": "The balance.", + "title": "Balance" + }, + "write_off_amount": { + "type": "number", + "format": "double", + "description": "The write off amount.", + "title": "Write Off Amount" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "price_precision": { + "type": "integer", + "format": "int32", + "description": "The price precision.", + "title": "Price Precision" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The gateway name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment Option" + }, + "is_emailed": { + "type": "boolean", + "description": "Whether has been emailed.", + "title": "Is Emailed" + }, + "reminders_sent": { + "type": "integer", + "format": "int32", + "description": "The number of reminders sent.", + "title": "Reminders Sent" + }, + "last_reminder_sent_date": { + "type": "string", + "description": "The last reminder sent date.", + "title": "Last Reminder Sent Date" + }, + "billing_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Billing" + }, + "shipping_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address.", + "title": "Address" + }, + "city": { + "type": "string", + "description": "The city.", + "title": "City" + }, + "state": { + "type": "string", + "description": "The state.", + "title": "State" + }, + "zip": { + "type": "string", + "description": "The zip code.", + "title": "Zip" + }, + "country": { + "type": "string", + "description": "The country.", + "title": "Country" + }, + "fax": { + "type": "string", + "description": "The fax number.", + "title": "Fax" + } + }, + "title": "Shipping" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customfield_id": { + "type": "string", + "description": "The custom field identifier.", + "title": "ID" + }, + "data_type": { + "type": "string", + "description": "The data type.", + "title": "Data Type" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "The index number.", + "title": "Index" + }, + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "show_on_pdf": { + "type": "boolean", + "description": "Whether to show on PDF.", + "title": "Show On PDF" + }, + "show_in_all_pdf": { + "type": "boolean", + "description": "Whether to show in all PDFs.", + "title": "Show In All PDFs" + }, + "value": { + "type": "number", + "format": "double", + "description": "The custom field value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "template_name": { + "type": "string", + "description": "The template name.", + "title": "Template Name" + }, + "created_time": { + "type": "string", + "description": "The created time.", + "title": "Created Time" + }, + "last_modified_time": { + "type": "string", + "description": "The last modified time.", + "title": "Last Modified Time" + }, + "attachment_name": { + "type": "string", + "description": "The attachment name.", + "title": "Attachment Name" + }, + "can_send_in_mail": { + "type": "boolean", + "description": "Whether can send in mail.", + "title": "Can Send In Mail" + }, + "salesperson_id": { + "type": "string", + "description": "The salesperson identifier.", + "title": "Salesperson ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson's name.", + "title": "Salesperson Name" + }, + "invoice_url": { + "type": "string", + "description": "The invoice URL address.", + "title": "URL" + } + }, + "title": "Invoice" + } + } + } + } + }, + "summary": "Update an invoice", + "description": "Update an existing invoice. To delete a line item just remove it from the line_items list.", + "operationId": "InvoicePut", + "parameters": [ + { + "name": "invoice_id", + "in": "path", + "x-ms-summary": "Invoice Identifier", + "x-ms-url-encoding": "single", + "description": "The invoice identifier.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "customer_id": { + "type": "string", + "description": "The customer identifier.", + "title": "Customer ID" + }, + "contact_persons": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The contact person.", + "title": "Contact Person" + }, + "invoice_number": { + "type": "string", + "description": "The invoice number.", + "title": "Invoice Number" + }, + "reference_number": { + "type": "string", + "description": "The reference number.", + "title": "Reference Number" + }, + "place_of_supply": { + "type": "string", + "description": "The place of supply.", + "title": "Place Of Supply" + }, + "vat_treatment": { + "type": "string", + "description": "The VAT treatment.", + "title": "Vat Treatment" + }, + "gst_treatment": { + "type": "string", + "description": "The GST treatment.", + "title": "GST Treatment" + }, + "tax_treatment": { + "type": "string", + "description": "The tax treatment.", + "title": "Tax Treatment" + }, + "cfdi_usage": { + "type": "string", + "description": "The CFDI usage.", + "title": "CFDI Usage" + }, + "gst_no": { + "type": "string", + "description": "The GST number.", + "title": "GST Number" + }, + "template_id": { + "type": "string", + "description": "The template identifier.", + "title": "Template ID" + }, + "date": { + "type": "string", + "description": "The date.", + "title": "Date" + }, + "payment_terms": { + "type": "integer", + "format": "int32", + "description": "The payment terms.", + "title": "Payment Terms" + }, + "payment_terms_label": { + "type": "string", + "description": "The payment terms label.", + "title": "Payment Terms Label" + }, + "due_date": { + "type": "string", + "description": "The due date.", + "title": "Due Date" + }, + "discount": { + "type": "number", + "format": "float", + "description": "The discount.", + "title": "Discount" + }, + "is_discount_before_tax": { + "type": "boolean", + "description": "Whether discount is before tax.", + "title": "Is Discount Before Tax" + }, + "discount_type": { + "type": "string", + "description": "The discount type.", + "title": "Discount Type" + }, + "is_inclusive_tax": { + "type": "boolean", + "description": "Whether is inclusive of tax.", + "title": "Is Inclusive Tax" + }, + "exchange_rate": { + "type": "number", + "format": "float", + "description": "The exchange rate.", + "title": "Exchange Rate" + }, + "recurring_invoice_id": { + "type": "string", + "description": "The recurring invoice identifier.", + "title": "Recurring Invoice ID" + }, + "invoiced_estimate_id": { + "type": "string", + "description": "The invoiced estimate identifier.", + "title": "Invoiced Estimate ID" + }, + "salesperson_name": { + "type": "string", + "description": "The salesperson name.", + "title": "Salesperson Name" + }, + "custom_fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label.", + "title": "Label" + }, + "value": { + "type": "number", + "format": "float", + "description": "The value.", + "title": "Value" + } + } + }, + "title": "Custom Field" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "line_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "item_id": { + "type": "string", + "description": "The item identifier.", + "title": "ID" + }, + "project_id": { + "type": "string", + "description": "The project identifier.", + "title": "Project ID" + }, + "time_entry_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The time entry identifiers.", + "title": "Time Entry IDs" + }, + "expense_id": { + "type": "string", + "description": "The expense identifier.", + "title": "Expense ID" + }, + "name": { + "type": "string", + "description": "The name.", + "title": "Name" + }, + "product_type": { + "type": "string", + "description": "The product type.", + "title": "Product Type" + }, + "hsn_or_sac": { + "type": "integer", + "format": "int32", + "description": "The HSN or SAC number.", + "title": "HSN Or SAC" + }, + "sat_item_key_code": { + "type": "integer", + "format": "int32", + "description": "The SAT item key code.", + "title": "SAT Item Key Code" + }, + "unitkey_code": { + "type": "string", + "description": "The unit key code.", + "title": "Unit Key Code" + }, + "description": { + "type": "string", + "description": "The description.", + "title": "Description" + }, + "item_order": { + "type": "integer", + "format": "int32", + "description": "The item order.", + "title": "Order" + }, + "rate": { + "type": "number", + "format": "float", + "description": "The rate.", + "title": "Rate" + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The quantity.", + "title": "Quantity" + }, + "unit": { + "type": "string", + "description": "The unit.", + "title": "Unit" + }, + "discount": { + "type": "number", + "format": "float", + "description": "The discount.", + "title": "Discount" + }, + "tax_id": { + "type": "string", + "description": "The tax identifier.", + "title": "Tax ID" + }, + "tds_tax_id": { + "type": "string", + "description": "The TDS tax identifier.", + "title": "TDS Tax ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt No" + }, + "tax_name": { + "type": "string", + "description": "The tax name.", + "title": "Tax Name" + }, + "tax_type": { + "type": "string", + "description": "The tax type.", + "title": "Tax Type" + }, + "tax_percentage": { + "type": "number", + "format": "float", + "description": "The tax percentage.", + "title": "Tax Percentage" + }, + "item_total": { + "type": "number", + "format": "float", + "description": "The item total.", + "title": "Total" + } + } + }, + "title": "Line Items" + }, + "payment_options": { + "type": "object", + "properties": { + "payment_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "configured": { + "type": "boolean", + "description": "Whether configured.", + "title": "Configured" + }, + "additional_field1": { + "type": "string", + "description": "The additional field.", + "title": "Additional Field" + }, + "gateway_name": { + "type": "string", + "description": "The name.", + "title": "Name" + } + } + }, + "title": "Gateway" + } + }, + "title": "Payment" + }, + "allow_partial_payments": { + "type": "boolean", + "description": "Whether to allow partial payments.", + "title": "Allow Partial Payments" + }, + "custom_body": { + "type": "string", + "description": "The custom body.", + "title": "Custom Body" + }, + "custom_subject": { + "type": "string", + "description": "The custom subject.", + "title": "Custom Subject" + }, + "notes": { + "type": "string", + "description": "The notes.", + "title": "Notes" + }, + "terms": { + "type": "string", + "description": "The terms.", + "title": "Terms" + }, + "shipping_charge": { + "type": "number", + "format": "float", + "description": "The shipping charge.", + "title": "Shipping Charge" + }, + "adjustment": { + "type": "number", + "format": "float", + "description": "The adjustment.", + "title": "Adjustment" + }, + "adjustment_description": { + "type": "string", + "description": "The adjustment description.", + "title": "Adjustment Description" + }, + "reason": { + "type": "string", + "description": "The reason.", + "title": "Reason" + }, + "tax_authority_id": { + "type": "string", + "description": "The tax authority identifier.", + "title": "Tax Authority ID" + }, + "tax_exemption_id": { + "type": "string", + "description": "The tax exemption identifier.", + "title": "Tax Exemption ID" + }, + "avatax_use_code": { + "type": "string", + "description": "The AvaTax use code.", + "title": "AvaTax Use Code" + }, + "avatax_tax_code": { + "type": "string", + "description": "The AvaTax tax code.", + "title": "AvaTax Tax Code" + }, + "avatax_exempt_no": { + "type": "string", + "description": "The AvaTax exempt number.", + "title": "AvaTax Exempt Number" + } + } + } + } + ] + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "basic-auth": { + "type": "basic" + } + }, + "security": [ + { + "basic-auth": [] + } + ], + "tags": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://www.zoho.com/us/invoice/" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://www.zoho.com/privacy.html" + }, + { + "propertyName": "Categories", + "propertyValue": "Finance;Sales and CRM" + } + ] +} diff --git a/independent-publisher-connectors/Zoho Invoice Basic/apiProperties.json b/independent-publisher-connectors/Zoho Invoice Basic/apiProperties.json new file mode 100644 index 0000000000..2daff69242 --- /dev/null +++ b/independent-publisher-connectors/Zoho Invoice Basic/apiProperties.json @@ -0,0 +1,62 @@ +{ + "properties": { + "connectionParameters": { + "ZohoOrgID": { + "type": "string", + "uiDefinition": { + "displayName": "Zoho Organization ID", + "description": "The Zoho organization identifier for this api", + "tooltip": "Provide the Zoho Organization ID", + "constraints": { + "tabIndex": 2, + "clearText": true, + "required": "true" + } + } + }, + "username": { + "type": "string", + "uiDefinition": { + "displayName": "Client ID", + "description": "The Client ID for this api", + "tooltip": "Provide the Client ID", + "constraints": { + "tabIndex": 3, + "clearText": true, + "required": "true" + } + } + }, + "password": { + "type": "securestring", + "uiDefinition": { + "displayName": "Client Secret", + "description": "The Client Secret for this api", + "tooltip": "Provide the Client Secret", + "constraints": { + "tabIndex": 4, + "clearText": false, + "required": "true" + } + } + } + }, + "iconBrandColor": "#da3b01", + "scriptOperations": [], + "capabilities": [], + "policyTemplateInstances": [ + { + "templateId": "setheader", + "title": "Set ZohoOrgID", + "parameters": { + "x-ms-apimTemplateParameter.name": "X-com-zoho-invoice-organizationid", + "x-ms-apimTemplateParameter.value": "@connectionParameters('ZohoOrgID')", + "x-ms-apimTemplateParameter.existsAction": "override", + "x-ms-apimTemplate-policySection": "Request" + } + } + ], + "publisher": "Troy Taylor", + "stackOwner": "Zoho" + } +} \ No newline at end of file diff --git a/independent-publisher-connectors/Zoho Invoice Basic/readme.md b/independent-publisher-connectors/Zoho Invoice Basic/readme.md new file mode 100644 index 0000000000..7de7c170ef --- /dev/null +++ b/independent-publisher-connectors/Zoho Invoice Basic/readme.md @@ -0,0 +1,35 @@ +# Zoho Invoice Basic +Customize and create professional invoices, and get paid for your hard work. Zoho Invoice is online invoice management software for small businesses that is easy-to-use and completely free, forever. + +## Publisher: Troy Taylor, Hitachi Solutions + +## Prerequisites +You need to have a registered organization with Zoho. + +## Obtaining Credentials +Once you have created an organization, create a Self Client from the [Zoho API Console](https://api-console.zoho.com/). This will create a Client ID and Client Password to be used with the connector. + +## Supported Operations +### Get contacts +Retrieve a list of all contacts with pagination. +### Create a contact +Creates a new contact. +### Get a contact +Retrieve the details of an existing contact. +### Delete a contact +Deletes an existing contact. +### Update a contact +Updates an existing contact. +### Get invoices +Retrieve a list of invoices with pagination. +### Create an invoice +Creates an invoice for a customer. +### Get an invoice +Retrieve the details of an invoice. +### Delete an invoice +Deletes an existing invoice. Invoices which have payment or credits note applied cannot be deleted. +### Update an invoice +Update an existing invoice. To delete a line item just remove it from the line items list. + +## Known Issues and Limitations +There are no known issues at this time. diff --git a/independent-publisher-connectors/Zoho Invoice Basic/script.csx b/independent-publisher-connectors/Zoho Invoice Basic/script.csx new file mode 100644 index 0000000000..66abe5b6cc --- /dev/null +++ b/independent-publisher-connectors/Zoho Invoice Basic/script.csx @@ -0,0 +1,120 @@ +public class Script : ScriptBase +{ + public override async Task ExecuteAsync() + { + var _logger = this.Context.Logger; + + // Set the authentication URL + string authURL = "https://accounts.zoho.com/oauth/v2/token"; + + // Get the Client ID and Client Secret from the Basic Authentication header + if (!this.Context.Request.Headers.TryGetValues("Authorization", out var authHeaders)) + { + _logger.LogError("Authorization header is missing."); + return new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new StringContent("Authorization header is missing.") + }; + } + + var authorizationHeader = authHeaders.First(); + var credentials = authorizationHeader.Split(' ')[1]; + var decodedCredentials = Encoding.UTF8.GetString(Convert.FromBase64String(credentials)); + var CLIENT_ID = decodedCredentials.Split(':')[0]; + var CLIENT_SECRET = decodedCredentials.Split(':')[1]; + + // Get the organization ID + if (!this.Context.Request.Headers.TryGetValues("X-com-zoho-invoice-organizationid", out var orgHeaders)) + { + _logger.LogError("X-com-zoho-invoice-organizationid header is missing."); + return new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new StringContent("X-com-zoho-invoice-organizationid header is missing.") + }; + } + + var zohoInvoiceOrgId = "org" + orgHeaders.First(); + + // Construct the query string manually + var queryString = $"grant_type=client_credentials&client_id={Uri.EscapeDataString(CLIENT_ID)}&client_secret={Uri.EscapeDataString(CLIENT_SECRET)}&scope=ZohoInvoice.fullaccess.all&soid=ZohoInvoice.{Uri.EscapeDataString(zohoInvoiceOrgId)}"; + _logger.LogInformation("Constructed query string: {0}", queryString); + + Uri authUrl = new Uri($"{authURL}?{queryString}"); + _logger.LogInformation("Constructed URL: {0}", authUrl); + + HttpRequestMessage authRequest = new HttpRequestMessage(HttpMethod.Post, authUrl); + _logger.LogInformation("Sending request: Method: {0}, Uri: {1}", authRequest.Method, authRequest.RequestUri); + + HttpResponseMessage authResponse = await this.Context.SendAsync(authRequest, this.CancellationToken); + _logger.LogInformation("Response: StatusCode: {0}, ReasonPhrase: {1}", authResponse.StatusCode, authResponse.ReasonPhrase); + + // Check if the response content is empty + var responseString = await authResponse.Content.ReadAsStringAsync(); + if (string.IsNullOrWhiteSpace(responseString)) + { + _logger.LogError("The response content is empty."); + return new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new StringContent("The response content is empty.") + }; + } + + // Parse the JSON response + JObject jsonResponse; + try + { + jsonResponse = JObject.Parse(responseString); + } + catch (JsonReaderException ex) + { + _logger.LogError("Error parsing JSON response: {0}", ex.Message); + return new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new StringContent("Error parsing JSON response.") + }; + } + + if (!jsonResponse.TryGetValue("access_token", out JToken accessToken)) + { + _logger.LogError("Access token not found in the response."); + return new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new StringContent("Access token not found in the response.") + }; + } + + var ACCESS_TOKEN = accessToken.ToString(); + _logger.LogInformation("Access token retrieved: {0}", ACCESS_TOKEN); + + // Set JWT token + var newAuthHeader = "Zoho-oauthtoken " + ACCESS_TOKEN; + this.Context.Request.Headers.Authorization = AuthenticationHeaderValue.Parse(newAuthHeader); + _logger.LogInformation("New Authorization header set: {0}", newAuthHeader); + + // Remove the X-com-zoho-invoice-organizationid header before sending the action request + if (this.Context.Request.Headers.Contains("X-com-zoho-invoice-organizationid")) + { + this.Context.Request.Headers.Remove("X-com-zoho-invoice-organizationid"); + _logger.LogInformation("Removed header: X-com-zoho-invoice-organizationid"); + } + + // Remove the Origin header before sending the action request + if (this.Context.Request.Headers.Contains("Origin")) + { + this.Context.Request.Headers.Remove("Origin"); + _logger.LogInformation("Removed header: Origin"); + } + + // Log the headers of the action request + _logger.LogInformation("Action Request: Method: {0}, Uri: {1}", this.Context.Request.Method, this.Context.Request.RequestUri); + foreach (var header in this.Context.Request.Headers) + { + _logger.LogInformation("Action Request Header: {0}: {1}", header.Key, string.Join(", ", header.Value)); + } + + // Send action request + var actionResponse = await this.Context.SendAsync(this.Context.Request, this.CancellationToken); + + return actionResponse; + } +} \ No newline at end of file